Compare commits

..

54 Commits

Author SHA1 Message Date
idk
dd47ffd902 don't use wine to unpack Tor Browser on Windows 2023-01-24 04:50:30 +00:00
idk
b2f92840e5 get rid of fixperms.sh 2023-01-23 23:35:52 +00:00
idk
0cffa15047 look for makensis in wsl 2023-01-23 22:31:24 +00:00
idk
0a6dae1aac port FindProcess to Uninstallers since apparently that's a thing you have to do in NSIS 2023-01-23 22:18:40 +00:00
idk
6e3fcd3285 re-enable cross building for Windows from Linux using a nightly as a base 2023-01-23 21:13:04 +00:00
idk
57fa862f01 fix up use of prebuilt router 2023-01-23 20:43:08 +00:00
idk
2225b47459 tell builders to use unsigned.sh because it is easier 2023-01-23 19:15:11 +00:00
idk
78989a8bbd get rid of note about git bash from readme 2023-01-23 19:14:22 +00:00
idk
e7025ae941 get rid of last few make calls in the shell scripts, no more need for wierd WSL workaround 2023-01-23 19:12:48 +00:00
idk
d7423eb595 get rid of more makefile responsibilities 2023-01-23 19:11:02 +00:00
idk
4cb8febe3b get rid of more makefile responsibilities 2023-01-23 19:02:18 +00:00
idk
039faf8280 get rid of more makefile responsibilities 2023-01-23 18:58:21 +00:00
idk
3a17a3926d get rid of more makefile responsibilities 2023-01-23 18:54:47 +00:00
idk
e09d2a41ec get rid of more makefile responsibilities 2023-01-23 18:52:56 +00:00
idk
848fabd27c fix error in makefile 2023-01-23 18:51:08 +00:00
idk
da58c26935 remove more junk from makefile 2023-01-23 18:45:35 +00:00
idk
c84522a244 move version file generator to build script 2023-01-23 18:35:34 +00:00
idk
d8953824c5 Move build scripts to own directory and fix up all the paths used in them 2023-01-23 18:25:48 +00:00
idk
b67235b2a9 Fix up more paths in buildscripts 2023-01-23 17:23:58 +00:00
idk
00bf0f267e force full builddir paths 2023-01-23 17:19:54 +00:00
idk
a1d07cffee fix paths in moved buildscripts 2023-01-23 17:01:31 +00:00
idk
c678c6eca2 fix paths in moved buildscripts 2023-01-23 16:50:03 +00:00
idk
2a162fb4c1 move all the buildscripts out of the root 2023-01-23 16:43:15 +00:00
idk
e594ce9bb5 move all the buildscripts out of the root 2023-01-23 16:41:27 +00:00
idk
4a312198ff move build scripts to dedicated directory 2023-01-23 16:38:18 +00:00
idk
f0fb375e13 move launcher.sh 2023-01-23 16:32:07 +00:00
idk
f19a5ca002 quote EXTRA 2023-01-23 16:24:34 +00:00
idk
45deb5ac28 Ensure changed RouterVersion.java gets included in tarball 2023-01-23 16:15:24 +00:00
idk
7403cf2e8f Ensure changed RouterVersion.java gets included in tarball 2023-01-23 16:14:46 +00:00
idk
046090ea11 Edit RouterVersion.EXTRA before generating the i2p.i2p tarball 2023-01-23 16:04:13 +00:00
idk
00098cbf53 Also wait for I2P to finish exiting in uninstaller function 2023-01-17 22:41:37 +00:00
idk
c4980a61f0 Also wait for I2P to finish exiting in uninstaller function 2023-01-17 22:36:04 +00:00
idk
20b5ffdb17 disable signing in releaser script 2023-01-12 18:38:50 +00:00
idk
4a6926fcbf bump version for release 2023-01-12 17:05:02 +00:00
idk
5b12f20406 generate source tarball of embedded I2P router after pulling in all available tags 2023-01-03 20:03:15 +00:00
idk
da29268898 update icon 2023-01-03 19:31:01 +00:00
idk
79f016cb1c switch to git archive for tarball, include ico and png in app-content to make NSIS builds work 2023-01-03 19:26:04 +00:00
idk
e19ce19368 change the icon used in the jpackage builds on Windows 2023-01-03 17:57:27 +00:00
idk
2e4f110c30 use prebuild jbigi 2023-01-02 23:25:37 +00:00
idk
1bb8238e68 add m4 to path when building on Windows 2023-01-02 04:01:17 +00:00
idk
6bfec5d6ef unquote to allow globbing, make nightlies build from master 2023-01-02 03:57:55 +00:00
idk
f7c6251f30 possible jbigi fix 2023-01-02 02:32:51 +00:00
idk
1a1e25a52f remove erroneously checked in files 2023-01-01 18:57:05 +00:00
idk
b8b19786b1 remove erroneously checked in files 2023-01-01 18:56:18 +00:00
idk
8c2c839337 rename release artifacts 2023-01-01 18:54:56 +00:00
idk
f56771ac8a update Java version, update uninstaller shortcut 2022-11-22 23:01:12 -05:00
idk
e0d5d61518 fix outproxy false.i2p line in i2ptunnel.config 2022-11-21 13:51:15 -05:00
idk
c4c40eee8f fixperms in zip.sh 2022-11-06 21:11:24 -05:00
idk
2db71e402d move fixperms to own script 2022-11-06 21:09:40 -05:00
idk
6e9df08473 delay a second before correcting perms 2022-11-06 20:56:54 -05:00
idk
b98b488f70 delay a second before correcting perms 2022-11-06 20:36:47 -05:00
idk
52b34a5d6a move windows portable script 2022-11-06 20:07:44 -05:00
idk
c1b20d4f2b move windows portable script 2022-11-06 20:01:48 -05:00
idk
c656b80674 move windows portable script 2022-11-06 20:01:23 -05:00
50 changed files with 679 additions and 388 deletions

6
.gitignore vendored
View File

@ -21,4 +21,8 @@ cmd
*.jar *.jar
*.zip *.zip
*.tar.gz *.tar.gz
config_override.sh config_override.sh
i2pkeys
onionkeys
tlskeys
tmp

View File

@ -7,9 +7,9 @@ preset=`rm .version; make version`
-include .version -include .version
PROFILE_VERSION=$(MAJOR).$(MINOR).$(BUILD) PROFILE_VERSION=$(VERSIONMAJOR).$(VERSIONMINOR).$(VERSIONBUILD)
all: version prep install.exe all: version install.exe
fmt: fmt:
find . -name '*.java' -exec clang-format -i {} \; find . -name '*.java' -exec clang-format -i {} \;
@ -18,19 +18,7 @@ tag:
git tag $(PROFILE_VERSION) git tag $(PROFILE_VERSION)
version: version:
echo !define VERSIONMAJOR $(VERSIONMAJOR) > src/nsis/i2pbrowser-version.nsi ./buildscripts/version.sh
echo !define VERSIONMINOR $(VERSIONMINOR) >> src/nsis/i2pbrowser-version.nsi
echo !define VERSIONBUILD $(VERSIONBUILD) >> src/nsis/i2pbrowser-version.nsi
sed 's|!define VERSION||g' src/nsis/i2pbrowser-version.nsi | sed 's| |=|g' > .version
rm -f version.txt
make version.txt i2pbrowser-jpackage.nsi
version.txt: build
echo "$(PROFILE_VERSION)" > build/version.txt
echo "$(PROFILE_VERSION)" > build/version.txt
i2pbrowser-jpackage.nsi:
echo "!define I2P_VERSION $(PROFILE_VERSION)" > src/nsis/i2pbrowser-jpackage.nsi
jpackage: version I2P build/I2P/config all jpackage: version I2P build/I2P/config all
@ -42,56 +30,25 @@ help: version
@echo "$(preset)" @echo "$(preset)"
prep: prep:
make build/licenses
echo "licenses" >>make.log
make build/I2P
echo "buildi2p" >>make.log
make build/I2P/config
echo "buildi2pconfig" >>make.log
cp src/nsis/*.nsi build
echo "nsi1" >>make.log
cp src/nsis/*.nsh build
echo "nsi2" >>make.log
cp src/icons/*.ico build
install.exe: #build/licenses install.exe:
cd build && makensis i2pbrowser-installer.nsi && cp I2P-Easy-Install-Bundle-*.exe ../ && echo "built windows installer" ./buildscripts/nsis.sh
export RES_DIR="../i2p.i2p.jpackage-build/installer/resources" export RES_DIR="../i2p.i2p.jpackage-build/installer/resources"
export PKG_DIR="../i2p.i2p.jpackage-build/pkg-temp" export PKG_DIR="../i2p.i2p.jpackage-build/pkg-temp"
export I2P_JBIGI="../i2p.i2p.jpackage-build/installer/lib/jbigi" #export I2P_JBIGI="../i2p.i2p.jpackage-build/installer/lib/jbigi"
distclean: clean distclean: clean
rm -rf I2P rm -rf I2P
I2P: I2P:
./build.sh ./buildscripts/build.sh
build/I2P: I2P build build/I2P: I2P build
rm -rf build/I2P
cp -rv I2P build/I2P ; true
cp "$(I2P_JBIGI)"/*windows*.dll build/I2P/runtime/lib; true
src/I2P/config: src/I2P/config:
mkdir -p src/I2P/config
rm -rf src/I2P/config/geoip src/I2P/config/webapps src/I2P/config/certificates
cp -v $(RES_DIR)/clients.config src/I2P/config/
cp -v $(RES_DIR)/wrapper.config src/I2P/config/
#grep -v 'router.updateURL' $(RES_DIR)/router.config > src/I2P/config/router.config
cat router.config > src/I2P/config/router.config
cat i2ptunnel.config > src/I2P/config/i2ptunnel.config
cp -v $(RES_DIR)/hosts.txt src/I2P/config/hosts.txt
cp -R $(RES_DIR)/certificates src/I2P/config/certificates
cp -R $(RES_DIR)/eepsite src/I2P/config/eepsite
mkdir -p src/I2P/config/geoip
cp -v $(RES_DIR)/GeoLite2-Country.mmdb.gz src/I2P/config/geoip/GeoLite2-Country.mmdb.gz
cp -R "$(PKG_DIR)"/webapps src/I2P/config/webapps
cd src/I2P/config/geoip && gunzip GeoLite2-Country.mmdb.gz; cd ../../..
build/I2P/config: src/I2P/config build/I2P build/I2P/config: src/I2P/config build/I2P
cp -rv src/I2P/config build/I2P/config
# cp -rv build/I2P/* I2P/
# cp -rv src/I2P/config build/I2P/.i2p
# #
# Warning: a displayed license file of more than 28752 bytes # Warning: a displayed license file of more than 28752 bytes
@ -99,24 +56,10 @@ build/I2P/config: src/I2P/config build/I2P
# Possibly related: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895064 # Possibly related: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895064
# #
build/licenses: build build/licenses: build
mkdir -p build/licenses ./buildscripts/licenses.sh
cp license/* build/licenses
cp LICENSE.md build/licenses/MIT.txt
cat build/licenses/LICENSE.index \
build/licenses/EPL.txt \
build/licenses/GPL+CLASSPATH.txt \
build/licenses/HTTPS-Everywhere.txt \
build/licenses/LICENSE.tor \
build/licenses/MIT.txt \
build/licenses/MPL2.txt \
build/licenses/NoScript.txt \
build/licenses/NSS.txt \
build/licenses/I2P.txt > build/licenses/LICENSE.txt
unix2dos build/licenses/LICENSE.txt
clean: clean:
rm -rf build app-profile-*.tgz profile-*.tgz I2P-Easy-Install-Bundle-*.exe *.deb src/I2P/config *.su3 .version *.url make.log ./buildscripts/clean.sh
git clean -fdx src build
build: build:
@echo "creating build directory" @echo "creating build directory"
@ -126,12 +69,13 @@ include makefiles/su.mk
include makefiles/su-unsigned.mk include makefiles/su-unsigned.mk
include makefiles/debian.mk
I2P_DATE=`date +%Y-%m-%d` I2P_DATE=`date +%Y-%m-%d`
MAGNET=`bttools torrent printinfo i2pwinupdate.su3.torrent | grep 'MagNet' | sed 's|MagNet: ||g' | sed 's|%3A|:|g'| sed 's|%2F|/|g'` MAGNET=`bttools torrent dumpinfo i2pwinupdate.su3.torrent | grep 'Magnet' | sed 's|Magnet: ||g' | sed 's|%3A|:|g'| sed 's|%2F|/|g'`
MAGNET_TESTING=`bttools torrent printinfo i2pwinupdate-testing.su3.torrent | grep 'MagNet' | sed 's|MagNet: ||g' | sed 's|%3A|:|g'| sed 's|%2F|/|g'` MAGNET_TESTING=`bttools torrent dumpinfo i2pwinupdate-testing.su3.torrent | grep 'MagNet' | sed 's|MagNet: ||g' | sed 's|%3A|:|g'| sed 's|%2F|/|g'`
magnet:
echo "$(MAGNET)"
BLANK=`awk '! NF { print NR; exit }' changelog.txt` BLANK=`awk '! NF { print NR; exit }' changelog.txt`

View File

@ -57,7 +57,7 @@ The Windows build tools listed above must be installed on the Windows host machi
TODO: Add links to the respective instructions for each of these. TODO: Add links to the respective instructions for each of these.
**Note that after the dependencies are installed, this step is automated** **Note that after the dependencies are installed, this step is automated**
**with `./build.sh`.** **with `./buildscripts/build.sh`.**
In order to include a jpackaged(dependency-free) I2P router in the Profile In order to include a jpackaged(dependency-free) I2P router in the Profile
Bundle you will need to build the jpackaged I2P router as an "App Image" on Bundle you will need to build the jpackaged I2P router as an "App Image" on
@ -127,10 +127,10 @@ Ubuntu in WSL.
ant clean pkg ant clean pkg
cd .. cd ..
7. Move into the i2p.firefox directory. Run the `./build.sh` script. 7. Move into the i2p.firefox directory. Run the `./buildscripts/build.sh` script.
cd i2p.firefox cd i2p.firefox
./build.sh ./buildscripts/build.sh
8. Compile the NSIS installer using WSL. 8. Compile the NSIS installer using WSL.
@ -143,18 +143,9 @@ I highly recommend you look into the Chocolatey package manager, which makes it
easier to configure these tools and keep them up to date. easier to configure these tools and keep them up to date.
**Prerequisites:** In addition to the other prerequisites, you will need to to have **Prerequisites:** In addition to the other prerequisites, you will need to to have
`make` installed with `cygwin`. If you are using this method, you cannot use the `make` installed with `cygwin`. For our purposes, as long as everything else is
automated build scripts without a hack. You will need to create a file called `wsl` set up and you're using git bash, that is enough to make the scripts compatible with
in a place that is in the path used by `git-bash.exe` sessions, with the content: `cygwin`. Cygwin builds without git bash are not likely to work.
```
#! /usr/bin/env bash
$@
```
For our purposes, as long as everything else is set up and you're using git bash,
that is enough to make the scripts compatible with `cygwin`. Cygwin builds without
git bash are not likely to work.
1. Run the Cygwin `setup-$arch.exe` for your platform to set up new packages. Select the `make` `jq` `dos2unix` and `curl` packages. 1. Run the Cygwin `setup-$arch.exe` for your platform to set up new packages. Select the `make` `jq` `dos2unix` and `curl` packages.
2. Open a cygwin terminal. 2. Open a cygwin terminal.
@ -170,10 +161,10 @@ git bash are not likely to work.
ant clean pkg ant clean pkg
cd .. cd ..
5. Move into the i2p.firefox directory. Run the `./build.sh` script. 5. Move into the i2p.firefox directory. Run the `./buildscripts/unsigned.sh` script.
cd i2p.firefox cd i2p.firefox
./build.sh ./buildscripts/unsigned.sh
6. Run `make` to build the installer. 6. Run `make` to build the installer.

View File

@ -1,71 +0,0 @@
#! /usr/bin/env bash
set -e
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/i2pversion"
if [ -f i2pversion_override ]; then
. "$SCRIPT_DIR/i2pversion_override"
fi
. "$SCRIPT_DIR/config.sh"
if [ -f config_overide.sh ]; then
. "$SCRIPT_DIR/config_override.sh"
fi
if [ -z $machine ]; then
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) machine=Linux;;
Darwin*) machine=Mac;;
*) machine="UNKNOWN:${unameOut}"
esac
fi
if [ "$machine" = "Mac" ]; then
rm -rf I2P
./getprebuilt.sh
exit 0
elif [ "$machine" = "Linux" ]; then
rm -rf I2P
./getprebuilt.sh
exit 0
fi
. "$SCRIPT_DIR/launcher.sh"
if [ -z $I2P_VERSION ]; then
I2P_VERSION=$("$JAVA_HOME"/bin/java -cp build/router.jar net.i2p.router.RouterVersion | sed "s/.*: //" | head -n 1 | sed 's|-|.|g')
fi
echo "preparing to invoke jpackage for I2P version $I2P_VERSION"
rm -rf I2P
make src/I2P/config
if [ ! -d "I2P" ]; then
"$JAVA_HOME"/bin/jpackage --type app-image --name I2P --app-version "$I2P_VERSION" \
--verbose \
--java-options "-Xmx512m" \
--java-options "--add-opens java.base/java.lang=ALL-UNNAMED" \
--java-options "--add-opens java.base/sun.nio.fs=ALL-UNNAMED" \
--java-options "--add-opens java.base/java.nio=ALL-UNNAMED" \
--java-options "--add-opens java.base/java.util.Properties=ALL-UNNAMED" \
--java-options "--add-opens java.base/java.util.Properties.defaults=ALL-UNNAMED" \
$JPACKAGE_OPTS \
--resource-dir build \
--app-content src/I2P/config \
--app-content src/unix/torbrowser.sh \
--app-content src/win/torbrowser-windows.sh \
--app-content src/icons/windowsUIToopie2.png \
--app-content src/icons/ui2pbrowser_icon.ico \
--icon src/icons/windowsUIToopie2.png \
--input build --main-jar launcher.jar --main-class net.i2p.router.WinLauncher
fi
cp "$I2P_PKG/licenses/"* license/
cp "$HERE/../i2p.i2p.jpackage-build/LICENSE.txt" license/I2P.txt

83
buildscripts/build.sh Executable file
View File

@ -0,0 +1,83 @@
#! /usr/bin/env bash
set -e
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/i2pversion"
if [ -f i2pversion_override ]; then
. "$SCRIPT_DIR/i2pversion_override"
fi
. "$SCRIPT_DIR/config.sh"
if [ -f config_overide.sh ]; then
. "$SCRIPT_DIR/config_override.sh"
fi
"$SCRIPT_DIR"/buildscripts/version.sh
"$SCRIPT_DIR"/buildscripts/licenses.sh
if [ -z $machine ]; then
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) machine=Linux;;
Darwin*) machine=Mac;;
*) machine="UNKNOWN:${unameOut}"
esac
fi
ICON="$SCRIPT_DIR/src/icons/ui2pbrowser_icon.ico"
if [ "$machine" = "Mac" ]; then
rm -rf I2P
"$SCRIPT_DIR"/buildscripts/getprebuilt.sh
exit 0
elif [ "$machine" = "Linux" ]; then
rm -rf I2P
"$SCRIPT_DIR"/buildscripts/getprebuilt.sh
exit 0
elif [ "$machine" = "unix" ]; then
ICON="$SCRIPT_DIR"/src/icons/windowsUIToopie2.png
export EXTRACODE="unix"
export EXTRA=" public final static String EXTRA = \"-$EXTRACODE\";"
fi
. "$SCRIPT_DI"$SCRIPT_DIR"/buildscripts/launcher.sh"
if [ -z $I2P_VERSION ]; then
I2P_VERSION=$("$JAVA_HOME"/bin/java -cp $SCRIPT_DIR/build/router.jar net.i2p.router.RouterVersion | sed "s/.*: //" | head -n 1 | sed 's|-|.|g')
fi
echo "preparing to invoke jpackage for I2P version $I2P_VERSION"
rm -rf I2P
if [ ! -d "I2P" ]; then
"$JAVA_HOME"/bin/jpackage --type app-image --name I2P --app-version "$I2P_VERSION" \
--verbose \
--java-options "-Xmx512m" \
--java-options "--add-opens java.base/java.lang=ALL-UNNAMED" \
--java-options "--add-opens java.base/sun.nio.fs=ALL-UNNAMED" \
--java-options "--add-opens java.base/java.nio=ALL-UNNAMED" \
--java-options "--add-opens java.base/java.util.Properties=ALL-UNNAMED" \
--java-options "--add-opens java.base/java.util.Properties.defaults=ALL-UNNAMED" \
$JPACKAGE_OPTS \
--resource-dir $SCRIPT_DIR/build \
--app-content "$SCRIPT_DIR"/src/I2P/config \
--app-content "$SCRIPT_DIR"/src/unix/torbrowser.sh \
--app-content "$SCRIPT_DIR"/src/win/torbrowser-windows.sh \
--app-content "$SCRIPT_DIR"/src/icons/windowsUIToopie2.png \
--app-content "$SCRIPT_DIR"/src/icons/ui2pbrowser_icon.ico \
--icon "${ICON}" \
--input $SCRIPT_DIR/build --main-jar launcher.jar --main-class net.i2p.router.WinLauncher
fi
cp "$I2P_PKG/licenses/"* license/
cp "$SCRIPT_DIR/../i2p.i2p.jpackage-build/LICENSE.txt" license/I2P.txt
mkdir -p "$SCRIPT_DIR"/build/I2P
cp -rv "$SCRIPT_DIR"/I2P/* "$SCRIPT_DIR"/build/I2P
cp -rv src/I2P/config build/I2P/config

View File

@ -1,6 +1,6 @@
#! /usr/bin/env bash #! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1 cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/config.sh" . "$SCRIPT_DIR/config.sh"
@ -31,4 +31,5 @@ rm -rf \
*.jar \ *.jar \
*.exe \ *.exe \
*.dmg *.dmg
make clean rm -rf build app-profile-*.tgz profile-*.tgz I2P-Easy-Install-Bundle-*.exe *.deb src/I2P/config *.su3 .version *.url make.log
git clean -fdx src build onionkeys tlskeys i2pkeys

View File

@ -1,6 +1,6 @@
#! /usr/bin/env bash #! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1 cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/i2pversion" . "$SCRIPT_DIR/i2pversion"
@ -25,7 +25,7 @@ fi
# GITHUB_USERNAME=your github username # GITHUB_USERNAME=your github username
git clean -fd git clean -fd
git checkout . git checkout .
./targz.sh "$SCRIPT_DIR"/buildscripts/targz.sh
. "$HOME/github-release-config.sh" . "$HOME/github-release-config.sh"
@ -51,7 +51,3 @@ ZIPCHECKSUM=$(sha256sum "I2P.tar.gz")
echo github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "I2P.tar.gz" -l "$ZIPCHECKSUM" -t "$TODAYSDATE" -n "I2P.tar.gz" echo github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "I2P.tar.gz" -l "$ZIPCHECKSUM" -t "$TODAYSDATE" -n "I2P.tar.gz"
github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "I2P.tar.gz" -l "$ZIPCHECKSUM" -t "$TODAYSDATE" -n "I2P.tar.gz" github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "I2P.tar.gz" -l "$ZIPCHECKSUM" -t "$TODAYSDATE" -n "I2P.tar.gz"
./zip.sh
WINZIPCHECKSUM=$(sha256sum "I2P-windows-portable.zip")
echo github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "I2P-windows-portable.zip" -l "$WINZIPCHECKSUM" -t "$TODAYSDATE" -n "I2P-windows-portable.zip"
github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "I2P-windows-portable.zip" -l "$WINZIPCHECKSUM" -t "$TODAYSDATE" -n "I2P-windows-portable.zip"

View File

@ -0,0 +1,52 @@
#! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/i2pversion"
if [ -f i2pversion_override ]; then
. "$SCRIPT_DIR/i2pversion_override"
fi
. "$SCRIPT_DIR/config.sh"
if [ -f config_overide.sh ]; then
. "$SCRIPT_DIR/config_override.sh"
fi
### How to set up this script:
#
# This script will not work unless you give it a Github API key.
# You need to create a file in your $HOME directory, which on
# Windows will by /c/Users/yourusername, called github-release-config.sh,
# containing this key as the variable GITHUB_TOKEN.
# github-release-config.sh must also contain:
# GITHUB_USERNAME=your github username
git clean -fd
git checkout .
. "$HOME/github-release-config.sh"
if [ -f ./i2pversion_override ]; then
. ./i2pversion_override
fi
TODAYSDATE=$(date +%Y%m%d)
if [ -z "$DESCRIPTION" ]; then
DESCRIPTION="Daily unsigned build of i2p.firefox for $TODAYSDATE
===================================================
These builds are automatically built on a daily basis and may have serious bugs.
They are intended for testing purposes only, use them at your own risk.
"
fi
echo github-release release -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
github-release release -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
"$SCRIPT_DIR"/buildscripts/zip.sh
WINZIPCHECKSUM=$(sha256sum "I2P-windows-portable.zip")
echo github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "I2P-windows-portable.zip" -l "$WINZIPCHECKSUM" -t "$TODAYSDATE" -n "I2P-windows-portable.zip"
github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "I2P-windows-portable.zip" -l "$WINZIPCHECKSUM" -t "$TODAYSDATE" -n "I2P-windows-portable.zip"

View File

@ -1,6 +1,6 @@
#! /usr/bin/env bash #! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1 cd "$SCRIPT_DIR" || exit 1
cp -v "$SCRIPT_DIR/config_override.example.sh" config_override.sh cp -v "$SCRIPT_DIR/config_override.example.sh" config_override.sh
@ -25,7 +25,7 @@ fi
git clean -fd git clean -fd
git checkout . git checkout .
cp -v "$SCRIPT_DIR/config_override.example.sh" config_override.sh cp -v "$SCRIPT_DIR/config_override.example.sh" config_override.sh
./unsigned.sh "$SCRIPT_DIR"/buildscripts/unsigned.sh
. "$HOME/github-release-config.sh" . "$HOME/github-release-config.sh"

View File

@ -1,6 +1,6 @@
#! /usr/bin/env bash #! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1 cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/i2pversion" . "$SCRIPT_DIR/i2pversion"
@ -22,7 +22,7 @@ mv "$SCRIPT_DIR/config_override.sh" "$SCRIPT_DIR/config_override.sh.bak"
# GITHUB_USERNAME=your github username # GITHUB_USERNAME=your github username
git clean -fd git clean -fd
git checkout . git checkout .
./unsigned.sh "$SCRIPT_DIR"/buildscripts/unsigned.sh
. "$HOME/github-release-config.sh" . "$HOME/github-release-config.sh"

View File

@ -1,6 +1,6 @@
#! /usr/bin/env bash #! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1 cd "$SCRIPT_DIR" || exit 1
cp -v "$SCRIPT_DIR/config_override.example.sh" config_override.sh cp -v "$SCRIPT_DIR/config_override.example.sh" config_override.sh

View File

@ -1,6 +1,6 @@
#! /usr/bin/env bash #! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1 cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/i2pversion" . "$SCRIPT_DIR/i2pversion"

View File

@ -2,7 +2,8 @@
## EXPERIMENTAL. PROBABLY WON'T SEE THE LIGHT OF DAY BUT MAYBE I GET LUCKY. ## EXPERIMENTAL. PROBABLY WON'T SEE THE LIGHT OF DAY BUT MAYBE I GET LUCKY.
# Motivation SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1
. ./config.sh . ./config.sh
. ./i2pversion . ./i2pversion
@ -16,10 +17,10 @@ jpackage --name I2P-EXE --app-version "$I2P_VERSION" \
--java-options "--add-opens java.base/java.util.Properties=ALL-UNNAMED" \ --java-options "--add-opens java.base/java.util.Properties=ALL-UNNAMED" \
--java-options "--add-opens java.base/java.util.Properties.defaults=ALL-UNNAMED" \ --java-options "--add-opens java.base/java.util.Properties.defaults=ALL-UNNAMED" \
$JPACKAGE_OPTS \ $JPACKAGE_OPTS \
--app-content src/I2P/config \ --app-content "$SCRIPT_DIR"/src/I2P/config \
--app-content src/icons/windowsUIToopie2.png \ --app-content "$SCRIPT_DIR"/src/icons/windowsUIToopie2.png \
--icon src/icons/windowsUIToopie2.png \ --icon "$SCRIPT_DIR"/src/icons/windowsUIToopie2.png \
--input build \ --input "$SCRIPT_DIR/build" \
--verbose \ --verbose \
--type exe \ --type exe \
--win-dir-chooser \ --win-dir-chooser \

16
buildscripts/experimental.sh Executable file
View File

@ -0,0 +1,16 @@
#! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/config.sh"
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
. "$SCRIPT_DIR/config_override.sh"
fi
"$SCRIPT_DIR"/buildscripts/clean.sh
"$SCRIPT_DIR"/buildscripts/version.sh
"$SCRIPT_DIR"/buildscripts/licenses.sh
"$SCRIPT_DIR"/buildscripts/build.sh
"$SCRIPT_DIR"/buildscripts/nsis.sh

64
buildscripts/getprebuilt.sh Executable file
View File

@ -0,0 +1,64 @@
#! /usr/bin/env bash
set -e
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/i2pversion"
if [ -f i2pversion_override ]; then
. "$SCRIPT_DIR/i2pversion_override"
fi
. "$SCRIPT_DIR/config.sh"
if [ -f config_overide.sh ]; then
. "$SCRIPT_DIR/config_override.sh"
fi
"$SCRIPT_DIR"/buildscripts/version.sh
echo "version set"
"$SCRIPT_DIR"/buildscripts/licenses.sh
echo "licenses generated"
. "$HOME/github-release-config.sh"
if [ -z $TODAYSDATE ]; then
TODAYSDATE=$(date -d '-1 day' '+%Y%m%d')
fi
if [ ! -f I2P.zip ]; then
echo github-release download -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "I2P.zip" -t "$TODAYSDATE"
github-release download -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "I2P.zip" -t "$TODAYSDATE"
fi
unzip -FF I2P.zip || true
echo "unzipped prebuilt router"
sleep 3
echo "moved prebuilt router"
cd "$SCRIPT_DIR"
export I2P_PKG="$SCRIPT_DIR/../i2p.i2p.jpackage-build/pkg-temp"
export RES_DIR="$SCRIPT_DIR/../i2p.i2p.jpackage-build/installer/resources"
export I2P_JARS="$I2P_PKG/lib"
export I2P_JBIGI="$SCRIPT_DIR/../i2p.i2p.jpackage-build/installer/lib/jbigi"
export I2P_JBIGI_JAR="$SCRIPT_DIR/../i2p.i2p.jpackage-build/build/jbigi.jar"
mkdir -p "$SCRIPT_DIR/src/I2P/config"
rm -rf "$SCRIPT_DIR/src/I2P/config/geoip" "$SCRIPT_DIR/src/I2P/config/webapps" "$SCRIPT_DIR/src/I2P/config/certificates"
cp -v "$RES_DIR/clients.config" "$SCRIPT_DIR/src/I2P/config/"
cp -v "$RES_DIR/wrapper.config" "$SCRIPT_DIR/src/I2P/config/"
#grep -v 'router.updateURL' $(RES_DIR)/router.config > "$SCRIPT_DIR"/src/I2P/config/router.config
cat router.config > "$SCRIPT_DIR/src/I2P/config/router.config"
cat i2ptunnel.config > "$SCRIPT_DIR/src/I2P/config/i2ptunnel.config"
cp -v "$RES_DIR/hosts.txt" "$SCRIPT_DIR/src/I2P/config/hosts.txt"
cp -r "$RES_DIR/certificates" "$SCRIPT_DIR/src/I2P/config/certificates"
cp -r "$RES_DIR/eepsite" "$SCRIPT_DIR/src/I2P/config/eepsite"
mkdir -p "$SCRIPT_DIR/src/I2P/config/geoip"
cp -v "$RES_DIR/GeoLite2-Country.mmdb.gz" "$SCRIPT_DIR/src/I2P/config/geoip/GeoLite2-Country.mmdb.gz"
#cp -r "$I2P_PKG/webapps" "$SCRIPT_DIR/src/I2P/config/webapps"
cd "$SCRIPT_DIR/src/I2P/config/geoip" && gunzip GeoLite2-Country.mmdb.gz; cd "$SCRIPT_DIR"
mkdir -p "$SCRIPT_DIR"/build/I2P
cp -rv "$SCRIPT_DIR"/I2P/* "$SCRIPT_DIR"/build/I2P
cp -rv "$SCRIPT_DIR"/src/I2P/config "$SCRIPT_DIR"/build/I2P/config

124
buildscripts/launcher.sh Executable file
View File

@ -0,0 +1,124 @@
#! /usr/bin/env bash
set -e
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/i2pversion"
if [ -f i2pversion_override ]; then
. "$SCRIPT_DIR/i2pversion_override"
fi
. "$SCRIPT_DIR/config.sh"
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
. "$SCRIPT_DIR/config_override.sh"
fi
COUNT="Ten Nine Eight Seven Six Five Four Three Two One"
which java
export JAVA=$(java --version | tr -d 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\n' | cut -d ' ' -f 2 | cut -d '.' -f 1 | tr -d '\n\t\- ')
if [ "$JAVA" -lt "14" ]; then
echo "Java 14+ must be used to compile with jpackage, java is $JAVA"
exit 1
fi
if [ "$JAVA" -lt "17" ]; then
echo "It is highly recommended that you use Java 17+ to build release packages"
fi
if [ -z "${JAVA_HOME}" ]; then
export JAVA_HOME=`type -p java|xargs readlink -f|xargs dirname|xargs dirname`
fi
if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
export JAVA_HOME=`type -p java|xargs readlink -f|xargs dirname|xargs dirname`
fi
echo "Building with: $JAVA, $JAVA_HOME"
sleep 5s
"$SCRIPT_DIR"/buildscripts/version.sh
"$SCRIPT_DIR"/buildscripts/licenses.sh
#SCRIPT_DIR="$PWD"
export I2P_PKG="$SCRIPT_DIR/../i2p.i2p.jpackage-build/pkg-temp"
export RES_DIR="$SCRIPT_DIR/../i2p.i2p.jpackage-build/installer/resources"
export I2P_JARS="$I2P_PKG/lib"
export I2P_JBIGI="$SCRIPT_DIR/../i2p.i2p.jpackage-build/installer/lib/jbigi"
export I2P_JBIGI_JAR="$SCRIPT_DIR/../i2p.i2p.jpackage-build/build/jbigi.jar"
if [ ! -d "$SCRIPT_DIR/../i2p.i2p.jpackage-build/" ]; then
git clone --depth=1 -b "$VERSION" https://i2pgit.org/i2p-hackers/i2p.i2p "$SCRIPT_DIR/../i2p.i2p.jpackage-build/"
fi
cd "$SCRIPT_DIR/../i2p.i2p.jpackage-build/"
OLDEXTRA=$(find . -name RouterVersion.java -exec grep 'String EXTRA' {} \;)
if [ -z "$EXTRA" ]; then
export EXTRACODE="win"
export EXTRA=" public final static String EXTRA = \"-$EXTRACODE\";"
fi
find . -name RouterVersion.java -exec sed -i "s|$OLDEXTRA|$EXTRA|g" {} \;
git checkout -b "i2p-$VERSION-$EXTRACODE" && git commit -am "i2p-$VERSION-$EXTRACODE"
git pull --tags
git archive --format=tar.gz --output="$SCRIPT_DIR/../i2p.firefox/i2p.i2p.jpackage-build.tar.gz" "i2p-$VERSION-$EXTRACODE"
for i in $COUNT; do
echo -n "$i...."; sleep 1s
done
ant distclean pkg || true
ant jbigi
cd "$SCRIPT_DIR"
mkdir -p "$SCRIPT_DIR/src/I2P/config"
rm -rf "$SCRIPT_DIR/src/I2P/config/geoip" "$SCRIPT_DIR/src/I2P/config/webapps" "$SCRIPT_DIR/src/I2P/config/certificates"
cp -v "$RES_DIR/clients.config" "$SCRIPT_DIR/src/I2P/config/"
cp -v "$RES_DIR/wrapper.config" "$SCRIPT_DIR/src/I2P/config/"
#grep -v 'router.updateURL' $(RES_DIR)/router.config > "$SCRIPT_DIR"/src/I2P/config/router.config
cat router.config > "$SCRIPT_DIR/src/I2P/config/router.config"
cat i2ptunnel.config > "$SCRIPT_DIR/src/I2P/config/i2ptunnel.config"
cp -v "$RES_DIR/hosts.txt" "$SCRIPT_DIR/src/I2P/config/hosts.txt"
cp -R "$RES_DIR/certificates" "$SCRIPT_DIR/src/I2P/config/certificates"
cp -R "$RES_DIR/eepsite" "$SCRIPT_DIR/src/I2P/config/eepsite"
mkdir -p "$SCRIPT_DIR/src/I2P/config/geoip"
cp -v "$RES_DIR/GeoLite2-Country.mmdb.gz" "$SCRIPT_DIR/src/I2P/config/geoip/GeoLite2-Country.mmdb.gz"
cp -R "$I2P_PKG/webapps" "$SCRIPT_DIR/src/I2P/config/webapps"
cd "$SCRIPT_DIR/src/I2P/config/geoip" && gunzip GeoLite2-Country.mmdb.gz; cd ../../..
echo "compiling custom launcher"
mkdir -p "$SCRIPT_DIR/build"
cp "$I2P_JARS"/*.jar "$SCRIPT_DIR/build"
cp "$I2P_JBIGI_JAR" "$SCRIPT_DIR/build"
if [ ! -f "$SCRIPT_DIR/build/jna.jar" ]; then
wget -O "$SCRIPT_DIR/build/jna.jar" "https://repo1.maven.org/maven2/net/java/dev/jna/jna/$JNA_VERSION/jna-$JNA_VERSION.jar"
fi
if [ ! -f "$SCRIPT_DIR/build/jna-platform.jar" ]; then
wget -O "$SCRIPT_DIR/build/jna-platform.jar" "https://repo1.maven.org/maven2/net/java/dev/jna/jna-platform/$JNA_VERSION/jna-platform-$JNA_VERSION.jar"
fi
if [ ! -f "$SCRIPT_DIR/build/i2pfirefox.jar" ]; then
wget -O "$SCRIPT_DIR/build/i2pfirefox.jar" "https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/$I2PFIREFOX_VERSION/i2pfirefox.jar"
fi
for dll in "$I2P_JBIGI/"*windows*.dll; do
jar uf "$SCRIPT_DIR/build/jbigi.jar" "$dll"
done
cd "$SCRIPT_DIR"/java
"$JAVA_HOME"/bin/javac -d ../build -classpath "$SCRIPT_DIR/build/i2pfirefox.jar:$SCRIPT_DIR/build/jna.jar":"$SCRIPT_DIR/build/jna-platform.jar":"$SCRIPT_DIR/build/i2p.jar":"$SCRIPT_DIR/build/router.jar":"$SCRIPT_DIR/build/routerconsole.jar":"$SCRIPT_DIR/build/jbigi.jar" \
net/i2p/router/CopyConfigDir.java \
net/i2p/router/Elevator.java \
net/i2p/router/Shell32X.java \
net/i2p/router/WindowsServiceUtil.java \
net/i2p/router/WinLauncher.java \
net/i2p/router/WindowsUpdatePostProcessor.java \
net/i2p/router/WinUpdateProcess.java \
net/i2p/router/WindowsServiceUtil.java \
net/i2p/router/ZipUpdateProcess.java
cd ..
#echo "building launcher.jar"
cd "$SCRIPT_DIR/build"
"$JAVA_HOME"/bin/jar -cf launcher.jar net
cd ..

31
buildscripts/licenses.sh Executable file
View File

@ -0,0 +1,31 @@
#! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/i2pversion"
if [ -f i2pversion_override ]; then
. "$SCRIPT_DIR/i2pversion_override"
fi
. "$SCRIPT_DIR/config.sh"
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
. "$SCRIPT_DIR/config_override.sh"
fi
mkdir -p "$SCRIPT_DIR"/build/licenses
cp "$SCRIPT_DIR"/license/* "$SCRIPT_DIR"/build/licenses
cp "$SCRIPT_DIR"/LICENSE.md "$SCRIPT_DIR"/build/licenses/MIT.txt
cat "$SCRIPT_DIR"/build/licenses/LICENSE.index \
"$SCRIPT_DIR"/build/licenses/EPL.txt \
"$SCRIPT_DIR"/build/licenses/GPL+CLASSPATH.txt \
"$SCRIPT_DIR"/build/licenses/HTTPS-Everywhere.txt \
"$SCRIPT_DIR"/build/licenses/LICENSE.tor \
"$SCRIPT_DIR"/build/licenses/MIT.txt \
"$SCRIPT_DIR"/build/licenses/MPL2.txt \
"$SCRIPT_DIR"/build/licenses/NoScript.txt \
"$SCRIPT_DIR"/build/licenses/NSS.txt \
"$SCRIPT_DIR"/build/licenses/I2P.txt > "$SCRIPT_DIR"/build/licenses/LICENSE.txt
unix2dos "$SCRIPT_DIR"/build/licenses/LICENSE.txt

View File

@ -2,12 +2,13 @@
## EXPERIMENTAL. PROBABLY WON'T SEE THE LIGHT OF DAY BUT MAYBE I GET LUCKY. ## EXPERIMENTAL. PROBABLY WON'T SEE THE LIGHT OF DAY BUT MAYBE I GET LUCKY.
# Motivation SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1
. ./config.sh . ./config.sh
. ./i2pversion . ./i2pversion
./build.sh "$SCRIPT_DIR"/buildscripts/build.sh
jpackage --name I2P-MSI --app-version "$I2P_VERSION" \ jpackage --name I2P-MSI --app-version "$I2P_VERSION" \
--verbose \ --verbose \
--java-options "-Xmx512m" \ --java-options "-Xmx512m" \
@ -17,10 +18,10 @@ jpackage --name I2P-MSI --app-version "$I2P_VERSION" \
--java-options "--add-opens java.base/java.util.Properties=ALL-UNNAMED" \ --java-options "--add-opens java.base/java.util.Properties=ALL-UNNAMED" \
--java-options "--add-opens java.base/java.util.Properties.defaults=ALL-UNNAMED" \ --java-options "--add-opens java.base/java.util.Properties.defaults=ALL-UNNAMED" \
$JPACKAGE_OPTS \ $JPACKAGE_OPTS \
--app-content src/I2P/config \ --app-content "$SCRIPT_DIR"/src/I2P/config \
--app-content src/icons/windowsUIToopie2.png \ --app-content "$SCRIPT_DIR"/src/icons/windowsUIToopie2.png \
--icon src/icons/windowsUIToopie2.png \ --icon "$SCRIPT_DIR"/src/icons/windowsUIToopie2.png \
--input build \ --input "$SCRIPT_DIR/build" \
--verbose \ --verbose \
--type msi \ --type msi \
--win-dir-chooser \ --win-dir-chooser \

26
buildscripts/nsis.sh Executable file
View File

@ -0,0 +1,26 @@
#! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/i2pversion"
if [ -f i2pversion_override ]; then
. "$SCRIPT_DIR/i2pversion_override"
fi
. "$SCRIPT_DIR/config.sh"
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
. "$SCRIPT_DIR/config_override.sh"
fi
MAKENSIS=$(which makensis)
if [ -z "$MAKENSIS" ]; then
MAKENSIS="wsl makensis"
fi
cp "$SCRIPT_DIR"/src/nsis/*.nsi "$SCRIPT_DIR"/build
cp "$SCRIPT_DIR"/src/nsis/*.nsh "$SCRIPT_DIR"/build
cp "$SCRIPT_DIR"/src/icons/*.ico "$SCRIPT_DIR"/build
cd "$SCRIPT_DIR"/build && $MAKENSIS i2pbrowser-installer.nsi && cp I2P-Easy-Install-Bundle-*.exe ../ && echo "built windows installer"

View File

@ -1,6 +1,6 @@
#! /usr/bin/env bash #! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1 cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/config.sh" . "$SCRIPT_DIR/config.sh"
@ -9,5 +9,5 @@ if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
. "$SCRIPT_DIR/config_override.sh" . "$SCRIPT_DIR/config_override.sh"
fi fi
./unsigned.sh "$SCRIPT_DIR"/buildscripts/unsigned.sh
./sign.sh "$SCRIPT_DIR"/buildscripts/sign.sh

View File

@ -1,6 +1,6 @@
#! /usr/bin/env bash #! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1 cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/i2pversion" . "$SCRIPT_DIR/i2pversion"
@ -40,6 +40,8 @@ if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
linuxsign I2P-Easy-Install-Bundle-$I2P_VERSION.exe linuxsign I2P-Easy-Install-Bundle-$I2P_VERSION.exe
cp "I2P-Easy-Install-Bundle-$I2P_VERSION.exe" "I2P-Easy-Install-Bundle-$I2P_VERSION-signed.exe" cp "I2P-Easy-Install-Bundle-$I2P_VERSION.exe" "I2P-Easy-Install-Bundle-$I2P_VERSION-signed.exe"
else else
signtool.exe sign -a "I2P-Easy-Install-Bundle-$I2P_VERSION.exe" #signtool.exe sign -a "I2P-Easy-Install-Bundle-$I2P_VERSION.exe"
echo "WARNING: Signing is temporarily disabled for the installer."
sleep 5s
cp "I2P-Easy-Install-Bundle-$I2P_VERSION.exe" "I2P-Easy-Install-Bundle-$I2P_VERSION-signed.exe" cp "I2P-Easy-Install-Bundle-$I2P_VERSION.exe" "I2P-Easy-Install-Bundle-$I2P_VERSION-signed.exe"
fi fi

View File

@ -1,6 +1,6 @@
#! /usr/bin/env bash #! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1 cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/config.sh" . "$SCRIPT_DIR/config.sh"
@ -9,16 +9,16 @@ if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
. "$SCRIPT_DIR/config_override.sh" . "$SCRIPT_DIR/config_override.sh"
fi fi
export machine=unix export machine=unix
./clean.sh "$SCRIPT_DIR"/buildscripts/clean.sh
wsl make distclean wsl "$SCRIPT_DIR"/buildscripts/clean.sh
./build.sh "$SCRIPT_DIR"/buildscripts/build.sh
cd "$SCRIPT_DIR/I2P" || exit 1 cd "$SCRIPT_DIR/I2P" || exit 1
TORSOCKS=$(which torsocks) TORSOCKS=$(which torsocks)
if [ -f "${TORSOCKS}" ]; then if [ -f "${TORSOCKS}" ]; then
. "${TORSOCKS}" on . "${TORSOCKS}" on
fi fi
./lib/torbrowser.sh "$SCRIPT_DIR"/src/unix/torbrowser.sh
version="$(curl -s https://aus1.torproject.org/torbrowser/update_3/release/downloads.json | jq -r ".version")" version="$(curl -s https://aus1.torproject.org/torbrowser/update_3/release/downloads.json | jq -r ".version")"
. "${TORSOCKS}" off . "${TORSOCKS}" off
locale="en-US" # mention your locale. default = en-US locale="en-US" # mention your locale. default = en-US

15
buildscripts/unsigned.sh Executable file
View File

@ -0,0 +1,15 @@
#! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/config.sh"
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
. "$SCRIPT_DIR/config_override.sh"
fi
"$SCRIPT_DIR"/buildscripts/clean.sh
wsl "$SCRIPT_DIR"/buildscripts/clean.sh
"$SCRIPT_DIR"/buildscripts/build.sh
"$SCRIPT_DIR"/buildscripts/nsis.sh

26
buildscripts/version.sh Executable file
View File

@ -0,0 +1,26 @@
#! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/i2pversion"
if [ -f i2pversion_override ]; then
. "$SCRIPT_DIR/i2pversion_override"
fi
. "$SCRIPT_DIR/config.sh"
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
. "$SCRIPT_DIR/config_override.sh"
fi
echo "!define VERSIONMAJOR $VERSIONMAJOR" > "$SCRIPT_DIR"/src/nsis/i2pbrowser-version.nsi
echo "!define VERSIONMINOR $VERSIONMINOR" >> "$SCRIPT_DIR"/src/nsis/i2pbrowser-version.nsi
echo "!define VERSIONBUILD $VERSIONBUILD" >> "$SCRIPT_DIR"/src/nsis/i2pbrowser-version.nsi
echo "!define I2P_VERSION $PROFILE_VERSION" > "$SCRIPT_DIR"/src/nsis/i2pbrowser-jpackage.nsi
mkdir -p "$SCRIPT_DIR"/build
echo "$PROFILE_VERSION" > "$SCRIPT_DIR"/build/version.txt
echo "$PROFILE_VERSION" > "$SCRIPT_DIR"/build/version.txt
sed 's|!define VERSION||g' "$SCRIPT_DIR"/src/nsis/i2pbrowser-version.nsi | sed 's| |=|g' > .version

View File

@ -1,6 +1,6 @@
#! /usr/bin/env bash #! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)/..
cd "$SCRIPT_DIR" || exit 1 cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/config.sh" . "$SCRIPT_DIR/config.sh"
@ -8,17 +8,16 @@ cd "$SCRIPT_DIR" || exit 1
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
. "$SCRIPT_DIR/config_override.sh" . "$SCRIPT_DIR/config_override.sh"
fi fi
./clean.sh "$SCRIPT_DIR"/buildscripts/clean.sh
wsl make distclean wsl "$SCRIPT_DIR"/buildscripts/clean.sh
./build.sh "$SCRIPT_DIR"/buildscripts/build.sh
cd "$SCRIPT_DIR/I2P" || exit 1 cd "$SCRIPT_DIR/I2P" || exit 1
TORSOCKS=$(which torsocks) TORSOCKS=$(which torsocks)
if [ -f "${TORSOCKS}" ]; then if [ -f "${TORSOCKS}" ]; then
. "${TORSOCKS}" on . "${TORSOCKS}" on
fi fi
#./torbrowser-windows.sh "$SCRIPT_DIR"/src/win/torbrowser-windows.sh
../src/win/torbrowser-windows.sh
version="$(curl -s https://aus1.torproject.org/torbrowser/update_3/release/downloads.json | jq -r ".version")" version="$(curl -s https://aus1.torproject.org/torbrowser/update_3/release/downloads.json | jq -r ".version")"
. "${TORSOCKS}" off . "${TORSOCKS}" off
locale="en-US" # mention your locale. default = en-US locale="en-US" # mention your locale. default = en-US

View File

@ -1,3 +1,7 @@
2022-01-23 idk
* Move build scripts to their own directory and make them use correct paths when moved
* Add EXTRA to router when generating embedded router jars.
2022-09-20 idk 2022-09-20 idk
* improve compatibility with local service installs and with un-bundled installs side-by-side with bundled intalls * improve compatibility with local service installs and with un-bundled installs side-by-side with bundled intalls
* version 1.9.7 * version 1.9.7

View File

@ -10,17 +10,21 @@ uname=$(uname)
# to use it for Oracle OpenJDK18 # to use it for Oracle OpenJDK18
if [[ -n "$IS_WSL" || -n "$WSL_DISTRO_NAME" ]]; then if [[ -n "$IS_WSL" || -n "$WSL_DISTRO_NAME" ]]; then
PATH="/c/Program Files/Java/jdk-18.0.2/bin/:$PATH:/c/Program Files/Java/jdk-18.0.2/bin/" PATH="/c/Program Files/Java/jdk-19/bin/:$PATH:/c/Program Files/Java/jdk-19/bin/"
export PATH="/c/Program Files/Java/jdk-18.0.2/bin/:$PATH:/c/Program Files/Java/jdk-18.0.2/bin/" export PATH="/c/Program Files/Java/jdk-19/bin/:$PATH:/c/Program Files/Java/jdk-19/bin/"
JAVA_HOME="/c/Program Files/Java/jdk-18.0.2" JAVA_HOME="/c/Program Files/Java/jdk-19"
export JAVA_HOME="/c/Program Files/Java/jdk-18.0.2" export JAVA_HOME="/c/Program Files/Java/jdk-19"
HOST=win32
export HOST=win32
fi fi
if [ "${uname}" != "Linux" ]; then if [ "${uname}" != "Linux" ]; then
PATH="/c/Program Files/Java/jdk-18.0.2/bin/:$PATH:/c/Program Files/Java/jdk-18.0.2/bin/" PATH="/c/Program Files/Java/jdk-19/bin/:$PATH:/c/Program Files/Java/jdk-19/bin/"
export PATH="/c/Program Files/Java/jdk-18.0.2/bin/:$PATH:/c/Program Files/Java/jdk-18.0.2/bin/" export PATH="/c/Program Files/Java/jdk-19/bin/:$PATH:/c/Program Files/Java/jdk-19/bin/"
JAVA_HOME="/c/Program Files/Java/jdk-18.0.2" JAVA_HOME="/c/Program Files/Java/jdk-19"
export JAVA_HOME="/c/Program Files/Java/jdk-18.0.2" export JAVA_HOME="/c/Program Files/Java/jdk-19"
HOST=win32
export HOST=win32
fi fi
@ -74,9 +78,13 @@ fi
if [[ -n "$IS_WSL" || -n "$WSL_DISTRO_NAME" ]]; then if [[ -n "$IS_WSL" || -n "$WSL_DISTRO_NAME" ]]; then
PATH="$PATH:/c/Program Files (x86)/Windows Kits/10/App Certification Kit/" PATH="$PATH:/c/Program Files (x86)/Windows Kits/10/App Certification Kit/"
export PATH="$PATH:/c/Program Files (x86)/Windows Kits/10/App Certification Kit/" export PATH="$PATH:/c/Program Files (x86)/Windows Kits/10/App Certification Kit/"
PATH="$PATH:C:\Users\user\Downloads\m4-1.4.14-1-bin\bin"
export PATH="$PATH:C:\Users\user\Downloads\m4-1.4.14-1-bin\bin"
fi fi
if [ "${uname}" != "Linux" ]; then if [ "${uname}" != "Linux" ]; then
PATH="$PATH:/c/Program Files (x86)/Windows Kits/10/App Certification Kit/" PATH="$PATH:/c/Program Files (x86)/Windows Kits/10/App Certification Kit/"
export PATH="$PATH:/c/Program Files (x86)/Windows Kits/10/App Certification Kit/" export PATH="$PATH:/c/Program Files (x86)/Windows Kits/10/App Certification Kit/"
PATH="$PATH:C:\Users\user\Downloads\m4-1.4.14-1-bin\bin"
export PATH="$PATH:C:\Users\user\Downloads\m4-1.4.14-1-bin\bin"
fi fi

View File

@ -1,15 +0,0 @@
#! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/config.sh"
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
. "$SCRIPT_DIR/config_override.sh"
fi
./clean.sh
wsl make distclean
./build.sh
wsl make

View File

@ -1,28 +0,0 @@
#! /usr/bin/env bash
set -e
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/i2pversion"
if [ -f i2pversion_override ]; then
. "$SCRIPT_DIR/i2pversion_override"
fi
. "$SCRIPT_DIR/config.sh"
if [ -f config_overide.sh ]; then
. "$SCRIPT_DIR/config_override.sh"
fi
. "$HOME/github-release-config.sh"
if [ -z $TODAYSDATE ]; then
TODAYSDATE=$(date -d '-1 day' '+%Y%m%d')
fi
echo github-release download -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "I2P.zip" -t "$TODAYSDATE"
github-release download -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "I2P.zip" -t "$TODAYSDATE"
unzip I2P.zip
find I2P -type d -exec chmod 755 {} \;

View File

@ -21,7 +21,7 @@ tunnel.0.type=httpclient
tunnel.0.sharedClient=false tunnel.0.sharedClient=false
tunnel.0.interface=127.0.0.1 tunnel.0.interface=127.0.0.1
tunnel.0.listenPort=4444 tunnel.0.listenPort=4444
tunnel.0.proxyList=false.i2p tunnel.0.proxyList=exit.stormycloud.i2p
tunnel.0.i2cpHost=127.0.0.1 tunnel.0.i2cpHost=127.0.0.1
tunnel.0.i2cpPort=7654 tunnel.0.i2cpPort=7654
tunnel.0.option.inbound.nickname=HTTP Proxy tunnel.0.option.inbound.nickname=HTTP Proxy
@ -31,7 +31,7 @@ tunnel.0.option.i2cp.reduceIdleTime=900000
tunnel.0.option.i2cp.reduceOnIdle=true tunnel.0.option.i2cp.reduceOnIdle=true
tunnel.0.option.i2cp.reduceQuantity=1 tunnel.0.option.i2cp.reduceQuantity=1
tunnel.0.option.i2p.streaming.connectDelay=1000 tunnel.0.option.i2p.streaming.connectDelay=1000
tunnel.0.option.i2ptunnel.httpclient.SSLOutproxies=false.i2p tunnel.0.option.i2ptunnel.httpclient.SSLOutproxies=exit.stormycloud.i2p
tunnel.0.option.inbound.length=3 tunnel.0.option.inbound.length=3
tunnel.0.option.inbound.lengthVariance=0 tunnel.0.option.inbound.lengthVariance=0
tunnel.0.option.outbound.length=3 tunnel.0.option.outbound.length=3

View File

@ -2,15 +2,14 @@
JNA_VERSION=5.12.1 JNA_VERSION=5.12.1
export JNA_VERSION=5.12.1 export JNA_VERSION=5.12.1
I2PFIREFOX_VERSION=1.0.3 I2PFIREFOX_VERSION=1.0.7
export I2PFIREFOX_VERSION=1.0.3 export I2PFIREFOX_VERSION=1.0.7
# Comment this out to build from an alternate branch or # Comment this out to build from an alternate branch or
# the tip of the master branch. # the tip of the master branch.
VERSIONMAJOR=1 VERSIONMAJOR=2
VERSIONMINOR=9 VERSIONMINOR=1
VERSIONBUILD=7 VERSIONBUILD=0
I2P_VERSION="$VERSIONMAJOR.$VERSIONMINOR.$VERSIONBUILD" I2P_VERSION="$VERSIONMAJOR.$VERSIONMINOR.$VERSIONBUILD"
export I2P_VERSION="$VERSIONMAJOR.$VERSIONMINOR.$VERSIONBUILD" export I2P_VERSION="$VERSIONMAJOR.$VERSIONMINOR.$VERSIONBUILD"
VERSION=i2p-jpackage-1.9.4 VERSION=i2p-2.1.0
export VERSION=i2p-jpackage-1.9.4 export VERSION=i2p-2.1.0

View File

@ -88,7 +88,9 @@ public class WinLauncher extends CopyConfigDir {
File programs = programFile(); File programs = programFile();
File home = homeDir(); File home = homeDir();
System.setProperty("i2p.dir.base", programs.getAbsolutePath()); System.setProperty(
"i2p.dir.base",
new File(programs.getAbsolutePath(), "config").getAbsolutePath());
System.setProperty("i2p.dir.config", home.getAbsolutePath()); System.setProperty("i2p.dir.config", home.getAbsolutePath());
System.setProperty("router.pid", System.setProperty("router.pid",
String.valueOf(ProcessHandle.current().pid())); String.valueOf(ProcessHandle.current().pid()));

View File

@ -1,91 +0,0 @@
#! /usr/bin/env bash
set -e
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/i2pversion"
if [ -f i2pversion_override ]; then
. "$SCRIPT_DIR/i2pversion_override"
fi
. "$SCRIPT_DIR/config.sh"
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
. "$SCRIPT_DIR/config_override.sh"
fi
COUNT="Ten Nine Eight Seven Six Five Four Three Two One"
which java
export JAVA=$(java --version | tr -d 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\n' | cut -d ' ' -f 2 | cut -d '.' -f 1 | tr -d '\n\t\- ')
if [ "$JAVA" -lt "14" ]; then
echo "Java 14+ must be used to compile with jpackage, java is $JAVA"
exit 1
fi
if [ "$JAVA" -lt "17" ]; then
echo "It is highly recommended that you use Java 17+ to build release packages"
fi
if [ -z "${JAVA_HOME}" ]; then
export JAVA_HOME=`type -p java|xargs readlink -f|xargs dirname|xargs dirname`
fi
if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
export JAVA_HOME=`type -p java|xargs readlink -f|xargs dirname|xargs dirname`
fi
echo "Building with: $JAVA, $JAVA_HOME"
sleep 5s
HERE="$PWD"
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/"
tar --exclude="$HERE/../i2p.i2p.jpackage-build/.git" -cvzf i2p.i2p.jpackage-build.tar.gz "$HERE/../i2p.i2p.jpackage-build/"
fi
cd "$HERE/../i2p.i2p.jpackage-build/"
git pull --all
for i in $COUNT; do
echo -n "$i...."; sleep 1s
done
ant distclean pkg || true
cd "$HERE"
export I2P_PKG="$HERE/../i2p.i2p.jpackage-build/pkg-temp"
export RES_DIR="$HERE/../i2p.i2p.jpackage-build/installer/resources"
export I2P_JARS="$I2P_PKG/lib"
export I2P_JBIGI="$HERE/../i2p.i2p.jpackage-build/installer/lib/jbigi"
echo "compiling custom launcher"
mkdir -p build
cp "$I2P_JARS"/*.jar build
if [ ! -f "$HERE/build/jna.jar" ]; then
wget -O "$HERE/build/jna.jar" "https://repo1.maven.org/maven2/net/java/dev/jna/jna/$JNA_VERSION/jna-$JNA_VERSION.jar"
fi
if [ ! -f "$HERE/build/jna-platform.jar" ]; then
wget -O "$HERE/build/jna-platform.jar" "https://repo1.maven.org/maven2/net/java/dev/jna/jna-platform/$JNA_VERSION/jna-platform-$JNA_VERSION.jar"
fi
if [ ! -f "$HERE/build/i2pfirefox.jar" ]; then
wget -O "$HERE/build/i2pfirefox.jar" "https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/$I2PFIREFOX_VERSION/i2pfirefox.jar"
fi
cd java
"$JAVA_HOME"/bin/javac -d ../build -classpath "$HERE/build/i2pfirefox.jar:$HERE/build/jna.jar":"$HERE/build/jna-platform.jar":"$HERE/build/i2p.jar":"$HERE/build/router.jar":"$HERE/build/routerconsole.jar" \
net/i2p/router/CopyConfigDir.java \
net/i2p/router/Elevator.java \
net/i2p/router/Shell32X.java \
net/i2p/router/WindowsServiceUtil.java \
net/i2p/router/WinLauncher.java \
net/i2p/router/WindowsUpdatePostProcessor.java \
net/i2p/router/WinUpdateProcess.java \
net/i2p/router/WindowsServiceUtil.java \
net/i2p/router/ZipUpdateProcess.java
cd ..
#echo "building launcher.jar"
cd build
"$JAVA_HOME"/bin/jar -cf launcher.jar net
cd ..

View File

View File

@ -1,4 +0,0 @@
orig:
tar --exclude=debian --exclude=.git -cvzf ../i2p-firefox-profile_$(PROFILE_VERSION).orig.tar.gz .
## HOWTO: Don't bother. See http://i2pgit.org/idk/i2p.plugins.firefox debian jpackages.

View File

@ -1 +0,0 @@
# DEPRECATED: see https://i2pgit.org/idk/i2p.plugins.firefox for much better replacement.

View File

@ -1 +0,0 @@
#DEPRECATED moved to i2p.plugins.firefox as "Base/Strict Mode"

View File

View File

@ -1 +0,0 @@
#DEPRECATED moved to i2p.plugins.firefox as "Usability Mode"

View File

View File

@ -7,11 +7,11 @@ $(GOPATH)/src/i2pgit.org/idk/su3-tools/su3-tools:
go mod vendor && go build go mod vendor && go build
prepupdate: prepupdate:
cp -v "I2P-Profile-Installer-$(PROFILE_VERSION)-signed.su3" i2pwinupdate.su3 cp -v "I2P-Easy-Install-Bundle-$(PROFILE_VERSION)-signed.su3" i2pwinupdate.su3
su3: $(GOPATH)/src/i2pgit.org/idk/su3-tools/su3-tools su3: $(GOPATH)/src/i2pgit.org/idk/su3-tools/su3-tools
$(GOPATH)/src/i2pgit.org/idk/su3-tools/su3-tools -name "I2P-Profile-Installer-$(PROFILE_VERSION)-signed" -signer "$(SIGNER)" -version "$(I2P_VERSION)" $(GOPATH)/src/i2pgit.org/idk/su3-tools/su3-tools -name "I2P-Easy-Install-Bundle-$(PROFILE_VERSION)-signed" -signer "$(SIGNER)" -version "$(PROFILE_VERSION)"
java -cp "$(HOME)/i2p/lib/*" net.i2p.crypto.SU3File sign -c ROUTER -f EXE I2P-Profile-Installer-$(PROFILE_VERSION)-signed.exe I2P-Profile-Installer-$(PROFILE_VERSION)-signed.su3 "$(HOME)/.i2p-plugin-keys/news-su3-keystore.ks" $(PROFILE_VERSION) $(SIGNER) java -cp "$(HOME)/i2p/lib/*" net.i2p.crypto.SU3File sign -c ROUTER -f EXE I2P-Easy-Install-Bundle-$(PROFILE_VERSION)-signed.exe I2P-Easy-Install-Bundle-$(PROFILE_VERSION)-signed.su3 "$(HOME)/.i2p-plugin-keys/news-su3-keystore.ks" $(PROFILE_VERSION) $(SIGNER)
i2pwinupdate.su3.torrent: prepupdate su3 i2pwinupdate.su3.torrent: prepupdate su3
mktorrent \ mktorrent \

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 67 KiB

View File

@ -11,13 +11,126 @@
!ifndef FindProcess !ifndef FindProcess
!define FindProcess '!insertmacro FindProcess' !define FindProcess '!insertmacro FindProcess'
!ifndef un.FindProcess
!define un.FindProcess '!insertmacro un.FindProcess'
!macro FindProcess ProcessList BoolReturn !macro FindProcess ProcessList BoolReturn
Push '${ProcessList}' Push '${ProcessList}'
Call FindProcess Call FindProcess
Pop ${BoolReturn} Pop ${BoolReturn}
!macroend !macroend
!macro un.FindProcess ProcessList BoolReturn
Push '${ProcessList}'
Call un.FindProcess
Pop ${BoolReturn}
!macroend
Function un.FindProcess
# return True if any process in ProcessList is active
Exch $0 ; get ProcessList, save $0
Push $1
Push $2
Push $R0
Push $R1
Push $R2
StrCpy $2 "$0," ; $2 = ProcessList
Push 0 ; set return value = False
# method based upon one by Phoenix1701@gmail.com 1/27/07
System::Alloc 1024
Pop $R0 ; process list buffer
# get an array of all process ids
System::Call "Psapi::EnumProcesses(i R0, i 1024, *i .R1)i .r0"
${Unless} $0 = 0
IntOp $R1 $R1 / 4 ; Divide by sizeof(DWORD) to get $R1 process count
IntOp $R1 $R1 - 1 ; decr for 0 base loop
ClearErrors
${For} $R2 0 $R1
# get a PID from the array
IntOp $0 $R2 << 2
IntOp $0 $0 + $R0 ; buffer.dword[i]
System::Call "*$0(i .r0)" ; Get next PID
${Unless} $0 = 0
Push $0
Call un.GetProcessName
Pop $1
# is this process one we are looking for?
${WordFind} '$2' ',' 'E/$1' $0
${Unless} ${Errors}
# yes, change return value
Pop $0 ; discard old result
Push 1 ; set return True
# exit the loop
${Break}
${EndUnless}
${EndUnless}
${Next}
${EndUnless}
System::Free $R0
Pop $0 ; get return value
Pop $R2 ; restore registers
Pop $R1
Pop $R0
Pop $2
Pop $1
Exch $0
FunctionEnd
Function un.GetProcessName
# ( Pid -- ProcessName )
Exch $2 ; get Pid, save $2
Push $0
Push $1
Push $3
Push $R0
System::Call "Kernel32::OpenProcess(i 1040, i 0, i r2)i .r3"
StrCpy $2 "<unknown>" ; set return value
${Unless} $3 = 0 ; $3 is hProcess
# get hMod array
System::Alloc 1024
Pop $R0
# params: Pid, &hMod, sizeof(hMod), &cb
System::Call "Psapi::EnumProcessModules(i r3, i R0, i 1024, *i .r1)i .r0"
${Unless} $0 = 0
# get first hMod
System::Call "*$R0(i .r0)"
# get BaseName; params: Pid, hMod, szBuffer, sizeof(szBuffer)
System::Call "Psapi::GetModuleBaseName(i r3, i r0, t .r2, i 256)i .r0"
${EndUnless}
System::Free $R0
System::Call "kernel32::CloseHandle(i r3)"
${EndUnless}
Pop $R0 ; restore registers
Pop $3
Pop $1
Pop $0
Exch $2 ; save process name
FunctionEnd
!endif
Function FindProcess Function FindProcess
# return True if any process in ProcessList is active # return True if any process in ProcessList is active
Exch $0 ; get ProcessList, save $0 Exch $0 ; get ProcessList, save $0
@ -119,4 +232,4 @@ Function GetProcessName
Pop $0 Pop $0
Exch $2 ; save process name Exch $2 ; save process name
FunctionEnd FunctionEnd
!endif !endif

View File

@ -197,6 +197,7 @@ Function installerFunction
CreateShortCut "$DESKTOP\Browse I2P.lnk" "$INSTDIR\I2P.exe" "" "$INSTDIR\ui2pbrowser_icon.ico" CreateShortCut "$DESKTOP\Browse I2P.lnk" "$INSTDIR\I2P.exe" "" "$INSTDIR\ui2pbrowser_icon.ico"
CreateShortCut "$DESKTOP\Browse I2P - Temporary Identity.lnk" "$INSTDIR\I2P.exe -private" "" "$INSTDIR\ui2pbrowser_icon.ico" CreateShortCut "$DESKTOP\Browse I2P - Temporary Identity.lnk" "$INSTDIR\I2P.exe -private" "" "$INSTDIR\ui2pbrowser_icon.ico"
CreateShortCut "$SMPROGRAMS\${APPNAME}\Uninstall I2P Easy-Install Bundle.lnk" "$INSTDIR\uninstall-i2pbrowser.exe" "" "$INSTDIR\ui2pbrowser_icon.ico"
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
SetShellVarContext current SetShellVarContext current
@ -210,9 +211,8 @@ Function installerFunction
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
# create the uninstaller # create the uninstaller
WriteUninstaller "$INSTDIR\uninstall-i2pbrowser.exe" WriteUninstaller "$INSTDIR\uninstall-i2pbrowser.exe"
CreateShortCut "$SMPROGRAMS\${APPNAME}\Uninstall I2P Easy-Install Bundle.lnk" "$INSTDIR\uninstall-i2pbrowser.exe" "" "$INSTDIR\ui2pbrowser_icon.ico"
# create a shortcut to the uninstaller
CreateShortCut "$SMPROGRAMS\${APPNAME}\Uninstall-${APPNAME}.lnk" "$INSTDIR\uninstall-i2pbrowser.exe"
FunctionEnd FunctionEnd
@ -223,6 +223,16 @@ SectionEnd
# uninstaller section start # uninstaller section start
Section "uninstall" Section "uninstall"
# Don't try to uninstall until the router is fully shut down.
${un.FindProcess} "I2P.exe" $0
${If} $0 <> 0
MessageBox MB_OK "I2P is still running, uninstaller is paused. Uninstaller will continue after I2P has shut down."
${Do}
${un.FindProcess} "I2P.exe" $0
Sleep 500
${LoopWhile} $0 <> 0
${EndIf}
# Uninstall the launcher scripts # Uninstall the launcher scripts
rmDir /r "$INSTDIR\app" rmDir /r "$INSTDIR\app"
rmDir /r "$INSTDIR\config" rmDir /r "$INSTDIR\config"

View File

@ -1 +1 @@
!define I2P_VERSION 1.9.7 !define I2P_VERSION

View File

@ -1,3 +1,3 @@
!define VERSIONMAJOR 1 !define VERSIONMAJOR 2
!define VERSIONMINOR 9 !define VERSIONMINOR 1
!define VERSIONBUILD 7 !define VERSIONBUILD 0

View File

@ -27,6 +27,12 @@ gpgv --keyring ./tor.keyring "torbrowser-install-win64-${version}_${locale}.exe.
#tar xvJf "torbrowser-install-win64-${version}_${locale}.exe" #tar xvJf "torbrowser-install-win64-${version}_${locale}.exe"
#for n in `seq 1 2000`; do echo $n; dd ibs=256 if="torbrowser-install-win64-${version}_${locale}.exe" count=2 skip=$n | file - ; done 2>/dev/null |less #for n in `seq 1 2000`; do echo $n; dd ibs=256 if="torbrowser-install-win64-${version}_${locale}.exe" count=2 skip=$n | file - ; done 2>/dev/null |less
#zip -FF "torbrowser-install-win64-${version}_${locale}.exe" --out extracted.zip #zip -FF "torbrowser-install-win64-${version}_${locale}.exe" --out extracted.zip
export WINEPREFIX=$(pwd)/../tmp WINE=$(which wine)
wine "torbrowser-install-win64-${version}_${locale}.exe" /S /D . if [ -z "$WINE" ]; then
cp -vr "$WINEPREFIX/drive_c/users/idk/Desktop/Tor Browser/" "Tor Browser" "./torbrowser-install-win64-${version}_${locale}.exe" /S #/D .
cp -vr "$HOME/Desktop/Tor Browser/" "Tor Browser"
else
export WINEPREFIX=$(pwd)/../tmp
$WINE "torbrowser-install-win64-${version}_${locale}.exe" /S #/D .
cp -vr "$WINEPREFIX/drive_c/users/idk/Desktop/Tor Browser/" "Tor Browser"
fi

View File

@ -1,15 +0,0 @@
#! /usr/bin/env bash
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
cd "$SCRIPT_DIR" || exit 1
. "$SCRIPT_DIR/config.sh"
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
. "$SCRIPT_DIR/config_override.sh"
fi
./clean.sh
wsl make distclean
./build.sh
wsl make