Skip to content

Commit 60b74e4

Browse files
committed
fix: Pin linuxdeploy and plugin versions in create-appimage.sh
- Updated the script to download specific stable versions of linuxdeploy and linuxdeploy-plugin-qt for both x86_64 and aarch64 architectures. - Enhanced output messages to reflect the version being downloaded. - Added verbosity option to the linuxdeploy command for cleaner output during AppImage creation.
1 parent 4fb642b commit 60b74e4

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

create-appimage.sh

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -147,35 +147,39 @@ mkdir -p "$TOOLS_DIR"
147147
# Download linuxdeploy and plugins if they don't exist
148148
echo "Ensuring linuxdeploy tools are available..."
149149

150+
# Pin to specific stable versions
151+
LINUXDEPLOY_VERSION="1-alpha-20250213-2"
152+
LINUXDEPLOY_PLUGIN_QT_VERSION="1-alpha-20250213-1"
153+
150154
# Choose the right linuxdeploy tools based on architecture
151155
if [ "$ARCH" = "x86_64" ]; then
152156
LINUXDEPLOY="$TOOLS_DIR/linuxdeploy-x86_64.AppImage"
153157
LINUXDEPLOY_QT="$TOOLS_DIR/linuxdeploy-plugin-qt-x86_64.AppImage"
154158

155159
if [ ! -f "$LINUXDEPLOY" ]; then
156-
echo "Downloading linuxdeploy for x86_64..."
157-
curl -L -o "$LINUXDEPLOY" "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
160+
echo "Downloading linuxdeploy $LINUXDEPLOY_VERSION for x86_64..."
161+
curl -L -o "$LINUXDEPLOY" "https://github.com/linuxdeploy/linuxdeploy/releases/download/$LINUXDEPLOY_VERSION/linuxdeploy-x86_64.AppImage"
158162
chmod +x "$LINUXDEPLOY"
159163
fi
160164

161165
if [ ! -f "$LINUXDEPLOY_QT" ]; then
162-
echo "Downloading linuxdeploy-plugin-qt for x86_64..."
163-
curl -L -o "$LINUXDEPLOY_QT" "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage"
166+
echo "Downloading linuxdeploy-plugin-qt $LINUXDEPLOY_PLUGIN_QT_VERSION for x86_64..."
167+
curl -L -o "$LINUXDEPLOY_QT" "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/$LINUXDEPLOY_PLUGIN_QT_VERSION/linuxdeploy-plugin-qt-x86_64.AppImage"
164168
chmod +x "$LINUXDEPLOY_QT"
165169
fi
166170
elif [ "$ARCH" = "aarch64" ]; then
167171
LINUXDEPLOY="$TOOLS_DIR/linuxdeploy-aarch64.AppImage"
168172
LINUXDEPLOY_QT="$TOOLS_DIR/linuxdeploy-plugin-qt-aarch64.AppImage"
169173

170174
if [ ! -f "$LINUXDEPLOY" ]; then
171-
echo "Downloading linuxdeploy for aarch64..."
172-
curl -L -o "$LINUXDEPLOY" "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-aarch64.AppImage"
175+
echo "Downloading linuxdeploy $LINUXDEPLOY_VERSION for aarch64..."
176+
curl -L -o "$LINUXDEPLOY" "https://github.com/linuxdeploy/linuxdeploy/releases/download/$LINUXDEPLOY_VERSION/linuxdeploy-aarch64.AppImage"
173177
chmod +x "$LINUXDEPLOY"
174178
fi
175179

176180
if [ ! -f "$LINUXDEPLOY_QT" ]; then
177-
echo "Downloading linuxdeploy-plugin-qt for aarch64..."
178-
curl -L -o "$LINUXDEPLOY_QT" "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-aarch64.AppImage"
181+
echo "Downloading linuxdeploy-plugin-qt $LINUXDEPLOY_PLUGIN_QT_VERSION for aarch64..."
182+
curl -L -o "$LINUXDEPLOY_QT" "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/$LINUXDEPLOY_PLUGIN_QT_VERSION/linuxdeploy-plugin-qt-aarch64.AppImage"
179183
chmod +x "$LINUXDEPLOY_QT"
180184
fi
181185
fi
@@ -247,11 +251,11 @@ export QML_SOURCES_PATHS="$QML_SOURCES_PATH"
247251
export APPIMAGE_EXTRACT_AND_RUN=1
248252
# Set Qt path for linuxdeploy-plugin-qt
249253
export QMAKE="$QT_DIR/bin/qmake"
250-
# Set LD_LIBRARY_PATH to include Qt libraries
254+
# Set library paths to include Qt libraries (both runtime and linker search paths)
251255
export LD_LIBRARY_PATH="$QT_DIR/lib:$LD_LIBRARY_PATH"
252256
# Optimize deployment: exclude translations and unnecessary libraries
253257
export LINUXDEPLOY_PLUGIN_QT_IGNORE_GLOB="*/translations/*"
254-
"$LINUXDEPLOY" --appdir="$APPDIR" --plugin=qt --exclude-library="libwayland-*"
258+
"$LINUXDEPLOY" --appdir="$APPDIR" --plugin=qt --exclude-library="libwayland-*" --verbosity=0
255259

256260
# Hook for removing files before AppImage creation
257261
echo "Pre-packaging hook - opportunity to remove unwanted files"
@@ -298,10 +302,12 @@ echo "Creating AppImage..."
298302
rm -f "$PWD/rpi-imager-desktop-$ARCH.AppImage"
299303
rm -f "$PWD/rpi-imager-$ARCH.AppImage" # Legacy symlink name
300304
# Ensure LD_LIBRARY_PATH is still set for this call too
305+
export LD_LIBRARY_PATH="$QT_DIR/lib:$LD_LIBRARY_PATH"
301306
# Explicitly specify the desktop file to ensure correct naming
302307
"$LINUXDEPLOY" --appdir="$APPDIR" \
303308
--desktop-file="$APPDIR/usr/share/applications/com.raspberrypi.rpi-imager.desktop" \
304-
--output=appimage
309+
--output=appimage \
310+
--verbosity=0
305311

306312
# Rename the output file if needed
307313
# Find and rename the AppImage created by linuxdeploy to our standardized name

0 commit comments

Comments
 (0)