forked from t-oster/VisiCut
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
62 lines (56 loc) · 2.51 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
# list all targets which are not actual files:
.PHONY: all help jar splash run libLaserCut clean dist install uninstall prop2po po2prop
PREFIX?=/usr
all: jar
help:
@echo "\n\n\n\
usage: \n\
make (or make jar): compile (includes LibLaserCut) \n\
make run: compile and run \n\
make dist: build setup files (in ./distribute subdirectory)\n\
make clean: remove all compiled files\n\
"
splash:
./generatesplash.sh
jar: splash libLaserCut
mvn initialize
mvn package
dist:
./distribute/distribute.sh zip
echo "Successfully built the Platform independent ZIP file. For other build variants, please run ./distribute/distribute.sh"
run: jar
java -Xmx2048m -Xms256m -jar target/visicut*full.jar
libLaserCut:
@test -f LibLaserCut/pom.xml || { echo "Error: the LibLaserCut submodule is missing. Try running 'git submodule update --init'."; false; }
cd LibLaserCut && mvn install
cd ..
clean:
rm -f src/main/resources/de/thomas_oster/visicut/gui/resources/splash.png
mvn clean
install:
mkdir -p $(DESTDIR)$(PREFIX)/share/visicut
cp target/visicut*full.jar $(DESTDIR)$(PREFIX)/share/visicut/Visicut.jar
mkdir -p $(DESTDIR)$(PREFIX)/share/pixmaps
cp src/main/resources/de/thomas_oster/visicut/gui/resources/icon.png $(DESTDIR)$(PREFIX)/share/pixmaps/visicut.png
cp src/main/resources/de/thomas_oster/visicut/gui/resources/icon-48.png $(DESTDIR)$(PREFIX)/share/pixmaps/visicut-48.png
cp src/main/resources/de/thomas_oster/visicut/gui/resources/icon-32.png $(DESTDIR)$(PREFIX)/share/pixmaps/visicut-32.png
cp -r distribute/files/* $(DESTDIR)$(PREFIX)/share/visicut/
mkdir -p $(DESTDIR)$(PREFIX)/share/visicut/inkscape_extension
cp tools/inkscape_extension/*.inx $(DESTDIR)$(PREFIX)/share/visicut/inkscape_extension/
cp tools/inkscape_extension/*.py $(DESTDIR)$(PREFIX)/share/visicut/inkscape_extension/
mkdir -p $(DESTDIR)$(PREFIX)/share/visicut/illustrator_script
cp tools/illustrator_script/*.scpt $(DESTDIR)$(PREFIX)/share/visicut/illustrator_script/
mkdir -p $(DESTDIR)$(PREFIX)/bin
ln -s ../share/visicut/VisiCut.Linux $(DESTDIR)$(PREFIX)/bin/visicut
mkdir -p $(DESTDIR)$(PREFIX)/share/applications
cat distribute/linux/VisiCut.desktop | sed s#PREFIX#$(PREFIX)#g# > $(DESTDIR)$(PREFIX)/share/applications/VisiCut.desktop
uninstall:
rm -rf $(PREFIX)/share/visicut
rm -f $(PREFIX)/share/pixmaps/visicut.png
rm -f $(PREFIX)/bin/visicut
rm -f $(PREFIX)/share/applications/VisiCut.desktop
prop2po:
prop2po src po
po2prop:
po2prop --personality=java -t src po src
find src -name '*.properties' -exec sed -e 's/\(\\u....\)/\L\1/g' -i {} \;