mirror of
https://github.com/koreader/koreader
synced 2024-10-31 21:20:20 +00:00
make: improve appimageupdate
rule
Instead of trying to detect if running under Docker, use a simpler wildcard check to detect if FUSE support is available. This as the advantage of supporting Docker, rootless Docker, and Podman.
This commit is contained in:
parent
0dbfac22b0
commit
5535bdc3ef
8
Makefile
8
Makefile
@ -70,8 +70,8 @@ WIN32_DIR=$(PLATFORM_DIR)/win32
|
|||||||
APPIMAGETOOL=appimagetool-x86_64.AppImage
|
APPIMAGETOOL=appimagetool-x86_64.AppImage
|
||||||
APPIMAGETOOL_URL=https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage
|
APPIMAGETOOL_URL=https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage
|
||||||
|
|
||||||
# set to 1 if in Docker
|
# Is fuse support available?
|
||||||
DOCKER:=$(shell grep -q docker /proc/1/cgroup 2>/dev/null && echo 1)
|
USE_FUSE ?= $(wildcard /dev/fuse)
|
||||||
|
|
||||||
# files to link from main directory
|
# files to link from main directory
|
||||||
INSTALL_FILES=reader.lua setupkoenv.lua frontend resources defaults.lua datastorage.lua \
|
INSTALL_FILES=reader.lua setupkoenv.lua frontend resources defaults.lua datastorage.lua \
|
||||||
@ -342,7 +342,7 @@ ifeq ("$(wildcard $(APPIMAGETOOL))","")
|
|||||||
wget "$(APPIMAGETOOL_URL)"
|
wget "$(APPIMAGETOOL_URL)"
|
||||||
chmod a+x "$(APPIMAGETOOL)"
|
chmod a+x "$(APPIMAGETOOL)"
|
||||||
endif
|
endif
|
||||||
ifeq ($(DOCKER), 1)
|
ifeq ($(USE_FUSE),)
|
||||||
# remove previously extracted appimagetool, if any
|
# remove previously extracted appimagetool, if any
|
||||||
rm -rf squashfs-root
|
rm -rf squashfs-root
|
||||||
./$(APPIMAGETOOL) --appimage-extract
|
./$(APPIMAGETOOL) --appimage-extract
|
||||||
@ -356,7 +356,7 @@ endif
|
|||||||
|
|
||||||
# generate AppImage
|
# generate AppImage
|
||||||
cd $(INSTALL_DIR)/tmp && \
|
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
|
mv *.AppImage ../../koreader-$(DIST)-$(MACHINE)-$(VERSION).AppImage
|
||||||
|
|
||||||
androidupdate: all
|
androidupdate: all
|
||||||
|
Loading…
Reference in New Issue
Block a user