diff --git a/build.sh b/build.sh index 22587c1..9fad3a3 100755 --- a/build.sh +++ b/build.sh @@ -37,6 +37,7 @@ elif [ "$machine" = "Linux" ]; then exit 0 elif [ "$machine" = "unix" ]; then ICON=src/icons/windowsUIToopie2.png + export EXTRA=" public final static String EXTRA = \"-unix\";" fi . "$SCRIPT_DIR/launcher.sh" diff --git a/java/net/i2p/router/WinLauncher.java b/java/net/i2p/router/WinLauncher.java index 159ebe2..cfea070 100644 --- a/java/net/i2p/router/WinLauncher.java +++ b/java/net/i2p/router/WinLauncher.java @@ -88,7 +88,9 @@ public class WinLauncher extends CopyConfigDir { File programs = programFile(); File home = homeDir(); - System.setProperty("i2p.dir.base", new File(programs.getAbsolutePath(), "config").getAbsolutePath()); + System.setProperty( + "i2p.dir.base", + new File(programs.getAbsolutePath(), "config").getAbsolutePath()); System.setProperty("i2p.dir.config", home.getAbsolutePath()); System.setProperty("router.pid", String.valueOf(ProcessHandle.current().pid())); diff --git a/launcher.sh b/launcher.sh index 42eb332..33dd2a6 100755 --- a/launcher.sh +++ b/launcher.sh @@ -43,6 +43,11 @@ if [ ! -d "$HERE/../i2p.i2p.jpackage-build/" ]; then git clone --depth=1 -b "$VERSION" https://i2pgit.org/i2p-hackers/i2p.i2p "$HERE/../i2p.i2p.jpackage-build/" fi cd "$HERE/../i2p.i2p.jpackage-build/" +OLDEXTRA=$(find . -name RouterVersion.java -exec grep 'String EXTRA' {} \;) +if [ -z $EXTRA ]; then + export EXTRA=" public final static String EXTRA = \"-win\";" +fi +find . -name RouterVersion.java -exec sed -i "s|$OLDEXTRA|$EXTRA|g" {} \; git pull --tags git archive --format=tar.gz --output="$HERE/../i2p.firefox/i2p.i2p.jpackage-build.tar.gz" "$VERSION" for i in $COUNT; do