chkuendig / scummvm-demo

🕹️ ScummVM Web Demo (unofficial)
http://scummvm.kuendig.io/
10 stars 2 forks source link

Fix the building of scummvm icons from git #12

Closed neuromancer closed 2 years ago

neuromancer commented 2 years ago

The use of the checkout action breaks the python script that generates the icon file (it queries the git revision).

neuromancer commented 2 years ago

I think should work if merged (since it is a PR, it won't be able to update your website with my github token).

chkuendig commented 2 years ago

I didn't have time to test this yet, but when I looked at this previously the .dat file generated this way was only a differential file (it lacked all the default symbols included), and overwriting the default file with it didn't work (since the default icons then were missing)

neuromancer commented 2 years ago

If you checked the current action log in main:

Step 2: fetching changed icons using hash b2a20aad85714e0fea510483007e5e96d84225ca
checking local directory is scummvm-icons repo ... done
checking local repo is up to date...done
fatal: Invalid revision range b2a20aad85714e0fea510483007e5e96d84225ca..
fetching file names for commit:b2a20aad85714e0fea510483007e5e96d84225ca ... done
icons (files) changed: 0

On the other side, in this action log, you will see:

Step 2: fetching changed icons using hash b2a20aad85714e0fea510483007e5e96d84225ca
checking local directory is scummvm-icons repo ... done
checking local repo is up to date...done
fetching file names for commit:b2a20aad85714e0fea510483007e5e96d84225ca ... done
icons (files) changed: 231

So this is new code is generating the file correctly (also, I tested it in my branch, you can check the result here: https://neuromancer.github.io/scummvm.html

chkuendig commented 2 years ago

Great, thanks for the clarification. LGTM.

chkuendig commented 2 years ago

FYI: I switched this again and added it to the build.sh in the main repo. The reason being that the regular python script generates "differential" files which should be used in combination with the existing default gui-icons.dat (so the above change still lead to some icons missing afaik)

Since these are just zip files, it's easy to pack this. I added this here: https://github.com/chkuendig/scummvm/blob/0a5c23acb8837b4b6f76b8b9a707b1e0390ea15b/dists/emscripten/build.sh#L339 / https://github.com/chkuendig/scummvm/commit/0a5c23acb8837b4b6f76b8b9a707b1e0390ea15b as I like having a github-independent build system which I can also run locally, instead of having the github action spec to become the build file.