Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
cdzombak committed Aug 25, 2021
1 parent 60b4c0f commit 1e0bca3
Show file tree
Hide file tree
Showing 4 changed files with 789 additions and 374 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ darwin-*-template/
# build products:
out/


# https://raw.githubusercontent.com/github/gitignore/master/Node.gitignore

# Logs
Expand Down
33 changes: 20 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Based on https://github.com/cdzombak/nativefier-app-template

SHELL:=/usr/bin/env bash

VERSION=1.1.0
VERSION=1.1.1
URL="https://lofi.cafe/"
define BUILD_FLAGS
-n "Lofi Cafe" \
Expand All @@ -17,37 +19,42 @@ define BUILD_FLAGS
-i icon.icns
endef

# Also define name below; you may want its name on the filesystem to differ:
APPFILENAME="Lofi Cafe"

default: help
# via https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

.PHONY: check-deps
check-deps: ## Verify build dependencies are installed
check-deps: ## Verify build-time dependencies are installed
@command -v npm >/dev/null 2>&1 || echo "[!] Missing npm"
@npm install

.PHONY: update-deps
update-deps: check-deps ## Update the application's dependencies (eg. nativefier)
npm update

.PHONY: clean
clean: ## Clean build output directory
rm -rf ./out

.PHONY: build
build: clean check-deps ## Build app for the current platform
build: clean check-deps update-deps ## Build app for the current platform
mkdir -p ./out
npm exec nativefier -- ${URL} ${BUILD_FLAGS} ./out

.PHONY: install-mac
install-mac: build ## Build & install to /Applications (on macOS, Intel or Apple Silicon)
cp -R "./out/${APPFILENAME}-darwin-x64/${APPFILENAME}.app" /Applications || cp -R "./out/${APPFILENAME}-darwin-arm64/${APPFILENAME}.app" /Applications
rm -rf ./out

.PHONY: build-all
build-all: clean check-deps ## Build app for many supported platforms
build-all: clean check-deps ## Build app for supported platforms
mkdir -p ./out
npm exec nativefier -- ${URL} ${BUILD_FLAGS} -p mac -a x64 ./out
pushd "./out/Lofi Cafe-darwin-x64" && zip -r ../lofi-cafe-${VERSION}-macos-x64.zip "./Lofi Cafe.app" && popd
pushd "./out/${APPFILENAME}-darwin-x64" && zip -r "../lofi-cafe-${VERSION}-macos-x64.zip" "./${APPFILENAME}.app" && popd
npm exec nativefier -- ${URL} ${BUILD_FLAGS} -p mac -a arm64 ./out
pushd "./out/Lofi Cafe-darwin-arm64" && zip -r ../lofi-cafe-${VERSION}-macos-arm.zip "./Lofi Cafe.app" && popd
# npm exec nativefier -- ${URL} ${BUILD_FLAGS} -p windows -a x64 ./out/windows-x64
# npm exec nativefier -- ${URL} ${BUILD_FLAGS} -p windows -a arm64 ./out/windows-arm

.PHONY: install-mac
install-mac: build ## Build & install to /Applications (for macOS, x64 or arm)
cp -R "./out/Lofi Cafe-darwin-x64/Lofi Cafe.app" /Applications || cp -R "./out/Lofi Cafe-darwin-arm64/Lofi Cafe.app" /Applications
rm -rf ./out
pushd "./out/${APPFILENAME}-darwin-arm64" && zip -r "../lofi-cafe-${VERSION}-macos-arm.zip" "./${APPFILENAME}.app" && popd
Loading

0 comments on commit 1e0bca3

Please sign in to comment.