Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made the AppImage updatable & get rid of libfuse2 dependency #36

Merged
merged 8 commits into from
Feb 1, 2025
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions make-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ sudo DEBIAN_FRONTEND=noninteractive -i sh -c "apt update && apt -y upgrade && \
cmake \
curl \
$CC \
desktop-file-utils \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ivan-hc Why is this needed now?

Copy link
Contributor Author

@ivan-hc ivan-hc Feb 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometime appimagetool require to check if the .desktop file has valid entries, if not to bundle the AppImage fails.

I don't know you, but in my experience I had long workflows failed at the last moment because appigetool was looking for desktop-file-validate in $PATH, so from then I always added this in all my projects.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it sounds like this would be another package that should be added to the linuxdeploy image.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libboost-dev \
libboost-filesystem-dev \
libboost-system-dev \
Expand All @@ -68,7 +69,8 @@ sudo DEBIAN_FRONTEND=noninteractive -i sh -c "apt update && apt -y upgrade && \
patchelf \
python3 \
rustc \
zlib1g-dev"
zlib1g-dev \
zsync"

# needed for spidermonkey build
#export SHELL=/bin/bash
Expand Down Expand Up @@ -209,13 +211,22 @@ linuxdeploy \
--library=/usr/lib/$ARCH-linux-gnu/libthai.so.0 \
--custom-apprun=$WORKSPACE/AppRun \
--appdir $APPDIR \
--output appimage \
--plugin gtk
fi

DATE_STR=$(date +%y%m%d%H%M)
OUT_APPIMAGE="0ad-$VERSION-$DATE_STR-$ARCH.AppImage"
mv 0_A.D.-$VERSION-$ARCH.AppImage $OUT_APPIMAGE

REPO="0ad-appimage"
TAG="latest"
[ -z "$GITHUB_REPOSITORY_OWNER" ] && GITHUB_REPOSITORY_OWNER="0ad-matters"
UPINFO="gh-releases-zsync|$GITHUB_REPOSITORY_OWNER|$REPO|$TAG|*$ARCH.AppImage.zsync"

./appimagetool --appimage-extract-and-run \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
./appimagetool --appimage-extract-and-run \
appimagetool --appimage-extract-and-run \

It's in the PATH, installed to $HOME/.local/bin https://github.com/andy5995/linuxdeploy-build-helper-container/blob/3f70f7b215753306b9474f3d95c777498a0c7186/Dockerfile#L99

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm... failed. Strange that this option isn't available:

2025-02-01T01:46:41.2132353Z appimagetool --appimage-extract-and-run \
2025-02-01T01:46:41.2132703Z 	--comp zstd --mksquashfs-opt -Xcompression-level --mksquashfs-opt 20 \
2025-02-01T01:46:41.2133014Z 	-u "$UPINFO" \
2025-02-01T01:46:41.2133177Z 	"$APPDIR" "$OUT_APPIMAGE"
2025-02-01T01:46:41.2183371Z Option parsing failed: Unknown option --appimage-extract-and-run
2025-02-01T01:46:42.4148172Z ##[error]Process completed with exit code 1.

I'm installing it in the docker image from https://github.com/AppImage/appimagetool

Could we just run that argument from the appimage first?

[andy@prometheus Downloads]$ ./0ad-0.27.0-2501310402-x86_64.AppImage --appimage-help
AppImage options:

  --appimage-extract [<pattern>]  Extract content from embedded filesystem image
                                  If pattern is passed, only extract matching
                                  files
  --appimage-extract-and-run      Temporarily extract content from embedded
                                  filesystem image, run contained application,
                                  then delete temporarily extracted content
  --appimage-help                 Print this help
  --appimage-mount                Mount embedded filesystem image and print
                                  mount point and wait for kill with Ctrl-C
  --appimage-offset               Print byte offset to start of embedded
                                  filesystem image
  --appimage-portable-home        Create a portable home folder to use as $HOME
  --appimage-portable-config      Create a portable config folder to use as
                                  $XDG_CONFIG_HOME
  --appimage-signature            Print digital signature embedded in AppImage
  --appimage-updateinfo[rmation]  Print update info embedded in AppImage
  --appimage-version              Print version of AppImage runtime

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that argument is used widelly in systems without a working FUSE, such as a docker container... I added that flag because before the command was a local file and worked. In this case, we should not need to extract and run the AppImage from $PATH

--comp zstd --mksquashfs-opt -Xcompression-level --mksquashfs-opt 20 \
-u "$UPINFO" \
"$APPDIR" "$OUT_APPIMAGE"

sha1sum $OUT_APPIMAGE > "$OUT_APPIMAGE.sha1sum"
cat "$OUT_APPIMAGE.sha1sum"

Expand Down
Loading