diff --git a/build.sh b/build.sh index 4aae231..6104d30 100755 --- a/build.sh +++ b/build.sh @@ -12,19 +12,32 @@ rm -f *.exe rm -f *.dmg -RES_DIR=../i2p.i2p/installer/resources -I2P_JARS=../i2p.i2p/pkg-temp/lib + HERE=$PWD +RES_DIR=$HERE/../i2p.i2p/installer/resources +I2P_JARS=$HERE/../i2p.i2p/pkg-temp/lib +I2P_PKG=$HERE/../i2p.i2p/pkg-temp + echo "preparing resources.csv" mkdir build cd $RES_DIR find certificates -name *.crt -exec echo '{},{}' >> $HERE/build/resources.csv \; +cd small +find . -name '*.config' -exec echo 'small/{},{}' >> $HERE/build/resources.csv \; +echo "preparing webapps" +cd $I2P_PKG +find webapps -name '*.war' -exec echo '{},{}' >> $HERE/build/resources.csv \; cd $HERE echo "geoip/GeoLite2-Country.mmdb,geoip/GeoLite2-Country.mmdb" >> build/resources.csv +sed -i 's|\./||g' build/resources.csv + echo "copying certificates" cp -R $RES_DIR/certificates build/ +echo "copying config" +cp -R $RES_DIR/small build/ +cp -R $I2P_PKG/webapps build/ echo "copying GeoIP" mkdir build/geoip @@ -39,7 +52,7 @@ cd .. echo "building launcher.jar" cd build -$JAVA_HOME/bin/jar -cf launcher.jar net certificates geoip resources.csv +$JAVA_HOME/bin/jar -cf launcher.jar net certificates geoip small webapps resources.csv cd .. echo "preparing to invoke jpackage" diff --git a/clean.sh b/clean.sh new file mode 100755 index 0000000..4a34260 --- /dev/null +++ b/clean.sh @@ -0,0 +1,15 @@ +#! /usr/bin/env sh + +rm -rfv \ + build \ + eventlog.txt \ + hostsdb.blockfile \ + I2P \ + i2p_1.0-1_amd64.deb \ + libjbigi.so \ + libjcpuid.so \ + logs \ + peerProfiles \ + prngseed.rnd \ + router.config \ + wrapper.log diff --git a/java/net/i2p/router/PackageLauncher.java b/java/net/i2p/router/PackageLauncher.java index dc8f629..f689d93 100644 --- a/java/net/i2p/router/PackageLauncher.java +++ b/java/net/i2p/router/PackageLauncher.java @@ -55,7 +55,7 @@ public class PackageLauncher { } else { // All other platforms // TODO: Maybe. Determine if it's a service and return a different home. - i2p = new File(home, "i2p"); + i2p = new File(home, "I2P"); } return i2p.getAbsoluteFile(); } @@ -77,7 +77,7 @@ public class PackageLauncher { targetDir.mkdirs(); else if (!targetDir.isDirectory()) throw new Exception(targetDir + " exists but not a directory. Please get it out of the way"); - + System.out.println(targetFile.toPath()); Files.copy(resource, targetFile.toPath(), StandardCopyOption.REPLACE_EXISTING); } }