summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile45
-rw-r--r--assets/osx/Alacritty.app/Contents/Info.plist32
-rw-r--r--assets/osx/Alacritty.app/Contents/Resources/alacritty.icnsbin0 -> 66619 bytes
3 files changed, 77 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000..6eb4d521
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,45 @@
+TARGET = alacritty
+
+APP_NAME = Alacritty.app
+ASSETS_DIR = assets
+RELEASE_DIR = target/release
+APP_TEMPLATE = $(ASSETS_DIR)/osx/$(APP_NAME)
+APP_DIR = $(RELEASE_DIR)/osx
+APP_BINARY_DIR = $(APP_DIR)/$(APP_NAME)/Contents/MacOS
+
+DMG_NAME = Alacritty.dmg
+DMG_DIR = $(RELEASE_DIR)/osx
+
+vpath $(TARGET) $(RELEASE_DIR)
+vpath $(APP_NAME) $(APP_DIR)
+
+all: help
+
+help: ## Prints help for targets with comments
+ @grep -E '^[a-zA-Z._-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
+
+binary: | $(TARGET) ## Build release binary
+$(TARGET):
+ @echo "Please build '$@' with 'cargo build --release'"
+
+app: | $(APP_NAME) ## Clone Alacritty.app template and mount binary
+$(APP_NAME): $(TARGET) $(APP_TEMPLATE)
+ @mkdir -p $(APP_DIR)
+ @cp -R $(APP_TEMPLATE) $(APP_DIR)
+ @cp $< $(APP_BINARY_DIR)
+ @echo "$@ created in $(APP_DIR)"
+
+dmg: | $(DMG_NAME) ## Pack Alacritty.app into .dmg
+$(DMG_NAME): $(APP_NAME)
+ @echo "Packing disk image..."
+ @hdiutil create $(DMG_DIR)/$(DMG_NAME) \
+ -volname "Alacritty" \
+ -fs HFS+ \
+ -srcfolder $(APP_DIR) \
+ -ov -format UDZO
+ @echo "$@ packed in $(APP_DIR)"
+
+.PHONY: app binary clean dmg
+
+clean: ## Remove all artifacts
+ -rm -rf $(APP_DIR)
diff --git a/assets/osx/Alacritty.app/Contents/Info.plist b/assets/osx/Alacritty.app/Contents/Info.plist
new file mode 100644
index 00000000..acf636e8
--- /dev/null
+++ b/assets/osx/Alacritty.app/Contents/Info.plist
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDisplayName</key>
+ <string>Alacritty</string>
+ <key>CFBundleExecutable</key>
+ <string>alacritty</string>
+ <!-- <key>CFBundleIdentifier</key> -->
+ <!-- <string>alacritty</string> -->
+ <key>CFBundleName</key>
+ <string>Alacritty</string>
+ <key>CFBundleIconFile</key>
+ <string>alacritty.icns</string>
+ <key>CFBundleShortVersionString</key>
+ <string>0.1.0</string>
+ <key>CFBundleVersion</key>
+ <string>0.1.0</string>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>NSHighResolutionCapable</key>
+ <true/>
+ <key>NSMainNibFile</key>
+ <string></string>
+ <key>NSSupportsAutomaticGraphicsSwitching</key>
+ <true/>
+</dict>
+</plist>
diff --git a/assets/osx/Alacritty.app/Contents/Resources/alacritty.icns b/assets/osx/Alacritty.app/Contents/Resources/alacritty.icns
new file mode 100644
index 00000000..bdbc0ca1
--- /dev/null
+++ b/assets/osx/Alacritty.app/Contents/Resources/alacritty.icns
Binary files differ