You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
i2p-zero/bin/build-launcher.sh

20 lines
940 B

5 years ago
#!/bin/bash
5 years ago
basedir=$(dirname $(dirname $(readlink -fm $0)))
5 years ago
# convert the jar files from an existing I2P built into modules suitable for use with jlink
5 years ago
$basedir/bin/convert-jars-to-modules.sh
5 years ago
# compile the Main class that starts the I2P router and SAM listener
5 years ago
echo "*** Compiling Main class"
javac --module-path import/lib -d target/classes $(find src -name '*.java')
5 years ago
# package as a modular jar
5 years ago
echo "*** Packaging as a modular jar"
5 years ago
jar --create --file target/org.getmonero.i2p.embedded.jar --main-class org.getmonero.i2p.embedded.Main -C target/classes .
# create an OS specific launcher which will bundle together the code and a minimal JVM
5 years ago
echo "*** Performing jlink"
5 years ago
jlink --module-path target/modules:target/org.getmonero.i2p.embedded.jar --add-modules org.getmonero.i2p.embedded --launcher router=org.getmonero.i2p.embedded --output target/router --strip-debug --compress 2 --no-header-files --no-man-pages
5 years ago
echo "*** Done ***"