1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-25 14:05:41 -05:00

Make the macOS bundle compatible osx 10.12

On macOS 10.12.6, running `make app` creates a bundle that refuses to
start (it complains application is only compatible with more recent
versions of macOS). The binary works great when running it directly.

To resolve this, the `MACOSX_DEPLOYMENT_TARGET` environment
variable is now set automatically from the makefile. This allows
building on macOS 10.12 and earlier, without negatively impacting the
later versions of macOS.
This commit is contained in:
Matthias Bussonnier 2018-10-02 18:38:03 -07:00 committed by Christian Duerr
parent b22999f1e7
commit 24533d2c5d

View file

@ -8,6 +8,8 @@ APP_DIR = $(RELEASE_DIR)/osx
APP_BINARY = $(RELEASE_DIR)/$(TARGET) APP_BINARY = $(RELEASE_DIR)/$(TARGET)
APP_BINARY_DIR = $(APP_DIR)/$(APP_NAME)/Contents/MacOS APP_BINARY_DIR = $(APP_DIR)/$(APP_NAME)/Contents/MacOS
export MACOSX_DEPLOYMENT_TARGET = $(shell defaults read loginwindow SystemVersionStampAsString)
DMG_NAME = Alacritty.dmg DMG_NAME = Alacritty.dmg
DMG_DIR = $(RELEASE_DIR)/osx DMG_DIR = $(RELEASE_DIR)/osx
@ -22,6 +24,9 @@ help: ## Prints help for targets with comments
binary: | $(TARGET) ## Build release binary with cargo binary: | $(TARGET) ## Build release binary with cargo
$(TARGET): $(TARGET):
ifneq ( "${MACOSX_DEPLOYMENT_TARGET}" , "")
@echo MACOSX_DEPLOYMENT_TARGET=$${MACOSX_DEPLOYMENT_TARGET}
endif
cargo build --release cargo build --release
app: | $(APP_NAME) ## Clone Alacritty.app template and mount binary app: | $(APP_NAME) ## Clone Alacritty.app template and mount binary