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

Commit

Permalink
Revert "change build to use plain java tools (faster) (#10)"
Browse files Browse the repository at this point in the history
This reverts commit c5760f9.
  • Loading branch information
alandipert committed Sep 14, 2018
1 parent 2606934 commit e9abce7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 29 deletions.
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,14 @@ Boot executable—downloads and runs [Boot](http://boot-clj.com).
System requirements:

* Java 7
* Boot
* Bash shell
* [launch4j](http://launch4j.sourceforge.net/)

```
./build.sh # builds target/boot.sh (Unix) and target/boot.exe (Windows)
./build.sh # builds bin/boot.sh (Unix) and bin/boot.exe (Windows)
```

Running various artifacts:

- `target/Boot.class`: `java -cp target Boot`
- `target/loader.jar`: `java -jar target/loader.jar`
- `target/boot.sh`: `./target/boot.sh`

## License

Copyright © 2015 Alan Dipert and Micha Niskin
Expand Down
6 changes: 6 additions & 0 deletions boot.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#https://github.com/boot-clj/boot
#Sun Nov 15 17:35:18 EST 2015
BOOT_VERSION=2.7.2
BOOT_CLOJURE_VERSION=1.7.0
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_EMIT_TARGET=no
34 changes: 13 additions & 21 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,33 @@ export PATH=${PATH}:launch4j
VERSION=$(git describe)
JAVA_VERSION=$(java -version 2>&1 \
| awk -F '"' '/version/ {print $2}' \
| awk -F. '{print $1 "." $2}')
|awk -F. '{print $1 "." $2}')

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

rm -rf target
mkdir target
mkdir -p bin build

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


# Build target/loader.jar which serves as foundation for boot.sh/exe

javac -d target src/Boot.java src/boot/bin/ParentClassLoader.java
cp -r resources/* target/
jar cef Boot target/loader.jar -C target/ .


# Build boot.sh

cat src/head.sh target/loader.jar > target/boot.sh
chmod 755 target/boot.sh
echo -e "\033[0;32m<< Success: bin/boot.sh >>\033[0m"
if [ ! -e build/boot ]; then
wget -O build/boot https://github.com/boot-clj/boot-bin/releases/download/2.4.2/boot.sh
chmod 755 build/boot
fi

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

# Build boot.exe
./build/boot -s src -r resources javac jar -m Boot -f loader.jar target

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

if which launch4j; then
launch4j launch4j-config.xml
echo -e "\033[0;32m<< Success: target/boot.exe >>\033[0m"; \
echo -e "\033[0;32m<< Success: bin/boot.exe >>\033[0m"; \
else
echo -e "\033[0;31m<< Skipped: target/boot.exe (launch4j not found) >>\033[0m"; \
echo -e "\033[0;31m<< Skipped: bin/boot.exe (launch4j not found) >>\033[0m"; \
fi

cat src/head.sh target/loader.jar > bin/boot.sh
chmod 755 bin/boot.sh
echo -e "\033[0;32m<< Success: bin/boot.sh >>\033[0m"
2 changes: 1 addition & 1 deletion src/launch4j-config.in.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<launch4jConfig>
<headerType>console</headerType>
<outfile>target/boot.exe</outfile>
<outfile>bin/boot.exe</outfile>
<jar>target/loader.jar</jar>
<classPath>
<mainClass>Boot</mainClass>
Expand Down

0 comments on commit e9abce7

Please sign in to comment.