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

make: improve appimageupdate rule #11669

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ WIN32_DIR=$(PLATFORM_DIR)/win32
APPIMAGETOOL=appimagetool-x86_64.AppImage
APPIMAGETOOL_URL=https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage

# set to 1 if in Docker
DOCKER:=$(shell grep -q docker /proc/1/cgroup 2>/dev/null && echo 1)
# Is fuse support available?
USE_FUSE ?= $(wildcard /dev/fuse)
Copy link
Member

@Frenzie Frenzie Apr 11, 2024

Choose a reason for hiding this comment

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

Fwiw the AppImage docs supply the slightly unaesthetic example of APPIMAGE_EXTRACT_AND_RUN.

Edit: over this way https://docs.appimage.org/user-guide/troubleshooting/fuse.html#extract-and-run-type-2-appimages

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Which they decided against documenting in the --appimage-help output… sigh

Copy link
Member

@Frenzie Frenzie Apr 11, 2024

Choose a reason for hiding this comment

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

D'oh, I completely overlooked the implications (or perhaps rather: simplifications) of the and-run earlier. They added the --appimage-extract-and-run flag sometime in between 2018 and now, and I failed to realize it was a different option than --appimage-extract.

But that aside. Strangely enough https://gitlab.com/koreader/nightly-builds/-/jobs/6606286131 seems to think it does have fuse, which doesn't make sense to me. :-/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Damn. Forget about detection, just use --appimage-extract-and-run unconditionally then, since the performance impact is minimal.


# files to link from main directory
INSTALL_FILES=reader.lua setupkoenv.lua frontend resources defaults.lua datastorage.lua \
Expand Down Expand Up @@ -342,7 +342,7 @@ ifeq ("$(wildcard $(APPIMAGETOOL))","")
wget "$(APPIMAGETOOL_URL)"
chmod a+x "$(APPIMAGETOOL)"
endif
ifeq ($(DOCKER), 1)
ifeq ($(USE_FUSE),)
# remove previously extracted appimagetool, if any
rm -rf squashfs-root
./$(APPIMAGETOOL) --appimage-extract
Expand All @@ -356,7 +356,7 @@ endif

# generate AppImage
cd $(INSTALL_DIR)/tmp && \
ARCH=x86_64 ../../$(if $(DOCKER),squashfs-root/AppRun,$(APPIMAGETOOL)) koreader && \
ARCH=x86_64 ../../$(if $(USE_FUSE),$(APPIMAGETOOL),squashfs-root/AppRun) koreader && \
mv *.AppImage ../../koreader-$(DIST)-$(MACHINE)-$(VERSION).AppImage

androidupdate: all
Expand Down