BACKENDS: ATARI: Handle themes in installation script

- "fat" version uses repacked (zip -0) archives; also separate "data"
  and "themes" folders
- "slim" version doesn't use any external themes (for speed reasons)
This commit is contained in:
Miro Kropacek 2023-05-10 23:53:26 +02:00
parent c66b66664b
commit a6a5b8ab42
4 changed files with 25 additions and 7 deletions

View File

@ -57,11 +57,10 @@ AtariGraphicsManager::AtariGraphicsManager() {
if (!ConfMan.hasKey("gui_theme"))
ConfMan.set("gui_theme", "builtin");
// make "data" the default theme path (defining DATA_PATH as "data"
// is forbidden, it must be an absolute path, see bug #14174)
ConfMan.registerDefault("themepath", "data");
// make "themes" the default theme path
ConfMan.registerDefault("themepath", "themes");
if (!ConfMan.hasKey("themepath"))
ConfMan.set("themepath", "data");
ConfMan.set("themepath", "themes");
ConfMan.flushToDisk();

View File

@ -33,3 +33,17 @@ fi
make -j 16
rm -rf dist-generic
make dist-generic
# move themes into 'themes' folder (with compression level zero for faster depacking)
mkdir -p dist-generic/scummvm/themes
cd dist-generic/scummvm/themes
(
for f in ../data/*.zip
do
unzip -d tmp "$f" && cd tmp && zip -0 ../$(basename "$f") * && cd .. && rm -r tmp && rm "$f"
done
)
cd -
# readme.txt
cp ../backends/platform/atari/readme.txt dist-generic/scummvm

View File

@ -34,3 +34,9 @@ fi
make -j 16
rm -rf dist-generic
make dist-generic
# remove themes
rm -f dist-generic/scummvm/data/*.zip
# readme.txt
cp ../backends/platform/atari/readme.txt dist-generic/scummvm

View File

@ -279,9 +279,8 @@ Slow GUI
Themes handling is quite slow - each theme must be depacked, each one contains
quite a few XML files to parse and quite a few images to load/convert. That's
the reason why the built-in one is used as default, it dramatically speeds up
loading time. A compromise solution is to depack the theme in an equally named
directory (i.e. avoiding the depacking phase) but you need a filesystem with
long name support for that to work.
loading time. To speed things up in other cases, the "fat" version is
distributed with repackaged theme files with compression level zero.
Known issues