Skip to content

Commit

Permalink
Fix gtk messageboxes, copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
elizagamedev committed Jun 19, 2020
1 parent 3f7ba6a commit 868b874
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 3 deletions.
13 changes: 13 additions & 0 deletions assets/AppRun
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
temp_gdk_loaders_cache="$(mktemp)"
function atexit {
[ -n "$temp_gdk_loaders_cache" ] && rm -f "$temp_gdk_loaders_cache"
}
trap atexit EXIT

appdir_lib_escaped="$(printf '%s\n' "$APPDIR/usr/lib" | sed -e 's/[\/&]/\\&/g')"
sed "s,%RETARGET%,$appdir_lib_escaped," \
"$APPDIR/usr/lib/loaders.cache" > "$temp_gdk_loaders_cache"
export GDK_PIXBUF_MODULE_FILE="$temp_gdk_loaders_cache"

"$APPDIR/usr/bin/oneshot"
43 changes: 40 additions & 3 deletions make-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

LINUXDEPLOY=linuxdeploy-x86_64.AppImage
APPIMAGETOOL=appimagetool-x86_64.AppImage
GDK_LOADERS_PATH=/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0

if [ $# -lt 6 ]; then
echo "usage: make-appimage.sh SOURCE_PATH CONAN_INSTALL_PATH GAME_PATH EXTRA_UNIX_CONTENT_PATH JOURNAL_FILE APPIMAGE_FILE"
Expand All @@ -24,20 +25,56 @@ trap atexit EXIT

$LINUXDEPLOY -e "$conan_install_path/bin/oneshot" \
-l "$conan_install_path/lib/libruby.so.2.5.3" \
-l "$GDK_LOADERS_PATH/loaders/io-wmf.so" \
-l "$GDK_LOADERS_PATH/loaders/libpixbufloader-bmp.so" \
-l "$GDK_LOADERS_PATH/loaders/libpixbufloader-icns.so" \
-l "$GDK_LOADERS_PATH/loaders/libpixbufloader-jpeg.so" \
-l "$GDK_LOADERS_PATH/loaders/libpixbufloader-pnm.so" \
-l "$GDK_LOADERS_PATH/loaders/libpixbufloader-svg.so" \
-l "$GDK_LOADERS_PATH/loaders/libpixbufloader-tiff.so" \
-l "$GDK_LOADERS_PATH/loaders/libpixbufloader-xpm.so" \
-l "$GDK_LOADERS_PATH/loaders/libpixbufloader-ani.so" \
-l "$GDK_LOADERS_PATH/loaders/libpixbufloader-gif.so" \
-l "$GDK_LOADERS_PATH/loaders/libpixbufloader-ico.so" \
-l "$GDK_LOADERS_PATH/loaders/libpixbufloader-png.so" \
-l "$GDK_LOADERS_PATH/loaders/libpixbufloader-qtif.so" \
-l "$GDK_LOADERS_PATH/loaders/libpixbufloader-tga.so" \
-l "$GDK_LOADERS_PATH/loaders/libpixbufloader-xbm.so" \
-i "$source_path/assets/oneshot.png" \
-d "$source_path/assets/oneshot.desktop" \
--custom-apprun="$source_path/assets/AppRun" \
--appdir "$appdir"

# Bundle game data
cp -af "$journal_file" "$appdir/usr/bin/_______"
cp -af "$source_path/assets/journal.png" "$appdir/usr/bin/_______.png"
for dir in Audio Data Fonts Graphics Languages Wallpaper testing_saves testing_saves_postgame; do
cp -ra "$game_path/$dir" "$appdir/usr/bin/"
[ -d "$game_path/$dir/" ] && rsync -a "$game_path/$dir" "$appdir/usr/bin/"
[ -d "$unix_content_path/$dir/" ] && rsync -a "$unix_content_path/$dir/" "$appdir/usr/bin/$dir/"
done
find "$appdir/usr/bin" \( -iname '*.bmp' -o -iname 'thumbs.db' -o -iname '*.ini' \) -delete
# GDK pixbuf retarget nonsense
sed "s,$GDK_LOADERS_PATH/loaders/,%RETARGET%/," \
"$GDK_LOADERS_PATH/loaders.cache" > "$appdir/usr/lib/loaders.cache"
# Delete some files
find "$appdir/usr/bin" -type f \( \
-iname '*.bmp' -o \
-iname 'thumbs.db' -o \
-iname '*.ini' -o \
-iname '*conflicted*' \) \
-delete
# copyright :(
find "$appdir/usr/bin" \( -iname '*.loc' -a \! -iname 'en.loc' \) -delete
find "$appdir/usr/bin" -type f \( -iname '*.loc' -a \! -iname 'en.loc' \) -delete
# more copyright :(
find "$appdir/usr/bin" -type d \( \
-iname 'es' -o \
-iname 'fr' -o \
-iname 'ja' -o \
-iname 'ko' -o \
-iname 'pt_BR' -o \
-iname 'zh_CN' \) \
-exec rm -rf {} +
# International fonts are now taking up space
find "$appdir/usr/bin/Fonts" -type f \! -iname 'TerminusTTF-Bold.ttf' -delete
cp -af "$conan_install_path/bin/Data/xScripts.rxdata" "$appdir/usr/bin/Data/"

# Create AppImage
Expand Down

0 comments on commit 868b874

Please sign in to comment.