Compare commits

...

135 Commits

Author SHA1 Message Date
idk
220b6756b6 Merge branch 'master' of i2pgit.org:i2p-hackers/i2p.firefox into EXPERIMENTAL-docker 2021-08-22 17:21:20 -04:00
idk
7f7f021e45 Merge branch 'EXPERIMENTAL-jpackage' into 'master'
Embed a jpackaged router in the installer. Self-Updating.

See merge request i2p-hackers/i2p.firefox!3
2021-08-22 21:19:48 +00:00
idk
f9b02fe13f Re-update extension URL's 2021-08-22 17:15:08 -04:00
idk
6026ee3ec6 Merge branch 'EXPERIMENTAL-jpackage' of i2pgit.org:i2p-hackers/i2p.firefox into EXPERIMENTAL-jpackage 2021-08-22 17:13:07 -04:00
idk
3c508f4190 Merge branch 'master' of i2pgit.org:i2p-hackers/i2p.firefox into EXPERIMENTAL-jpackage 2021-08-22 17:12:14 -04:00
idk
91abc574d3 Merge branch 'master' into 'EXPERIMENTAL-jpackage'
# Conflicts:
#   .gitignore
#   Makefile
#   src/app-profile/version.txt
#   src/nsis/i2pbrowser-installer.nsi
#   src/nsis/i2pbrowser-version.nsi
#   src/profile/version.txt
2021-08-22 20:58:48 +00:00
idk
bae0412ebc add newsURL and backupNewsURL to router.config 2021-08-20 13:07:06 -04:00
idk
e73a5969db Merge branch 'EXPERIMENTAL-jpackage' of 127.0.0.1:i2p-hackers/i2p.firefox into EXPERIMENTAL-docker 2021-08-20 01:45:46 -04:00
idk
e764c7b773 Add Dockerfile 2021-08-20 01:01:06 -04:00
idk
7c62c8ecda Add a target for creating light tags at release time 2021-08-20 00:51:31 -04:00
idk
d13e2317dd Make it run in Docker too 2021-08-20 00:12:36 -04:00
idk
7ff4eb5e37 Set autodisabledscopes to 0 2021-08-19 23:54:37 -04:00
idk
e6928d64ce Uninstall a jpackaged router if found 2021-08-19 22:28:48 -04:00
idk
ad373eface Add update server basics 2021-08-19 21:01:23 -04:00
idk
d52e79c72e don't fail if cloneing su3-tools fails, don't delete router.config in clean.sh 2021-08-19 20:40:59 -04:00
idk
71b9b9c6ec check in basic router.config with update url, build su3-tools if it isn't yet 2021-08-19 20:13:08 -04:00
idk
f8ff48f723 work on getting it signed on Windows 2021-08-19 19:30:11 -04:00
idk
8b089ad49e Put update config url into it's own file 2021-08-19 19:20:01 -04:00
idk
afdb51370e configure the router.updateURL by default 2021-08-19 16:52:53 -04:00
idk
2ff2e462a9 configure the router.updateURL by default 2021-08-19 16:09:28 -04:00
idk
41f4f80a4d configure the router.updateURL by default 2021-08-19 15:14:21 -04:00
idk
aee8cdbe5f add --java-options --illega-access=permit to support MuWire plugin 2021-08-19 11:53:09 -04:00
idk
15a2386981 Use a "static" filename, ending in exe, in moveUpdateInstaller in case of differences in file-extension handling across various Windows platforms and configurations 2021-08-19 11:46:15 -04:00
idk
8aefcff4b1 Check return value of renameTo, if false throw an IOException. 2021-08-18 14:57:30 -04:00
idk
1b35c8dc8b use a supplier to get the file path when starting the WinUpdateProcess, fix logging issues 2021-08-18 13:28:08 -04:00
idk
e7ea163a64 More intelligible shortcut label text 2021-08-17 12:03:39 -04:00
idk
2b95573f7a Fix working directory which was still copied over from zab's 2021-08-15 18:41:53 -04:00
idk
51aa9a97b1 Build the process with processbuilder, check the I2P version when upgrading from NSIS in silent mode, check the RESTART_I2P environment variable when upgrading from NSIS in silent mode 2021-08-15 14:42:02 -04:00
idk
8737093b6d add WinUpdateProcess.java to the java src's 2021-08-14 10:17:56 -04:00
idk
688b9ca309 Fixes for many, but not all the things from zab's code review 2021-08-14 02:08:45 -04:00
idk
ac7336f669 mix in eepsite config 2021-08-02 23:46:20 -04:00
idk
51a63dfb35 mix in eepsite config 2021-08-02 23:27:35 -04:00
idk
2c328bec86 Try and get it to use a native jbigi 2021-08-02 21:16:40 -04:00
idk
fa54305df3 Try and get it to use a native jbigi 2021-08-02 21:05:49 -04:00
idk
d7036f7a96 Try and get it to use a native jbigi 2021-08-02 20:16:44 -04:00
idk
111ecebe6c Try and get it to use a native jbigi 2021-08-02 20:12:38 -04:00
idk
272ff689e7 Try and get it to use a native jbigi 2021-08-02 20:02:06 -04:00
idk
3b544d0e25 Try and get it to use a native jbigi 2021-08-02 19:57:11 -04:00
idk
7b24afba86 fix quotes on set 2021-08-02 19:16:05 -04:00
idk
5b8c3e4b2a Wait 3 seconds after starting I2P 2021-08-02 18:59:24 -04:00
idk
86b6413a9b echo on for a little while 2021-08-02 18:58:41 -04:00
idk
cd15ee07c1 Force a non-x86 ProgramFiles path 2021-08-02 17:51:47 -04:00
idk
59ca9d1d7f Exec the bat file directly rather than using the shortcut 2021-08-02 17:37:56 -04:00
idk
94feece528 Use the copy of the profile from inside the %programfiles%/i2p 2021-08-02 17:20:33 -04:00
idk
fc1cce1f4b Make sure working config dir is created. Add Tor Browser support to .bat scripts. Register UPP in a thread, see @zlatinb's example in i2p-jpackage-mac. 2021-08-02 17:05:24 -04:00
idk
5218f18599 Make sure working config dir is created. Add Tor Browser support to .bat scripts. Register UPP in a thread, see @zlatinb's example in i2p-jpackage-mac. 2021-08-02 17:04:44 -04:00
idk
b79044bcce fix static references in Winlauncher And WindowsUpdatePostProcessor 2021-08-02 14:17:02 -04:00
idk
8453c4092c fix up new launcher scripts with the right paths 2021-08-02 13:46:10 -04:00
idk
a90e7db310 Make some targets more reliable 2021-08-02 12:54:54 -04:00
idk
eacb19034a No need anymore to generate launcher scripts at install time, so move them to src/win directory 2021-08-02 12:19:01 -04:00
idk
14b40177fe checkin UPDATES.md doc, but also force gitlab to send me a notification email normally 2021-07-28 09:45:54 -04:00
idk
f54d989ea7 Remove unix changes, they can go in EXPERIMENTAL-debian 2021-07-23 19:39:07 -04:00
idk
99f6029578 Always use i2pbrowser-version.nsi as the source of the version of the profile 2021-07-15 17:08:46 -04:00
idk
50097f335a add su3 signing to makefile 2021-07-15 16:19:59 -04:00
idk
d943bf98ca Tabs to spaces 2021-07-15 16:06:31 -04:00
idk
1504d65ba7 fix path in Makefile 2021-07-15 16:01:15 -04:00
idk
7ef6e9149d fix build issues, allow overriding i2p version with a file 2021-07-15 15:48:34 -04:00
idk
a8117ce0fc move the updated installer to the application directory, pass the renamed file the the thing that starts the process. Don't start the shutdown or monitor it in any way. 2021-07-13 21:49:02 -04:00
idk
1430d73103 remove superfluous files from checkin, automatically import them from the sibling i2p.i2p repository 2021-07-06 14:06:23 -04:00
idk
b5de7de981 update jpackages, remove debian dir, that will be merged from EXPERIMENTAL-debian 2021-07-06 13:57:23 -04:00
idk
59dc5d65e0 Add missing line to while loop 2021-07-04 10:35:07 -04:00
idk
6165131c66 When a Silent installer is run, loop until there isn't an I2P.exe process anymore. 2021-07-03 22:39:54 -04:00
idk
a5db548ad5 Get the exe path not the dir 2021-07-01 20:32:09 -04:00
idk
7dfd857b43 Cancel if shutdownGracefullyAndRerun returns false 2021-07-01 20:22:37 -04:00
idk
008025d76f Don't pass the /D flag it's not required 2021-07-01 20:18:39 -04:00
idk
755a47d6f2 Make WinLauncher extend WindowsUpdatePostProcessor 2021-07-01 20:05:21 -04:00
idk
97f3dbd71f OK I think that registers it 2021-07-01 19:52:21 -04:00
idk
ffd7bfb834 Set up NSIS to be silennt 2021-07-01 18:30:23 -04:00
idk
ab58ec31ff I think that might be a working UpdatePostProcessor, now to figure out how to register it 2021-07-01 18:20:16 -04:00
idk
da9f7695a7 Start working on an updater thing for the jpackage builds 2021-07-01 16:55:29 -04:00
idk
a6481d7bd7 switch to Rhizome variant of IPB plugin. Update extensions at install time 2021-07-01 10:26:19 -04:00
idk
d9025e5853 Switch to alternate version of I2PIPB which automatically configures home page to be extension-owned help page 2021-06-01 19:14:09 -04:00
idk
27328d5141 Update the version numbers 2021-05-31 12:36:37 -04:00
idk
b3967525e5 Merge branch 'diff-languages-admin-acct' into 'master'
backport the different languages issue fix from EXPERIMENTAL-jpackage

See merge request i2p-hackers/i2p.firefox!2
2021-05-31 16:32:12 +00:00
idk
5e55b9068f update extension download urls 2021-05-31 12:28:32 -04:00
idk
c467296aad update .gitignore 2021-05-31 12:26:46 -04:00
idk
dfe9ff50ee update .gitignore 2021-05-31 12:26:38 -04:00
idk
72ca56e9a1 move LICENSE to LICENSE.md to work around case-sensitivity issues on Windows 2021-05-31 12:25:48 -04:00
idk
b62d64bb0f fix include optional jpackage install in profile.tgz line 2021-05-31 12:23:49 -04:00
idk
8424727dae Windows does not *seem* to have an application power saving mode that would affect I2P at this time. 2021-05-25 13:50:18 -04:00
idk
10f02140a3 Make it possible to optionally generate jpackage which can be added to a Linux tar.gzipped firefox profile+script. If a Firefox is added to this .tar.gz in a directory called ./firefox/, and that Firefox is configured to be portable and avoid the disk, the launching script will favor the local Firefox and it *should* never need to touch anything outside the directory it's unpacked in, making it usable from a flash drive without touching the disk on a host, for instance. More generally, forming the basis of a TBB-like package 2021-05-25 13:46:37 -04:00
idk
c66d08d9d8 updater isn't enough, it needs to go all the way to preppkg. For now ignore a build error which doesn't matter to the jpackaged router 2021-05-23 01:00:05 -04:00
idk
bf9e8cae14 Set i2pversion and version tag in i2version file 2021-05-23 00:14:14 -04:00
idk
5ce0477d46 Set i2pversion and version tag in i2version file 2021-05-23 00:07:56 -04:00
idk
13af013cbd Ant updater is faster and good enough 2021-05-22 22:30:39 -04:00
idk
ff1451c0dc Correct version number 2021-05-22 22:26:13 -04:00
idk
986b003f20 Make sure the build script enforces the use of a tagged, released version 2021-05-22 22:23:03 -04:00
idk
9171c454bc backport the different languages issue fix from EXPERIMENTAL-jpackage 2021-05-09 23:58:39 -04:00
idk
2099c1f5fa No need to run i2p.exe from i2pconfig.bat 2021-04-04 09:27:10 -04:00
idk
1edb0c3e0e Make sure curl gets the L flag 2021-04-04 01:47:33 -04:00
idk
ca89bc017b Try and limit the xcopy prompt 2021-04-04 01:26:16 -04:00
idk
d5fd31eba9 Install profiles to %PROGRAMFILES% and copy afterward, if necessary, using batch scripts. This eliminates all *essential* use of %LOCALAPPDATA% by NSIS. One place still uses it technically, but it can recover from failure there. 2021-04-04 01:14:10 -04:00
idk
12f124d259 Install profiles to %PROGRAMFILES% and copy afterward, if necessary, using batch scripts. This eliminates all *essential* use of %LOCALAPPDATA% by NSIS. One place still uses it technically, but it can recover from failure there. 2021-04-04 01:12:33 -04:00
idk
55a7be91c6 Install profiles to %PROGRAMFILES% and copy afterward, if necessary, using batch scripts. This eliminates all *essential* use of %LOCALAPPDATA% by NSIS. One place still uses it technically, but it can recover from failure there. 2021-04-04 01:04:57 -04:00
idk
98d1a80347 Install profiles to %PROGRAMFILES% and copy afterward, if necessary, using batch scripts. This eliminates all *essential* use of %LOCALAPPDATA% by NSIS. One place still uses it technically, but it can recover from failure there. 2021-04-04 00:37:14 -04:00
idk
8aae087969 check router.config when in program files too 2021-04-03 23:37:11 -04:00
idk
d2d272f17a check for i2p.exe at install time 2021-04-03 23:25:23 -04:00
idk
0429c2bab5 Reference localappdata from bat scripts instead of at install time 2021-04-03 23:21:34 -04:00
idk
2d24c57c8e Just use LOCALAPPDATA since when we elevate in the NSIS script has no effect 2021-04-03 23:03:28 -04:00
idk
f0a4001b53 Fix conflicting files for case-insensitive filesystems. 2021-04-03 22:55:56 -04:00
idk
b678d1434a Fix conflicting files for case-insensitive filesystems. 2021-04-03 22:52:47 -04:00
idk
ee2a7cc93d Install the config files to %PROGRAMFILES% since it should avoid the multiple-encodings error 2021-04-03 20:06:31 -04:00
idk
0c3fe5b37d Find the path by finding the JRE and traversing up 2021-04-03 19:53:09 -04:00
idk
b8a4633113 Find the path by finding the JRE and traversing up 2021-04-03 19:16:32 -04:00
idk
b4b09ea5da Try not setting the base dir for now since that seems to be causing it to stall on my wiwindows machine 2021-04-03 18:45:30 -04:00
idk
4df405978f Print some stuff for debugging 2021-04-03 18:37:17 -04:00
idk
cb821a72ad set i2p.dir.base to PROGRAMFILES/i2p 2021-04-03 18:24:59 -04:00
idk
8218591986 Configure for ProgramFiles based installs 2021-04-03 18:08:44 -04:00
idk
9a03137a67 Start a WinLauncher 2021-04-03 17:30:31 -04:00
idk
03bba27c14 Start a WinLauncher 2021-04-03 17:29:41 -04:00
idk
9998692bbd Start a WinLauncher 2021-04-03 16:39:26 -04:00
506d2035cb backward slashes so it compiles on windows 2021-04-03 16:35:58 +01:00
5783feb348 do not show the 'where is i2p' page if we are about to deploy jpackage 2021-04-03 16:34:24 +01:00
afb3ca87b4 always set UniCode true 2021-04-03 16:33:10 +01:00
dc08fda98b ant updater does not include jetty jars 2021-04-03 16:32:28 +01:00
idk
c3c0a8ae28 correctly unpacked jpackaged file 2021-03-30 00:06:22 -04:00
idk
2e95100bf4 make configdir an alias for src/I2P/config so we don't call it all the time. Only a convenience target to update the config files in the experimental branch for now. 2021-03-29 23:32:43 -04:00
idk
cd02426571 make src/I2P/config a target for now, so it doesn't accidentally recreate directories 2021-03-29 23:28:58 -04:00
idk
1eece32f73 make build a dependency of build/I2P 2021-03-29 23:12:36 -04:00
idk
a4b99698af make build/I2P/config a separate target 2021-03-29 23:10:46 -04:00
idk
075d5e4181 Remove the config stuff from I2P directory, which is gitignored 2021-03-29 22:57:55 -04:00
idk
8b3d0babda Remove the config stuff from I2P directory, which is gitignored 2021-03-29 22:56:24 -04:00
idk
ac3036e819 Work on jpackage detailed build instructions 2021-03-27 02:30:16 -04:00
idk
0e60f158ce Work on jpackage detailed build instructions 2021-03-27 01:38:52 -04:00
idk
e438fff266 Work on jpackage detailed build instructions 2021-03-27 01:38:00 -04:00
idk
c244dc9fe7 Work on jpackage detailed build instructions 2021-03-27 01:12:37 -04:00
idk
ddc6704351 Make it so debs can be built without running NSIS 2021-03-26 23:59:42 -04:00
idk
8adf9b83a4 Add default start command 2021-03-26 23:35:59 -04:00
idk
e22abb872e Make the launcher command it accepts variable so I can pass arguments in the snap 2021-03-26 21:15:29 -04:00
idk
8f70bc346d Add a note to the readme about pre-built images 2021-03-26 18:09:13 -04:00
idk
30909d1353 Give it a way to know it's working on a jpackaged router and if so update itself 2021-03-26 18:07:32 -04:00
idk
a218f0d580 This one **Actually Works(tm)** 2021-03-26 17:37:55 -04:00
idk
0a0f063f1b This one **Actually Works(tm)** 2021-03-26 17:24:20 -04:00
idk
50ab03e195 copy resources from sibling branch for jpackaged router experiment 2021-03-26 00:52:45 -04:00
idk
3cdc0d674a Start an experimental jpackage-included branch 2021-03-25 20:59:22 -04:00
32 changed files with 1140 additions and 142 deletions

7
.gitignore vendored
View File

@ -1,3 +1,8 @@
build
*.deb
*.tgz
*.tgz
./I2P/
i2pversion_override
*.crl
*.crt
*.pem

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM alpine:latest
RUN apk update && apk add firefox make curl musl-locales dbus-x11 font-ubuntu-nerd jq --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing
ADD . /src
WORKDIR /src
RUN make profile.tgz # && \
RUN chown -R 1000:1000 /src/build/profile # && \
RUN chmod -R +w /src/build/profile
RUN ls -lah /src/build/profile
#USER 1000
CMD sh -c 'cd build/profile && ./i2pbrowser.sh'

View File

@ -1 +1 @@
https://addons.mozilla.org/firefox/downloads/file/3716461/2021.1.27/https_everywhere-2021.1.27-an+fx.xpi
https://addons.mozilla.org/firefox/downloads/file/3716461/2021.7.13/https_everywhere-2021.7.13-an+fx.xpi

View File

162
Makefile
View File

@ -1,11 +1,85 @@
all: profile.tgz app-profile.tgz install.exe
-include i2pversion
-include i2pversion_override
install.exe: profile build/licenses
-include config.mk
preset=`rm .version; make .version`
include .version
PROFILE_VERSION=$(MAJOR).$(MINOR).$(BUILD)
all: .version install.exe
tag:
git tag $(PROFILE_VERSION)
.version:
sed 's|!define VERSION||g' src/nsis/i2pbrowser-version.nsi | sed 's| |=|g' > .version
make version.txt src/nsis/i2pbrowser_jpackage.nsi
version.txt:
echo "$(PROFILE_VERSION)" > src/profile/version.txt
echo "$(PROFILE_VERSION)" > src/app-profile/version.txt
src/nsis/i2pbrowser_jpackage.nsi:
echo "!define I2P_VERSION $(I2P_VERSION)" > src/nsis/i2pbrowser_jpackage.nsi
jpackage: .version I2P all
help: .version
@echo "I2P-Profile-Installer-$(PROFILE_VERSION)"
@echo "$(SIGNER)"
@echo "$(I2P_VERSION)"
@echo "$(MAJOR).$(MINOR).$(BUILD)"
@echo "$(preset)"
prep: profile.tgz app-profile.tgz profile build/licenses build/I2P build/I2P/config launchers
cp src/nsis/*.nsi build
cp src/nsis/*.nsh build
cp src/icons/*.ico build
install.exe: prep
cd build && makensis i2pbrowser-installer.nsi && cp I2P-Profile-Installer-*.exe ../ && echo "built windows installer"
export RES_DIR="../i2p.i2p/installer/resources"
export PKG_DIR="../i2p.i2p/pkg-temp"
export I2P_JBIGI="../i2p.i2p/installer/lib/jbigi"
distclean: clean
rm -rf I2P
I2P:
./build.sh
build/I2P: build
rm -rf build/I2P
cp -rv I2P build/I2P ; true
cp "$(I2P_JBIGI)"/*windows*.dll build/I2P/runtime/lib; true
configdir: src/I2P/config
src/I2P/config:
mkdir src/I2P/config
rm -rf src/I2P/config/geoip src/I2P/config/webapps src/I2P/config/certificates
echo true | tee src/I2P/config/jpackaged
cp -v $(RES_DIR)/clients.config src/I2P/config/
cp -v $(RES_DIR)/i2ptunnel.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
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: build/I2P src/I2P/config
cp -rv src/I2P/config build/I2P/config ; true
cp -rv src/I2P/config build/I2P/.i2p ; true
#
# Warning: a displayed license file of more than 28752 bytes
# will cause makensis V3.03 to crash.
@ -14,11 +88,11 @@ install.exe: profile build/licenses
build/licenses: build
mkdir -p build/licenses
cp license/* build/licenses
cp LICENSE build/licenses/MIT.txt
cp LICENSE.md build/licenses/MIT.txt
unix2dos build/licenses/LICENSE.index
clean:
rm -rf build app-profile-*.tgz profile-*.tgz I2P-Profile-Installer-*.exe *.deb
rm -rf build app-profile-*.tgz profile-*.tgz I2P-Profile-Installer-*.exe *.deb src/I2P/config *.su3
build:
@echo "creating build directory"
@ -26,9 +100,10 @@ build:
profile: build/profile/user.js build/profile/prefs.js build/profile/bookmarks.html build/profile/storage-sync.sqlite copy-xpi
profile.tgz: profile
$(eval PROFILE_VERSION := $(shell cat src/profile/version.txt))
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 ../
@ -44,16 +119,17 @@ build/profile/bookmarks.html: build/profile src/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/NoScript.xpi build/HTTPSEverywhere.xpi build/i2ppb@eyedeekay.github.io.xpi build/profile/extensions
copy-xpi: build/NoScript.xpi build/HTTPSEverywhere.xpi build/i2prhz@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
cp build/i2prhz@eyedeekay.github.io.xpi build/profile/extensions/i2prhz@eyedeekay.github.io.xpi
app-profile: 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: .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))
# $(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 ../
@ -72,18 +148,20 @@ build/app-profile/bookmarks.html: build/app-profile src/app-profile/bookmarks.ht
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
copy-app-xpi: build/NoScript.xpi build/HTTPSEverywhere.xpi build/i2prhz@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
cp build/i2prhz@eyedeekay.github.io.xpi build/app-profile/extensions/i2prhz@eyedeekay.github.io.xpi
build/i2ppb@eyedeekay.github.io.xpi:
curl -L `cat i2psetproxy.url` > build/i2ppb@eyedeekay.github.io.xpi
build-extensions: build/i2prhz@eyedeekay.github.io.xpi build/NoScript.xpi build/HTTPSEverywhere.xpi
build/i2prhz@eyedeekay.github.io.xpi: i2psetproxy.url
curl -L `cat i2psetproxy.url` > build/i2prhz@eyedeekay.github.io.xpi
build/NoScript.xpi: NoScript.url
curl `cat NoScript.url` > build/NoScript.xpi
curl -L `cat NoScript.url` > build/NoScript.xpi
build/HTTPSEverywhere.xpi : HTTPSEverywhere.url
curl `cat HTTPSEverywhere.url` > build/HTTPSEverywhere.xpi
build/HTTPSEverywhere.xpi: HTTPSEverywhere.url
curl -L `cat HTTPSEverywhere.url` > build/HTTPSEverywhere.xpi
clean-extensions:
rm -fv i2psetproxy.url NoScript.url HTTPSEverywhere.url
@ -97,14 +175,29 @@ 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/3674169/"`./amo-version.sh i2p-in-private-browsing`"/i2ppb@eyedeekay.github.io.xpi" > i2psetproxy.url
@echo "https://addons.mozilla.org/firefox/downloads/file/3784917/"`./amo-version.sh i2pipb-rhizome-variant`"/i2prhz@eyedeekay.github.io" > i2psetproxy.url
#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
@ -141,7 +234,7 @@ uninstall:
/usr/share/applications/i2pbrowser.desktop \
/usr/share/applications/i2pconfig.desktop
checkinstall:
checkinstall: version
checkinstall \
--default \
--install=no \
@ -151,10 +244,35 @@ checkinstall:
--pkggroup=net \
--pkgrelease=1 \
--pkgsource="https://i2pgit.org/i2p-hackers/i2p.firefox" \
--maintainer="hankhill19580@gmail.com" \
--requires="firefox,wget,i2p,i2p-router" \
--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)" -signer "$(SIGNER)" -version "$(I2P_VERSION)"
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

View File

@ -1 +1 @@
https://addons.mozilla.org/firefox/downloads/file/3534184/11.2.3/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi
https://addons.mozilla.org/firefox/downloads/file/3534184/11.2.11/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi

137
README.md
View File

@ -19,6 +19,7 @@ To build this, you will need the following software packages (all available in D
* nsis
* dos2unix
* curl
* jq
to build a Debian package, you'll also need
@ -89,6 +90,142 @@ with `sudo service i2p start` then you can run the script:
/usr/local/bin/i2p-config-service-setup
Including a jpackaged I2P Router(EXPERIMENTAL)
----------------------------------------------
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
a Windows system and place it into a directory called `I2P` in your `i2p.firefox`
checkout.
Assuming a working java and jpackage environment on your Windows system, the
following command should generate a suitable "App Image" in a directory
called "I2P."
export I2P_VERSION=0.9.49
cp -R ../i2p.i2p/pkg-temp/lib build/lib
jpackage --type app-image --name I2P --app-version "$I2P_VERSION" \
--verbose \
--resource-dir build/lib \
--input build/lib --main-jar router.jar --main-class net.i2p.router.RouterLaunch
Transfer the I2P directory to the machine where you build i2p.firefox if
necessary, then complete the regular build instructions. If a jpackaged I2P router
isn't present to use at build time, the inclusion will be skipped automatically
with a non-fatal warning.
In the near future, I'll start providing a pre-built app image to ease the
build process for non-Windows users.
End-to-End Windows build process using WSL
------------------------------------------
**If you've already done this once, you can just use:** `./build.sh && wsl make`
**in `git bash`** to automatically build an installer.
**Prerequisites:** You need to have OpenJDK 14 or greater installed and configured
with your `%JAVA_HOME%` environment variable configured and `%JAVA_HOME%/bin` on
your `%PATH%`. You need to have Apache Ant installed and configured with `%ANT_HOME%`
environment variable configured and `%ANT_HOME%/bin` on your `%PATH%`. You must have
Cygwin installed. You must have `NSIS.exe` installed and `makensis` available on your
`%PATH%`. You must have Git for Windows installed. When installing git for Windows,
you should select "Checkout as is, commit as is" and leave line-endings alone.
1. [Set up Windows Subsystem for Linux per Microsoft's instructions](https://docs.microsoft.com/en-us/windows/wsl/install-win10#manual-installation-steps)
2. [Install Ubuntu Focal per Microsoft's instructions](https://www.microsoft.com/store/apps/9n6svws3rx71)
3. Open Git Bash.
4. Install prerequisites `wsl sudo apt-get update && sudo apt-get install make nsis dos2unix curl jq`
5. Clone `i2p.i2p` and `i2p.firefox`
git clone https://github.com/i2p/i2p.i2p
git clone https://github.com/i2p/i2p.firefox
6. Move to the i2p.i2p directory. Build the .jar files required to build the App Image
inside i2p.i2p. Return to home.
cd i2p.i2p
ant clean pkg
cd ..
7. Move into the i2p.firefox directory. Run the `./build.sh` script.
cd i2p.firefox
./build.sh
8. Compile the NSIS installer using WSL.
wsl make
End-to-End Windows build process using Cygwin
---------------------------------------------
**Prerequisites:** You need to have OpenJDK 14 or greater installed and configured
with your `%JAVA_HOME%` environment variable configured and `%JAVA_HOME%/bin` on
your `%PATH%`. You need to have Apache Ant installed and configured with `%ANT_HOME%`
environment variable configured and `%ANT_HOME%/bin` on your `%PATH%`. You must have
WSL and git bash installed. You must have `NSIS.exe` installed and `makensis` available on your
`%PATH%`. You must have Git for Windows installed. When installing git for Windows, you should
select "Checkout as is, commit as is" and leave line-endings alone.
TODO: Add links to the respective instructions for each of these.
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.
3. Clone `i2p.i2p` and `i2p.firefox`
git clone https://github.com/i2p/i2p.i2p
git clone https://github.com/i2p/i2p.firefox
3. Move to the i2p.i2p directory. Build the .jar files required to build the App Image
inside i2p.i2p. Return to home.
cd i2p.i2p
ant clean pkg
cd ..
7. Move into the i2p.firefox directory. Run the `./build.sh` script.
cd i2p.firefox
./build.sh
5. Run `make` to build the installer.
Building a signed update file
-----------------------------
Building a signed update file for automatically updating a Windows I2P router
requires you to also have Go installed in your Cygwin or WSL environment.
With WSL, you can do this using the command:
wsl sudo apt-get install golang-go
With that dependency satisfied, you can then run:
wsl make su3
to build the signing tool if necessary and then package the installer in a
signed update file.
Docker Support
--------------
You can use a Docker container to install this browser profile as well. In order
to do this, you can run the commands:
xhost + local:docker
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
To build and run the container locally, clone this repository and run the
make run
target.
Issues
------

29
UPDATES.md Normal file
View File

@ -0,0 +1,29 @@
Setting up an Update Server for an I2P Bundle
=============================================
It is important to set up a signed update server so that people are able to
safely and anonymously update your I2P bundle.
The quick way:
--------------
This process depends on my ability to push releases to github. If you are
forking, setting up a dev server, or taking over because I got hit by a bus,
you'll need to do it the complete way.
For as long as I am building updates, you will be able to mirror the jpackaged
Windows bundle by cloning the repository `https://github.com/eyedeekay/i2p` and
running the `make docker run` target in that repository. You can retrieve the
base32 address of your update server by viewing the log with
`docker logs eephttpd-jpackage | grep b32.i2p | tee eephttpd-address.md`. To
update the site, run `./update.site.sh` in that repository.
Once you have cloned the repository and started the container with
`make docker run`, you can simply add `path/to/repo/update-site.sh` to your
`crontab` and it will update at an interval of your choosing.
The complete way:
-----------------
TODO: describe how to do it with less of the awesome fancy stuff I put together
to make it easier on myself to keep an update server going.

View File

@ -1,3 +1,4 @@
#! /usr/bin/env sh
curl -s https://addons.mozilla.org/api/v5/addons/addon/$1/versions/?page_size=1 | jq '.results | .[0] | .version' | tr -d '"'
curl -s "https://addons.mozilla.org/api/v5/addons/addon/$1/versions/?page_size=1" | jq '.results | .[0] | .version' | tr -d '"'

61
build.sh Executable file
View File

@ -0,0 +1,61 @@
#!/bin/bash
set -e
. i2pversion
if [ -f i2pversion_override ]; then
. i2pversion_override
fi
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
sleep 2s
if [ -z "${JAVA_HOME}" ]; then
JAVA_HOME=`type -p java|xargs readlink -f|xargs dirname|xargs dirname`
echo "Building with: $JAVA, $JAVA_HOME"
fi
echo "cleaning"
./clean.sh
HERE="$PWD"
cd "$HERE/../i2p.i2p/"
git checkout "$VERSION"
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"
echo "compiling custom launcher"
mkdir build
cp "$I2P_JARS"/*.jar build
cd java
"$JAVA_HOME"/bin/javac -d ../build -classpath "$HERE"/build/i2p.jar:"$HERE"/build/router.jar:"$HERE"/build/routerconsole.jar net/i2p/router/WinLauncher.java net/i2p/router/WindowsUpdatePostProcessor.java net/i2p/router/WinUpdateProcess.java
cd ..
#echo "building launcher.jar"
cd build
"$JAVA_HOME"/bin/jar -cf launcher.jar net
cd ..
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"
"$JAVA_HOME"/bin/jpackage --type app-image --name I2P --app-version "$I2P_VERSION" \
--verbose \
$JPACKAGE_OPTS \
--resource-dir build \
--java-options "--illegal-access=permit" \
--input build --main-jar launcher.jar --main-class net.i2p.router.WinLauncher

17
clean.sh Executable file
View File

@ -0,0 +1,17 @@
#! /usr/bin/env sh
rm -rf \
build \
eventlog.txt \
hostsdb.blockfile \
I2P \
i2p_1.0-1_amd64.deb \
libjbigi.so \
libjcpuid.so \
logs \
peerProfiles \
prngseed.rnd \
wrapper.log \
*.jar \
*.exe \
*.dmg

2
config.mk Normal file
View File

@ -0,0 +1,2 @@
SIGNER=hankhill19580@gmail.com
export SIGNER=hankhill19580@gmail.com

View File

@ -1 +1 @@
https://addons.mozilla.org/firefox/downloads/file/3674169/0.98/i2ppb@eyedeekay.github.io.xpi
https://addons.mozilla.org/firefox/downloads/file/3784917/0.108/i2prhz@eyedeekay.github.io

15
i2pversion Normal file
View File

@ -0,0 +1,15 @@
#! /usr/bin/env sh
#Comment this out to build from an alternate branch or
# the tip of the master branch.
#I2P_VERSION=0.9.50
#export I2P_VERSION=0.9.50
#VERSION=i2p-$I2P_VERSION
#export VERSION="$VERSION"
#Uncomment this to build from the tip of the master.
I2P_VERSION=0.9.50
export I2P_VERSION=0.9.50
VERSION=master
export VERSION="$VERSION"

View File

@ -0,0 +1,108 @@
package net.i2p.router;
import java.io.*;
import java.util.*;
import net.i2p.crypto.*;
import net.i2p.app.ClientAppManager;
import net.i2p.router.RouterLaunch;
import net.i2p.router.Router;
import net.i2p.update.UpdateManager;
import net.i2p.update.UpdatePostProcessor;
import net.i2p.util.SystemVersion;
import net.i2p.update.*;
import static net.i2p.update.UpdateType.*;
/**
* Launches a router from %PROGRAMFILES%/I2P using configuration data in
* %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
* 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())
programs.mkdirs();
else if (!programs.isDirectory()) {
System.err.println(programs + " exists but is not a directory. Please get it out of the way");
System.exit(1);
}
File home = selectHome();
if (!home.exists())
home.mkdirs();
else if (!home.isDirectory()) {
System.err.println(home + " exists but is not a directory. Please get it out of the way");
System.exit(1);
}
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"));
wupp.i2pRouter = new Router(System.getProperties());
System.out.println("Router is configured");
Thread registrationThread = new Thread(REGISTER_UPP);
registrationThread.setName("UPP Registration");
registrationThread.setDaemon(true);
registrationThread.start();
wupp.i2pRouter.runRouter();
}
private static final Runnable REGISTER_UPP = () -> {
// first wait for the RouterContext to appear
RouterContext ctx;
while ((ctx = (RouterContext) wupp.i2pRouter.getContext().getCurrentContext()) == null) {
sleep(1000);
}
// then wait for the update manager
ClientAppManager cam = ctx.clientAppManager();
UpdateManager um;
while ((um = (UpdateManager) cam.getRegisteredApp(UpdateManager.APP_NAME)) == null) {
sleep(1000);
}
wupp = new WindowsUpdatePostProcessor(ctx);
um.register(wupp, UpdateType.ROUTER_SIGNED_SU3, SU3File.TYPE_EXE);
um.register(wupp, UpdateType.ROUTER_DEV_SU3, SU3File.TYPE_EXE);
};
private static void sleep(int millis) {
try {
Thread.sleep(millis);
} catch (InterruptedException bad) {
bad.printStackTrace();
throw new RuntimeException(bad);
}
}
private static File selectHome() { //throws Exception {
if (SystemVersion.isWindows()) {
File home = new File(System.getProperty("user.home"));
File appData = new File(home, "AppData");
File local = new File(appData, "Local");
File i2p;
i2p = new File(local, "I2P");
System.out.println("Windows jpackage wrapper started, using: " + i2p + " as base config");
return i2p.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 started, using: " + programs + " as base config");
return programs.getAbsoluteFile();
}
}
}

View File

@ -0,0 +1,72 @@
package net.i2p.router;
import net.i2p.router.*;
import net.i2p.I2PAppContext;
import java.util.function.*;
import java.io.*;
import net.i2p.util.Log;
class WinUpdateProcess implements Runnable {
private final RouterContext ctx;
private final Supplier<String> versionSupplier;
private final Supplier<File> fileSupplier;
WinUpdateProcess(RouterContext ctx, Supplier<String> versionSupplier, Supplier<File> fileSupplier) {
this.ctx = ctx;
this.versionSupplier = versionSupplier;
this.fileSupplier = fileSupplier;
}
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;
} else {
workDir.mkdirs();
}
return workDir;
}
return null;
}
private void runUpdateInstaller() throws IOException {
String version = versionSupplier.get();
File file = fileSupplier.get();
if (file == null)
return;
var workingDir = workDir();
var logFile = new File(workingDir, "log-" + version + ".txt");
ProcessBuilder pb = new ProcessBuilder(file.getAbsolutePath());
var env = pb.environment();
env.put("OLD_I2P_VERSION", version);
env.remove("RESTART_I2P");
int exitCode = ctx.router().scheduledGracefulExitCode();
if (exitCode == Router.EXIT_HARD_RESTART || exitCode == Router.EXIT_GRACEFUL_RESTART)
env.put("RESTART_I2P", "true");
try {
pb.directory(workingDir).
redirectErrorStream(true).
redirectOutput(logFile).
start();
} catch (IOException ex) {
System.out.println("Unable to run update-program in background. Update will fail.");
}
}
@Override
public void run() {
try {
runUpdateInstaller();
} catch(IOException ioe) {
System.out.println("Error running updater, update may fail." + ioe);
}
}
}

View File

@ -0,0 +1,119 @@
package net.i2p.router;
import java.io.*;
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;
import net.i2p.update.UpdateType;
import net.i2p.update.UpdatePostProcessor;
import net.i2p.util.Log;
import net.i2p.util.SystemVersion;
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;
private volatile File positionedFile = null;
private final String fileName = "i2p-jpackage-update.exe";
WindowsUpdatePostProcessor() {
this.ctx = null;
}
WindowsUpdatePostProcessor(RouterContext ctx) {
this.ctx = ctx;
}
public String getVersion() {
return version;
}
public File getFile() {
return positionedFile;
}
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) {
_log.warn("Unsupported update type " + type);
return;
}
if (fileType != SU3File.TYPE_EXE) {
_log.warn("Unsupported file type " + fileType);
return;
}
this.positionedFile = moveUpdateInstaller(file);
this.version = version;
if (!hook.compareAndSet(false,true)) {
_log.info("shutdown hook was already set");
return;
}
_log.info("adding shutdown hook");
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;
else
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");
}
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;
} else {
workDir.mkdirs();
}
return workDir;
}
return null;
}
protected File selectProgramFile() {
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");
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");
return programs.getAbsoluteFile();
}
}
}

3
router.config Normal file
View File

@ -0,0 +1,3 @@
router.updateURL=http://ekm3fu6fr5pxudhwjmdiea5dovc3jdi66hjgop4c7z7dfaw7spca.b32.i2p/i2pwinupdate.su3
router.newsURL=http://tc73n4kivdroccekirco7rhgxdg5f3cjvbaapabupeyzrqwv5guq.b32.i2p/win/stable/news.su3
router.backupNewsURL=http://dn3tvalnjz432qkqsvpfdqrwpqkw3ye4n4i2uyfr4jexvo3sp5ka.b32.i2p/news/win/stable/news.su3

View File

@ -53,3 +53,10 @@ user_pref("browser.newtabpage.activity-stream.feeds.section.highlights", false);
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
user_pref("browser.newtabpage.activity-stream.default.sites", "http://127.0.0.1:7657/home,http://127.0.0.1:7657/i2psnark/,http://127.0.0.1:7657/susimail/");
user_pref("browser.newtabpage.activity-stream.feeds.topsites", true);
user_pref("ui.use_standins_for_native_colors", true);
user_pref("webgl.disable-extensions", true);
user_pref("webgl.min_capability_mode", true);
user_pref("webgl.disable-fail-if-major-performance-caveat", true);
user_pref("webgl.enable-webgl2", false);
user_pref("media.navigator.enabled", false);
user_pref("dom.w3c_touch_events.enabled", false);

View File

@ -216,3 +216,9 @@ user_pref("keyword.enabled", false);
user_pref("extensions.allowPrivateBrowsingByDefault", true);
user_pref("extensions.PrivateBrowsing.notification", false);
user_pref("browser.newtabpage.activity-stream.feeds.topsites", true);
user_pref("ui.use_standins_for_native_colors", true);
user_pref("webgl.disable-extensions", true);
user_pref("webgl.min_capability_mode", true);
user_pref("webgl.disable-fail-if-major-performance-caveat", true);
user_pref("webgl.enable-webgl2", false);
user_pref("dom.w3c_touch_events.enabled", false);

View File

@ -1 +1 @@
0.3
0.04.0

122
src/nsis/FindProcess.nsh Normal file
View File

@ -0,0 +1,122 @@
/* FindProcess.nsh
*
* written by Donald Miller
* Mar 7, 2007
*
*/
!include LogicLib.nsh
!include WordFunc.nsh
!insertmacro WordFind
!ifndef FindProcess
!define FindProcess '!insertmacro FindProcess'
!macro FindProcess ProcessList BoolReturn
Push '${ProcessList}'
Call FindProcess
Pop ${BoolReturn}
!macroend
Function 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 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 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

View File

@ -1,5 +1,5 @@
# uncomment on v3
# UniCode true
# This now requires v3
UniCode true
!define APPNAME "I2PBrowser-Launcher"
!define COMPANYNAME "I2P"
@ -11,11 +11,14 @@
!define CONSOLE_URL "http://127.0.0.1:7657/home"
!include i2pbrowser-version.nsi
!include i2pbrowser-jpackage.nsi
!include FindProcess.nsh
var FFINSTEXE
var FFNONTORINSTEXE
var I2PINSTEXE
!define FFINSTEXE
!define FFNONTORINSTEXE
!define FFINSTEXE32 "$PROGRAMFILES32\Mozilla Firefox\"
@ -27,14 +30,14 @@ var I2PINSTEXE
!define RAM_NEEDED_FOR_64BIT 0x80000000
InstallDir "$PROGRAMFILES\${COMPANYNAME}\${APPNAME}"
InstallDir "$PROGRAMFILES64\${COMPANYNAME}\${APPNAME}"
# rtf or txt file - remember if it is txt, it must be in the DOS text format (\r\n)
LicenseData "licenses\LICENSE.index"
# This will be in the installer/uninstaller's title bar
Name "${COMPANYNAME} - ${APPNAME}"
Icon ui2pbrowser_icon.ico
OutFile "I2P-Profile-Installer-${VERSIONMAJOR}.${VERSIONMINOR}${VERSIONBUILD}.exe"
OutFile "I2P-Profile-Installer-${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONBUILD}.exe"
RequestExecutionLevel admin
@ -169,10 +172,11 @@ Function .onInit
StrCpy $FFINSTEXE "$PROFILE/Desktop/Tor Browser/Browser/"
${EndIf}
${EndIf}
${If} ${FileExists} "${I2PINSTEXE32}"
StrCpy $I2PINSTEXE "${I2PINSTEXE64}"
${If} ${FileExists} "${I2PINSTEXE32}\i2p.exe"
StrCpy $I2PINSTEXE "${I2PINSTEXE32}"
${EndIf}
${If} ${FileExists} "${I2PINSTEXE64}"
${If} ${FileExists} "${I2PINSTEXE64}\i2p.exe"
StrCpy $I2PINSTEXE "${I2PINSTEXE64}"
${EndIf}
FunctionEnd
@ -185,6 +189,36 @@ FunctionEnd
Function routerDetect
${If} ${FileExists} "$I2PINSTEXE"
Abort directory
${Else}
createDirectory $I2PINSTEXE
SetOutPath $I2PINSTEXE
File /nonfatal /a /r "I2P\"
File /nonfatal "I2P\config\jpackaged"
createDirectory "$I2PINSTEXE\"
SetOutPath "$I2PINSTEXE\"
File /nonfatal "I2P\config\clients.config"
File /nonfatal "I2P\config\i2ptunnel.config"
File /nonfatal "I2P\config\wrapper.config"
File /nonfatal "I2P\config\hosts.txt"
createDirectory "$I2PINSTEXE\webapps\"
SetOutPath "$I2PINSTEXE\webapps\"
File /nonfatal /a /r "I2P\config\webapps\"
createDirectory "$I2PINSTEXE\geoip\"
SetOutPath "$I2PINSTEXE\geoip\"
File /nonfatal /a /r "I2P\config\geoip\"
createDirectory "$I2PINSTEXE\certificates\"
SetOutPath "$I2PINSTEXE\certificates\"
File /nonfatal /a /r "I2P\config\certificates\"
createDirectory "$I2PINSTEXE\eepsite\"
SetOutPath "$I2PINSTEXE\eepsite\"
File /nonfatal /a /r "I2P\config\eepsite\"
Abort directory
${EndIf}
FunctionEnd
@ -192,70 +226,71 @@ FunctionEnd
# start default section
Section Install
${If} ${Silent}
${Do}
${FindProcess} "I2P.exe" $0
Sleep 500
${LoopWhile} $0 <> 0
${EndIf}
# set the installation directory as the destination for the following actions
createDirectory $INSTDIR
SetOutPath $INSTDIR
File ui2pbrowser_icon.ico
# Install the launcher scripts: This will need to be it's own section, since
# now I think we just need to let the user select if the user is using a non
# default Firefox path.
FileOpen $0 "$INSTDIR\i2pbrowser.bat" w
FileWrite $0 "@echo off"
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileWrite $0 'start "" "$I2PINSTEXE\i2p.exe"'
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileWrite $0 'start "" "$FFINSTEXE\firefox.exe" -no-remote -profile "$LOCALAPPDATA\${APPNAME}\firefox.profile.i2p" -url %1'
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileWrite $0 exit
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileClose $0
# Update jpackaged I2P router, if it exists
${If} ${FileExists} "$I2PINSTEXE\jpackaged"
createDirectory $I2PINSTEXE
SetOutPath $I2PINSTEXE
FileOpen $0 "$INSTDIR\i2pbrowser-private.bat" w
FileWrite $0 "@echo off"
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileWrite $0 'start "" "$I2PINSTEXE\i2p.exe"'
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileWrite $0 'start "" "$FFINSTEXE\firefox.exe" -no-remote -profile "$LOCALAPPDATA\${APPNAME}\firefox.profile.i2p" -private-window about:blank'
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileWrite $0 exit
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileClose $0
${If} ${Silent}
ReadEnvStr $0 OLD_I2P_VERSION
${If} $0 < ${I2P_VERSION}
File /nonfatal /a /r "I2P\"
File /nonfatal "I2P\config\jpackaged"
createDirectory "$I2PINSTEXE\"
SetOutPath "$I2PINSTEXE\"
# Install the launcher scripts: This will need to be it's own section, since
# now I think we just need to let the user select if the user is using a non
# default Firefox path.
FileOpen $0 "$INSTDIR\i2pconfig.bat" w
FileWrite $0 "@echo off"
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileWrite $0 'start "" "$I2PINSTEXE\i2p.exe"'
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileWrite $0 'start "" "$FFNONTORINSTEXE\firefox.exe" -no-remote -profile "$LOCALAPPDATA\${APPNAME}\firefox.profile.config.i2p" -url %1'
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileWrite $0 exit
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileClose $0
createDirectory "$I2PINSTEXE\webapps\"
SetOutPath "$I2PINSTEXE\webapps\"
File /nonfatal /a /r "I2P\config\webapps\"
createDirectory "$I2PINSTEXE\geoip\"
SetOutPath "$I2PINSTEXE\geoip\"
File /nonfatal /a /r "I2P\config\geoip\"
createDirectory "$I2PINSTEXE\certificates\"
SetOutPath "$I2PINSTEXE\certificates\"
File /nonfatal /a /r "I2P\config\certificates\"
${EndIf}
${Else}
File /nonfatal /a /r "I2P\"
File /nonfatal "I2P\config\jpackaged"
createDirectory "$I2PINSTEXE\"
SetOutPath "$I2PINSTEXE\"
createDirectory "$I2PINSTEXE\webapps\"
SetOutPath "$I2PINSTEXE\webapps\"
File /nonfatal /a /r "I2P\config\webapps\"
createDirectory "$I2PINSTEXE\geoip\"
SetOutPath "$I2PINSTEXE\geoip\"
File /nonfatal /a /r "I2P\config\geoip\"
createDirectory "$I2PINSTEXE\certificates\"
SetOutPath "$I2PINSTEXE\certificates\"
File /nonfatal /a /r "I2P\config\certificates\"
${EndIf}
${EndIf}
# Install the launcher scripts
createDirectory "$INSTDIR\licenses"
SetOutPath "$INSTDIR"
File win/i2pbrowser.bat
File win/i2pbrowser-private.bat
File win/i2pconfig.bat
# Install the licenses
createDirectory "$INSTDIR\licenses"
@ -263,61 +298,75 @@ Section Install
File /r licenses\*.*
# Install the profile
createDirectory "$LOCALAPPDATA\${APPNAME}\firefox.profile.i2p"
SetOutPath "$LOCALAPPDATA\${APPNAME}\firefox.profile.i2p"
File profile/user.js
File profile/prefs.js
File profile/bookmarks.html
File profile/storage-sync.sqlite
createDirectory "$INSTDIR\firefox.profile.i2p"
SetOutPath "$INSTDIR\firefox.profile.i2p"
File profile\user.js
File profile\prefs.js
File profile\bookmarks.html
File profile\storage-sync.sqlite
# Install the extensions
createDirectory "$LOCALAPPDATA\${APPNAME}\firefox.profile.i2p\extensions"
SetOutPath "$LOCALAPPDATA\${APPNAME}\firefox.profile.i2p\extensions"
File "profile/extensions/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi"
File profile/extensions/https-everywhere-eff@eff.org.xpi
File profile/extensions/i2ppb@eyedeekay.github.io.xpi
createDirectory "$INSTDIR\firefox.profile.i2p\extensions"
SetOutPath "$INSTDIR\firefox.profile.i2p\extensions"
File "profile\extensions\{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi"
File profile\extensions\https-everywhere-eff@eff.org.xpi
File profile\extensions\i2prhz@eyedeekay.github.io.xpi
# Install the config profile
createDirectory "$LOCALAPPDATA\${APPNAME}\firefox.profile.config.i2p"
SetOutPath "$LOCALAPPDATA\${APPNAME}\firefox.profile.config.i2p"
File app-profile/user.js
File app-profile/prefs.js
File app-profile/bookmarks.html
File app-profile/storage-sync.sqlite
createDirectory "$INSTDIR\firefox.profile.config.i2p"
SetOutPath "$INSTDIR\firefox.profile.config.i2p"
File app-profile\user.js
File app-profile\prefs.js
File app-profile\bookmarks.html
File app-profile\storage-sync.sqlite
# Install the config extensions
createDirectory "$LOCALAPPDATA\${APPNAME}\firefox.profile.config.i2p\extensions"
SetOutPath "$LOCALAPPDATA\${APPNAME}\firefox.profile.config.i2p\extensions"
File profile/extensions/https-everywhere-eff@eff.org.xpi
File profile/extensions/i2ppb@eyedeekay.github.io.xpi
createDirectory "$INSTDIR\firefox.profile.config.i2p\extensions"
SetOutPath "$INSTDIR\firefox.profile.config.i2p\extensions"
File profile\extensions\https-everywhere-eff@eff.org.xpi
File profile\extensions\i2prhz@eyedeekay.github.io.xpi
# Install the config userChrome
createDirectory "$LOCALAPPDATA\${APPNAME}\firefox.profile.config.i2p\chrome"
SetOutPath "$LOCALAPPDATA\${APPNAME}\firefox.profile.config.i2p\chrome"
File app-profile/chrome/userChrome.css
createDirectory "$INSTDIR\firefox.profile.config.i2p\chrome"
SetOutPath "$INSTDIR\firefox.profile.config.i2p\chrome"
File app-profile\chrome\userChrome.css
SetOutPath "$INSTDIR"
createDirectory "$SMPROGRAMS\${APPNAME}"
CreateShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "C:\Windows\system32\cmd.exe" "/c $\"$INSTDIR\i2pbrowser.bat$\" ${CONSOLE_URL}" "$INSTDIR\ui2pbrowser_icon.ico"
CreateShortCut "$SMPROGRAMS\${APPNAME}\Private Browsing-${APPNAME}.lnk" "C:\Windows\system32\cmd.exe" "/c $\"$INSTDIR\i2pbrowser-private.bat$\"" "$INSTDIR\ui2pbrowser_icon.ico"
CreateShortCut "$DESKTOP\${APPNAME}.lnk" "C:\Windows\system32\cmd.exe" "/c $\"$INSTDIR\i2pbrowser.bat$\" ${CONSOLE_URL}" "$INSTDIR\ui2pbrowser_icon.ico"
CreateShortCut "$DESKTOP\Private Browsing-${APPNAME}.lnk" "C:\Windows\system32\cmd.exe" "/c $\"$INSTDIR\i2pbrowser-private.bat$\"" "$INSTDIR\ui2pbrowser_icon.ico"
CreateShortCut "$SMPROGRAMS\${APPNAME}\Browse I2P.lnk" "C:\Windows\system32\cmd.exe" "/c $\"$INSTDIR\i2pbrowser.bat$\" ${CONSOLE_URL}" "$INSTDIR\ui2pbrowser_icon.ico"
CreateShortCut "$SMPROGRAMS\${APPNAME}\Browse I2P - Temporary Identity.lnk" "C:\Windows\system32\cmd.exe" "/c $\"$INSTDIR\i2pbrowser-private.bat$\"" "$INSTDIR\ui2pbrowser_icon.ico"
; CreateShortCut "$SMPROGRAMS\${APPNAME}\I2P Applications.lnk" "C:\Windows\system32\cmd.exe" "/c $\"$INSTDIR\i2pconfig.bat$\"" "$INSTDIR\ui2pbrowser_icon.ico"
CreateShortCut "$DESKTOP\Browse I2P.lnk" "C:\Windows\system32\cmd.exe" "/c $\"$INSTDIR\i2pbrowser.bat$\" ${CONSOLE_URL}" "$INSTDIR\ui2pbrowser_icon.ico"
CreateShortCut "$DESKTOP\Browse I2P - Temporary Identity.lnk" "C:\Windows\system32\cmd.exe" "/c $\"$INSTDIR\i2pbrowser-private.bat$\"" "$INSTDIR\ui2pbrowser_icon.ico"
; CreateShortCut "$DESKTOP\I2P Applications.lnk" "C:\Windows\system32\cmd.exe" "/c $\"$INSTDIR\i2pconfig.bat$\"" "$INSTDIR\ui2pbrowser_icon.ico"
;# Point the browser config setting in the base router.config
FileOpen $0 "$I2PINSTEXE\router.config" a
FileSeek $0 0 END
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileWrite $0 "routerconsole.browser=$\"$INSTDIR\i2pconfig.bat$\""
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileClose $0
SetShellVarContext current
Var /Global I2PAPPDATA
IfFileExists "$I2PINSTEXE\clients.config" 0 +2
StrCpy $I2PAPPDATA "$I2PINSTEXE"
IfFileExists "$APPDATA\I2P\clients.config.d" 0 +2
StrCpy $I2PAPPDATA "$APPDATA\I2P\"
IfFileExists "$LOCALAPPDATA\I2P\clients.config.d" 0 +2
StrCpy $I2PAPPDATA "$LOCALAPPDATA\I2P\"
IfFileExists "$LOCALAPPDATA\I2P\clients.config" 0 +2
StrCpy $I2PAPPDATA "$LOCALAPPDATA\I2P\"
createDirectory "$I2PAPPDATA"
SetOutPath "$I2PAPPDATA"
;# Point the browser config setting
;# Point the browser config setting in the working config
FileOpen $0 "$I2PAPPDATA\router.config" a
FileSeek $0 0 END
FileWriteByte $0 "13"
@ -327,6 +376,9 @@ Section Install
FileWriteByte $0 "10"
FileClose $0
createDirectory "$I2PINSTEXE"
SetOutPath "$I2PINSTEXE"
SetOutPath "$INSTDIR"
# create the uninstaller
WriteUninstaller "$INSTDIR\uninstall-i2pbrowser.exe"
@ -349,25 +401,25 @@ Section "uninstall"
Delete $INSTDIR\ui2pbrowser_icon.ico
# Uninstall the profile
Delete $LOCALAPPDATA\${APPNAME}\firefox.profile.i2p\prefs.js
Delete $LOCALAPPDATA\${APPNAME}\firefox.profile.i2p\user.js
Delete $LOCALAPPDATA\${APPNAME}\firefox.profile.i2p\bookmarks.html
Delete $LOCALAPPDATA\${APPNAME}\firefox.profile.i2p\storage-sync.sqlite
Delete $INSTDIR\firefox.profile.i2p\prefs.js
Delete $INSTDIR\firefox.profile.i2p\user.js
Delete $INSTDIR\firefox.profile.i2p\bookmarks.html
Delete $INSTDIR\firefox.profile.i2p\storage-sync.sqlite
Delete $LOCALAPPDATA\${APPNAME}\firefox.profile.config.i2p\prefs.js
Delete $LOCALAPPDATA\${APPNAME}\firefox.profile.config.i2p\user.js
Delete $LOCALAPPDATA\${APPNAME}\firefox.profile.config.i2p\bookmarks.html
Delete $LOCALAPPDATA\${APPNAME}\firefox.profile.config.i2p\storage-sync.sqlite
Delete $INSTDIR\firefox.profile.config.i2p\prefs.js
Delete $INSTDIR\firefox.profile.config.i2p\user.js
Delete $INSTDIR\firefox.profile.config.i2p\bookmarks.html
Delete $INSTDIR\firefox.profile.config.i2p\storage-sync.sqlite
# Uninstall the extensions
Delete "$LOCALAPPDATA\${APPNAME}\firefox.profile.i2p\extensions\{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi"
Delete "$LOCALAPPDATA\${APPNAME}\firefox.profile.i2p\extensions\https-everywhere-eff@eff.org.xpi"
Delete "$LOCALAPPDATA\${APPNAME}\firefox.profile.i2p\extensions\i2ppb@eyedeekay.github.io.xpi"
Delete "$INSTDIR\firefox.profile.i2p\extensions\{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi"
Delete "$INSTDIR\firefox.profile.i2p\extensions\https-everywhere-eff@eff.org.xpi"
Delete "$INSTDIR\firefox.profile.i2p\extensions\i2prhz@eyedeekay.github.io.xpi"
Delete "$LOCALAPPDATA\${APPNAME}\firefox.profile.config.i2p\extensions\https-everywhere-eff@eff.org.xpi"
Delete "$LOCALAPPDATA\${APPNAME}\firefox.profile.config.i2p\extensions\i2ppb@eyedeekay.github.io.xpi"
Delete "$INSTDIR\firefox.profile.config.i2p\extensions\https-everywhere-eff@eff.org.xpi"
Delete "$INSTDIR\firefox.profile.config.i2p\extensions\i2prhz@eyedeekay.github.io.xpi"
Delete "$LOCALAPPDATA\${APPNAME}\firefox.profile.config.i2p\config\userChrome.css"
Delete "$INSTDIR\firefox.profile.config.i2p\config\userChrome.css"
# Remove shortcuts and folders
Delete "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk"
@ -376,11 +428,14 @@ Section "uninstall"
Delete "$DESKTOP\${APPNAME}.lnk"
Delete "$DESKTOP\Private Browsing-${APPNAME}.lnk"
rmDir "$SMPROGRAMS\${APPNAME}"
rmDir "$LOCALAPPDATA\${APPNAME}\firefox.profile.i2p\extensions"
rmDir "$LOCALAPPDATA\${APPNAME}\firefox.profile.i2p"
rmDir "$INSTDIR\firefox.profile.i2p\extensions"
rmDir "$INSTDIR\firefox.profile.i2p"
rmDir "$LOCALAPPDATA\${APPNAME}"
rmDir "$INSTDIR"
${If} ${FileExists} "$I2PINSTEXE\jpackaged"
rmDir "$I2PINSTEXE"
${EndIf}
# delete the uninstaller
Delete "$INSTDIR\uninstall-i2pbrowser.exe"
@ -394,5 +449,12 @@ SectionEnd
!insertmacro MUI_PAGE_FINISH
Function LaunchLink
ExecShell "" "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk"
${If} ${Silent}
ReadEnvStr $0 RESTART_I2P
${If} $0 != ""
Exec "$INSTDIR\i2pbrowser.bat"
${EndIf}
${Else}
Exec "$INSTDIR\i2pbrowser.bat"
${EndIf}
FunctionEnd

View File

@ -0,0 +1 @@
!define I2P_VERSION 0.9.50

View File

@ -1,3 +1,3 @@
!define VERSIONMAJOR 0
!define VERSIONMINOR 03
!define VERSIONBUILD
!define VERSIONMINOR 04
!define VERSIONBUILD 0

View File

@ -51,3 +51,10 @@ user_pref("browser.newtabpage.activity-stream.feeds.section.highlights", false);
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
user_pref("browser.newtabpage.activity-stream.default.sites", "http://planet.i2p/,http://legwork.i2p/,http://i2pwiki.i2p/,http://i2pforums.i2p/,http://zzz.i2p/");
user_pref("browser.newtabpage.activity-stream.feeds.topsites", true);
user_pref("ui.use_standins_for_native_colors", true);
user_pref("webgl.disable-extensions", true);
user_pref("webgl.min_capability_mode", true);
user_pref("webgl.disable-fail-if-major-performance-caveat", true);
user_pref("webgl.enable-webgl2", false);
user_pref("media.navigator.enabled", false);
user_pref("dom.w3c_touch_events.enabled", false);

View File

@ -170,7 +170,7 @@ user_pref("dom.serviceWorkers.enabled", false);
user_pref("dom.serviceWorkers.interception.enabled", false);
user_pref("dom.storage.enabled", false);
user_pref("dom.webaudio.enabled", false);
user_pref("extensions.autoDisableScopes", 14);
user_pref("extensions.autoDisableScopes", 0);
user_pref("extensions.getAddons.cache.enabled", false);
user_pref("extensions.getAddons.showPane", false);
user_pref("extensions.pocket.enabled", false);
@ -216,3 +216,9 @@ user_pref("keyword.enabled", false);
user_pref("extensions.allowPrivateBrowsingByDefault", true);
user_pref("extensions.PrivateBrowsing.notification", false);
user_pref("browser.newtabpage.activity-stream.feeds.topsites", true);
user_pref("ui.use_standins_for_native_colors", true);
user_pref("webgl.disable-extensions", true);
user_pref("webgl.min_capability_mode", true);
user_pref("webgl.disable-fail-if-major-performance-caveat", true);
user_pref("webgl.enable-webgl2", false);
user_pref("dom.w3c_touch_events.enabled", false);

View File

@ -1 +1 @@
0.3
0.04.0

View File

@ -40,4 +40,5 @@ if [ -z $FIREFOX ]; then
exit 1
fi
$FIREFOX --profile "$BROWSING_PROFILE" $@
echo $FIREFOX --profile "$BROWSING_PROFILE" $@
$FIREFOX --profile "$BROWSING_PROFILE" $@

View File

@ -0,0 +1,38 @@
@echo on
if not exist "%ProgramFiles%\I2P\" (
set "ProgramFiles=C:\Program Files"
)
if exist "%ProgramFiles%\I2P\jpackaged" (
start "i2p" /D "%LOCALAPPDATA%\I2P" "%ProgramFiles%\I2P\i2p.exe"
) else (
start "i2p" "%ProgramFiles%\I2P\i2p.exe"
)
timeout /t 3
if exist "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p\" (
echo "profile is configured, updating extensions"
xcopy /s /i /y "%ProgramFiles%\I2P\I2PBrowser-Launcher\firefox.profile.i2p\extensions" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p\extensions"
) else (
echo "configuring profile"
xcopy /s /i /y "%ProgramFiles%\I2P\I2PBrowser-Launcher\firefox.profile.i2p" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p"
)
if exist "%USERPROFILE%/Desktop/Tor Browser/Browser/firefox.exe" (
start "i2pbrowser" "%USERPROFILE%/Desktop/Tor Browser/Browser/firefox.exe" -no-remote -profile "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p" -private-window about:blank
exit
)
if exist "%USERPROFILE%/OneDrive/Desktop/Tor Browser/Browser/firefox.exe" (
start "i2pbrowser" "%USERPROFILE%/OneDrive/Desktop/Tor Browser/Browser/firefox.exe" -no-remote -profile "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p" -private-window about:blank
exit
)
if exist "%ProgramFiles%\Mozilla Firefox\firefox.exe" (
start "i2pbrowser" "%ProgramFiles%\Mozilla Firefox\firefox.exe" -no-remote -profile "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p" -private-window about:blank
exit
)
exit

38
src/win/i2pbrowser.bat Normal file
View File

@ -0,0 +1,38 @@
@echo on
if not exist "%ProgramFiles%\I2P\" (
set "ProgramFiles=C:\Program Files"
)
if exist "%ProgramFiles%\I2P\jpackaged" (
start "i2p" /D "%LOCALAPPDATA%\I2P" "%ProgramFiles%\I2P\i2p.exe"
) else (
start "i2p" "%ProgramFiles%\I2P\i2p.exe"
)
timeout /t 3
if exist "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p\" (
echo "profile is configured, updating extensions"
xcopy /s /i /y "%ProgramFiles%\I2P\I2PBrowser-Launcher\firefox.profile.i2p\extensions" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p\extensions"
) else (
echo "configuring profile"
xcopy /s /i /y "%ProgramFiles%\I2P\I2PBrowser-Launcher\firefox.profile.i2p" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p"
)
if exist "%USERPROFILE%/Desktop/Tor Browser/Browser/firefox.exe" (
start "i2pbrowser" "%USERPROFILE%/Desktop/Tor Browser/Browser/firefox.exe" -no-remote -profile "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p" -url %1
exit
)
if exist "%USERPROFILE%/OneDrive/Desktop/Tor Browser/Browser/firefox.exe" (
start "i2pbrowser" "%USERPROFILE%/OneDrive/Desktop/Tor Browser/Browser/firefox.exe" -no-remote -profile "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p" -url %1
exit
)
if exist "%ProgramFiles%\Mozilla Firefox\firefox.exe" (
start "i2pbrowser" "%ProgramFiles%\Mozilla Firefox\firefox.exe" -no-remote -profile "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p" -url %1
exit
)
exit

13
src/win/i2pconfig.bat Normal file
View File

@ -0,0 +1,13 @@
@echo off
if exist "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p\" (
echo "profile is configured"
xcopy /s /i /y "$INSTDIR\firefox.profile.i2p\extensions" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p\extensions"
) else (
echo "configuring profile"
xcopy /s /i /y "$INSTDIR\firefox.profile.config.i2p" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p"
)
start "i2pconfig" "c:\Program Files\Mozilla Firefox\firefox.exe" -no-remote -profile "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p" -url %1
exit