2
0
mirror of https://github.com/koreader/koreader synced 2024-11-08 07:10:27 +00:00

make: always symlink, even for release builds (faster)

This commit is contained in:
Benoit Pierre 2024-07-31 01:55:34 +02:00 committed by Frans de Jonge
parent d83647d76e
commit 14f105707d
10 changed files with 16 additions and 19 deletions

View File

@ -64,17 +64,14 @@ all: base
ifdef ANDROID
rm -f android-fdroid-version; echo -e "$(ANDROID_NAME)\n$(ANDROID_VERSION)" > koreader-android-fdroid-latest
endif
ifeq ($(IS_RELEASE),1)
bash -O extglob -c '$(RCP) -fL $(OUTPUT_DIR_ARTIFACTS) $(INSTALL_DIR)/koreader/'
else
cp -f $(KOR_BASE)/ev_replay.py $(INSTALL_DIR)/koreader/
@echo "[*] create symlink instead of copying files in development mode"
ifeq (,$(IS_RELEASE))
$(SYMLINK) $(KOR_BASE)/ev_replay.py $(INSTALL_DIR)/koreader/
endif
bash -O extglob -c '$(SYMLINK) $(OUTPUT_DIR_ARTIFACTS) $(INSTALL_DIR)/koreader/'
ifneq (,$(EMULATE_READER))
ifneq (,$(EMULATE_READER))
@echo "[*] install front spec only for the emulator"
$(SYMLINK) spec $(INSTALL_DIR)/koreader/spec/front
$(SYMLINK) test $(INSTALL_DIR)/koreader/spec/front/unit/data
endif
endif
$(SYMLINK) $(INSTALL_FILES) $(INSTALL_DIR)/koreader/
ifdef ANDROID
@ -96,10 +93,10 @@ endif
$(SYMLINK) plugins $(INSTALL_DIR)/koreader/
@echo "[*] Install resources"
$(SYMLINK) resources/fonts/* $(INSTALL_DIR)/koreader/fonts/
install -d $(INSTALL_DIR)/koreader/{screenshots,data/{dict,tessdata},fonts/host,ota}
ifeq ($(IS_RELEASE),1)
install -d $(INSTALL_DIR)/koreader/{screenshots,fonts/host,ota}
ifneq (,$(IS_RELEASE))
@echo "[*] Clean up, remove unused files for releases"
rm -rf $(INSTALL_DIR)/koreader/data/{cr3.ini,cr3skin-format.txt,desktop,devices,manual}
rm -rf $(INSTALL_DIR)/koreader/data/{cr3.ini,desktop,devices,dict,manual,tessdata}
endif
base:

2
base

@ -1 +1 @@
Subproject commit aade35b80ffe07619a462d9bbf7f899a3962ee09
Subproject commit 0d6abcf6113f6d9c0ebd1de2db3bad085f37ed89

View File

@ -29,7 +29,7 @@ update: all
# APK version
echo $(VERSION) > $(ANDROID_ASSETS)/version.txt
# shared libraries are stored as raw assets
cp -pR $(INSTALL_DIR)/koreader/libs $(ANDROID_LAUNCHER_DIR)/assets
cp -pLR $(INSTALL_DIR)/koreader/libs $(ANDROID_LAUNCHER_DIR)/assets
# in runtime luajit-launcher's libluajit.so will be loaded
rm -vf $(ANDROID_LAUNCHER_DIR)/assets/libs/libluajit.so
# binaries are stored as shared libraries to prevent W^X exception on Android 10+

View File

@ -4,7 +4,7 @@ CERVANTES_PACKAGE_OTA = koreader-cervantes$(KODEDUG_SUFFIX)-$(VERSION).targz
update: all
# ensure that the binaries were built for ARM
file $(INSTALL_DIR)/koreader/luajit | grep ARM || exit 1
file --dereference $(INSTALL_DIR)/koreader/luajit | grep ARM || exit 1
# remove old package if any
rm -f $(CERVANTES_PACKAGE)
# Cervantes launching scripts

View File

@ -10,7 +10,7 @@ endif
update: all
# ensure that the binaries were built for ARM
file $(INSTALL_DIR)/koreader/luajit | grep ARM || exit 1
file --dereference $(INSTALL_DIR)/koreader/luajit | grep ARM || exit 1
# remove old package if any
rm -f $(KINDLE_PACKAGE)
# Kindle launching scripts

View File

@ -4,7 +4,7 @@ KOBO_PACKAGE_OTA = koreader-kobo$(KODEDUG_SUFFIX)-$(VERSION).targz
update: all
# ensure that the binaries were built for ARM
file $(INSTALL_DIR)/koreader/luajit | grep ARM || exit 1
file --dereference $(INSTALL_DIR)/koreader/luajit | grep ARM || exit 1
# remove old package if any
rm -f $(KOBO_PACKAGE)
# Kobo launching scripts

View File

@ -4,7 +4,7 @@ PB_PACKAGE_OTA = koreader-pocketbook$(KODEDUG_SUFFIX)-$(VERSION).targz
update: all
# ensure that the binaries were built for ARM
file $(INSTALL_DIR)/koreader/luajit | grep ARM || exit 1
file --dereference $(INSTALL_DIR)/koreader/luajit | grep ARM || exit 1
# remove old package if any
rm -f $(PB_PACKAGE)
# Pocketbook launching scripts

View File

@ -4,7 +4,7 @@ REMARKABLE_PACKAGE_OTA = koreader-remarkable$(KODEDUG_SUFFIX)-$(VERSION).targz
update: all
# ensure that the binaries were built for ARM
file $(INSTALL_DIR)/koreader/luajit | grep ARM || exit 1
file --dereference $(INSTALL_DIR)/koreader/luajit | grep ARM || exit 1
# remove old package if any
rm -f $(REMARKABLE_PACKAGE)
# Remarkable scripts

View File

@ -4,7 +4,7 @@ SONY_PRSTUX_PACKAGE_OTA = koreader-sony-prstux$(KODEDUG_SUFFIX)-$(VERSION).targz
update: all
# ensure that the binaries were built for ARM
file $(INSTALL_DIR)/koreader/luajit | grep ARM || exit 1
file --dereference $(INSTALL_DIR)/koreader/luajit | grep ARM || exit 1
# remove old package if any
rm -f $(SONY_PRSTUX_PACKAGE)
# Sony PRSTUX launching scripts

View File

@ -3,7 +3,7 @@ UBUNTUTOUCH_SDL_DIR = $(UBUNTUTOUCH_DIR)/ubuntu-touch-sdl
update: all
# ensure that the binaries were built for ARM
file $(INSTALL_DIR)/koreader/luajit | grep ARM || exit 1
file --dereference $(INSTALL_DIR)/koreader/luajit | grep ARM || exit 1
# remove old package if any
rm -f koreader-ubuntu-touch-$(MACHINE)-$(VERSION).click
$(SYMLINK) $(UBUNTUTOUCH_DIR)/koreader.sh $(INSTALL_DIR)/koreader/