1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-18 13:55:23 -05:00

Add auxiliary files to macOS Application bundle

Fixes #2653.
This commit is contained in:
Andrew Zhou 2020-07-04 09:03:48 -05:00 committed by GitHub
parent e1474a1e5f
commit 466f95d3ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 8 deletions

View file

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Minimum Rust version has been bumped to 1.41.0 - Minimum Rust version has been bumped to 1.41.0
- Prebuilt Linux binaries have been removed - Prebuilt Linux binaries have been removed
- Added manpage, terminfo, and completions to macOS application bundle
### Removed ### Removed

View file

@ -1,12 +1,21 @@
TARGET = alacritty TARGET = alacritty
APP_NAME = Alacritty.app
ASSETS_DIR = extra ASSETS_DIR = extra
RELEASE_DIR = target/release RELEASE_DIR = target/release
MANPAGE = $(ASSETS_DIR)/alacritty.man
TERMINFO = $(ASSETS_DIR)/alacritty.info
COMPLETIONS_DIR = $(ASSETS_DIR)/completions
COMPLETIONS = $(COMPLETIONS_DIR)/_alacritty \
$(COMPLETIONS_DIR)/alacritty.bash \
$(COMPLETIONS_DIR)/alacritty.fish
APP_NAME = Alacritty.app
APP_TEMPLATE = $(ASSETS_DIR)/osx/$(APP_NAME) APP_TEMPLATE = $(ASSETS_DIR)/osx/$(APP_NAME)
APP_DIR = $(RELEASE_DIR)/osx 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
APP_EXTRAS_DIR = $(APP_DIR)/$(APP_NAME)/Contents/Resources
APP_COMPLETIONS_DIR = $(APP_EXTRAS_DIR)/completions
DMG_NAME = Alacritty.dmg DMG_NAME = Alacritty.dmg
DMG_DIR = $(RELEASE_DIR)/osx DMG_DIR = $(RELEASE_DIR)/osx
@ -25,10 +34,15 @@ $(TARGET):
MACOSX_DEPLOYMENT_TARGET="10.11" cargo build --release MACOSX_DEPLOYMENT_TARGET="10.11" cargo build --release
app: | $(APP_NAME) ## Clone Alacritty.app template and mount binary app: | $(APP_NAME) ## Clone Alacritty.app template and mount binary
$(APP_NAME): $(TARGET) $(APP_TEMPLATE) $(APP_NAME): $(TARGET)
@mkdir -p $(APP_BINARY_DIR) @mkdir -p $(APP_BINARY_DIR)
@mkdir -p $(APP_EXTRAS_DIR)
@mkdir -p $(APP_COMPLETIONS_DIR)
@gzip -c $(MANPAGE) > $(APP_EXTRAS_DIR)/alacritty.1.gz
@tic -xe alacritty,alacritty-direct -o $(APP_EXTRAS_DIR) $(TERMINFO)
@cp -fRp $(APP_TEMPLATE) $(APP_DIR) @cp -fRp $(APP_TEMPLATE) $(APP_DIR)
@cp -fp $(APP_BINARY) $(APP_BINARY_DIR) @cp -fp $(APP_BINARY) $(APP_BINARY_DIR)
@cp -fp $(COMPLETIONS) $(APP_COMPLETIONS_DIR)
@touch -r "$(APP_BINARY)" "$(APP_DIR)/$(APP_NAME)" @touch -r "$(APP_BINARY)" "$(APP_DIR)/$(APP_NAME)"
@echo "Created '$@' in '$(APP_DIR)'" @echo "Created '$@' in '$(APP_DIR)'"

View file

@ -131,12 +131,9 @@ pkg install alacritty
brew cask install alacritty brew cask install alacritty
``` ```
Once the cask is installed, it is recommended to setup the Once the cask is installed, it is recommended to setup the manual page, shell
[manual page](INSTALL.md#manual-page), completions, and terminfo definitions. These are located inside the installed
[shell completions](INSTALL.md#shell-completions), and application's Resources directory: `Alacritty.app/Contents/Resources`.
[terminfo definitions](INSTALL.md#terminfo). These instructions need to be
followed from within the Alacritty source for your version, which can be found
on the [GitHub releases page](https://github.com/alacritty/alacritty/releases).
### Windows ### Windows