Skip to content

Commit 15c4141

Browse files
always use newest appimagetool version (scp-fs2open#7468)
This will download the appimagetool utility as part of the install step so that the newest version of both the tool and the runtime is always used. Moving it out of the build image allows us to take advantage of newer capabilities, such as no longer having an external dependency on libfuse2.
1 parent 295291e commit 15c4141

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

ci/linux/generate_appimage.sh

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,37 @@
22

33
INSTALL_FOLDER=$1
44

5+
# safety check
6+
if [ ! -d bin -o ! -f cmake_install.cmake ]; then
7+
echo "ERROR! This script must be run from within the build root!"
8+
exit 1
9+
fi
10+
11+
if [ ! -x "$(which wget)" ]; then
12+
echo "ERROR! Required utility is not available: wget"
13+
exit 1
14+
fi
15+
16+
# install newest appimagetool if it's not already available
17+
if [ ! -x ./bin/appimagetool ]; then
18+
APPIMAGE_TOOL_URL="https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$(uname -m).AppImage"
19+
20+
wget -O ./bin/appimagetool "$APPIMAGE_TOOL_URL" || { echo "ERROR! Failed to get appimagetool!" && exit 1; }
21+
chmod +x ./bin/appimagetool
22+
fi
23+
24+
# This shouldn't be needed with newer runtimes, but they still generate an
25+
# error if fusermount is missing even though it works. So to skip error msg
26+
# and have max compatibility with runtimes and containers we'll use it.
27+
export APPIMAGE_EXTRACT_AND_RUN=1
28+
529
# Install Freespace2 targets
630
cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_FOLDER/Freespace2 -DCOMPONENT=Unspecified -P cmake_install.cmake
731
cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_FOLDER/Freespace2 -DCOMPONENT=Freespace2 -P cmake_install.cmake
832

933
# We need to be a bit creative for determining the AppImage name since we don't want to hard-code the name
1034
FILENAME="$(find $INSTALL_FOLDER/Freespace2/bin -name 'fs2_open_*' -type f -printf "%f\n").AppImage"
11-
appimagetool -n "$INSTALL_FOLDER/Freespace2" "$INSTALL_FOLDER/$FILENAME"
35+
./bin/appimagetool -n "$INSTALL_FOLDER/Freespace2" "$INSTALL_FOLDER/$FILENAME"
1236
chmod +x "$INSTALL_FOLDER/$FILENAME"
1337

1438
# Maybe install qtFRED targets
@@ -18,7 +42,7 @@ if [ -f qtfred/cmake_install.cmake ]; then
1842

1943
# We need to be a bit creative for determining the AppImage name since we don't want to hard-code the name
2044
FILENAME="$(find $INSTALL_FOLDER/qtFRED/bin -iname 'qtfred_*' -type f -printf "%f\n").AppImage"
21-
appimagetool -n "$INSTALL_FOLDER/qtFRED" "$INSTALL_FOLDER/$FILENAME"
45+
./bin/appimagetool -n "$INSTALL_FOLDER/qtFRED" "$INSTALL_FOLDER/$FILENAME"
2246
chmod +x "$INSTALL_FOLDER/$FILENAME"
2347
fi
2448

0 commit comments

Comments
 (0)