Files
koreader-mirror/make/macos.mk
Benoit Pierre c04023f1d1 make: factorize code for generating release updates (#12655)
Instead of splitting remove / exclusion of unwanted files in 2-3 places
(`all` rule, `update` rule, and update script in some cases), install
the same files in debug & release builds, and exclude unwanted stuff
when generating the update.

This should finally fix the CI issue with OCR tests (since we don't
remove the `data/dict` & `data/tessdata` directories on release build
anymore).
2024-11-23 20:48:37 +01:00

21 lines
776 B
Makefile

MACOS_DIR = $(PLATFORM_DIR)/mac
define UPDATE_PATH_EXCLUDES +=
plugins/SSH.koplugin
plugins/autofrontlight.koplugin
plugins/hello.koplugin
plugins/timesync.koplugin
tools
endef
update: all
mkdir -p $(INSTALL_DIR)/bundle/Contents/{MacOS,Resources}
cp -pv $(MACOS_DIR)/koreader.icns $(INSTALL_DIR)/bundle/Contents/Resources/icon.icns
cd $(INSTALL_DIR)/koreader && '$(abspath tools/mkrelease.sh)' ../bundle/Contents/koreader/ . $(release_excludes)
cp -pv $(MACOS_DIR)/menu.xml $(INSTALL_DIR)/bundle/Contents/MainMenu.xib
ibtool --compile $(INSTALL_DIR)/bundle/Contents/Resources/Base.lproj/MainMenu.nib $(INSTALL_DIR)/bundle/Contents/MainMenu.xib
rm -vf $(INSTALL_DIR)/bundle/Contents/MainMenu.xib
$(CURDIR)/platform/mac/do_mac_bundle.sh $(INSTALL_DIR)
PHONY += update