Project

General

Profile

Feature #575 » 0029-build_appimages.sh-Functionalize-client-AppImage-bui.patch

S3_1 - Marko Lindqvist, 05/09/2024 03:59 PM

View differences:

platforms/appimage/build_appimages.sh
exit 1
fi
client_appimage() {
if ! mkdir "AppDir/$1" || ! mkdir "build/gtk4" ; then
echo "Failed to create $1 directories!" >&2
return 1
fi
cd "build/$1"
if ! meson setup -Dack_experimental=true -Dappimage=true -Dprefix=/usr -Ddefault_library=static \
-Dclients=$1 -Dfcmp=[] -Druledit=false "${SRC_ROOT}"
then
echo "$1 setup with meson failed!" >&2
return 1
fi
if ! DESTDIR="${BUILD_ROOT}/AppDir/$1" ninja install ; then
echo "$1 build with ninja failed!" >&2
return 1
fi
cd "${BUILD_ROOT}"
if ! tools/linuxdeploy-x86_64.AppImage --appdir "AppDir/$1" --output appimage
then
echo "$1 image build with linuxdeploy failed!" >&2
return 1
fi
if ! mv Freeciv-x86_64.AppImage "Freeciv-$1-x86_64.AppImage" ; then
echo "$1 appimage rename failed!" >&2
return 1
fi
}
if ! mkdir tools ||
! mkdir -p AppDir/server ||
! mkdir AppDir/gtk4 ||
! mkdir -p build/server ||
! mkdir build/gtk4
! mkdir -p build/server
then
echo "Failed to create required directories!" >&2
echo "Failed to create server directories!" >&2
exit 1
fi
......
exit 1
fi
cd build/gtk4
if ! meson setup -Dack_experimental=true -Dappimage=true -Dprefix=/usr -Ddefault_library=static \
-Dclients=gtk4 -Dfcmp=[] -Druledit=false "${SRC_ROOT}"
then
echo "Gtk4-client setup with meson failed!" >&2
exit 1
fi
if ! DESTDIR="${BUILD_ROOT}/AppDir/gtk4" ninja install ; then
echo "Gtk4-client build with ninja failed!" >&2
exit 1
fi
cd "${BUILD_ROOT}"
if ! tools/linuxdeploy-x86_64.AppImage --appdir AppDir/gtk4 --output appimage
then
echo "Gtk4-client image build with linuxdeploy failed!" >&2
exit 1
fi
if ! mv Freeciv-x86_64.AppImage Freeciv-gtk4-x86_64.AppImage ; then
echo "gtk4-client appimage rename failed!" >&2
if ! client_appimage gtk4 ; then
exit 1
fi
(2-2/4)