diff --git a/Makefile b/Makefile index a36fc45..c5b8828 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ version.txt: i2pbrowser-jpackage.nsi: echo "!define I2P_VERSION $(I2P_VERSION)" > src/nsis/i2pbrowser-jpackage.nsi -jpackage: .version I2P all +jpackage: .version I2P build/I2P/config all help: .version @echo "I2P-Profile-Installer-$(PROFILE_VERSION)" @@ -58,8 +58,6 @@ build/I2P: build cp -rv I2P build/I2P ; true cp "$(I2P_JBIGI)"/*windows*.dll build/I2P/runtime/lib; true -configdir: 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 @@ -79,7 +77,7 @@ src/I2P/config: build/I2P/config: build/I2P make src/I2P/config; true - cp -rv src/I2P/config build/I2P/config ; true + cp -rv src/I2P/config/* build/I2P/config ; true cp -rv src/I2P/config build/I2P/.i2p ; true # @@ -101,295 +99,30 @@ build: @echo "creating build directory" mkdir -p build -profile: build/profile/user.js build/profile/prefs.js build/profile/bookmarks.html build/profile/storage-sync.sqlite copy-xpi +include makefiles/profile.mk -profile.tgz: .version profile -# $(eval PROFILE_VERSION := $(shell cat src/profile/version.txt)) - @echo "building profile tarball $(PROFILE_VERSION)" - sh -c 'ls I2P && cp -rv build/I2P build/profile/I2P'; true - install -m755 src/unix/i2pbrowser.sh build/profile/i2pbrowser.sh - cd build && tar -czf profile-$(PROFILE_VERSION).tgz profile && cp profile-$(PROFILE_VERSION).tgz ../ +include makefiles/app-profile.mk -build/profile/user.js: build/profile src/profile/user.js - cp src/profile/user.js build/profile/user.js +-include makefiles/new-extensions.mk -build/profile/prefs.js: build/profile src/profile/prefs.js - cp src/profile/prefs.js build/profile/prefs.js +include makefiles/extensions.mk -build/profile/bookmarks.html: build/profile src/profile/bookmarks.html - cp src/profile/bookmarks.html build/profile/bookmarks.html +include makefiles/build.mk -build/profile/storage-sync.sqlite: build/profile src/profile/storage-sync.sqlite - cp src/profile/storage-sync.sqlite build/profile/storage-sync.sqlite +include makefiles/install.mk -copy-xpi: build/NoScript.xpi build/HTTPSEverywhere.xpi build/i2ppb@eyedeekay.github.io.xpi build/profile/extensions - cp build/NoScript.xpi "build/profile/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi" - cp build/HTTPSEverywhere.xpi "build/profile/extensions/https-everywhere-eff@eff.org.xpi" - cp build/i2ppb@eyedeekay.github.io.xpi build/profile/extensions/i2ppb@eyedeekay.github.io.xpi +include makefiles/su.mk -app-profile: .version build/app-profile/user.js build/app-profile/prefs.js build/app-profile/chrome/userChrome.css build/app-profile/bookmarks.html build/app-profile/storage-sync.sqlite copy-app-xpi +include makefiles/su-unsigned.mk -app-profile.tgz: app-profile -# $(eval PROFILE_VERSION := $(shell cat src/app-profile/version.txt)) - @echo "building app-profile tarball $(PROFILE_VERSION)" - sh -c 'ls I2P && cp -rv build/I2P build/app-profile/I2P'; true - install -m755 src/unix/i2pconfig.sh build/app-profile/i2pconfig.sh - cd build && tar -czf app-profile-$(PROFILE_VERSION).tgz app-profile && cp app-profile-$(PROFILE_VERSION).tgz ../ +include makefiles/docker.mk -build/app-profile/user.js: build/app-profile src/app-profile/user.js - cp src/app-profile/user.js build/app-profile/user.js - -build/app-profile/prefs.js: build/app-profile src/app-profile/prefs.js - cp src/app-profile/prefs.js build/app-profile/prefs.js - -build/app-profile/chrome/userChrome.css: build/app-profile/chrome src/app-profile/chrome/userChrome.css - cp src/app-profile/chrome/userChrome.css build/app-profile/chrome/userChrome.css - -build/app-profile/bookmarks.html: build/app-profile src/app-profile/bookmarks.html - cp src/app-profile/bookmarks.html build/app-profile/bookmarks.html - -build/app-profile/storage-sync.sqlite: build/app-profile src/app-profile/storage-sync.sqlite - cp src/app-profile/storage-sync.sqlite build/app-profile/storage-sync.sqlite - -copy-app-xpi: build/NoScript.xpi build/HTTPSEverywhere.xpi build/i2ppb@eyedeekay.github.io.xpi build/app-profile/extensions - cp build/HTTPSEverywhere.xpi "build/app-profile/extensions/https-everywhere-eff@eff.org.xpi" - cp build/i2ppb@eyedeekay.github.io.xpi build/app-profile/extensions/i2ppb@eyedeekay.github.io.xpi - -build-extensions: build/i2ppb@eyedeekay.github.io.xpi build/NoScript.xpi build/HTTPSEverywhere.xpi - -build/i2ppb@eyedeekay.github.io.xpi: i2psetproxy.url - curl -L `cat i2psetproxy.url` > build/i2ppb@eyedeekay.github.io.xpi - -build/NoScript.xpi: NoScript.url - curl -L `cat NoScript.url` > build/NoScript.xpi - -build/HTTPSEverywhere.xpi: HTTPSEverywhere.url - curl -L `cat HTTPSEverywhere.url` > build/HTTPSEverywhere.xpi - -clean-extensions: - rm -fv i2psetproxy.url NoScript.url HTTPSEverywhere.url - -extensions:HTTPSEverywhere.url NoScript.url i2psetproxy.url - --include new-extensions.mk - -HTTPSEverywhere.url: - @echo "https://addons.mozilla.org/firefox/downloads/file/3809748/"`./amo-version.sh https-everywhere`"/https-everywhere-eff@eff.org.xpi" > HTTPSEverywhere.url - -NoScript.url: - @echo "https://addons.mozilla.org/firefox/downloads/file/3534184/"`./amo-version.sh noscript`"/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi" > NoScript.url - -i2psetproxy.url: - @echo "https://addons.mozilla.org/firefox/downloads/file/3887295/"`./amo-version.sh i2p-in-private-browsing`"/i2ppb@eyedeekay.github.io.xpi" > i2psetproxy.url - -# TODO: switch to the "Rhizome" variant which has extended permission to do things like set the homepage. -# @echo "https://addons.mozilla.org/firefox/downloads/file/3799074/"`./amo-version.sh i2pipb-rhizome-variant`"/i2prhz@eyedeekay.github.io.xpi" > i2psetproxy.url - -#https://addons.mozilla.org/firefox/downloads/file/3821635/i2p_in_private_browsing-0.112.1-an+fx.xpi -#i2ppb@eyedeekay.github.io.xpi - -build/profile/extensions: build/profile - mkdir -p build/profile/extensions - -build/profile: build - mkdir -p build/profile - -build/win: - mkdir -p build/win/ - -build/win/i2pbrowser.bat: - cp src/win/i2pbrowser.bat build/win/i2pbrowser.bat - -build/win/i2pconfig.bat: - cp src/win/i2pconfig.bat build/win/i2pconfig.bat - -build/win/i2pbrowser-private.bat: - cp src/win/i2pbrowser-private.bat build/win/i2pbrowser-private.bat - -launchers: build/win build/win/i2pbrowser.bat build/win/i2pbrowser-private.bat build/win/i2pconfig.bat - -build/app-profile/chrome: build/app-profile - mkdir -p build/app-profile/chrome - -build/app-profile/extensions: build/app-profile - mkdir -p build/app-profile/extensions - -build/app-profile: build - mkdir -p build/app-profile - -install: - install -D -m644 src/unix/i2pbrowserrc /etc/i2pbrowser/i2pbrowserrc - install -D -m644 src/unix/i2pbrowserdebianrc /etc/i2pbrowser/i2pbrowserdebianrc - install -D -m755 build/profile/i2pbrowser.sh /usr/local/bin/i2pbrowser - install -D -m755 build/app-profile/i2pconfig.sh /usr/local/bin/i2pconfig - install -D -m755 src/unix/i2p-config-service-setup.sh /usr/local/bin/i2p-config-service-setup - cp -vr build/profile /var/lib/i2pbrowser/profile - cp -vr build/app-profile /var/lib/i2pbrowser/app-profile - cp -vr src/icons /var/lib/i2pbrowser/icons - cp src/unix/desktop/i2pbrowser.desktop /usr/share/applications - cp src/unix/desktop/i2pconfig.desktop /usr/share/applications - -uninstall: - rm -rfv /etc/i2pbrowser \ - /var/lib/i2pbrowser \ - /etc/i2pbrowser/i2pbrowserrc \ - /usr/local/bin/i2pbrowser \ - /usr/local/bin/i2pconfig \ - /usr/local/bin/i2p-config-service-setup \ - /usr/share/applications/i2pbrowser.desktop \ - /usr/share/applications/i2pconfig.desktop - -checkinstall: .version - checkinstall \ - --default \ - --install=no \ - --fstrans=yes \ - --pkgname=i2p-firefox \ - --pkgversion=$(PROFILE_VERSION) \ - --pkggroup=net \ - --pkgrelease=1 \ - --pkgsource="https://i2pgit.org/i2p-hackers/i2p.firefox" \ - --maintainer="$(SIGNER)" \ - --requires="firefox,wget" \ - --suggests="i2p,i2p-router,syndie,tor,tsocks" \ - --nodoc \ - --deldoc=yes \ - --deldesc=yes \ - --backup=no - -GOPATH=$(HOME)/go - -$(GOPATH)/src/i2pgit.org/idk/su3-tools/su3-tools: - git clone https://i2pgit.org/idk/su3-tools $(GOPATH)/src/i2pgit.org/idk/su3-tools; true - git pull --all - cd $(GOPATH)/src/i2pgit.org/idk/su3-tools && \ - go mod vendor && go build - -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)" - 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" "$(I2P_VERSION)" $(SIGNER) - -su3-unsigned-exe: - $(GOPATH)/src/i2pgit.org/idk/su3-tools/su3-tools -name "I2P-Profile-Installer-$(PROFILE_VERSION)" -signer "$(SIGNER)" -version "$(I2P_VERSION)" - java -cp "$(HOME)/i2p/lib/*" net.i2p.crypto.SU3File sign -c ROUTER -f EXE I2P-Profile-Installer-$(PROFILE_VERSION).exe I2P-Profile-Installer-$(PROFILE_VERSION)-signed.su3 "$(HOME)/.i2p-plugin-keys/news-su3-keystore.ks" "$(I2P_VERSION)" $(SIGNER) - -docker: - docker build -t geti2p/i2p.firefox . - -xhost: - xhost + local:docker - -run: docker xhost - docker run -it --rm \ - --net=host \ - -e DISPLAY=unix$(DISPLAY) \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - geti2p/i2p.firefox firefox --profile /src/build/profile - -orig: - tar --exclude=debian --exclude=.git -cvzf ../i2p-firefox-profile_$(PROFILE_VERSION).orig.tar.gz . - -## HOWTO: If you need to release a package to launchpad, build for the oldest -## release launchpad supports(bionic AFIACT). Then, after the build is -## published, copy it to the other distributions. When bionic is out of date, -## update it to the new LTS. - -bionic: - @sed -i "s|`head -n 1 debian/changelog`|i2p-firefox-profile ($(PROFILE_VERSION)-1) bionic; urgency=medium|g" debian/changelog - make orig - debuild -S - make dput - -focal: - @sed -i "s|`head -n 1 debian/changelog`|i2p-firefox-profile ($(PROFILE_VERSION)-1) focal; urgency=medium|g" debian/changelog - make orig - debuild -S - make dput - -groovy: - @sed -i "s|`head -n 1 debian/changelog`|i2p-firefox-profile ($(PROFILE_VERSION)-1) groovy; urgency=medium|g" debian/changelog - make orig - debuild -S - make dput - -buster: - @sed -i "s|`head -n 1 debian/changelog`|i2p-firefox-profile ($(PROFILE_VERSION)-1) buster; urgency=medium|g" debian/changelog - make orig - debuild -S - make dput - -bullseye: - @sed -i "s|`head -n 1 debian/changelog`|i2p-firefox-profile ($(PROFILE_VERSION)-1) bullseye; urgency=medium|g" debian/changelog - make orig - debuild -S - make dput - -trixie: - @sed -i "s|`head -n 1 debian/changelog`|i2p-firefox-profile ($(PROFILE_VERSION)-1) trixie; urgency=medium|g" debian/changelog - make orig - debuild -S - make dput - -sid: - @sed -i "s|`head -n 1 debian/changelog`|i2p-firefox-profile ($(PROFILE_VERSION)-1) sid; urgency=medium|g" debian/changelog - make orig - debuild -S - make dput - -dput: - dput --simulate --force ppa:i2p-community/ppa ../i2p-firefox-profile_$(PROFILE_VERSION)-1_source.changes || exit - dput --force ppa:i2p-community/ppa ../i2p-firefox-profile_$(PROFILE_VERSION)-1_source.changes - -launchpad: bionic +include makefiles/debian.mk I2P_DATE=`date +%Y-%m-%d` -prepupdate: - cp -v "I2P-Profile-Installer-$(PROFILE_VERSION)-signed.su3" i2pwinupdate.su3 || cp -v "I2P-Profile-Installer-$(PROFILE_VERSION).su3" i2pwinupdate.su3 - -i2pwinupdate.su3.torrent: prepupdate - mktorrent --announce=http://tracker2.postman.i2p/announce.php --announce=http://w7tpbzncbcocrqtwwm3nezhnnsw4ozadvi2hmvzdhrqzfxfum7wa.b32.i2p/a --announce=http://mb5ir7klpc2tj6ha3xhmrs3mseqvanauciuoiamx2mmzujvg67uq.b32.i2p/a i2pwinupdate.su3 - -torrent: i2pwinupdate.su3.torrent - MAGNET=`bttools torrent printinfo i2pwinupdate.su3.torrent | grep 'MagNet' | sed 's|MagNet: ||g' | sed 's|%3A|:|g'| sed 's|%2F|/|g'` - -releases.json: torrent - @echo "[" | tee ../i2p.newsxml/data/win/beta/releases.json - @echo " {" | tee -a ../i2p.newsxml/data/win/beta/releases.json - @echo " \"date\": \"$(I2P_DATE)\"," | tee -a ../i2p.newsxml/data/win/beta/releases.json - @echo " \"version\": \"$(I2P_VERSION)\"," | tee -a ../i2p.newsxml/data/win/beta/releases.json - @echo " \"minVersion\": \"1.5.0\"," | tee -a ../i2p.newsxml/data/win/beta/releases.json - @echo " \"minJavaVersion\": \"1.8\"," | tee -a ../i2p.newsxml/data/win/beta/releases.json - @echo " \"updates\": {" | tee -a ../i2p.newsxml/data/win/beta/releases.json - @echo " \"su3\": {" | tee -a ../i2p.newsxml/data/win/beta/releases.json - @echo " \"torrent\": \"$(MAGNET)\"," | tee -a ../i2p.newsxml/data/win/beta/releases.json - @echo " \"url\": [" | tee -a ../i2p.newsxml/data/win/beta/releases.json - @echo " \"http://ekm3fu6fr5pxudhwjmdiea5dovc3jdi66hjgop4c7z7dfaw7spca.b32.i2p/i2pwinupdate.su3\"" | tee -a ../i2p.newsxml/data/win/beta/releases.json - @echo " ]" | tee -a ../i2p.newsxml/data/win/beta/releases.json - @echo " }" | tee -a ../i2p.newsxml/data/win/beta/releases.json - @echo " }" | tee -a ../i2p.newsxml/data/win/beta/releases.json - @echo " }" | tee -a ../i2p.newsxml/data/win/beta/releases.json - @echo "]" | tee -a ../i2p.newsxml/data/win/beta/releases.json - -testing-releases.json: su3-unsigned-exe torrent - mkdir -p ../i2p.newsxml/data/win/testing/ - @echo "[" | tee ../i2p.newsxml/data/win/testing/releases.json - @echo " {" | tee -a ../i2p.newsxml/data/win/testing/releases.json - @echo " \"date\": \"$(I2P_DATE)\"," | tee -a ../i2p.newsxml/data/win/testing/releases.json - @echo " \"version\": \"$(I2P_VERSION)\"," | tee -a ../i2p.newsxml/data/win/testing/releases.json - @echo " \"minVersion\": \"1.5.0\"," | tee -a ../i2p.newsxml/data/win/testing/releases.json - @echo " \"minJavaVersion\": \"1.8\"," | tee -a ../i2p.newsxml/data/win/testing/releases.json - @echo " \"updates\": {" | tee -a ../i2p.newsxml/data/win/testing/releases.json - @echo " \"su3\": {" | tee -a ../i2p.newsxml/data/win/testing/releases.json - @echo " \"torrent\": \"$(MAGNET)\"," | tee -a ../i2p.newsxml/data/win/testing/releases.json - @echo " \"url\": [" | tee -a ../i2p.newsxml/data/win/testing/releases.json - @echo " \"http://ekm3fu6fr5pxudhwjmdiea5dovc3jdi66hjgop4c7z7dfaw7spca.b32.i2p/i2pwinupdate.su3\"" | tee -a ../i2p.newsxml/data/win/testing/releases.json - @echo " ]" | tee -a ../i2p.newsxml/data/win/testing/releases.json - @echo " }" | tee -a ../i2p.newsxml/data/win/testing/releases.json - @echo " }" | tee -a ../i2p.newsxml/data/win/testing/releases.json - @echo " }" | tee -a ../i2p.newsxml/data/win/testing/releases.json - @echo "]" | tee -a ../i2p.newsxml/data/win/testing/releases.json +MAGNET_TESTING=`bttools torrent printinfo i2pwinupdate-testing.su3.torrent | grep 'MagNet' | sed 's|MagNet: ||g' | sed 's|%3A|:|g'| sed 's|%2F|/|g'` BLANK=`awk '! NF { print NR; exit }' changelog.txt` diff --git a/build.sh b/build.sh index 16c48cf..75453ed 100755 --- a/build.sh +++ b/build.sh @@ -7,6 +7,8 @@ if [ -f i2pversion_override ]; then . i2pversion_override fi +COUNT="Ten Nine Eight Seven Six Five Four Three Two One" + JAVA=$(java --version | tr -d 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\n' | cut -d ' ' -f 2 | cut -d '.' -f 1 | tr -d '\n\t\- ') if [ "$JAVA" -lt "14" ]; then @@ -15,9 +17,8 @@ if [ "$JAVA" -lt "14" ]; then fi if [ "$JAVA" -lt "17" ]; then echo "It is highly recommended that you use Java 17+ to build release packages" - sleep 5s fi -sleep 2s +sleep 5s if [ -z "${JAVA_HOME}" ]; then JAVA_HOME=`type -p java|xargs readlink -f|xargs dirname|xargs dirname` @@ -28,16 +29,22 @@ echo "cleaning" ./clean.sh HERE="$PWD" -cd "$HERE/../i2p.i2p/" +if [ ! -d "$HERE/../i2p.i2p.jpackage-build/" ]; then + git clone https://i2pgit.org/i2p-hackers/i2p.i2p "$HERE/../i2p.i2p.jpackage-build/" +fi +cd "$HERE/../i2p.i2p.jpackage-build/" git checkout "$VERSION" -sleep 20s +for i in $COUNT; do + echo -n "$i...."; sleep 1s +done ant distclean preppkg-windows || true cd "$HERE" -RES_DIR="$HERE/../i2p.i2p/installer/resources" -I2P_JARS="$HERE/../i2p.i2p/pkg-temp/lib" -I2P_JBIGI="$HERE/../i2p.i2p/installer/lib//jbigi" -I2P_PKG="$HERE/../i2p.i2p/pkg-temp" +I2P_PKG="$HERE/../i2p.i2p.jpackage-build/pkg-temp" +RES_DIR="$HERE/../i2p.i2p.jpackage-build/installer/resources" +I2P_JARS="$I2P_PKG/lib" +I2P_JBIGI="$HERE/../i2p.i2p.jpackage-build/installer/lib/jbigi" + echo "compiling custom launcher" mkdir build diff --git a/java/net/i2p/router/WinLauncher.java b/java/net/i2p/router/WinLauncher.java index 21e7946..6012e49 100644 --- a/java/net/i2p/router/WinLauncher.java +++ b/java/net/i2p/router/WinLauncher.java @@ -17,15 +17,17 @@ import static net.i2p.update.UpdateType.*; /** * Launches a router from %PROGRAMFILES%/I2P using configuration data in - * %LOCALAPPDATA%/I2P.. Uses Java 9 APIs. - + * %LOCALAPPDATA%/I2P.. Uses Java 9 APIs. + * * Sets the following properties: * i2p.dir.base - this points to the (read-only) resources inside the bundle - * i2p.dir.config this points to the (read-write) config directory in local appdata + * i2p.dir.config this points to the (read-write) config directory in local + * appdata * router.pid - the pid of the java process. */ public class WinLauncher { private static WindowsUpdatePostProcessor wupp = new WindowsUpdatePostProcessor(); + public static void main(String[] args) throws Exception { File programs = wupp.selectProgramFile(); if (!programs.exists()) @@ -46,7 +48,8 @@ public class WinLauncher { System.setProperty("i2p.dir.base", programs.getAbsolutePath()); System.setProperty("i2p.dir.config", home.getAbsolutePath()); System.setProperty("router.pid", String.valueOf(ProcessHandle.current().pid())); - System.out.println("\t"+System.getProperty("i2p.dir.base") +"\n\t"+System.getProperty("i2p.dir.config")+"\n\t"+ System.getProperty("router.pid")); + System.out.println("\t" + System.getProperty("i2p.dir.base") + "\n\t" + System.getProperty("i2p.dir.config") + + "\n\t" + System.getProperty("router.pid")); wupp.i2pRouter = new Router(System.getProperties()); System.out.println("Router is configured"); @@ -63,7 +66,7 @@ public class WinLauncher { // first wait for the RouterContext to appear RouterContext ctx; - while ((ctx = (RouterContext) wupp.i2pRouter.getContext().getCurrentContext()) == null) { + while ((ctx = (RouterContext) RouterContext.getCurrentContext()) == null) { sleep(1000); } @@ -88,7 +91,7 @@ public class WinLauncher { } } - private static File selectHome() { //throws Exception { + private static File selectHome() { // throws Exception { if (SystemVersion.isWindows()) { File home = new File(System.getProperty("user.home")); File appData = new File(home, "AppData"); diff --git a/java/net/i2p/router/WinUpdateProcess.java b/java/net/i2p/router/WinUpdateProcess.java index 98a8aa4..46dadcc 100644 --- a/java/net/i2p/router/WinUpdateProcess.java +++ b/java/net/i2p/router/WinUpdateProcess.java @@ -11,20 +11,20 @@ class WinUpdateProcess implements Runnable { private final RouterContext ctx; private final Supplier versionSupplier; private final Supplier fileSupplier; - + WinUpdateProcess(RouterContext ctx, Supplier versionSupplier, Supplier fileSupplier) { this.ctx = ctx; this.versionSupplier = versionSupplier; this.fileSupplier = fileSupplier; } - - private File workDir() throws IOException{ + + private File workDir() throws IOException { if (ctx != null) { File workDir = new File(ctx.getConfigDir().getAbsolutePath(), "i2p_update_win"); if (workDir.exists()) { if (workDir.isFile()) throw new IOException(workDir + " exists but is a file, get it out of the way"); - return null; + return null; } else { workDir.mkdirs(); } @@ -35,9 +35,9 @@ class WinUpdateProcess implements Runnable { private void runUpdateInstaller() throws IOException { String version = versionSupplier.get(); - File file = fileSupplier.get(); - if (file == null) - return; + File file = fileSupplier.get(); + if (file == null) + return; var workingDir = workDir(); var logFile = new File(workingDir, "log-" + version + ".txt"); @@ -52,12 +52,9 @@ class WinUpdateProcess implements Runnable { env.put("RESTART_I2P", "true"); try { - pb.directory(workingDir). - redirectErrorStream(true). - redirectOutput(logFile). - start(); + pb.directory(workingDir).redirectErrorStream(true).redirectOutput(logFile).start(); } catch (IOException ex) { - System.out.println("Unable to run update-program in background. Update will fail."); + System.out.println("Unable to run update-program in background. Update will fail."); } } @@ -65,7 +62,7 @@ class WinUpdateProcess implements Runnable { public void run() { try { runUpdateInstaller(); - } catch(IOException ioe) { + } catch (IOException ioe) { System.out.println("Error running updater, update may fail." + ioe); } } diff --git a/java/net/i2p/router/WindowsUpdatePostProcessor.java b/java/net/i2p/router/WindowsUpdatePostProcessor.java index 75a5851..329f9ab 100644 --- a/java/net/i2p/router/WindowsUpdatePostProcessor.java +++ b/java/net/i2p/router/WindowsUpdatePostProcessor.java @@ -5,7 +5,6 @@ import java.util.*; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.*; - import net.i2p.crypto.*; import static net.i2p.update.UpdateType.*; import net.i2p.I2PAppContext; @@ -18,12 +17,11 @@ import java.lang.ProcessBuilder; import java.lang.Process; import java.lang.InterruptedException; - public class WindowsUpdatePostProcessor implements UpdatePostProcessor { private final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(WindowsUpdatePostProcessor.class); private final RouterContext ctx; protected static Router i2pRouter = null; - + private final AtomicBoolean hook = new AtomicBoolean(); private volatile String version; @@ -32,7 +30,7 @@ public class WindowsUpdatePostProcessor implements UpdatePostProcessor { private final String fileName = "i2p-jpackage-update.exe"; WindowsUpdatePostProcessor() { - this.ctx = null; + this.ctx = null; } WindowsUpdatePostProcessor(RouterContext ctx) { @@ -42,12 +40,13 @@ public class WindowsUpdatePostProcessor implements UpdatePostProcessor { public String getVersion() { return version; } - + public File getFile() { return positionedFile; } - public void updateDownloadedandVerified(UpdateType type, int fileType, String version, File file) throws IOException { + public void updateDownloadedandVerified(UpdateType type, int fileType, String version, File file) + throws IOException { _log.info("Got an update to post-process"); if (type != UpdateType.ROUTER_SIGNED_SU3 && type != UpdateType.ROUTER_DEV_SU3) { @@ -59,11 +58,11 @@ public class WindowsUpdatePostProcessor implements UpdatePostProcessor { _log.warn("Unsupported file type " + fileType); return; } - + this.positionedFile = moveUpdateInstaller(file); this.version = version; - - if (!hook.compareAndSet(false,true)) { + + if (!hook.compareAndSet(false, true)) { _log.info("shutdown hook was already set"); return; } @@ -72,28 +71,30 @@ public class WindowsUpdatePostProcessor implements UpdatePostProcessor { ctx.addFinalShutdownTask(new WinUpdateProcess(ctx, this::getVersion, this::getFile)); } - + private File moveUpdateInstaller(File file) throws IOException { RouterContext i2pContext = i2pRouter.getContext(); if (i2pContext != null) { File newFile = new File(workDir(), fileName); boolean renamedStatus = file.renameTo(newFile); if (renamedStatus) - return newFile; + return newFile; else - throw new IOException("WindowsUpdatePostProcesssor unable to move file to working directory, update will fail"); + throw new IOException( + "WindowsUpdatePostProcesssor unable to move file to working directory, update will fail"); } - throw new IOException("Router context not available to WindowsUpdatePostProcesssor, unable to find working directory, update will fail"); + throw new IOException( + "Router context not available to WindowsUpdatePostProcesssor, unable to find working directory, update will fail"); } - private File workDir() throws IOException{ + private File workDir() throws IOException { RouterContext i2pContext = i2pRouter.getContext(); if (i2pContext != null) { File workDir = new File(i2pContext.getConfigDir().getAbsolutePath(), "i2p_update_win"); if (workDir.exists()) { if (workDir.isFile()) throw new IOException(workDir + " exists but is a file, get it out of the way"); - return null; + return null; } else { workDir.mkdirs(); } @@ -106,12 +107,12 @@ public class WindowsUpdatePostProcessor implements UpdatePostProcessor { if (SystemVersion.isWindows()) { File jrehome = new File(System.getProperty("java.home")); File programs = jrehome.getParentFile(); - System.out.println("Windows portable jpackage wrapper found, using: " + programs + " as working config"); + System.out.println("Windows portable jpackage wrapper found, using: " + programs + " as working config"); return programs.getAbsoluteFile(); } else { File jrehome = new File(System.getProperty("java.home")); File programs = new File(jrehome.getParentFile().getParentFile(), "i2p"); - System.out.println("Linux portable jpackage wrapper found, using: " + programs + " as working config"); + System.out.println("Linux portable jpackage wrapper found, using: " + programs + " as working config"); return programs.getAbsoluteFile(); } } diff --git a/makefiles/app-profile.mk b/makefiles/app-profile.mk new file mode 100644 index 0000000..93f5e4e --- /dev/null +++ b/makefiles/app-profile.mk @@ -0,0 +1,28 @@ +app-profile: .version build/app-profile/user.js build/app-profile/prefs.js build/app-profile/chrome/userChrome.css build/app-profile/bookmarks.html build/app-profile/storage-sync.sqlite copy-app-xpi + +app-profile.tgz: app-profile +# $(eval PROFILE_VERSION := $(shell cat src/app-profile/version.txt)) + @echo "building app-profile tarball $(PROFILE_VERSION)" + sh -c 'ls I2P && cp -rv build/I2P build/app-profile/I2P'; true + install -m755 src/unix/i2pconfig.sh build/app-profile/i2pconfig.sh + cd build && tar -czf app-profile-$(PROFILE_VERSION).tgz app-profile && cp app-profile-$(PROFILE_VERSION).tgz ../ + +build/app-profile/user.js: build/app-profile src/app-profile/user.js + cp src/app-profile/user.js build/app-profile/user.js + +build/app-profile/prefs.js: build/app-profile src/app-profile/prefs.js + cp src/app-profile/prefs.js build/app-profile/prefs.js + +build/app-profile/chrome/userChrome.css: build/app-profile/chrome src/app-profile/chrome/userChrome.css + cp src/app-profile/chrome/userChrome.css build/app-profile/chrome/userChrome.css + +build/app-profile/bookmarks.html: build/app-profile src/app-profile/bookmarks.html + cp src/app-profile/bookmarks.html build/app-profile/bookmarks.html + +build/app-profile/storage-sync.sqlite: build/app-profile src/app-profile/storage-sync.sqlite + cp src/app-profile/storage-sync.sqlite build/app-profile/storage-sync.sqlite + +copy-app-xpi: build/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi build/https-everywhere-eff@eff.org.xpi build/i2ppb@eyedeekay.github.io.xpi build/app-profile/extensions + cp build/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi "build/app-profile/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi" + cp build/https-everywhere-eff@eff.org.xpi "build/app-profile/extensions/https-everywhere-eff@eff.org.xpi" + cp build/i2ppb@eyedeekay.github.io.xpi build/app-profile/extensions/i2ppb@eyedeekay.github.io.xpi \ No newline at end of file diff --git a/makefiles/build.mk b/makefiles/build.mk new file mode 100644 index 0000000..0577b4d --- /dev/null +++ b/makefiles/build.mk @@ -0,0 +1,28 @@ +build/profile/extensions: build/profile + mkdir -p build/profile/extensions + +build/profile: build + mkdir -p build/profile + +build/win: + mkdir -p build/win/ + +build/win/i2pbrowser.bat: + cp src/win/i2pbrowser.bat build/win/i2pbrowser.bat + +build/win/i2pconfig.bat: + cp src/win/i2pconfig.bat build/win/i2pconfig.bat + +build/win/i2pbrowser-private.bat: + cp src/win/i2pbrowser-private.bat build/win/i2pbrowser-private.bat + +launchers: build/win build/win/i2pbrowser.bat build/win/i2pbrowser-private.bat build/win/i2pconfig.bat + +build/app-profile/chrome: build/app-profile + mkdir -p build/app-profile/chrome + +build/app-profile/extensions: build/app-profile + mkdir -p build/app-profile/extensions + +build/app-profile: build + mkdir -p build/app-profile \ No newline at end of file diff --git a/makefiles/debian.mk b/makefiles/debian.mk new file mode 100644 index 0000000..0207815 --- /dev/null +++ b/makefiles/debian.mk @@ -0,0 +1,55 @@ +orig: + tar --exclude=debian --exclude=.git -cvzf ../i2p-firefox-profile_$(PROFILE_VERSION).orig.tar.gz . + +## HOWTO: If you need to release a package to launchpad, build for the oldest +## release launchpad supports(bionic AFIACT). Then, after the build is +## published, copy it to the other distributions. When bionic is out of date, +## update it to the new LTS. + +bionic: + @sed -i "s|`head -n 1 debian/changelog`|i2p-firefox-profile ($(PROFILE_VERSION)-1) bionic; urgency=medium|g" debian/changelog + make orig + debuild -S + make dput + +focal: + @sed -i "s|`head -n 1 debian/changelog`|i2p-firefox-profile ($(PROFILE_VERSION)-1) focal; urgency=medium|g" debian/changelog + make orig + debuild -S + make dput + +groovy: + @sed -i "s|`head -n 1 debian/changelog`|i2p-firefox-profile ($(PROFILE_VERSION)-1) groovy; urgency=medium|g" debian/changelog + make orig + debuild -S + make dput + +buster: + @sed -i "s|`head -n 1 debian/changelog`|i2p-firefox-profile ($(PROFILE_VERSION)-1) buster; urgency=medium|g" debian/changelog + make orig + debuild -S + make dput + +bullseye: + @sed -i "s|`head -n 1 debian/changelog`|i2p-firefox-profile ($(PROFILE_VERSION)-1) bullseye; urgency=medium|g" debian/changelog + make orig + debuild -S + make dput + +trixie: + @sed -i "s|`head -n 1 debian/changelog`|i2p-firefox-profile ($(PROFILE_VERSION)-1) trixie; urgency=medium|g" debian/changelog + make orig + debuild -S + make dput + +sid: + @sed -i "s|`head -n 1 debian/changelog`|i2p-firefox-profile ($(PROFILE_VERSION)-1) sid; urgency=medium|g" debian/changelog + make orig + debuild -S + make dput + +dput: + dput --simulate --force ppa:i2p-community/ppa ../i2p-firefox-profile_$(PROFILE_VERSION)-1_source.changes || exit + dput --force ppa:i2p-community/ppa ../i2p-firefox-profile_$(PROFILE_VERSION)-1_source.changes + +launchpad: bionic \ No newline at end of file diff --git a/makefiles/docker.mk b/makefiles/docker.mk new file mode 100644 index 0000000..5246f5f --- /dev/null +++ b/makefiles/docker.mk @@ -0,0 +1,12 @@ +docker: + docker build -t geti2p/i2p.firefox . + +xhost: + xhost + local:docker + +run: docker xhost + docker run -it --rm \ + --net=host \ + -e DISPLAY=unix$(DISPLAY) \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + geti2p/i2p.firefox firefox --profile /src/build/profile diff --git a/makefiles/extensions.mk b/makefiles/extensions.mk new file mode 100644 index 0000000..d05bace --- /dev/null +++ b/makefiles/extensions.mk @@ -0,0 +1,25 @@ + +build-extensions: build/i2ppb@eyedeekay.github.io.xpi build/NoScript.xpi build/HTTPSEverywhere.xpi + +build/i2ppb@eyedeekay.github.io.xpi: i2psetproxy.url + curl -L `cat i2psetproxy.url` > build/i2ppb@eyedeekay.github.io.xpi + +build/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi: NoScript.url + curl -L `cat NoScript.url` > "build/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi" + +build/https-everywhere-eff@eff.org.xpi: HTTPSEverywhere.url + curl -L `cat HTTPSEverywhere.url` > build/https-everywhere-eff@eff.org.xpi + +clean-extensions: + rm -fv i2psetproxy.url NoScript.url HTTPSEverywhere.url build/i2ppb@eyedeekay.github.io.xpi build/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi build/https-everywhere-eff@eff.org.xpi + +extensions: HTTPSEverywhere.url NoScript.url i2psetproxy.url + +HTTPSEverywhere.url: + @echo "https://addons.mozilla.org/firefox/downloads/file/3809748/"`./amo-version.sh https-everywhere`"/https-everywhere-eff@eff.org.xpi" > HTTPSEverywhere.url + +NoScript.url: + @echo "https://addons.mozilla.org/firefox/downloads/file/3534184/"`./amo-version.sh noscript`"/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi" > NoScript.url + +i2psetproxy.url: + @echo "https://addons.mozilla.org/firefox/downloads/file/3887295/"`./amo-version.sh i2p-in-private-browsing`"/i2ppb@eyedeekay.github.io.xpi" > i2psetproxy.url diff --git a/makefiles/install.mk b/makefiles/install.mk new file mode 100644 index 0000000..94bfb0c --- /dev/null +++ b/makefiles/install.mk @@ -0,0 +1,39 @@ +install: + install -D -m644 src/unix/i2pbrowserrc /etc/i2pbrowser/i2pbrowserrc + install -D -m644 src/unix/i2pbrowserdebianrc /etc/i2pbrowser/i2pbrowserdebianrc + install -D -m755 build/profile/i2pbrowser.sh /usr/local/bin/i2pbrowser + install -D -m755 build/app-profile/i2pconfig.sh /usr/local/bin/i2pconfig + install -D -m755 src/unix/i2p-config-service-setup.sh /usr/local/bin/i2p-config-service-setup + cp -vr build/profile /var/lib/i2pbrowser/profile + cp -vr build/app-profile /var/lib/i2pbrowser/app-profile + cp -vr src/icons /var/lib/i2pbrowser/icons + cp src/unix/desktop/i2pbrowser.desktop /usr/share/applications + cp src/unix/desktop/i2pconfig.desktop /usr/share/applications + +uninstall: + rm -rfv /etc/i2pbrowser \ + /var/lib/i2pbrowser \ + /etc/i2pbrowser/i2pbrowserrc \ + /usr/local/bin/i2pbrowser \ + /usr/local/bin/i2pconfig \ + /usr/local/bin/i2p-config-service-setup \ + /usr/share/applications/i2pbrowser.desktop \ + /usr/share/applications/i2pconfig.desktop + +checkinstall: .version + checkinstall \ + --default \ + --install=no \ + --fstrans=yes \ + --pkgname=i2p-firefox \ + --pkgversion=$(PROFILE_VERSION) \ + --pkggroup=net \ + --pkgrelease=1 \ + --pkgsource="https://i2pgit.org/i2p-hackers/i2p.firefox" \ + --maintainer="$(SIGNER)" \ + --requires="firefox,wget" \ + --suggests="i2p,i2p-router,syndie,tor,tsocks" \ + --nodoc \ + --deldoc=yes \ + --deldesc=yes \ + --backup=no diff --git a/new-extensions.mk b/makefiles/new-extensions.mk similarity index 52% rename from new-extensions.mk rename to makefiles/new-extensions.mk index 7200936..d8c63ff 100644 --- a/new-extensions.mk +++ b/makefiles/new-extensions.mk @@ -1,4 +1,18 @@ +build-new-extensions: build/i2ppb@eyedeekay.github.io.xpi build/NoScript.xpi build/HTTPSEverywhere.xpi + +build/uBlock0@raymondhill.net.xpi: + curl -L `cat UblockOrigin.url` > build/uBlock0@raymondhill.net.xpi + +build//jsr@javascriptrestrictor.xpi: + curl -L `cat JShelter.url` > build/jsr@javascriptrestrictor.xpi + +build/onioncbt@eyedeekay.github.io.xpi: + curl -L `cat onioncontainer.url` > build/onioncbt@eyedeekay.github.io.xpi + +build/{b86e4813-687a-43e6-ab65-0bde4ab75758}.xpi: + curl -L `cat LocalCDN.url` > build//{b86e4813-687a-43e6-ab65-0bde4ab75758}.xpi + UBlockOrigin.url: @echo "https://addons.mozilla.org/firefox/downloads/file/3892224/"`./amo-version.sh ublock-origin`"/uBlock0@raymondhill.net.xpi" > UBlockOrigin.url @@ -11,4 +25,7 @@ onioncontainer.url: LocalCDN.url: @echo "https://addons.mozilla.org/firefox/downloads/file/3902456/"`./amo-version.sh localcdn-fork-of-decentraleyes`"/{b86e4813-687a-43e6-ab65-0bde4ab75758}.xpi" > LocalCDN.url +clean-new-extensions: + rm -f UBlockOrigin.url JShelter.url onioncontainer.url LocalCDN.url build/i2ppb@eyedeekay.github.io.xpi build/onioncbt@eyedeekay.github.io.xpi + new-extensions: UBlockOrigin.url JShelter.url onioncontainer.url LocalCDN.url \ No newline at end of file diff --git a/makefiles/profile.mk b/makefiles/profile.mk new file mode 100644 index 0000000..341467e --- /dev/null +++ b/makefiles/profile.mk @@ -0,0 +1,26 @@ + +profile: build/profile/user.js build/profile/prefs.js build/profile/bookmarks.html build/profile/storage-sync.sqlite copy-xpi + +profile.tgz: .version profile +# $(eval PROFILE_VERSION := $(shell cat src/profile/version.txt)) + @echo "building profile tarball $(PROFILE_VERSION)" + sh -c 'ls I2P && cp -rv build/I2P build/profile/I2P'; true + install -m755 src/unix/i2pbrowser.sh build/profile/i2pbrowser.sh + cd build && tar -czf profile-$(PROFILE_VERSION).tgz profile && cp profile-$(PROFILE_VERSION).tgz ../ + +build/profile/user.js: build/profile src/profile/user.js + cp src/profile/user.js build/profile/user.js + +build/profile/prefs.js: build/profile src/profile/prefs.js + cp src/profile/prefs.js build/profile/prefs.js + +build/profile/bookmarks.html: build/profile src/profile/bookmarks.html + cp src/profile/bookmarks.html build/profile/bookmarks.html + +build/profile/storage-sync.sqlite: build/profile src/profile/storage-sync.sqlite + cp src/profile/storage-sync.sqlite build/profile/storage-sync.sqlite + +copy-xpi: build/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi build/https-everywhere-eff@eff.org.xpi build/i2ppb@eyedeekay.github.io.xpi build/profile/extensions + cp build/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi "build/profile/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi" + cp build/https-everywhere-eff@eff.org.xpi "build/profile/extensions/https-everywhere-eff@eff.org.xpi" + cp build/i2ppb@eyedeekay.github.io.xpi build/profile/extensions/i2ppb@eyedeekay.github.io.xpi diff --git a/makefiles/su-unsigned.mk b/makefiles/su-unsigned.mk new file mode 100644 index 0000000..9a1ea43 --- /dev/null +++ b/makefiles/su-unsigned.mk @@ -0,0 +1,35 @@ + +prepupdate-unsignedexe: + cp -v "I2P-Profile-Installer-$(PROFILE_VERSION).su3" i2pwinupdate-unsignedexe.su3 + +su3-unsignedexe: $(GOPATH)/src/i2pgit.org/idk/su3-tools/su3-tools + $(GOPATH)/src/i2pgit.org/idk/su3-tools/su3-tools -name "I2P-Profile-Installer-$(PROFILE_VERSION)" -signer "$(SIGNER)" -version "$(I2P_VERSION)" + java -cp "$(HOME)/i2p/lib/*" net.i2p.crypto.SU3File sign -c ROUTER -f EXE I2P-Profile-Installer-$(PROFILE_VERSION).exe I2P-Profile-Installer-$(PROFILE_VERSION)-signed.su3 "$(HOME)/.i2p-plugin-keys/news-su3-keystore.ks" "$(I2P_VERSION)" $(SIGNER) + +i2pwinupdate-unsignedexe.su3.torrent: prepupdate-unsignedexe su3-unsignedexe + mktorrent \ + --announce=http://tracker2.postman.i2p/announce.php \ + --announce=http://w7tpbzncbcocrqtwwm3nezhnnsw4ozadvi2hmvzdhrqzfxfum7wa.b32.i2p/a \ + --announce=http://mb5ir7klpc2tj6ha3xhmrs3mseqvanauciuoiamx2mmzujvg67uq.b32.i2p/a \ + i2pwinupdate-unsignedexe.su3 + +torrent-unsignedexe: i2pwinupdate-unsignedexe.su3.torrent + +testing-releases.json: torrent-unsignedexe + mkdir -p ../i2p.newsxml/data/win/testing/ + @echo "[" | tee ../i2p.newsxml/data/win/testing/releases.json + @echo " {" | tee -a ../i2p.newsxml/data/win/testing/releases.json + @echo " \"date\": \"$(I2P_DATE)\"," | tee -a ../i2p.newsxml/data/win/testing/releases.json + @echo " \"version\": \"$(I2P_VERSION)\"," | tee -a ../i2p.newsxml/data/win/testing/releases.json + @echo " \"minVersion\": \"1.5.0\"," | tee -a ../i2p.newsxml/data/win/testing/releases.json + @echo " \"minJavaVersion\": \"1.8\"," | tee -a ../i2p.newsxml/data/win/testing/releases.json + @echo " \"updates\": {" | tee -a ../i2p.newsxml/data/win/testing/releases.json + @echo " \"su3\": {" | tee -a ../i2p.newsxml/data/win/testing/releases.json + @echo " \"torrent\": \"$(MAGNET_TESTING)\"," | tee -a ../i2p.newsxml/data/win/testing/releases.json + @echo " \"url\": [" | tee -a ../i2p.newsxml/data/win/testing/releases.json + @echo " \"http://ekm3fu6fr5pxudhwjmdiea5dovc3jdi66hjgop4c7z7dfaw7spca.b32.i2p/i2pwinupdate.su3\"" | tee -a ../i2p.newsxml/data/win/testing/releases.json + @echo " ]" | tee -a ../i2p.newsxml/data/win/testing/releases.json + @echo " }" | tee -a ../i2p.newsxml/data/win/testing/releases.json + @echo " }" | tee -a ../i2p.newsxml/data/win/testing/releases.json + @echo " }" | tee -a ../i2p.newsxml/data/win/testing/releases.json + @echo "]" | tee -a ../i2p.newsxml/data/win/testing/releases.json diff --git a/makefiles/su.mk b/makefiles/su.mk new file mode 100644 index 0000000..5d7c2a4 --- /dev/null +++ b/makefiles/su.mk @@ -0,0 +1,41 @@ +GOPATH=$(HOME)/go + +$(GOPATH)/src/i2pgit.org/idk/su3-tools/su3-tools: + git clone https://i2pgit.org/idk/su3-tools $(GOPATH)/src/i2pgit.org/idk/su3-tools; true + git pull --all + cd $(GOPATH)/src/i2pgit.org/idk/su3-tools && \ + go mod vendor && go build + +prepupdate: + cp -v "I2P-Profile-Installer-$(PROFILE_VERSION)-signed.su3" i2pwinupdate.su3 + +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)" + 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" "$(I2P_VERSION)" $(SIGNER) + +i2pwinupdate.su3.torrent: prepupdate su3 + mktorrent \ + --announce=http://tracker2.postman.i2p/announce.php \ + --announce=http://w7tpbzncbcocrqtwwm3nezhnnsw4ozadvi2hmvzdhrqzfxfum7wa.b32.i2p/a \ + --announce=http://mb5ir7klpc2tj6ha3xhmrs3mseqvanauciuoiamx2mmzujvg67uq.b32.i2p/a \ + i2pwinupdate.su3 + +torrent: i2pwinupdate.su3.torrent + +releases.json: torrent + @echo "[" | tee ../i2p.newsxml/data/win/beta/releases.json + @echo " {" | tee -a ../i2p.newsxml/data/win/beta/releases.json + @echo " \"date\": \"$(I2P_DATE)\"," | tee -a ../i2p.newsxml/data/win/beta/releases.json + @echo " \"version\": \"$(I2P_VERSION)\"," | tee -a ../i2p.newsxml/data/win/beta/releases.json + @echo " \"minVersion\": \"1.5.0\"," | tee -a ../i2p.newsxml/data/win/beta/releases.json + @echo " \"minJavaVersion\": \"1.8\"," | tee -a ../i2p.newsxml/data/win/beta/releases.json + @echo " \"updates\": {" | tee -a ../i2p.newsxml/data/win/beta/releases.json + @echo " \"su3\": {" | tee -a ../i2p.newsxml/data/win/beta/releases.json + @echo " \"torrent\": \"$(MAGNET)\"," | tee -a ../i2p.newsxml/data/win/beta/releases.json + @echo " \"url\": [" | tee -a ../i2p.newsxml/data/win/beta/releases.json + @echo " \"http://ekm3fu6fr5pxudhwjmdiea5dovc3jdi66hjgop4c7z7dfaw7spca.b32.i2p/i2pwinupdate.su3\"" | tee -a ../i2p.newsxml/data/win/beta/releases.json + @echo " ]" | tee -a ../i2p.newsxml/data/win/beta/releases.json + @echo " }" | tee -a ../i2p.newsxml/data/win/beta/releases.json + @echo " }" | tee -a ../i2p.newsxml/data/win/beta/releases.json + @echo " }" | tee -a ../i2p.newsxml/data/win/beta/releases.json + @echo "]" | tee -a ../i2p.newsxml/data/win/beta/releases.json