Edit RouterVersion.EXTRA before generating the i2p.i2p tarball

This commit is contained in:
idk
2023-01-23 16:04:13 +00:00
parent 00098cbf53
commit 046090ea11
3 changed files with 9 additions and 1 deletions

View File

@ -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"

View File

@ -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()));

View File

@ -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