Compare commits

...

34 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
45 changed files with 532 additions and 326 deletions

View File

@@ -9,7 +9,7 @@ preset=`rm .version; make version`
PROFILE_VERSION=$(VERSIONMAJOR).$(VERSIONMINOR).$(VERSIONBUILD) 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,20 +30,9 @@ 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"
@@ -65,33 +42,13 @@ 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,8 +69,6 @@ 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 dumpinfo 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'`

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,7 +1,7 @@
#! /usr/bin/env bash #! /usr/bin/env bash
set -e set -e
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"
@@ -16,6 +16,9 @@ if [ -f config_overide.sh ]; then
. "$SCRIPT_DIR/config_override.sh" . "$SCRIPT_DIR/config_override.sh"
fi fi
"$SCRIPT_DIR"/buildscripts/version.sh
"$SCRIPT_DIR"/buildscripts/licenses.sh
if [ -z $machine ]; then if [ -z $machine ]; then
unameOut="$(uname -s)" unameOut="$(uname -s)"
case "${unameOut}" in case "${unameOut}" in
@@ -25,32 +28,32 @@ if [ -z $machine ]; then
esac esac
fi fi
ICON="src/icons/ui2pbrowser_icon.ico" ICON="$SCRIPT_DIR/src/icons/ui2pbrowser_icon.ico"
if [ "$machine" = "Mac" ]; then if [ "$machine" = "Mac" ]; then
rm -rf I2P rm -rf I2P
./getprebuilt.sh "$SCRIPT_DIR"/buildscripts/getprebuilt.sh
exit 0 exit 0
elif [ "$machine" = "Linux" ]; then elif [ "$machine" = "Linux" ]; then
rm -rf I2P rm -rf I2P
./getprebuilt.sh "$SCRIPT_DIR"/buildscripts/getprebuilt.sh
exit 0 exit 0
elif [ "$machine" = "unix" ]; then elif [ "$machine" = "unix" ]; then
ICON=src/icons/windowsUIToopie2.png ICON="$SCRIPT_DIR"/src/icons/windowsUIToopie2.png
export EXTRACODE="unix"
export EXTRA=" public final static String EXTRA = \"-$EXTRACODE\";"
fi fi
. "$SCRIPT_DIR/launcher.sh" . "$SCRIPT_DI"$SCRIPT_DIR"/buildscripts/launcher.sh"
if [ -z $I2P_VERSION ]; then 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') 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 fi
echo "preparing to invoke jpackage for I2P version $I2P_VERSION" echo "preparing to invoke jpackage for I2P version $I2P_VERSION"
rm -rf I2P rm -rf I2P
make src/I2P/config
if [ ! -d "I2P" ]; then if [ ! -d "I2P" ]; then
"$JAVA_HOME"/bin/jpackage --type app-image --name I2P --app-version "$I2P_VERSION" \ "$JAVA_HOME"/bin/jpackage --type app-image --name I2P --app-version "$I2P_VERSION" \
--verbose \ --verbose \
@@ -61,15 +64,20 @@ if [ ! -d "I2P" ]; then
--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 \
--resource-dir build \ --resource-dir $SCRIPT_DIR/build \
--app-content src/I2P/config \ --app-content "$SCRIPT_DIR"/src/I2P/config \
--app-content src/unix/torbrowser.sh \ --app-content "$SCRIPT_DIR"/src/unix/torbrowser.sh \
--app-content src/win/torbrowser-windows.sh \ --app-content "$SCRIPT_DIR"/src/win/torbrowser-windows.sh \
--app-content src/icons/windowsUIToopie2.png \ --app-content "$SCRIPT_DIR"/src/icons/windowsUIToopie2.png \
--app-content src/icons/ui2pbrowser_icon.ico \ --app-content "$SCRIPT_DIR"/src/icons/ui2pbrowser_icon.ico \
--icon "${ICON}" \ --icon "${ICON}" \
--input build --main-jar launcher.jar --main-class net.i2p.router.WinLauncher --input $SCRIPT_DIR/build --main-jar launcher.jar --main-class net.i2p.router.WinLauncher
fi fi
cp "$I2P_PKG/licenses/"* license/ cp "$I2P_PKG/licenses/"* license/
cp "$HERE/../i2p.i2p.jpackage-build/LICENSE.txt" license/I2P.txt 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"

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"
@@ -46,7 +46,7 @@ fi
echo github-release release -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE" 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" github-release release -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
./zip.sh "$SCRIPT_DIR"/buildscripts/zip.sh
WINZIPCHECKSUM=$(sha256sum "I2P-windows-portable.zip") 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" 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" 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,18 +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
./fixperms.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

@@ -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,6 +0,0 @@
#! /usr/bin/env sh
find I2P -type d -exec chmod -v 755 {} \;
find I2P -type f -exec chmod -v +rw {} \;
find I2P -type d -exec chmod -v 755 {} \;
find I2P -type f -exec chmod -v +rw {} \;

View File

@@ -1,31 +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
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 I2P.zip
sleep 3
./fixperms.sh

View File

@@ -7,11 +7,9 @@ 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=2 VERSIONMAJOR=2
VERSIONMINOR=0 VERSIONMINOR=1
VERSIONBUILD=0 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-2.0.0 VERSION=i2p-2.1.0
#export VERSION=i2p-2.0.0 export VERSION=i2p-2.1.0
VERSION=master
export VERSION=master

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", 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("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,98 +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/"
fi
cd "$HERE/../i2p.i2p.jpackage-build/"
git pull --tags
git archive --format=tar.gz --output="$HERE/../i2p.firefox/i2p.i2p.jpackage-build.tar.gz" "$VERSION"
for i in $COUNT; do
echo -n "$i...."; sleep 1s
done
ant distclean pkg || true
ant jbigi
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"
export I2P_JBIGI_JAR="$HERE/../i2p.i2p.jpackage-build/build/jbigi.jar"
echo "compiling custom launcher"
mkdir -p build
cp "$I2P_JARS"/*.jar build
cp "$I2P_JBIGI_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
for dll in "$I2P_JBIGI/"*windows*.dll; do
jar uf "$HERE/build/jbigi.jar" "$dll"
done
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":"$HERE/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 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

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

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