-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
81 lines (61 loc) · 1.96 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Makefile
APP = App
init : # inits the installation of the required libs (shards)
shards install
init_svelte :
npm create vite@latest svelte --template svelte-ts
cd svelte && npm install
dev : src/main.cr # dev
RUCKSACK_MODE=0 DEBUG=true crystal build -Dpreview_mt ./src/main.cr
svelte_dev :
cd svelte && npm run dev
svelte_build :
cd svelte && npm run build
exe : src/main.cr # build exe (not entire app)
RUCKSACK_MODE=1 DEBUG=true crystal build -Dpreview_mt ./src/main.cr
cat .rucksack >>main
release : src/main.cr # build optimized exe
RUCKSACK_MODE=2 DEBUG=false crystal build -Dpreview_mt --release ./src/main.cr
cat .rucksack >>main
packing : src/main.cr # Tests if packaging asserts works
mkdir -p tst
cp ./rucksack ./tst/main
./tst/rucksack
app : src/main.cr # build complete app
cd svelte && npm run build
RUCKSACK_MODE=2 DEBUG=false crystal build -Dpreview_mt --release ./src/main.cr
cat .rucksack >>main
mkdir -p ${APP}.app/Contents/MacOS
cp main ${APP}.app/Contents/MacOS/${APP}
open ${APP}.app/Contents/MacOS/${APP}
app_test : src/main.cr # build complete app
cd svelte && npm run build
RUCKSACK_MODE=1 DEBUG=false crystal build -Dpreview_mt ./src/main.cr
cat .rucksack >>main
mkdir -p ${APP}.app/Contents/MacOS
cp main ${APP}.app/Contents/MacOS/${APP}
open ${APP}.app/Contents/MacOS/${APP}
help : # Lists all available commands and summaries
@grep '^[^#[:space:]].*:' Makefile
show : # Opens "Finder to run app from finder"
open .
run : # Runs app
open App.app
rundev : # Runs exe
./main
format : # Format source code
crystal tool format ./src
clean : # Remove latest build
clear
rm -f main main.dwarf .rucksack .rucksack.toc shards.lock .DS_Store
rm -rf App.app tst lib
ls -lAF
clean_all : # Remove latest build and Svelte directory
clear
rm -f main main.dwarf .rucksack .rucksack.toc shards.lock .DS_Store
rm -rf App.app tst svelte lib
ls -lAF
zip_source :
zip source.zip ./src/* ./svelte/src/*
unzip_source :
unzip source.zip