mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-18 13:55:23 -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:
parent
b22999f1e7
commit
24533d2c5d
1 changed files with 5 additions and 0 deletions
5
Makefile
5
Makefile
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue