diff options
author | Matthias Bussonnier <bussonniermatthias@gmail.com> | 2018-10-02 18:38:03 -0700 |
---|---|---|
committer | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-10-03 01:38:03 +0000 |
commit | 24533d2c5d86857dbb2f75f171430da7073ce65c (patch) | |
tree | a3234709ea18842102299793494c45904137528e /Makefile | |
parent | b22999f1e7b39c1341caf797a98facb9010f89cf (diff) | |
download | alacritty-24533d2c5d86857dbb2f75f171430da7073ce65c.tar.gz alacritty-24533d2c5d86857dbb2f75f171430da7073ce65c.zip |
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.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -8,6 +8,8 @@ APP_DIR = $(RELEASE_DIR)/osx APP_BINARY = $(RELEASE_DIR)/$(TARGET) APP_BINARY_DIR = $(APP_DIR)/$(APP_NAME)/Contents/MacOS +export MACOSX_DEPLOYMENT_TARGET = $(shell defaults read loginwindow SystemVersionStampAsString) + DMG_NAME = Alacritty.dmg DMG_DIR = $(RELEASE_DIR)/osx @@ -22,6 +24,9 @@ help: ## Prints help for targets with comments binary: | $(TARGET) ## Build release binary with cargo $(TARGET): +ifneq ( "${MACOSX_DEPLOYMENT_TARGET}" , "") + @echo MACOSX_DEPLOYMENT_TARGET=$${MACOSX_DEPLOYMENT_TARGET} +endif cargo build --release app: | $(APP_NAME) ## Clone Alacritty.app template and mount binary |