-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
66 lines (55 loc) · 1.79 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
include engine/make/enable-java-shell.mk
.PHONY : default
ifeq ($(OS), WINDOWS)
default : exe
else ifeq ($(OS), MACOSX)
default : dmg
endif
ENGINE_VERSION := $(shell println(xpath(new File("engine/pom.xml"), "/*/*[local-name()='version']/text()"));)
.PHONY : dmg
dmg : src/resources/daisy-pipeline src/resources/icons/logo_mac_40x40_Template@2x.png
exec("yarn");
exec("yarn", "dist", "--mac");
.PHONY : exe
exe : src/resources/daisy-pipeline
exec("yarn.cmd");
exec("yarn.cmd", "dist", "--win");
.PHONY : release
release: src/resources/daisy-pipeline
ifeq ($(OS), WINDOWS)
exec("yarn.cmd");
exec("yarn.cmd", "release");
else
exec("yarn");
exec("yarn", "release");
endif
ifeq ($(OS), WINDOWS)
zip_classifier := win
else ifeq ($(OS), MACOSX)
zip_classifier := mac
endif
src/resources/daisy-pipeline : engine/target/assembly-$(ENGINE_VERSION)-$(zip_classifier).zip
rm("$@");
unzip(new File("$<"), new File("$(dir $@)"));
ifeq ($(OS), MACOSX)
// FIXME: unzip() currently does not preserve file permissions \
exec("chmod", "+x", "$@/jre/bin/java");
exec("chmod", "+x", "$@/jre/lib/jspawnhelper");
endif
engine/target/assembly-$(ENGINE_VERSION)-$(zip_classifier).zip : \
engine/pom.xml \
$(shell Files.walk(Paths.get("engine/src")).filter(Files::isRegularFile).forEach(System.out::println);)
exec("$(MAKE)", "-C", "engine", "zip-$(zip_classifier)", \
"--", "--without-osgi", \
"--without-cli", \
"--without-updater", \
"--without-persistence");
clean :
ifeq ($(OS), WINDOWS)
exec("yarn.cmd", "clean");
else
exec("yarn", "clean");
endif
rm("src/resources/daisy-pipeline");
rm("node_modules/.dev-temp-build");
exec("$(MAKE)", "-C", "engine", "clean");