-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
52 lines (41 loc) · 1.37 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Variables
NODE_VERSION_MIN = 18.12
.PHONY: dev-build
default: dev-build
# Ensure Node.js version meets the minimum requirement
check-node-version:
@echo "Checking Node.js version..."
@node_version=$$(node -v | sed 's/v//'); \
if [ "$$node_version" \< "$(NODE_VERSION_MIN)" ]; then \
echo "Error: Node.js version must be at least $(NODE_VERSION_MIN)"; \
exit 1; \
fi
@echo "Node.js version is adequate."
# Install dependencies
install-dependencies: check-node-version
@echo "Installing dependencies..."
npm install -g pnpm && pnpm install
# Start desktop development
start-dev: install-dependencies
@echo "Starting desktop development..."
pnpm tauri dev
# Build desktop application for MacOS
build-mac-app:
@echo "Building the desktop application..."
pnpm tauri build --bundles app
# Build DMG package for MacOS
build-mac-dmg:
@echo "Building the desktop dmg package..."
pnpm tauri build --bundles dmg
# Build universal DMG package for MacOS
build-mac-universal-dmg:
@echo "Building the desktop dmg package..."
pnpm tauri build --target universal-apple-darwin --bundles dmg
# Combined: Install dependencies, start dev, and build app
dev-build: install-dependencies start-dev build-app
@echo "Development and build process completed."
# Clean up node_modules and rebuild
clean-rebuild:
@echo "Cleaning up and rebuilding..."
rm -rf node_modules
$(MAKE) dev-build