Skip to content
This repository was archived by the owner on Jan 25, 2019. It is now read-only.

Commit c5760f9

Browse files
change build to use plain java tools (faster) (#10)
1 parent 817fd0f commit c5760f9

File tree

4 files changed

+29
-22
lines changed

4 files changed

+29
-22
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,19 @@ Boot executable—downloads and runs [Boot](http://boot-clj.com).
1515
System requirements:
1616

1717
* Java 7
18-
* Boot
1918
* Bash shell
2019
* [launch4j](http://launch4j.sourceforge.net/)
2120

2221
```
23-
./build.sh # builds bin/boot.sh (Unix) and bin/boot.exe (Windows)
22+
./build.sh # builds target/boot.sh (Unix) and target/boot.exe (Windows)
2423
```
2524

25+
Running various artifacts:
26+
27+
- `target/Boot.class`: `java -cp target Boot`
28+
- `target/loader.jar`: `java -jar target/loader.jar`
29+
- `target/boot.sh`: `./target/boot.sh`
30+
2631
## License
2732

2833
Copyright © 2015 Alan Dipert and Micha Niskin

boot.properties

Lines changed: 0 additions & 6 deletions
This file was deleted.

build.sh

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,41 @@ export PATH=${PATH}:launch4j
66
VERSION=$(git describe)
77
JAVA_VERSION=$(java -version 2>&1 \
88
| awk -F '"' '/version/ {print $2}' \
9-
|awk -F. '{print $1 "." $2}')
9+
| awk -F. '{print $1 "." $2}')
1010

1111
if [ "$JAVA_VERSION" != "1.7" ]; then
1212
echo "You must build with JDK version 1.7 only." 1>&2
1313
exit 1
1414
fi
1515

16-
mkdir -p bin build
17-
18-
if [ ! -e build/boot ]; then
19-
wget -O build/boot https://github.com/boot-clj/boot-bin/releases/download/2.4.2/boot.sh
20-
chmod 755 build/boot
21-
fi
16+
rm -rf target
17+
mkdir target
2218

2319
echo -e "\033[0;33m<< Version: $VERSION >>\033[0m"; \
2420

25-
./build/boot -s src -r resources javac jar -m Boot -f loader.jar target
21+
22+
# Build target/loader.jar which serves as foundation for boot.sh/exe
23+
24+
javac -d target src/Boot.java src/boot/bin/ParentClassLoader.java
25+
cp -r resources/* target/
26+
jar cef Boot target/loader.jar -C target/ .
27+
28+
29+
# Build boot.sh
30+
31+
cat src/head.sh target/loader.jar > target/boot.sh
32+
chmod 755 target/boot.sh
33+
echo -e "\033[0;32m<< Success: bin/boot.sh >>\033[0m"
34+
35+
36+
# Build boot.exe
2637

2738
sed -e "s@__VERSION__@$(git describe)@" src/launch4j-config.in.xml > launch4j-config.xml
2839

2940
if which launch4j; then
3041
launch4j launch4j-config.xml
31-
echo -e "\033[0;32m<< Success: bin/boot.exe >>\033[0m"; \
42+
echo -e "\033[0;32m<< Success: target/boot.exe >>\033[0m"; \
3243
else
33-
echo -e "\033[0;31m<< Skipped: bin/boot.exe (launch4j not found) >>\033[0m"; \
44+
echo -e "\033[0;31m<< Skipped: target/boot.exe (launch4j not found) >>\033[0m"; \
3445
fi
3546

36-
cat src/head.sh target/loader.jar > bin/boot.sh
37-
chmod 755 bin/boot.sh
38-
echo -e "\033[0;32m<< Success: bin/boot.sh >>\033[0m"

src/launch4j-config.in.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<launch4jConfig>
22
<headerType>console</headerType>
3-
<outfile>bin/boot.exe</outfile>
3+
<outfile>target/boot.exe</outfile>
44
<jar>target/loader.jar</jar>
55
<classPath>
66
<mainClass>Boot</mainClass>

0 commit comments

Comments
 (0)