News:

Want to praise Simutrans?
Your feedback is important for us ;D.

Building themes script is broken (build_themes.sh)

Started by m.vanderwulp, January 29, 2025, 06:21:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

m.vanderwulp

The script to build themes is broken.
This is "build_themes.sh".
In line 45 it says:
cd ../pak64german/filesBut that folder does not exist - it is named "files_large".
So, the script fails.

I am trying to use this script to build the theme pak files, which are missing in the "simutrans-src-124-3.zip".

This to provide simutrans in the OpenSuse repositories.

Andarix

#1
There are files and files_large. pak64german contains 2 themes.

line 50 is wrong

cd ../file-large
its a _ not a -

[EDIT]

fixed in 11621

m.vanderwulp

Thank you very much for the help.

But I was using the source from the "simutrans-src-124-3.zip" retrieved from sourceforge, and that one doesn't contain the "/pak64german/files" folder...

Hmm, I am stuck here.
I'll have to figure out what is missing from this zip file, compared to the previous version.

The current simutrans in the OpenSuse repos does not start with this error: "FATAL ERROR: gui_theme_t::init_gui_themes - Wrong theme loaded".

See https://build.opensuse.org/package/show/games/simutrans

Andarix

#3
The png and dat files are missing from all themes.

My recommendation is to take the folder from SVN and copy it into the simutrans-src-124-3.zip file.



The error was in zipsrc.sh. There the file list for the themes was overwritten by the next file list because the parameter name was the same.

fixed in r11622

Index: tools/zipsrc.sh
===================================================================
--- tools/zipsrc.sh    (Revision 11621)
+++ tools/zipsrc.sh    (Revision 11622)
@@ -6,7 +6,7 @@
    FILELISTE=`find . -type f "(" -name "*.c" -o -name "*.h" -o -name "*.cc" -o -name "*.mm" ")" -not -path */.vs/* -not -path */vcpkg_installed/*`
    FILELISTF=`find . -type f "(" -name "*.sh" -o -name "*.mk"  -o -name "*.nut" ")" -not -path */.vs/* -not -path */vcpkg_installed/*`
    FILELISTG=`find . -type f "(" -name "*.txt" -o -name "*.bdf"  -o -name "*.fnt"  -o -name "*.mid"  -o -name "*.tab" ")" -not -path */.vs/* -not -path */vcpkg_installed/*`
-    FILELISTI=`find . -type f "(" -name "*.tab" -o -name "*.dat"  -o -name "*.png" -o -name "*.svg" -o -name "*.desktop" ")" -not -path */.vs/* -not -path */vcpkg_installed/*`
+    FILELISTH=`find . -type f "(" -name "*.tab" -o -name "*.dat"  -o -name "*.png" -o -name "*.svg" -o -name "*.desktop" ")" -not -path */.vs/* -not -path */vcpkg_installed/*`
    FILELISTI=`find . -type f "(" -name "*.vcxproj" -o -name "*.vcxproj.filters"  -o -name "*.sln" -o -name "*.vcxitems" -o -name "*.json" ")" -not -path */.vs/* -not -path */vcpkg_installed/*`
    rm ../simutrans-src.zip
    zip ../simutrans-src.zip $FILELISTE

m.vanderwulp

Thanks, I took the themes.src folder out of the SVN, and copied it in my zip file.

Still the line of code above is not correct, so I patched the themes build script with this:

sed -i 's|cd ../file_large|cd ../files_large|g' build_themes.sh

Andarix

sorry, I missed the missing s

fixed in r11629