Compare commits
341 Commits
EXPERIMENT
...
20220521
Author | SHA1 | Date | |
---|---|---|---|
a09da35170 | |||
af5add3143 | |||
0f5eb563eb | |||
53dd311b58 | |||
6fc7d9a7b4 | |||
d283efdbf5 | |||
de56966a51 | |||
9b7f886e96 | |||
ec94eee4e2 | |||
17d3b9161f | |||
b8d1a48961 | |||
597207b425 | |||
d851dec3c4 | |||
1339df4ea6 | |||
02ed695417 | |||
0c0219c308 | |||
d47a6c1234 | |||
cc5f3052fa | |||
c10cf6aaeb | |||
17f2c8bdae | |||
7627dd9742 | |||
d4f14fdae9 | |||
1e18aa8c0d | |||
88ba9dc96e | |||
3fda252a34 | |||
dbc8376ebd | |||
ed53efea8f | |||
a4d9d17306 | |||
42b2e78bbe | |||
7fb9fd4e8d | |||
6ca76277db | |||
983813caaf | |||
5d9cd3b669 | |||
45a358bba4 | |||
1b2985665a | |||
a40a212774 | |||
78e703fd92 | |||
7f2ef1d074 | |||
c2b2624388 | |||
c5dda34ef2 | |||
8c507478b6 | |||
574321a1ee | |||
28ad8fcb61 | |||
af3e1696b8 | |||
ca4bf67e19 | |||
451e5d0494 | |||
ea8788e1c8 | |||
fa05c5f1cc | |||
3ab6464c54 | |||
0d29cd2bff | |||
cf4017f212 | |||
10ca0ec281 | |||
288007d6dd | |||
0e7b25ad2c | |||
27082b713e | |||
e16c7bca76 | |||
85fb43ca57 | |||
7a3598817d | |||
8e95435be0 | |||
9aba119a49 | |||
cf091c9e10 | |||
1cbd3f6553 | |||
467512bd26 | |||
af9c2460e9 | |||
6ffd0dae9a | |||
fb28051ba2 | |||
8f19517167 | |||
e55c57c6f8 | |||
e722cb4bec | |||
963d7e88b4 | |||
59baf37322 | |||
b949fa8a84 | |||
12b762d595 | |||
aa2ab5bbe5 | |||
e3f42a42bd | |||
3da8f56247 | |||
31c60f74e1 | |||
cd790ecae8 | |||
cfbeae0ecb | |||
b87e701ee0 | |||
f8c84ba50a | |||
5d3615a0c6 | |||
ec98865d33 | |||
978af1cb11 | |||
560f1c707a | |||
e29fdd95a1 | |||
39e1df1b10 | |||
93b6bc4b3e | |||
334e6525b1 | |||
46c6fb77e2 | |||
9305301bf5 | |||
d874204add | |||
aadf287ecd | |||
66864c317d | |||
ae02a1c6db | |||
b711a36c1d | |||
115805b9fb | |||
c426b73d79 | |||
a20b8ff46d | |||
c14287048f | |||
9be28a53fd | |||
14fdca2e1d | |||
e74405073a | |||
a05f3777a7 | |||
e051d4095c | |||
73f94a120e | |||
74d5ccc47f | |||
4ce272765f | |||
714ef026f3 | |||
8135506213 | |||
ffb9efaab8 | |||
706a7a6fe2 | |||
af44dd357a | |||
c64f0fe632 | |||
cf3385cfd0 | |||
ef0b5c5cad | |||
9282d22e7b | |||
400b9d3edc | |||
4aa673a959 | |||
1f543c8db5 | |||
87f9cc063b | |||
6651a16fb2 | |||
9a34008c48 | |||
1f980fb016 | |||
cf394be352 | |||
51dca79a76 | |||
bb7dcaa907 | |||
9da43b3961 | |||
a28bb6ac3c | |||
44b2ae44ee | |||
e2ad0d190a | |||
f5a424f083 | |||
fe99c7bb05 | |||
bc36564f5d | |||
d8e7551edb | |||
b8b7a1d21c | |||
99ef12af4b | |||
b24caf119c | |||
e50fae0dff | |||
2776609179 | |||
91728cd98c | |||
7172b051aa | |||
3391c23abd | |||
723b4d0e27 | |||
09d07c8c88 | |||
2afeee3d56 | |||
1d0cf4aba7 | |||
cedacc64ce | |||
cef159a137 | |||
f910ec2dde | |||
36b0618b8d | |||
8200d65eb5 | |||
565ac41168 | |||
bee6a1b2a8 | |||
c7be165fb4 | |||
1f0cb37588 | |||
1c4761f3b2 | |||
77c7aede79 | |||
f58944b21a | |||
56a83972e4 | |||
34197f013d | |||
ec68e623b3 | |||
5f8dcd5f27 | |||
a152a14655 | |||
8121d08a7c | |||
0da515eedf | |||
dc219e6287 | |||
e7cee0bcf1 | |||
ab8424c767 | |||
3f89a73856 | |||
7a79341e69 | |||
6128b98ece | |||
7636ab24d6 | |||
3d45bde893 | |||
30f24f6386 | |||
b9c7a7dffb | |||
e1e84bf0ea | |||
ef45bf3944 | |||
7ce35e0010 | |||
22e22c8175 | |||
82104baa5a | |||
57a8f6a1a0 | |||
a96d33027c | |||
3125f13138 | |||
d53974d5b9 | |||
4d6c1d4df1 | |||
de6c0dfd2f | |||
187cf7dfef | |||
a9563fd763 | |||
060db1cff6 | |||
28fc12d1be | |||
1aba1177c2 | |||
461d138d53 | |||
3ee7e440e0 | |||
3c01ebd094 | |||
60ac2d7ec4 | |||
3d51872275 | |||
76899caf68 | |||
6a898b410c | |||
a793e11176 | |||
b50cd8c55b | |||
3c5208d50e | |||
42eb5fdecd | |||
ec700d725d | |||
e0a1b93e9e | |||
f924c2c534 | |||
5340809fa7 | |||
40de7a8f67 | |||
6dbee9db3c | |||
34452b9a4a | |||
220b6756b6 | |||
7f7f021e45 | |||
f9b02fe13f | |||
6026ee3ec6 | |||
3c508f4190 | |||
91abc574d3 | |||
bae0412ebc | |||
e73a5969db | |||
3440bff5b2 | |||
e764c7b773 | |||
7c62c8ecda | |||
d13e2317dd | |||
7ff4eb5e37 | |||
e6928d64ce | |||
ad373eface | |||
d52e79c72e | |||
71b9b9c6ec | |||
f8ff48f723 | |||
8b089ad49e | |||
afdb51370e | |||
2ff2e462a9 | |||
41f4f80a4d | |||
aee8cdbe5f | |||
15a2386981 | |||
8aefcff4b1 | |||
1b35c8dc8b | |||
e7ea163a64 | |||
2b95573f7a | |||
51aa9a97b1 | |||
8737093b6d | |||
688b9ca309 | |||
ac7336f669 | |||
51a63dfb35 | |||
2c328bec86 | |||
fa54305df3 | |||
d7036f7a96 | |||
111ecebe6c | |||
272ff689e7 | |||
3b544d0e25 | |||
7b24afba86 | |||
5b8c3e4b2a | |||
86b6413a9b | |||
cd15ee07c1 | |||
59ca9d1d7f | |||
94feece528 | |||
fc1cce1f4b | |||
5218f18599 | |||
b79044bcce | |||
8453c4092c | |||
a90e7db310 | |||
eacb19034a | |||
14b40177fe | |||
f54d989ea7 | |||
99f6029578 | |||
50097f335a | |||
d943bf98ca | |||
1504d65ba7 | |||
7ef6e9149d | |||
a8117ce0fc | |||
1430d73103 | |||
b5de7de981 | |||
0575913c19 | |||
59dc5d65e0 | |||
f384477700 | |||
3af9c06f01 | |||
6165131c66 | |||
a5db548ad5 | |||
7dfd857b43 | |||
008025d76f | |||
755a47d6f2 | |||
97f3dbd71f | |||
ffd7bfb834 | |||
ab58ec31ff | |||
da9f7695a7 | |||
a6481d7bd7 | |||
b62d64bb0f | |||
8424727dae | |||
10f02140a3 | |||
c66d08d9d8 | |||
bf9e8cae14 | |||
5ce0477d46 | |||
13af013cbd | |||
ff1451c0dc | |||
986b003f20 | |||
2099c1f5fa | |||
1edb0c3e0e | |||
ca89bc017b | |||
d5fd31eba9 | |||
12f124d259 | |||
55a7be91c6 | |||
98d1a80347 | |||
8aae087969 | |||
d2d272f17a | |||
0429c2bab5 | |||
2d24c57c8e | |||
f0a4001b53 | |||
b678d1434a | |||
ee2a7cc93d | |||
0c3fe5b37d | |||
b8a4633113 | |||
b4b09ea5da | |||
4df405978f | |||
cb821a72ad | |||
8218591986 | |||
9a03137a67 | |||
03bba27c14 | |||
9998692bbd | |||
506d2035cb | |||
5783feb348 | |||
afb3ca87b4 | |||
dc08fda98b | |||
c3c0a8ae28 | |||
2e95100bf4 | |||
cd02426571 | |||
1eece32f73 | |||
a4b99698af | |||
075d5e4181 | |||
8b3d0babda | |||
ac3036e819 | |||
0e60f158ce | |||
e438fff266 | |||
c244dc9fe7 | |||
ddc6704351 | |||
8adf9b83a4 | |||
e22abb872e | |||
8f70bc346d | |||
30909d1353 | |||
a218f0d580 | |||
0a0f063f1b | |||
50ab03e195 | |||
3cdc0d674a |
20
.gitignore
vendored
20
.gitignore
vendored
@ -1,7 +1,21 @@
|
||||
build
|
||||
*.deb
|
||||
*.tgz
|
||||
I2P-Profile-Installer-0.03.exe
|
||||
./I2P/
|
||||
I2P/
|
||||
router.info
|
||||
router.keys.dat
|
||||
i2pversion_override
|
||||
*.crl
|
||||
*.crt
|
||||
*.pem
|
||||
*.p12
|
||||
.stfolder
|
||||
*.url
|
||||
.vscode
|
||||
.version
|
||||
*.su3
|
||||
*.su3.torrent
|
||||
*.exe
|
||||
*.log
|
||||
cmd
|
||||
*.so
|
||||
*.jar
|
10
Dockerfile
Normal file
10
Dockerfile
Normal 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'
|
@ -1 +0,0 @@
|
||||
https://addons.mozilla.org/firefox/downloads/file/3716461/2021.4.15/https_everywhere-2021.4.15-an+fx.xpi
|
254
Makefile
254
Makefile
@ -1,37 +1,104 @@
|
||||
all: install.exe
|
||||
-include i2pversion
|
||||
-include i2pversion_override
|
||||
|
||||
prep: profile.tgz app-profile.tgz profile build/licenses build/I2P build/I2P/config
|
||||
-include config.mk
|
||||
|
||||
preset=`rm .version; make version`
|
||||
|
||||
-include .version
|
||||
|
||||
PROFILE_VERSION=$(MAJOR).$(MINOR).$(BUILD)
|
||||
|
||||
all: version prep install.exe
|
||||
|
||||
tag:
|
||||
git tag $(PROFILE_VERSION)
|
||||
|
||||
version:
|
||||
echo !define VERSIONMAJOR $(VERSIONMAJOR) > src/nsis/i2pbrowser-version.nsi
|
||||
echo !define VERSIONMINOR $(VERSIONMINOR) >> src/nsis/i2pbrowser-version.nsi
|
||||
echo !define VERSIONBUILD $(VERSIONBUILD) >> src/nsis/i2pbrowser-version.nsi
|
||||
sed 's|!define VERSION||g' src/nsis/i2pbrowser-version.nsi | sed 's| |=|g' > .version
|
||||
rm -f version.txt
|
||||
make version.txt i2pbrowser-jpackage.nsi
|
||||
|
||||
version.txt:
|
||||
echo "$(PROFILE_VERSION)" > src/profile/version.txt
|
||||
echo "$(PROFILE_VERSION)" > src/app-profile/version.txt
|
||||
|
||||
i2pbrowser-jpackage.nsi:
|
||||
echo "!define I2P_VERSION $(PROFILE_VERSION)" > src/nsis/i2pbrowser-jpackage.nsi
|
||||
|
||||
jpackage: version I2P build/I2P/config all
|
||||
|
||||
help: version
|
||||
@echo "I2P-Profile-Installer-$(PROFILE_VERSION)"
|
||||
@echo "$(SIGNER)"
|
||||
@echo "$(I2P_VERSION)"
|
||||
@echo "$(MAJOR).$(MINOR).$(BUILD)"
|
||||
@echo "$(preset)"
|
||||
|
||||
prep: #launchers build/licenses profile.tgz app-profile.tgz profile build/I2P build/I2P/config #
|
||||
make launchers
|
||||
echo "launchers" >make.log
|
||||
make build/licenses
|
||||
echo "licenses" >make.log
|
||||
make profile.tgz
|
||||
echo "profilezip" >make.log
|
||||
make app-profile.tgz
|
||||
echo "appprofile" >make.log
|
||||
make profile
|
||||
echo "profile" >make.log
|
||||
make build/I2P
|
||||
echo "buildi2p" >make.log
|
||||
make build/I2P/config
|
||||
echo "buildi2pconfig" >make.log
|
||||
cp src/nsis/*.nsi build
|
||||
echo "nsi1" >make.log
|
||||
cp src/nsis/*.nsh build
|
||||
echo "nsi2" >make.log
|
||||
cp src/icons/*.ico build
|
||||
|
||||
install.exe: prep
|
||||
install.exe: #build/licenses
|
||||
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 RES_DIR="../i2p.i2p.jpackage-build/installer/resources"
|
||||
export PKG_DIR="../i2p.i2p.jpackage-build/pkg-temp"
|
||||
export I2P_JBIGI="../i2p.i2p.jpackage-build/installer/lib/jbigi"
|
||||
|
||||
build/I2P: build
|
||||
distclean: clean clean-extensions
|
||||
rm -rf I2P
|
||||
git clean -fd
|
||||
|
||||
I2P:
|
||||
./build.sh
|
||||
|
||||
build/I2P: 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:
|
||||
src/I2P/config: build/I2P
|
||||
mkdir -p src/I2P/config
|
||||
rm -rf src/I2P/config/geoip src/I2P/config/webapps src/I2P/config/certificates
|
||||
echo true | tee src/I2P/config/jpackaged ; true
|
||||
cp $(RES_DIR)/clients.config src/I2P/config/ ; true
|
||||
cp $(RES_DIR)/i2ptunnel.config src/I2P/config/ ; true
|
||||
cp $(RES_DIR)/wrapper.config src/I2P/config/ ; true
|
||||
cp $(RES_DIR)/hosts.txt src/I2P/config/hosts.txt ; true
|
||||
cp -R $(RES_DIR)/certificates src/I2P/config/certificates ; true
|
||||
mkdir -p src/I2P/config/geoip ; true
|
||||
cp $(RES_DIR)/GeoLite2-Country.mmdb.gz src/I2P/config/geoip/GeoLite2-Country.mmdb.gz ; true
|
||||
cp -R "$(PKG_DIR)"/webapps src/I2P/config/webapps ; true
|
||||
cd src/I2P/config/geoip && gunzip GeoLite2-Country.mmdb.gz; cd ../../.. ; true
|
||||
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
|
||||
cp -rv src/I2P/config build/I2P/config ; true
|
||||
build/I2P/config: src/I2P/config build/I2P
|
||||
cp -rv src/I2P/config build/I2P/config
|
||||
# cp -rv build/I2P/* I2P/
|
||||
# cp -rv src/I2P/config build/I2P/.i2p
|
||||
|
||||
#
|
||||
# Warning: a displayed license file of more than 28752 bytes
|
||||
@ -45,143 +112,58 @@ build/licenses: build
|
||||
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 .version *.url make.log
|
||||
git clean -fdx src build
|
||||
|
||||
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: profile
|
||||
$(eval PROFILE_VERSION := $(shell cat src/profile/version.txt))
|
||||
@echo "building profile tarball $(PROFILE_VERSION)"
|
||||
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/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/i2prhz@eyedeekay.github.io.xpi build/profile/extensions/i2prhz@eyedeekay.github.io.xpi
|
||||
include makefiles/su.mk
|
||||
|
||||
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
|
||||
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)"
|
||||
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
|
||||
include makefiles/debian.mk
|
||||
|
||||
build/app-profile/prefs.js: build/app-profile src/app-profile/prefs.js
|
||||
cp src/app-profile/prefs.js build/app-profile/prefs.js
|
||||
I2P_DATE=`date +%Y-%m-%d`
|
||||
|
||||
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
|
||||
MAGNET=`bttools torrent printinfo i2pwinupdate.su3.torrent | grep 'MagNet' | sed 's|MagNet: ||g' | sed 's|%3A|:|g'| sed 's|%2F|/|g'`
|
||||
MAGNET_TESTING=`bttools torrent printinfo i2pwinupdate-testing.su3.torrent | grep 'MagNet' | sed 's|MagNet: ||g' | sed 's|%3A|:|g'| sed 's|%2F|/|g'`
|
||||
|
||||
build/app-profile/bookmarks.html: build/app-profile src/app-profile/bookmarks.html
|
||||
cp src/app-profile/bookmarks.html build/app-profile/bookmarks.html
|
||||
BLANK=`awk '! NF { print NR; exit }' changelog.txt`
|
||||
|
||||
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
|
||||
I2P.zip: I2P-jpackage-windows-$(I2P_VERSION).zip
|
||||
|
||||
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/i2prhz@eyedeekay.github.io.xpi build/app-profile/extensions/i2prhz@eyedeekay.github.io.xpi
|
||||
I2P-jpackage-windows-$(I2P_VERSION).zip:
|
||||
zip I2P-jpackage-windows-$(I2P_VERSION).zip -r build/I2P
|
||||
|
||||
build/i2prhz@eyedeekay.github.io.xpi:
|
||||
curl -L `cat i2psetproxy.url` > build/i2prhz@eyedeekay.github.io.xpi
|
||||
changelog:
|
||||
head -n "$(BLANK)" changelog.txt
|
||||
|
||||
build/NoScript.xpi: NoScript.url
|
||||
curl -L `cat NoScript.url` > build/NoScript.xpi
|
||||
release-jpackage: I2P-jpackage-windows-$(I2P_VERSION).zip
|
||||
head -n "$(BLANK)" changelog.txt | gothub release -p -u eyedeekay -r i2p -t i2p-jpackage-windows-$(I2P_VERSION) -n i2p-jpackage-windows-$(I2P_VERSION) -d -; true
|
||||
|
||||
build/HTTPSEverywhere.xpi : HTTPSEverywhere.url
|
||||
curl -L `cat HTTPSEverywhere.url` > build/HTTPSEverywhere.xpi
|
||||
update-release-jpackage:
|
||||
head -n "$(BLANK)" changelog.txt | gothub edit -p -u eyedeekay -r i2p -t i2p-jpackage-windows-$(I2P_VERSION) -n i2p-jpackage-windows-$(I2P_VERSION) -d -; true
|
||||
|
||||
clean-extensions:
|
||||
rm -fv i2psetproxy.url NoScript.url HTTPSEverywhere.url
|
||||
delete-release-jpackage:
|
||||
gothub delete -u eyedeekay -r i2p -t i2p-jpackage-windows-$(I2P_VERSION); true
|
||||
|
||||
extensions:HTTPSEverywhere.url NoScript.url i2psetproxy.url
|
||||
upload-release-jpackage:
|
||||
gothub upload -R -u eyedeekay -r i2p -t i2p-jpackage-windows-$(I2P_VERSION) -n "i2p-jpackage-windows-$(I2P_VERSION)" -f "./I2P-jpackage-windows-$(I2P_VERSION).zip"
|
||||
|
||||
HTTPSEverywhere.url:
|
||||
@echo "https://addons.mozilla.org/firefox/downloads/file/3716461/"`./amo-version.sh https-everywhere`"/https_everywhere-"`./amo-version.sh https-everywhere`"-an+fx.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/3784917/"`./amo-version.sh i2pipb-rhizome-variant`"/i2prhz@eyedeekay.github.io" > i2psetproxy.url
|
||||
|
||||
build/profile/extensions: build/profile
|
||||
mkdir -p build/profile/extensions
|
||||
|
||||
build/profile: build
|
||||
mkdir -p build/profile
|
||||
|
||||
|
||||
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:
|
||||
rm -rfv /etc/i2pbrowser \
|
||||
/var/lib/i2pbrowser
|
||||
mkdir -p /etc/i2pbrowser \
|
||||
/var/lib/i2pbrowser
|
||||
install -m644 src/unix/i2pbrowserrc /etc/i2pbrowser/i2pbrowserrc
|
||||
install -m644 src/unix/i2pbrowserdebianrc /etc/i2pbrowser/i2pbrowserdebianrc
|
||||
install -m755 build/profile/i2pbrowser.sh /usr/local/bin/i2pbrowser
|
||||
install -m755 build/app-profile/i2pconfig.sh /usr/local/bin/i2pconfig
|
||||
install -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:
|
||||
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="hankhill19580@gmail.com" \
|
||||
--requires="firefox,wget,i2p,i2p-router" \
|
||||
--suggests="i2p,i2p-router,syndie,tor,tsocks" \
|
||||
--nodoc \
|
||||
--deldoc=yes \
|
||||
--deldesc=yes \
|
||||
--backup=no
|
||||
jpackage-release: release-jpackage upload-release-jpackage
|
||||
|
@ -1 +0,0 @@
|
||||
https://addons.mozilla.org/firefox/downloads/file/3534184/11.2.8/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi
|
188
README.md
188
README.md
@ -4,32 +4,41 @@ I2P Browsing Profile for Firefox
|
||||
Features:
|
||||
---------
|
||||
|
||||
- Automatically select an up-to-date, secure Firefox or Tor Browser(On Windows) variant
|
||||
- Automatically configure a profile for I2P
|
||||
- Automatically block-list all non-I2P local destinations
|
||||
- Enable first-party isolation, anti-fingerprinting, letterboxing
|
||||
- Automatically sandbox I2P, Non-I2P, and I2P-Application cookiestores
|
||||
- Automatically select an up-to-date, secure Firefox or Tor Browser(On Windows) variant
|
||||
- Automatically configure a profile for I2P
|
||||
- Automatically block-list all non-I2P local destinations
|
||||
- Enable first-party isolation, anti-fingerprinting, letterboxing
|
||||
- Automatically sandbox I2P, Non-I2P, and I2P-Application cookiestores
|
||||
|
||||
Build Dependencies:
|
||||
-------------------
|
||||
|
||||
To build this, you will need the following software packages (all available in Debian) :
|
||||
|
||||
* make
|
||||
* nsis
|
||||
* dos2unix
|
||||
* curl
|
||||
- make
|
||||
- nsis
|
||||
- dos2unix
|
||||
- curl
|
||||
- jq
|
||||
|
||||
to build a Debian package, you'll also need
|
||||
In addition, you will need the NSIS plugin "ShellExecAsUser" which you can get from the
|
||||
[NSIS Wiki Page](https://nsis.sourceforge.io/ShellExecAsUser_plug-in). In order to install
|
||||
the plugin on Debian, Ubuntu, or using `WSL`, you can download the: [7zip release](https://nsis.sourceforge.io/mediawiki/images/6/68/ShellExecAsUser_amd64-Unicode.7z)
|
||||
and copy the content of `Plugins` to `/usr/share/nsis/Plugins`.
|
||||
|
||||
* checkinstall
|
||||
```sh
|
||||
cp -rv Plugins/* /usr/share/nsis/Plugins/
|
||||
```
|
||||
|
||||
To build a Debian package, you'll also need
|
||||
|
||||
- checkinstall
|
||||
|
||||
Preparation
|
||||
-----------
|
||||
|
||||
Before you build, run the targets
|
||||
|
||||
|
||||
make clean-extensions
|
||||
make extensions
|
||||
|
||||
@ -89,6 +98,159 @@ with `sudo service i2p start` then you can run the script:
|
||||
|
||||
/usr/local/bin/i2p-config-service-setup
|
||||
|
||||
Including a jpackaged I2P Router
|
||||
--------------------------------
|
||||
|
||||
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
|
||||
---------------------------------------------
|
||||
|
||||
I highly recommend you look into the Chocolatey package manager, which makes it much
|
||||
easier to configure these tools and keep them up to date.
|
||||
|
||||
**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
|
||||
|
||||
4. 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 ..
|
||||
|
||||
5. Move into the i2p.firefox directory. Run the `./build.sh` script.
|
||||
|
||||
cd i2p.firefox
|
||||
./build.sh
|
||||
|
||||
6. Run `make` to build the installer.
|
||||
|
||||
Doing a Release
|
||||
---------------
|
||||
|
||||
Once you have the installer `.exe` file produced by NSIS, you're almost ready to
|
||||
do a release. As a final step, someone must sign the `.exe` file using a
|
||||
Certificate which Windows will recognize. The current signer of the Windows
|
||||
bundle is Zlatinb. Standard Windows signing tools are used.
|
||||
|
||||
```sh
|
||||
# Release Copypasta
|
||||
./clean.sh
|
||||
wsl make distclean
|
||||
wsl make clean-extensions
|
||||
wsl make extensions
|
||||
./build.sh
|
||||
wsl make
|
||||
./sign.sh
|
||||
```
|
||||
|
||||
Building a signed update file
|
||||
-----------------------------
|
||||
|
||||
Building a signed update file for automatically updating a Windows I2P router
|
||||
requires you to either be using linux, or have Go installed in your Cygwin or WSL environment.
|
||||
On Linux(Where I sign the su3 files), this works:
|
||||
|
||||
make su3
|
||||
|
||||
to run 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
|
||||
------
|
||||
|
||||
@ -108,5 +270,3 @@ HTTPS Everywhere is developed on Github by the EFF:
|
||||
I2P in Private Browsing is developed on Gitlab and Github by idk and the community:
|
||||
- https://i2pgit.org/idk/I2P-in-Private-Browsing-Mode-Firefox
|
||||
- https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox
|
||||
|
||||
|
||||
|
29
UPDATES.md
Normal file
29
UPDATES.md
Normal 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.
|
@ -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] | .file | .url' | tr -d '"'
|
||||
|
||||
|
101
build.sh
Executable file
101
build.sh
Executable file
@ -0,0 +1,101 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
cd "$SCRIPT_DIR" || exit 1
|
||||
|
||||
. i2pversion
|
||||
|
||||
if [ -f i2pversion_override ]; then
|
||||
. i2pversion_override
|
||||
fi
|
||||
|
||||
. config.sh
|
||||
|
||||
if [ -f config_overide.sh ]; then
|
||||
. config_override.sh
|
||||
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
|
||||
echo "Java 14+ must be used to compile with jpackage, java is $JAVA"
|
||||
exit 1
|
||||
fi
|
||||
if [ "$JAVA" -lt "17" ]; then
|
||||
echo "It is highly recommended that you use Java 17+ to build release packages"
|
||||
fi
|
||||
|
||||
if [ -z "${JAVA_HOME}" ]; then
|
||||
JAVA_HOME=`type -p java|xargs readlink -f|xargs dirname|xargs dirname`
|
||||
fi
|
||||
if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
|
||||
JAVA_HOME=`type -p java|xargs readlink -f|xargs dirname|xargs dirname`
|
||||
fi
|
||||
echo "Building with: $JAVA, $JAVA_HOME"
|
||||
sleep 5s
|
||||
|
||||
HERE="$PWD"
|
||||
if [ ! -d "$HERE/../i2p.i2p.jpackage-build/" ]; then
|
||||
git clone --depth 1 -b "$VERSION" https://i2pgit.org/i2p-hackers/i2p.i2p "$HERE/../i2p.i2p.jpackage-build/"
|
||||
fi
|
||||
cd "$HERE/../i2p.i2p.jpackage-build/"
|
||||
git pull --tags
|
||||
git checkout "$VERSION"
|
||||
for i in $COUNT; do
|
||||
echo -n "$i...."; sleep 1s
|
||||
done
|
||||
ant distclean pkg || true
|
||||
|
||||
cd "$HERE"
|
||||
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 -p build
|
||||
cp "$I2P_JARS"/*.jar build
|
||||
if [ ! -f "$HERE/build/jna.jar" ]; then
|
||||
wget -O "$HERE/build/jna.jar" "https://repo1.maven.org/maven2/net/java/dev/jna/jna/$JNA_VERSION/jna-$JNA_VERSION.jar"
|
||||
fi
|
||||
|
||||
if [ ! -f "$HERE/build/jna-platform.jar" ]; then
|
||||
wget -O "$HERE/build/jna-platform.jar" "https://repo1.maven.org/maven2/net/java/dev/jna/jna-platform/$JNA_VERSION/jna-platform-$JNA_VERSION.jar"
|
||||
fi
|
||||
|
||||
cd java
|
||||
"$JAVA_HOME"/bin/javac -d ../build -classpath "$HERE/build/jna.jar":"$HERE/build/jna-platform.jar":"$HERE/build/i2p.jar":"$HERE/build/router.jar":"$HERE/build/routerconsole.jar" \
|
||||
net/i2p/router/Elevator.java \
|
||||
net/i2p/router/Shell32X.java \
|
||||
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 \
|
||||
--java-options "-Xmx512m" \
|
||||
--java-options "--add-opens java.base/java.lang=ALL-UNNAMED" \
|
||||
--java-options "--add-opens java.base/sun.nio.fs=ALL-UNNAMED" \
|
||||
--java-options "--add-opens java.base/java.nio=ALL-UNNAMED" \
|
||||
--java-options "--add-opens java.base/java.util.Properties=ALL-UNNAMED" \
|
||||
--java-options "--add-opens java.base/java.util.Properties.defaults=ALL-UNNAMED" \
|
||||
$JPACKAGE_OPTS \
|
||||
--resource-dir build \
|
||||
--input build --main-jar launcher.jar --main-class net.i2p.router.WinLauncher
|
@ -1,3 +1,75 @@
|
||||
2022-05-8 idk
|
||||
* Add translations for Arabic, German, French, Italian, Japanese, Portuguese, Russian,
|
||||
and Chinese.
|
||||
* Add support for I2P+ Router Console detection. Not an endorsement of I2P+, just
|
||||
a convenience requested by a helpful user.
|
||||
* The build system has been radically improved in order to be simpler to set up and
|
||||
configure.
|
||||
* Fixed a bug where the build deleted a config file.
|
||||
|
||||
2022-05-5 idk
|
||||
* Fix a bug where the I2P router detection inappropriately prioritized an easy
|
||||
install bundle when a non-bundled instal was in use.
|
||||
|
||||
2022-03-25 idk
|
||||
* This release adds support for user-mode, non-privileged installation of the
|
||||
jpackaged router and the browser profile. Admin installation is still supported
|
||||
and detected automatically, to support existing bundles.
|
||||
* On restart to update, will detect if a router requires admin rights to install
|
||||
and will ask the user to authorize the update. In user-mode, no prompt will ever
|
||||
be seen.
|
||||
* Updates to the Firefox profiles to improve compatibility with more Firefoxes
|
||||
|
||||
2022-02-10 idk
|
||||
* This release fixes automatic update using Bittorrent within the I2P network
|
||||
and the custom Update PostProcessor.
|
||||
* Fixes the first-run launcher bug
|
||||
* Drastically simplifies the Windows build process
|
||||
* Adds support for development releases
|
||||
* Adds support for Debian packaging(Of just the Firefox profile)
|
||||
|
||||
2021-11-1 idk
|
||||
* HTTPS Everywhere will now self-disable on some Firefox versions. This is not
|
||||
an issue since HTTPS Everywhere is deprecated in favor of Firefox built-in
|
||||
HTTPS enforcement features.
|
||||
* .bat Script: Detect location of C:\Program Files\I2P or
|
||||
C\Program Files(x86)\I2P in launcher scripts
|
||||
* NSIS changes
|
||||
- Make launcher scripts static artifacts instead of generating them during
|
||||
the install process
|
||||
- If a jpackaged I2P router is present in $checkout/I2P, include it in an
|
||||
installer.
|
||||
- If a running installer doesn't find an I2P router in Program Files, install
|
||||
the jpackaged I2P router. Mark it as jpackaged so we can quickly determine
|
||||
from other applications.
|
||||
* I2P in Private Browsing changes
|
||||
- bugfix for `reset()` of dynamic theme
|
||||
- bugfix for erroneous redirect/contain of mis-identified I2PSnark containers
|
||||
- improve support for in-I2P HTTPS
|
||||
- use global CSS on pageAction panels for HTTP, HTTPS, and Bittorrent(@sadie)
|
||||
- improve support for I2PSnark web handler in HTTPS tabs
|
||||
- icon update(@sadie)
|
||||
- contain android-incompatible features so they won't be executed on Fennec
|
||||
- translate into Spanish
|
||||
- visually conceal/reveal features based on whether they are enabled/configured.
|
||||
* I2P Jpackage
|
||||
- support for building an I2P Jpackage has been added to the build system
|
||||
Note that support is platform-specific, to build a Windows jpackage one must
|
||||
use a Windows OS, to build a Linux jpackage one must use a Linux OS. Only
|
||||
Windows jpackages are used for a release product.
|
||||
- For information about how releases are built see README.md and UPDATES.md
|
||||
- The jpackaged router has the following differences from mainline I2P:
|
||||
- The jars are installed to a different directory.
|
||||
- The native libraries are installed to a different directory
|
||||
- The wrapper script is not installed and not used, and replaced by the
|
||||
browser launcher.
|
||||
- The I2P executable is %programfiles%/I2P/I2P.exe, command-line flags are not
|
||||
compatible but configuration files are.
|
||||
- wrapper.config is unused
|
||||
- The built-by entry will reflect that idk built the package
|
||||
- Use flags to achieve compatibility with plugins that use Reflection on Java
|
||||
17 jpackages
|
||||
|
||||
2021-01-17 idk
|
||||
* Use Local Application Data instead of Roaming application data for router.config file
|
||||
* Use Roaming Application Daya only if a clients.config.d is present, indicating that the
|
||||
|
24
clean.sh
Executable file
24
clean.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#! /usr/bin/env sh
|
||||
|
||||
here=$(pwd)
|
||||
cd ../i2p.i2p.jpackage-build/
|
||||
ant distclean
|
||||
git checkout .
|
||||
git checkout master
|
||||
cd "$here"
|
||||
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
|
||||
make clean
|
2
config.mk
Normal file
2
config.mk
Normal file
@ -0,0 +1,2 @@
|
||||
SIGNER=hankhill19580@gmail.com
|
||||
export SIGNER=hankhill19580@gmail.com
|
50
config.sh
Executable file
50
config.sh
Executable file
@ -0,0 +1,50 @@
|
||||
|
||||
## If you need to use a different JVM, JDK, or other utility from
|
||||
# build.sh, set it in this file, for example:
|
||||
|
||||
export PATH="$PATH:/c/Program Files/Java/jdk-17.0.3/bin/"
|
||||
export JAVA_HOME="/c/Program Files/Java/jdk-17.0.3"
|
||||
# to use it for Oracle OpenJDK17
|
||||
|
||||
## Other potential values(NOT exhaustive):
|
||||
|
||||
#export PATH="$PATH:/c/Program Files/Java/jdk-18.0.1/bin/"
|
||||
#export JAVA_HOME="/c/Program Files/Java/jdk-18.0.1"
|
||||
#export PATH="$PATH:/c/Program Files/Eclipse Adoptium/jdk-17.0.3/bin/"
|
||||
#export JAVA_HOME="/c/Program Files/Eclipse Adoptium/jdk-17.0.3"
|
||||
#export PATH="$PATH:/c/Program Files/OpenJDK/jdk-17.0.3/bin/"
|
||||
#export JAVA_HOME="/c/Program Files/OpenJDK/jdk-17.0.3"
|
||||
|
||||
#BREAKS!
|
||||
#export PATH=/c/Program Files/GraalVM/graalvm-ce-java17-22.0.0.2/bin
|
||||
#export JAVA_HOME=/c/Program Files/GraalVM/graalvm-ce-java17-22.0.0.2
|
||||
#BREAKS!
|
||||
# might be fun to learn why this is broken
|
||||
|
||||
#WORKS WELL! GETS UPDATES AS SOON AS ORACLE! VIABLE ALTERNATIVE!
|
||||
#export PATH="$PATH:/c/Program Files/Amazon Corretto/jdk17.0.3_6/bin/"
|
||||
#export JAVA_HOME="/c/Program Files/Amazon Corretto/jdk17.0.3_6"
|
||||
#WORKS WELL! GETS UPDATES AS SOON AS ORACLE! VIABLE ALTERNATIVE!
|
||||
|
||||
# These are all things I built the package with today(April 20, 2022, idk)
|
||||
|
||||
# Which will determine, of course, which java compilers you use and where
|
||||
# your JAVA_HOME(and thus your bootclasspath jars and stuff) come from.
|
||||
# So for you reddit nerds who are all into graalVM or whatever, this might
|
||||
# be where you go to mess with that.
|
||||
|
||||
## Until 1.7.4, releases were built using Eclipse Adoptium OpenJDK
|
||||
# but it lags behind a day or two in security updates which did become
|
||||
# a major issue in April 2022. At this point it was migrated to Oracle's
|
||||
# JDK distribution which was more up to date. Should you prefer, or simply
|
||||
# wish to experiment with a different JVM, copy this file to `config_overrides.sh`
|
||||
# and add your JAVA_HOME and $PATH changes.
|
||||
|
||||
# You can also use this to temporarily add applications into the PATH that are
|
||||
# required to build this if you do not wish to edit your PATH across the entire
|
||||
# Windows session, and for setting ANT_HOME
|
||||
#export ANT_HOME="/c/apache-ant-1.10.9"
|
||||
#export PATH="$PATH:$ANT_HOME/bin/"
|
||||
|
||||
# Uncomment this to add signtool to the path so you don't have to fight with Visual Studio.
|
||||
export PATH="$PATH:/c/Program Files (x86)/Windows Kits/10/App Certification Kit/"
|
38
daily.sh
Executable file
38
daily.sh
Executable file
@ -0,0 +1,38 @@
|
||||
#! /usr/bin/env sh
|
||||
|
||||
### How to set up this script:
|
||||
#
|
||||
# This script will not work unless you give it a Github API key.
|
||||
# You need to create a file in your $HOME directory, which on
|
||||
# Windows will by /c/Users/yourusername, called github-release-config.sh,
|
||||
# containing this key as the variable GITHUB_TOKEN.
|
||||
# github-release-config.sh must also contain:
|
||||
# GITHUB_USERNAME=your github username
|
||||
git clean -fdx
|
||||
git checkout .
|
||||
./unsigned.sh
|
||||
|
||||
. "$HOME/github-release-config.sh"
|
||||
|
||||
. ./i2pversion
|
||||
|
||||
if [ -f ./i2pversion_override ]; then
|
||||
. ./i2pversion_override
|
||||
fi
|
||||
|
||||
TODAYSDATE=$(date +%Y%m%d)
|
||||
|
||||
if [ -z "$DESCRIPTION" ]; then
|
||||
DESCRIPTION="Daily unsigned build of i2p.firefox for $TODAYSDATE"
|
||||
fi
|
||||
|
||||
echo github-release release -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
|
||||
github-release release -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
|
||||
EXECHECKSUM=$(sha256sum "I2P-Profile-Installer-$I2P_VERSION.exe")
|
||||
echo github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "I2P-Profile-Installer-$I2P_VERSION.exe" -l "$EXECHECKSUM" -t "$TODAYSDATE" -n "I2P-Profile-Installer-$I2P_VERSION.exe"
|
||||
github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "I2P-Profile-Installer-$I2P_VERSION.exe" -l "$EXECHECKSUM" -t "$TODAYSDATE" -n "I2P-Profile-Installer-$I2P_VERSION.exe"
|
||||
cd build || exit
|
||||
tar -a -cf ../I2P.zip I2P
|
||||
ZIPCHECKSUM=$(sha256sum "../I2P.zip")
|
||||
echo github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "../I2P.zip" -l "$ZIPCHECKSUM" -t "$TODAYSDATE" -n "I2P.zip"
|
||||
github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "../I2P.zip" -l "$ZIPCHECKSUM" -t "$TODAYSDATE" -n "I2P.zip"
|
9
debian/README.Debian
vendored
Normal file
9
debian/README.Debian
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
i2p-firefox-profile for Debian
|
||||
-----------------------------
|
||||
|
||||
This is a Firefox Profile and a bundle of Open-Source extensions which are
|
||||
packaged for convenience as a Debian-style package. The extensions themselves
|
||||
may not be packaged in Debian. They are side-loaded on the first run of the
|
||||
browser profile.
|
||||
|
||||
-- idk <hankhill19580@gmail.com> Sat, 03 Jul 2021 23:32:29 -0400
|
5
debian/changelog
vendored
Normal file
5
debian/changelog
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
i2p-firefox-profile (1.05.0-1) sid; urgency=medium
|
||||
|
||||
* Initial release. Closes i2pgit.org/i2p-hackers/i2p.firefox #5
|
||||
|
||||
-- eyedeekay <hankhill19580@gmail.com> Sun, 22 Aug 2021 22:27:37 -0400
|
20
debian/control
vendored
Normal file
20
debian/control
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
Source: i2p-firefox-profile
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: idk <hankhill19580@gmail.com>
|
||||
Build-Depends: debhelper-compat (= 11)
|
||||
Standards-Version: 4.5.1
|
||||
Homepage: https://i2pgit.org/i2p-hackers/i2p.firefox
|
||||
Vcs-Browser: https://i2pgit.org/i2p-hackers/i2p.firefox
|
||||
Vcs-Git: https://i2pgit.org/i2p-hackers/i2p.firefox.git
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: i2p-firefox-profile
|
||||
Architecture: all
|
||||
Depends: firefox,wget,i2p | i2pd,${misc:Depends}
|
||||
Suggests: i2p,i2p-router,syndie,tor,tsocks
|
||||
Description: Browser profile for Firefox+I2P and script to launch it
|
||||
Debian/Ubuntu port of the I2P Browser Profile for Firefox/Windows
|
||||
systems. It is built from the same source and has identical
|
||||
functionality to the Windows version, and in most ways should appear
|
||||
nearly identical to it's Windows equivalent.
|
865
debian/copyright
vendored
Normal file
865
debian/copyright
vendored
Normal file
@ -0,0 +1,865 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: i2p-firefox-profile
|
||||
Upstream-Contact: idk hankhill19580@gmail.com
|
||||
Source: https://i2pgit.org/i2p-hackers/i2p.firefox
|
||||
|
||||
Files: *
|
||||
Copyright: 2018 The Invisible Internet Project
|
||||
License: MIT
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2021 idk <hankhill19580@gmail.com>
|
||||
License: MIT
|
||||
|
||||
License: MIT
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
.
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
# HTTPS Everwyhere:
|
||||
# Copyright © 2010-2012 Mike Perry <mikeperry@fscked.org>
|
||||
# Peter Eckersley <pde@eff.org>
|
||||
# and many others
|
||||
# (Licensed GPL v2+)
|
||||
#
|
||||
# Incorporating code from NoScript,
|
||||
# Copyright © 2004-2007 Giorgio Maone <g.maone@informaction.com>
|
||||
# Licensed GPL v2+
|
||||
#
|
||||
# Incorporating code from Convergence
|
||||
# Copyright © Moxie Marlinspike
|
||||
# Licensed GPL v3+
|
||||
#
|
||||
# Incorporating code from URI.js
|
||||
# Copyright © Rodney Rehm
|
||||
# Licensed MIT, GPL V3
|
||||
#
|
||||
# Incorporating code from js-lru
|
||||
# Copyright © 2010 Rasmus Andersson
|
||||
# Licensed MIT
|
||||
#
|
||||
# The build system incorporates code from Python 2.6,
|
||||
# Copyright © 2001-2006 Python Software Foundation
|
||||
# Python Software Foundation License Version 2
|
||||
#
|
||||
# Net License: GPL v3+ (complete tree)
|
||||
# GPL v2+ (if Moxie's NSS.js is absent)
|
||||
#
|
||||
#
|
||||
# Text of MIT License:
|
||||
# ====================
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
# MIT License
|
||||
#
|
||||
# Copyright (c) 2019 idk
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
# Mozilla Public License Version 2.0
|
||||
# ==================================
|
||||
#
|
||||
# 1. Definitions
|
||||
# --------------
|
||||
#
|
||||
# 1.1. "Contributor"
|
||||
# means each individual or legal entity that creates, contributes to
|
||||
# the creation of, or owns Covered Software.
|
||||
#
|
||||
# 1.2. "Contributor Version"
|
||||
# means the combination of the Contributions of others (if any) used
|
||||
# by a Contributor and that particular Contributor's Contribution.
|
||||
#
|
||||
# 1.3. "Contribution"
|
||||
# means Covered Software of a particular Contributor.
|
||||
#
|
||||
# 1.4. "Covered Software"
|
||||
# means Source Code Form to which the initial Contributor has attached
|
||||
# the notice in Exhibit A, the Executable Form of such Source Code
|
||||
# Form, and Modifications of such Source Code Form, in each case
|
||||
# including portions thereof.
|
||||
#
|
||||
# 1.5. "Incompatible With Secondary Licenses"
|
||||
# means
|
||||
#
|
||||
# (a) that the initial Contributor has attached the notice described
|
||||
# in Exhibit B to the Covered Software; or
|
||||
#
|
||||
# (b) that the Covered Software was made available under the terms of
|
||||
# version 1.1 or earlier of the License, but not also under the
|
||||
# terms of a Secondary License.
|
||||
#
|
||||
# 1.6. "Executable Form"
|
||||
# means any form of the work other than Source Code Form.
|
||||
#
|
||||
# 1.7. "Larger Work"
|
||||
# means a work that combines Covered Software with other material, in
|
||||
# a separate file or files, that is not Covered Software.
|
||||
#
|
||||
# 1.8. "License"
|
||||
# means this document.
|
||||
#
|
||||
# 1.9. "Licensable"
|
||||
# means having the right to grant, to the maximum extent possible,
|
||||
# whether at the time of the initial grant or subsequently, any and
|
||||
# all of the rights conveyed by this License.
|
||||
#
|
||||
# 1.10. "Modifications"
|
||||
# means any of the following:
|
||||
#
|
||||
# (a) any file in Source Code Form that results from an addition to,
|
||||
# deletion from, or modification of the contents of Covered
|
||||
# Software; or
|
||||
#
|
||||
# (b) any new file in Source Code Form that contains any Covered
|
||||
# Software.
|
||||
#
|
||||
# 1.11. "Patent Claims" of a Contributor
|
||||
# means any patent claim(s), including without limitation, method,
|
||||
# process, and apparatus claims, in any patent Licensable by such
|
||||
# Contributor that would be infringed, but for the grant of the
|
||||
# License, by the making, using, selling, offering for sale, having
|
||||
# made, import, or transfer of either its Contributions or its
|
||||
# Contributor Version.
|
||||
#
|
||||
# 1.12. "Secondary License"
|
||||
# means either the GNU General Public License, Version 2.0, the GNU
|
||||
# Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
# Public License, Version 3.0, or any later versions of those
|
||||
# licenses.
|
||||
#
|
||||
# 1.13. "Source Code Form"
|
||||
# means the form of the work preferred for making modifications.
|
||||
#
|
||||
# 1.14. "You" (or "Your")
|
||||
# means an individual or a legal entity exercising rights under this
|
||||
# License. For legal entities, "You" includes any entity that
|
||||
# controls, is controlled by, or is under common control with You. For
|
||||
# purposes of this definition, "control" means (a) the power, direct
|
||||
# or indirect, to cause the direction or management of such entity,
|
||||
# whether by contract or otherwise, or (b) ownership of more than
|
||||
# fifty percent (50%) of the outstanding shares or beneficial
|
||||
# ownership of such entity.
|
||||
#
|
||||
# 2. License Grants and Conditions
|
||||
# --------------------------------
|
||||
#
|
||||
# 2.1. Grants
|
||||
#
|
||||
# Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
# non-exclusive license:
|
||||
#
|
||||
# (a) under intellectual property rights (other than patent or trademark)
|
||||
# Licensable by such Contributor to use, reproduce, make available,
|
||||
# modify, display, perform, distribute, and otherwise exploit its
|
||||
# Contributions, either on an unmodified basis, with Modifications, or
|
||||
# as part of a Larger Work; and
|
||||
#
|
||||
# (b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
# for sale, have made, import, and otherwise transfer either its
|
||||
# Contributions or its Contributor Version.
|
||||
#
|
||||
# 2.2. Effective Date
|
||||
#
|
||||
# The licenses granted in Section 2.1 with respect to any Contribution
|
||||
# become effective for each Contribution on the date the Contributor first
|
||||
# distributes such Contribution.
|
||||
#
|
||||
# 2.3. Limitations on Grant Scope
|
||||
#
|
||||
# The licenses granted in this Section 2 are the only rights granted under
|
||||
# this License. No additional rights or licenses will be implied from the
|
||||
# distribution or licensing of Covered Software under this License.
|
||||
# Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
# Contributor:
|
||||
#
|
||||
# (a) for any code that a Contributor has removed from Covered Software;
|
||||
# or
|
||||
#
|
||||
# (b) for infringements caused by: (i) Your and any other third party's
|
||||
# modifications of Covered Software, or (ii) the combination of its
|
||||
# Contributions with other software (except as part of its Contributor
|
||||
# Version); or
|
||||
#
|
||||
# (c) under Patent Claims infringed by Covered Software in the absence of
|
||||
# its Contributions.
|
||||
#
|
||||
# This License does not grant any rights in the trademarks, service marks,
|
||||
# or logos of any Contributor (except as may be necessary to comply with
|
||||
# the notice requirements in Section 3.4).
|
||||
#
|
||||
# 2.4. Subsequent Licenses
|
||||
#
|
||||
# No Contributor makes additional grants as a result of Your choice to
|
||||
# distribute the Covered Software under a subsequent version of this
|
||||
# License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
# permitted under the terms of Section 3.3).
|
||||
#
|
||||
# 2.5. Representation
|
||||
#
|
||||
# Each Contributor represents that the Contributor believes its
|
||||
# Contributions are its original creation(s) or it has sufficient rights
|
||||
# to grant the rights to its Contributions conveyed by this License.
|
||||
#
|
||||
# 2.6. Fair Use
|
||||
#
|
||||
# This License is not intended to limit any rights You have under
|
||||
# applicable copyright doctrines of fair use, fair dealing, or other
|
||||
# equivalents.
|
||||
#
|
||||
# 2.7. Conditions
|
||||
#
|
||||
# Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
# in Section 2.1.
|
||||
#
|
||||
# 3. Responsibilities
|
||||
# -------------------
|
||||
#
|
||||
# 3.1. Distribution of Source Form
|
||||
#
|
||||
# All distribution of Covered Software in Source Code Form, including any
|
||||
# Modifications that You create or to which You contribute, must be under
|
||||
# the terms of this License. You must inform recipients that the Source
|
||||
# Code Form of the Covered Software is governed by the terms of this
|
||||
# License, and how they can obtain a copy of this License. You may not
|
||||
# attempt to alter or restrict the recipients' rights in the Source Code
|
||||
# Form.
|
||||
#
|
||||
# 3.2. Distribution of Executable Form
|
||||
#
|
||||
# If You distribute Covered Software in Executable Form then:
|
||||
#
|
||||
# (a) such Covered Software must also be made available in Source Code
|
||||
# Form, as described in Section 3.1, and You must inform recipients of
|
||||
# the Executable Form how they can obtain a copy of such Source Code
|
||||
# Form by reasonable means in a timely manner, at a charge no more
|
||||
# than the cost of distribution to the recipient; and
|
||||
#
|
||||
# (b) You may distribute such Executable Form under the terms of this
|
||||
# License, or sublicense it under different terms, provided that the
|
||||
# license for the Executable Form does not attempt to limit or alter
|
||||
# the recipients' rights in the Source Code Form under this License.
|
||||
#
|
||||
# 3.3. Distribution of a Larger Work
|
||||
#
|
||||
# You may create and distribute a Larger Work under terms of Your choice,
|
||||
# provided that You also comply with the requirements of this License for
|
||||
# the Covered Software. If the Larger Work is a combination of Covered
|
||||
# Software with a work governed by one or more Secondary Licenses, and the
|
||||
# Covered Software is not Incompatible With Secondary Licenses, this
|
||||
# License permits You to additionally distribute such Covered Software
|
||||
# under the terms of such Secondary License(s), so that the recipient of
|
||||
# the Larger Work may, at their option, further distribute the Covered
|
||||
# Software under the terms of either this License or such Secondary
|
||||
# License(s).
|
||||
#
|
||||
# 3.4. Notices
|
||||
#
|
||||
# You may not remove or alter the substance of any license notices
|
||||
# (including copyright notices, patent notices, disclaimers of warranty,
|
||||
# or limitations of liability) contained within the Source Code Form of
|
||||
# the Covered Software, except that You may alter any license notices to
|
||||
# the extent required to remedy known factual inaccuracies.
|
||||
#
|
||||
# 3.5. Application of Additional Terms
|
||||
#
|
||||
# You may choose to offer, and to charge a fee for, warranty, support,
|
||||
# indemnity or liability obligations to one or more recipients of Covered
|
||||
# Software. However, You may do so only on Your own behalf, and not on
|
||||
# behalf of any Contributor. You must make it absolutely clear that any
|
||||
# such warranty, support, indemnity, or liability obligation is offered by
|
||||
# You alone, and You hereby agree to indemnify every Contributor for any
|
||||
# liability incurred by such Contributor as a result of warranty, support,
|
||||
# indemnity or liability terms You offer. You may include additional
|
||||
# disclaimers of warranty and limitations of liability specific to any
|
||||
# jurisdiction.
|
||||
#
|
||||
# 4. Inability to Comply Due to Statute or Regulation
|
||||
# ---------------------------------------------------
|
||||
#
|
||||
# If it is impossible for You to comply with any of the terms of this
|
||||
# License with respect to some or all of the Covered Software due to
|
||||
# statute, judicial order, or regulation then You must: (a) comply with
|
||||
# the terms of this License to the maximum extent possible; and (b)
|
||||
# describe the limitations and the code they affect. Such description must
|
||||
# be placed in a text file included with all distributions of the Covered
|
||||
# Software under this License. Except to the extent prohibited by statute
|
||||
# or regulation, such description must be sufficiently detailed for a
|
||||
# recipient of ordinary skill to be able to understand it.
|
||||
#
|
||||
# 5. Termination
|
||||
# --------------
|
||||
#
|
||||
# 5.1. The rights granted under this License will terminate automatically
|
||||
# if You fail to comply with any of its terms. However, if You become
|
||||
# compliant, then the rights granted under this License from a particular
|
||||
# Contributor are reinstated (a) provisionally, unless and until such
|
||||
# Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
# ongoing basis, if such Contributor fails to notify You of the
|
||||
# non-compliance by some reasonable means prior to 60 days after You have
|
||||
# come back into compliance. Moreover, Your grants from a particular
|
||||
# Contributor are reinstated on an ongoing basis if such Contributor
|
||||
# notifies You of the non-compliance by some reasonable means, this is the
|
||||
# first time You have received notice of non-compliance with this License
|
||||
# from such Contributor, and You become compliant prior to 30 days after
|
||||
# Your receipt of the notice.
|
||||
#
|
||||
# 5.2. If You initiate litigation against any entity by asserting a patent
|
||||
# infringement claim (excluding declaratory judgment actions,
|
||||
# counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
# directly or indirectly infringes any patent, then the rights granted to
|
||||
# You by any and all Contributors for the Covered Software under Section
|
||||
# 2.1 of this License shall terminate.
|
||||
#
|
||||
# 5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
# end user license agreements (excluding distributors and resellers) which
|
||||
# have been validly granted by You or Your distributors under this License
|
||||
# prior to termination shall survive termination.
|
||||
#
|
||||
# ************************************************************************
|
||||
# * *
|
||||
# * 6. Disclaimer of Warranty *
|
||||
# * ------------------------- *
|
||||
# * *
|
||||
# * Covered Software is provided under this License on an "as is" *
|
||||
# * basis, without warranty of any kind, either expressed, implied, or *
|
||||
# * statutory, including, without limitation, warranties that the *
|
||||
# * Covered Software is free of defects, merchantable, fit for a *
|
||||
# * particular purpose or non-infringing. The entire risk as to the *
|
||||
# * quality and performance of the Covered Software is with You. *
|
||||
# * Should any Covered Software prove defective in any respect, You *
|
||||
# * (not any Contributor) assume the cost of any necessary servicing, *
|
||||
# * repair, or correction. This disclaimer of warranty constitutes an *
|
||||
# * essential part of this License. No use of any Covered Software is *
|
||||
# * authorized under this License except under this disclaimer. *
|
||||
# * *
|
||||
# ************************************************************************
|
||||
#
|
||||
# ************************************************************************
|
||||
# * *
|
||||
# * 7. Limitation of Liability *
|
||||
# * -------------------------- *
|
||||
# * *
|
||||
# * Under no circumstances and under no legal theory, whether tort *
|
||||
# * (including negligence), contract, or otherwise, shall any *
|
||||
# * Contributor, or anyone who distributes Covered Software as *
|
||||
# * permitted above, be liable to You for any direct, indirect, *
|
||||
# * special, incidental, or consequential damages of any character *
|
||||
# * including, without limitation, damages for lost profits, loss of *
|
||||
# * goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
# * and all other commercial damages or losses, even if such party *
|
||||
# * shall have been informed of the possibility of such damages. This *
|
||||
# * limitation of liability shall not apply to liability for death or *
|
||||
# * personal injury resulting from such party's negligence to the *
|
||||
# * extent applicable law prohibits such limitation. Some *
|
||||
# * jurisdictions do not allow the exclusion or limitation of *
|
||||
# * incidental or consequential damages, so this exclusion and *
|
||||
# * limitation may not apply to You. *
|
||||
# * *
|
||||
# ************************************************************************
|
||||
#
|
||||
# 8. Litigation
|
||||
# -------------
|
||||
#
|
||||
# Any litigation relating to this License may be brought only in the
|
||||
# courts of a jurisdiction where the defendant maintains its principal
|
||||
# place of business and such litigation shall be governed by laws of that
|
||||
# jurisdiction, without reference to its conflict-of-law provisions.
|
||||
# Nothing in this Section shall prevent a party's ability to bring
|
||||
# cross-claims or counter-claims.
|
||||
#
|
||||
# 9. Miscellaneous
|
||||
# ----------------
|
||||
#
|
||||
# This License represents the complete agreement concerning the subject
|
||||
# matter hereof. If any provision of this License is held to be
|
||||
# unenforceable, such provision shall be reformed only to the extent
|
||||
# necessary to make it enforceable. Any law or regulation which provides
|
||||
# that the language of a contract shall be construed against the drafter
|
||||
# shall not be used to construe this License against a Contributor.
|
||||
#
|
||||
# 10. Versions of the License
|
||||
# ---------------------------
|
||||
#
|
||||
# 10.1. New Versions
|
||||
#
|
||||
# Mozilla Foundation is the license steward. Except as provided in Section
|
||||
# 10.3, no one other than the license steward has the right to modify or
|
||||
# publish new versions of this License. Each version will be given a
|
||||
# distinguishing version number.
|
||||
#
|
||||
# 10.2. Effect of New Versions
|
||||
#
|
||||
# You may distribute the Covered Software under the terms of the version
|
||||
# of the License under which You originally received the Covered Software,
|
||||
# or under the terms of any subsequent version published by the license
|
||||
# steward.
|
||||
#
|
||||
# 10.3. Modified Versions
|
||||
#
|
||||
# If you create software not governed by this License, and you want to
|
||||
# create a new license for such software, you may create and use a
|
||||
# modified version of this License if you rename the license and remove
|
||||
# any references to the name of the license steward (except to note that
|
||||
# such modified license differs from this License).
|
||||
#
|
||||
# 10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
# Licenses
|
||||
#
|
||||
# If You choose to distribute Source Code Form that is Incompatible With
|
||||
# Secondary Licenses under the terms of this version of the License, the
|
||||
# notice described in Exhibit B of this License must be attached.
|
||||
#
|
||||
# Exhibit A - Source Code Form License Notice
|
||||
# -------------------------------------------
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# If it is not possible or desirable to put the notice in a particular
|
||||
# file, then You may include the notice in a location (such as a LICENSE
|
||||
# file in a relevant directory) where a recipient would be likely to look
|
||||
# for such a notice.
|
||||
#
|
||||
# You may add additional accurate notices of copyright ownership.
|
||||
#
|
||||
# Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
# ---------------------------------------------------------
|
||||
#
|
||||
# This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
# defined by the Mozilla Public License, v. 2.0.
|
||||
#
|
||||
# Note on GPL Compatibility
|
||||
# -------------------------
|
||||
#
|
||||
# The MPL 2, section 3.3, permits you to combine NSS with code under the GNU
|
||||
# General Public License (GPL) version 2, or any later version of that
|
||||
# license, to make a Larger Work, and distribute the result under the GPL.
|
||||
# The only condition is that you must also make NSS, and any changes you
|
||||
# have made to it, available to recipients under the terms of the MPL 2 also.
|
||||
#
|
||||
# Anyone who receives the combined code from you does not have to continue
|
||||
# to dual licence in this way, and may, if they wish, distribute under the
|
||||
# terms of either of the two licences - either the MPL alone or the GPL
|
||||
# alone. However, we discourage people from distributing copies of NSS under
|
||||
# the GPL alone, because it means that any improvements they make cannot be
|
||||
# reincorporated into the main version of NSS. There is never a need to do
|
||||
# this for license compatibility reasons.
|
||||
#
|
||||
# Note on LGPL Compatibility
|
||||
# --------------------------
|
||||
#
|
||||
# The above also applies to combining MPLed code in a single library with
|
||||
# code under the GNU Lesser General Public License (LGPL) version 2.1, or
|
||||
# any later version of that license. If the LGPLed code and the MPLed code
|
||||
# are not in the same library, then the copyleft coverage of the two
|
||||
# licences does not overlap, so no issues arise.
|
||||
#
|
||||
#
|
||||
# Mozilla Public License Version 2.0
|
||||
# ==================================
|
||||
#
|
||||
# 1. Definitions
|
||||
# --------------
|
||||
#
|
||||
# 1.1. "Contributor"
|
||||
# means each individual or legal entity that creates, contributes to
|
||||
# the creation of, or owns Covered Software.
|
||||
#
|
||||
# 1.2. "Contributor Version"
|
||||
# means the combination of the Contributions of others (if any) used
|
||||
# by a Contributor and that particular Contributor's Contribution.
|
||||
#
|
||||
# 1.3. "Contribution"
|
||||
# means Covered Software of a particular Contributor.
|
||||
#
|
||||
# 1.4. "Covered Software"
|
||||
# means Source Code Form to which the initial Contributor has attached
|
||||
# the notice in Exhibit A, the Executable Form of such Source Code
|
||||
# Form, and Modifications of such Source Code Form, in each case
|
||||
# including portions thereof.
|
||||
#
|
||||
# 1.5. "Incompatible With Secondary Licenses"
|
||||
# means
|
||||
#
|
||||
# (a) that the initial Contributor has attached the notice described
|
||||
# in Exhibit B to the Covered Software; or
|
||||
#
|
||||
# (b) that the Covered Software was made available under the terms of
|
||||
# version 1.1 or earlier of the License, but not also under the
|
||||
# terms of a Secondary License.
|
||||
#
|
||||
# 1.6. "Executable Form"
|
||||
# means any form of the work other than Source Code Form.
|
||||
#
|
||||
# 1.7. "Larger Work"
|
||||
# means a work that combines Covered Software with other material, in
|
||||
# a separate file or files, that is not Covered Software.
|
||||
#
|
||||
# 1.8. "License"
|
||||
# means this document.
|
||||
#
|
||||
# 1.9. "Licensable"
|
||||
# means having the right to grant, to the maximum extent possible,
|
||||
# whether at the time of the initial grant or subsequently, any and
|
||||
# all of the rights conveyed by this License.
|
||||
#
|
||||
# 1.10. "Modifications"
|
||||
# means any of the following:
|
||||
#
|
||||
# (a) any file in Source Code Form that results from an addition to,
|
||||
# deletion from, or modification of the contents of Covered
|
||||
# Software; or
|
||||
#
|
||||
# (b) any new file in Source Code Form that contains any Covered
|
||||
# Software.
|
||||
#
|
||||
# 1.11. "Patent Claims" of a Contributor
|
||||
# means any patent claim(s), including without limitation, method,
|
||||
# process, and apparatus claims, in any patent Licensable by such
|
||||
# Contributor that would be infringed, but for the grant of the
|
||||
# License, by the making, using, selling, offering for sale, having
|
||||
# made, import, or transfer of either its Contributions or its
|
||||
# Contributor Version.
|
||||
#
|
||||
# 1.12. "Secondary License"
|
||||
# means either the GNU General Public License, Version 2.0, the GNU
|
||||
# Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
# Public License, Version 3.0, or any later versions of those
|
||||
# licenses.
|
||||
#
|
||||
# 1.13. "Source Code Form"
|
||||
# means the form of the work preferred for making modifications.
|
||||
#
|
||||
# 1.14. "You" (or "Your")
|
||||
# means an individual or a legal entity exercising rights under this
|
||||
# License. For legal entities, "You" includes any entity that
|
||||
# controls, is controlled by, or is under common control with You. For
|
||||
# purposes of this definition, "control" means (a) the power, direct
|
||||
# or indirect, to cause the direction or management of such entity,
|
||||
# whether by contract or otherwise, or (b) ownership of more than
|
||||
# fifty percent (50%) of the outstanding shares or beneficial
|
||||
# ownership of such entity.
|
||||
#
|
||||
# 2. License Grants and Conditions
|
||||
# --------------------------------
|
||||
#
|
||||
# 2.1. Grants
|
||||
#
|
||||
# Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
# non-exclusive license:
|
||||
#
|
||||
# (a) under intellectual property rights (other than patent or trademark)
|
||||
# Licensable by such Contributor to use, reproduce, make available,
|
||||
# modify, display, perform, distribute, and otherwise exploit its
|
||||
# Contributions, either on an unmodified basis, with Modifications, or
|
||||
# as part of a Larger Work; and
|
||||
#
|
||||
# (b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
# for sale, have made, import, and otherwise transfer either its
|
||||
# Contributions or its Contributor Version.
|
||||
#
|
||||
# 2.2. Effective Date
|
||||
#
|
||||
# The licenses granted in Section 2.1 with respect to any Contribution
|
||||
# become effective for each Contribution on the date the Contributor first
|
||||
# distributes such Contribution.
|
||||
#
|
||||
# 2.3. Limitations on Grant Scope
|
||||
#
|
||||
# The licenses granted in this Section 2 are the only rights granted under
|
||||
# this License. No additional rights or licenses will be implied from the
|
||||
# distribution or licensing of Covered Software under this License.
|
||||
# Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
# Contributor:
|
||||
#
|
||||
# (a) for any code that a Contributor has removed from Covered Software;
|
||||
# or
|
||||
#
|
||||
# (b) for infringements caused by: (i) Your and any other third party's
|
||||
# modifications of Covered Software, or (ii) the combination of its
|
||||
# Contributions with other software (except as part of its Contributor
|
||||
# Version); or
|
||||
#
|
||||
# (c) under Patent Claims infringed by Covered Software in the absence of
|
||||
# its Contributions.
|
||||
#
|
||||
# This License does not grant any rights in the trademarks, service marks,
|
||||
# or logos of any Contributor (except as may be necessary to comply with
|
||||
# the notice requirements in Section 3.4).
|
||||
#
|
||||
# 2.4. Subsequent Licenses
|
||||
#
|
||||
# No Contributor makes additional grants as a result of Your choice to
|
||||
# distribute the Covered Software under a subsequent version of this
|
||||
# License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
# permitted under the terms of Section 3.3).
|
||||
#
|
||||
# 2.5. Representation
|
||||
#
|
||||
# Each Contributor represents that the Contributor believes its
|
||||
# Contributions are its original creation(s) or it has sufficient rights
|
||||
# to grant the rights to its Contributions conveyed by this License.
|
||||
#
|
||||
# 2.6. Fair Use
|
||||
#
|
||||
# This License is not intended to limit any rights You have under
|
||||
# applicable copyright doctrines of fair use, fair dealing, or other
|
||||
# equivalents.
|
||||
#
|
||||
# 2.7. Conditions
|
||||
#
|
||||
# Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
# in Section 2.1.
|
||||
#
|
||||
# 3. Responsibilities
|
||||
# -------------------
|
||||
#
|
||||
# 3.1. Distribution of Source Form
|
||||
#
|
||||
# All distribution of Covered Software in Source Code Form, including any
|
||||
# Modifications that You create or to which You contribute, must be under
|
||||
# the terms of this License. You must inform recipients that the Source
|
||||
# Code Form of the Covered Software is governed by the terms of this
|
||||
# License, and how they can obtain a copy of this License. You may not
|
||||
# attempt to alter or restrict the recipients' rights in the Source Code
|
||||
# Form.
|
||||
#
|
||||
# 3.2. Distribution of Executable Form
|
||||
#
|
||||
# If You distribute Covered Software in Executable Form then:
|
||||
#
|
||||
# (a) such Covered Software must also be made available in Source Code
|
||||
# Form, as described in Section 3.1, and You must inform recipients of
|
||||
# the Executable Form how they can obtain a copy of such Source Code
|
||||
# Form by reasonable means in a timely manner, at a charge no more
|
||||
# than the cost of distribution to the recipient; and
|
||||
#
|
||||
# (b) You may distribute such Executable Form under the terms of this
|
||||
# License, or sublicense it under different terms, provided that the
|
||||
# license for the Executable Form does not attempt to limit or alter
|
||||
# the recipients' rights in the Source Code Form under this License.
|
||||
#
|
||||
# 3.3. Distribution of a Larger Work
|
||||
#
|
||||
# You may create and distribute a Larger Work under terms of Your choice,
|
||||
# provided that You also comply with the requirements of this License for
|
||||
# the Covered Software. If the Larger Work is a combination of Covered
|
||||
# Software with a work governed by one or more Secondary Licenses, and the
|
||||
# Covered Software is not Incompatible With Secondary Licenses, this
|
||||
# License permits You to additionally distribute such Covered Software
|
||||
# under the terms of such Secondary License(s), so that the recipient of
|
||||
# the Larger Work may, at their option, further distribute the Covered
|
||||
# Software under the terms of either this License or such Secondary
|
||||
# License(s).
|
||||
#
|
||||
# 3.4. Notices
|
||||
#
|
||||
# You may not remove or alter the substance of any license notices
|
||||
# (including copyright notices, patent notices, disclaimers of warranty,
|
||||
# or limitations of liability) contained within the Source Code Form of
|
||||
# the Covered Software, except that You may alter any license notices to
|
||||
# the extent required to remedy known factual inaccuracies.
|
||||
#
|
||||
# 3.5. Application of Additional Terms
|
||||
#
|
||||
# You may choose to offer, and to charge a fee for, warranty, support,
|
||||
# indemnity or liability obligations to one or more recipients of Covered
|
||||
# Software. However, You may do so only on Your own behalf, and not on
|
||||
# behalf of any Contributor. You must make it absolutely clear that any
|
||||
# such warranty, support, indemnity, or liability obligation is offered by
|
||||
# You alone, and You hereby agree to indemnify every Contributor for any
|
||||
# liability incurred by such Contributor as a result of warranty, support,
|
||||
# indemnity or liability terms You offer. You may include additional
|
||||
# disclaimers of warranty and limitations of liability specific to any
|
||||
# jurisdiction.
|
||||
#
|
||||
# 4. Inability to Comply Due to Statute or Regulation
|
||||
# ---------------------------------------------------
|
||||
#
|
||||
# If it is impossible for You to comply with any of the terms of this
|
||||
# License with respect to some or all of the Covered Software due to
|
||||
# statute, judicial order, or regulation then You must: (a) comply with
|
||||
# the terms of this License to the maximum extent possible; and (b)
|
||||
# describe the limitations and the code they affect. Such description must
|
||||
# be placed in a text file included with all distributions of the Covered
|
||||
# Software under this License. Except to the extent prohibited by statute
|
||||
# or regulation, such description must be sufficiently detailed for a
|
||||
# recipient of ordinary skill to be able to understand it.
|
||||
#
|
||||
# 5. Termination
|
||||
# --------------
|
||||
#
|
||||
# 5.1. The rights granted under this License will terminate automatically
|
||||
# if You fail to comply with any of its terms. However, if You become
|
||||
# compliant, then the rights granted under this License from a particular
|
||||
# Contributor are reinstated (a) provisionally, unless and until such
|
||||
# Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
# ongoing basis, if such Contributor fails to notify You of the
|
||||
# non-compliance by some reasonable means prior to 60 days after You have
|
||||
# come back into compliance. Moreover, Your grants from a particular
|
||||
# Contributor are reinstated on an ongoing basis if such Contributor
|
||||
# notifies You of the non-compliance by some reasonable means, this is the
|
||||
# first time You have received notice of non-compliance with this License
|
||||
# from such Contributor, and You become compliant prior to 30 days after
|
||||
# Your receipt of the notice.
|
||||
#
|
||||
# 5.2. If You initiate litigation against any entity by asserting a patent
|
||||
# infringement claim (excluding declaratory judgment actions,
|
||||
# counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
# directly or indirectly infringes any patent, then the rights granted to
|
||||
# You by any and all Contributors for the Covered Software under Section
|
||||
# 2.1 of this License shall terminate.
|
||||
#
|
||||
# 5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
# end user license agreements (excluding distributors and resellers) which
|
||||
# have been validly granted by You or Your distributors under this License
|
||||
# prior to termination shall survive termination.
|
||||
#
|
||||
# ************************************************************************
|
||||
# * *
|
||||
# * 6. Disclaimer of Warranty *
|
||||
# * ------------------------- *
|
||||
# * *
|
||||
# * Covered Software is provided under this License on an "as is" *
|
||||
# * basis, without warranty of any kind, either expressed, implied, or *
|
||||
# * statutory, including, without limitation, warranties that the *
|
||||
# * Covered Software is free of defects, merchantable, fit for a *
|
||||
# * particular purpose or non-infringing. The entire risk as to the *
|
||||
# * quality and performance of the Covered Software is with You. *
|
||||
# * Should any Covered Software prove defective in any respect, You *
|
||||
# * (not any Contributor) assume the cost of any necessary servicing, *
|
||||
# * repair, or correction. This disclaimer of warranty constitutes an *
|
||||
# * essential part of this License. No use of any Covered Software is *
|
||||
# * authorized under this License except under this disclaimer. *
|
||||
# * *
|
||||
# ************************************************************************
|
||||
#
|
||||
# ************************************************************************
|
||||
# * *
|
||||
# * 7. Limitation of Liability *
|
||||
# * -------------------------- *
|
||||
# * *
|
||||
# * Under no circumstances and under no legal theory, whether tort *
|
||||
# * (including negligence), contract, or otherwise, shall any *
|
||||
# * Contributor, or anyone who distributes Covered Software as *
|
||||
# * permitted above, be liable to You for any direct, indirect, *
|
||||
# * special, incidental, or consequential damages of any character *
|
||||
# * including, without limitation, damages for lost profits, loss of *
|
||||
# * goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
# * and all other commercial damages or losses, even if such party *
|
||||
# * shall have been informed of the possibility of such damages. This *
|
||||
# * limitation of liability shall not apply to liability for death or *
|
||||
# * personal injury resulting from such party's negligence to the *
|
||||
# * extent applicable law prohibits such limitation. Some *
|
||||
# * jurisdictions do not allow the exclusion or limitation of *
|
||||
# * incidental or consequential damages, so this exclusion and *
|
||||
# * limitation may not apply to You. *
|
||||
# * *
|
||||
# ************************************************************************
|
||||
#
|
||||
# 8. Litigation
|
||||
# -------------
|
||||
#
|
||||
# Any litigation relating to this License may be brought only in the
|
||||
# courts of a jurisdiction where the defendant maintains its principal
|
||||
# place of business and such litigation shall be governed by laws of that
|
||||
# jurisdiction, without reference to its conflict-of-law provisions.
|
||||
# Nothing in this Section shall prevent a party's ability to bring
|
||||
# cross-claims or counter-claims.
|
||||
#
|
||||
# 9. Miscellaneous
|
||||
# ----------------
|
||||
#
|
||||
# This License represents the complete agreement concerning the subject
|
||||
# matter hereof. If any provision of this License is held to be
|
||||
# unenforceable, such provision shall be reformed only to the extent
|
||||
# necessary to make it enforceable. Any law or regulation which provides
|
||||
# that the language of a contract shall be construed against the drafter
|
||||
# shall not be used to construe this License against a Contributor.
|
||||
#
|
||||
# 10. Versions of the License
|
||||
# ---------------------------
|
||||
#
|
||||
# 10.1. New Versions
|
||||
#
|
||||
# Mozilla Foundation is the license steward. Except as provided in Section
|
||||
# 10.3, no one other than the license steward has the right to modify or
|
||||
# publish new versions of this License. Each version will be given a
|
||||
# distinguishing version number.
|
||||
#
|
||||
# 10.2. Effect of New Versions
|
||||
#
|
||||
# You may distribute the Covered Software under the terms of the version
|
||||
# of the License under which You originally received the Covered Software,
|
||||
# or under the terms of any subsequent version published by the license
|
||||
# steward.
|
||||
#
|
||||
# 10.3. Modified Versions
|
||||
#
|
||||
# If you create software not governed by this License, and you want to
|
||||
# create a new license for such software, you may create and use a
|
||||
# modified version of this License if you rename the license and remove
|
||||
# any references to the name of the license steward (except to note that
|
||||
# such modified license differs from this License).
|
||||
#
|
||||
# 10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
# Licenses
|
||||
#
|
||||
# If You choose to distribute Source Code Form that is Incompatible With
|
||||
# Secondary Licenses under the terms of this version of the License, the
|
||||
# notice described in Exhibit B of this License must be attached.
|
||||
#
|
||||
# Exhibit A - Source Code Form License Notice
|
||||
# -------------------------------------------
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# If it is not possible or desirable to put the notice in a particular
|
||||
# file, then You may include the notice in a location (such as a LICENSE
|
||||
# file in a relevant directory) where a recipient would be likely to look
|
||||
# for such a notice.
|
||||
#
|
||||
# You may add additional accurate notices of copyright ownership.
|
||||
#
|
||||
# Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
# ---------------------------------------------------------
|
||||
#
|
||||
# This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
# defined by the Mozilla Public License, v. 2.0.
|
||||
#
|
2
debian/files
vendored
Normal file
2
debian/files
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
i2p-firefox-profile_1.05.0-1_all.deb net optional
|
||||
i2p-firefox-profile_1.05.0-1_amd64.buildinfo net optional
|
2
debian/i2p-firefox-profile-docs.docs
vendored
Normal file
2
debian/i2p-firefox-profile-docs.docs
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
README.source
|
||||
README.Debian
|
10
debian/install
vendored
Normal file
10
debian/install
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
src/unix/i2pbrowserrc /etc/i2pbrowser/i2pbrowserrc
|
||||
src/unix/i2pbrowserdebianrc /etc/i2pbrowser/i2pbrowserdebianrc
|
||||
src/unix/i2pbrowser.sh /usr/bin/
|
||||
src/unix/i2pconfig.sh /usr/bin/
|
||||
src/unix/i2p-config-service-setup.sh /usr/bin/
|
||||
src/profile /var/lib/i2pbrowser/profile
|
||||
src/app-profile /var/lib/i2pbrowser/app-profile
|
||||
src/icons /var/lib/i2pbrowser/icons
|
||||
src/unix/desktop/i2pbrowser-debian.desktop /usr/share/applications/
|
||||
src/unix/desktop/i2pconfig-debian.desktop /usr/share/applications/
|
24
debian/rules
vendored
Executable file
24
debian/rules
vendored
Executable file
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/make -f
|
||||
# See debhelper(7) (uncomment to enable)
|
||||
# output every command that modifies files on the build system.
|
||||
#export DH_VERBOSE = 1
|
||||
|
||||
|
||||
# see FEATURE AREAS in dpkg-buildflags(1)
|
||||
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
# see ENVIRONMENT in dpkg-buildflags(1)
|
||||
# package maintainers to append CFLAGS
|
||||
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
|
||||
# package maintainers to append LDFLAGS
|
||||
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
||||
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_build:
|
||||
@echo "no need to do the windows build"
|
||||
|
||||
override_dh_auto_install: debian/install
|
||||
@echo "use debian/install"
|
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
@ -1 +0,0 @@
|
||||
https://addons.mozilla.org/firefox/downloads/file/3784917/0.108/i2prhz@eyedeekay.github.io
|
20
i2pversion
Normal file
20
i2pversion
Normal file
@ -0,0 +1,20 @@
|
||||
#! /usr/bin/env sh
|
||||
|
||||
JNA_VERSION=5.11.0
|
||||
export JNA_VERSION=5.11.0
|
||||
|
||||
#Comment this out to build from an alternate branch or
|
||||
# the tip of the master branch.
|
||||
VERSIONMAJOR=1
|
||||
VERSIONMINOR=7
|
||||
VERSIONBUILD=7
|
||||
I2P_VERSION="$VERSIONMAJOR.$VERSIONMINOR.$VERSIONBUILD"
|
||||
export I2P_VERSION="$VERSIONMAJOR.$VERSIONMINOR.$VERSIONBUILD"
|
||||
VERSION=i2p-jpackage-1.7.1
|
||||
export VERSION=i2p-jpackage-1.7.1
|
||||
|
||||
#Uncomment this to build from the tip of the master.
|
||||
#I2P_VERSION=1.8.0
|
||||
#export I2P_VERSION=1.8.0
|
||||
#VERSION=master
|
||||
#export VERSION="$VERSION"
|
33
java/net/i2p/router/Elevator.java
Normal file
33
java/net/i2p/router/Elevator.java
Normal file
@ -0,0 +1,33 @@
|
||||
package net.i2p.router;
|
||||
|
||||
import com.sun.jna.WString;
|
||||
import com.sun.jna.platform.win32.Kernel32;
|
||||
import com.sun.jna.platform.win32.Kernel32Util;
|
||||
|
||||
public class Elevator {
|
||||
public static void main(String... args) {
|
||||
executeAsAdministrator("c:\\windows\\system32\\notepad.exe", "");
|
||||
}
|
||||
|
||||
public static void executeAsAdministrator(String command, String args) {
|
||||
if (command == "" || command == null) {
|
||||
System.out.println("No command specified");
|
||||
return;
|
||||
}
|
||||
Shell32X.SHELLEXECUTEINFO execInfo = new Shell32X.SHELLEXECUTEINFO();
|
||||
execInfo.lpFile = new WString(command);
|
||||
if (args != null)
|
||||
execInfo.lpParameters = new WString(args);
|
||||
execInfo.nShow = Shell32X.SW_SHOWDEFAULT;
|
||||
execInfo.fMask = Shell32X.SEE_MASK_NOCLOSEPROCESS;
|
||||
execInfo.lpVerb = new WString("runas");
|
||||
boolean result = Shell32X.INSTANCE.ShellExecuteEx(execInfo);
|
||||
|
||||
if (!result) {
|
||||
int lastError = Kernel32.INSTANCE.GetLastError();
|
||||
String errorMessage = Kernel32Util.formatMessageFromLastErrorCode(lastError);
|
||||
throw new RuntimeException("Error performing elevation: " + lastError + ": " + errorMessage + " (apperror="
|
||||
+ execInfo.hInstApp + ")");
|
||||
}
|
||||
}
|
||||
}
|
111
java/net/i2p/router/Shell32X.java
Normal file
111
java/net/i2p/router/Shell32X.java
Normal file
@ -0,0 +1,111 @@
|
||||
package net.i2p.router;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.sun.jna.Native;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.Structure;
|
||||
import com.sun.jna.WString;
|
||||
import com.sun.jna.platform.win32.Shell32;
|
||||
import com.sun.jna.platform.win32.WinDef.HINSTANCE;
|
||||
import com.sun.jna.platform.win32.WinDef.HWND;
|
||||
import com.sun.jna.platform.win32.WinNT.HANDLE;
|
||||
import com.sun.jna.platform.win32.WinReg.HKEY;
|
||||
import com.sun.jna.win32.W32APIOptions;
|
||||
|
||||
public interface Shell32X extends Shell32 {
|
||||
Shell32X INSTANCE = (Shell32X) Native.loadLibrary("shell32", Shell32X.class, W32APIOptions.UNICODE_OPTIONS);
|
||||
|
||||
int SW_HIDE = 0;
|
||||
int SW_MAXIMIZE = 3;
|
||||
int SW_MINIMIZE = 6;
|
||||
int SW_RESTORE = 9;
|
||||
int SW_SHOW = 5;
|
||||
int SW_SHOWDEFAULT = 10;
|
||||
int SW_SHOWMAXIMIZED = 3;
|
||||
int SW_SHOWMINIMIZED = 2;
|
||||
int SW_SHOWMINNOACTIVE = 7;
|
||||
int SW_SHOWNA = 8;
|
||||
int SW_SHOWNOACTIVATE = 4;
|
||||
int SW_SHOWNORMAL = 1;
|
||||
|
||||
/** File not found. */
|
||||
int SE_ERR_FNF = 2;
|
||||
|
||||
/** Path not found. */
|
||||
int SE_ERR_PNF = 3;
|
||||
|
||||
/** Access denied. */
|
||||
int SE_ERR_ACCESSDENIED = 5;
|
||||
|
||||
/** Out of memory. */
|
||||
int SE_ERR_OOM = 8;
|
||||
|
||||
/** DLL not found. */
|
||||
int SE_ERR_DLLNOTFOUND = 32;
|
||||
|
||||
/** Cannot share an open file. */
|
||||
int SE_ERR_SHARE = 26;
|
||||
|
||||
int SEE_MASK_NOCLOSEPROCESS = 0x00000040;
|
||||
|
||||
int ShellExecute(int i, String lpVerb, String lpFile, String lpParameters, String lpDirectory, int nShow);
|
||||
|
||||
boolean ShellExecuteEx(SHELLEXECUTEINFO lpExecInfo);
|
||||
|
||||
public static class SHELLEXECUTEINFO extends Structure {
|
||||
/*
|
||||
* DWORD cbSize;
|
||||
* ULONG fMask;
|
||||
* HWND hwnd;
|
||||
* LPCTSTR lpVerb;
|
||||
* LPCTSTR lpFile;
|
||||
* LPCTSTR lpParameters;
|
||||
* LPCTSTR lpDirectory;
|
||||
* int nShow;
|
||||
* HINSTANCE hInstApp;
|
||||
* LPVOID lpIDList;
|
||||
* LPCTSTR lpClass;
|
||||
* HKEY hkeyClass;
|
||||
* DWORD dwHotKey;
|
||||
* union {
|
||||
* HANDLE hIcon;
|
||||
* HANDLE hMonitor;
|
||||
* } DUMMYUNIONNAME;
|
||||
* HANDLE hProcess;
|
||||
*/
|
||||
|
||||
public int cbSize = size();
|
||||
public int fMask;
|
||||
public HWND hwnd;
|
||||
public WString lpVerb;
|
||||
public WString lpFile;
|
||||
public WString lpParameters;
|
||||
public WString lpDirectory;
|
||||
public int nShow;
|
||||
public HINSTANCE hInstApp;
|
||||
public Pointer lpIDList;
|
||||
public WString lpClass;
|
||||
public HKEY hKeyClass;
|
||||
public int dwHotKey;
|
||||
|
||||
/*
|
||||
* Actually:
|
||||
* union {
|
||||
* HANDLE hIcon;
|
||||
* HANDLE hMonitor;
|
||||
* } DUMMYUNIONNAME;
|
||||
*/
|
||||
public HANDLE hMonitor;
|
||||
public HANDLE hProcess;
|
||||
|
||||
protected List getFieldOrder() {
|
||||
return Arrays.asList(new String[] {
|
||||
"cbSize", "fMask", "hwnd", "lpVerb", "lpFile", "lpParameters",
|
||||
"lpDirectory", "nShow", "hInstApp", "lpIDList", "lpClass",
|
||||
"hKeyClass", "dwHotKey", "hMonitor", "hProcess",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
195
java/net/i2p/router/WinLauncher.java
Normal file
195
java/net/i2p/router/WinLauncher.java
Normal file
@ -0,0 +1,195 @@
|
||||
package net.i2p.router;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.InetAddress;
|
||||
import java.net.Socket;
|
||||
import java.util.*;
|
||||
import java.util.logging.FileHandler;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.logging.SimpleFormatter;
|
||||
|
||||
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 {
|
||||
static Logger logger = Logger.getLogger("launcherlog");
|
||||
static FileHandler fh;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
// This block configure the logger with handler and formatter
|
||||
fh = new FileHandler(logFile().toString());
|
||||
logger.addHandler(fh);
|
||||
SimpleFormatter formatter = new SimpleFormatter();
|
||||
fh.setFormatter(formatter);
|
||||
// the following statement is used to log any messages
|
||||
logger.info("My first log");
|
||||
} catch (SecurityException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
File programs = selectProgramFile();
|
||||
if (!programs.exists())
|
||||
programs.mkdirs();
|
||||
else if (!programs.isDirectory()) {
|
||||
logger.warning(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()) {
|
||||
logger.warning(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()));
|
||||
logger.info("\t" + System.getProperty("i2p.dir.base") + "\n\t" + System.getProperty("i2p.dir.config")
|
||||
+ "\n\t" + System.getProperty("router.pid"));
|
||||
|
||||
// do a quick check to see of port 7657 is already occupied
|
||||
if (i2pIsRunning()) {
|
||||
logger.warning("I2P is already running");
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
// wupp.i2pRouter = new Router(System.getProperties());
|
||||
logger.info("Router is configured");
|
||||
|
||||
Thread registrationThread = new Thread(REGISTER_UPP);
|
||||
registrationThread.setName("UPP Registration");
|
||||
registrationThread.setDaemon(true);
|
||||
registrationThread.start();
|
||||
|
||||
// wupp.i2pRouter.runRouter();
|
||||
RouterLaunch.main(args);
|
||||
}
|
||||
|
||||
private static boolean i2pIsRunning() {
|
||||
// check if there's something listening on port 7657
|
||||
try {
|
||||
InetAddress localhost = InetAddress.getLocalHost();
|
||||
Socket s = new Socket(localhost, 7657);
|
||||
s.close();
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static final Runnable REGISTER_UPP = () -> {
|
||||
|
||||
// first wait for the RouterContext to appear
|
||||
RouterContext ctx;
|
||||
while ((ctx = (RouterContext) RouterContext.getCurrentContext()) == null) {
|
||||
sleep(1000);
|
||||
}
|
||||
|
||||
// then wait for the update manager
|
||||
|
||||
ClientAppManager cam;
|
||||
while ((cam = ctx.clientAppManager()) == null) {
|
||||
sleep(1000);
|
||||
}
|
||||
|
||||
UpdateManager um;
|
||||
while ((um = (UpdateManager) cam.getRegisteredApp(UpdateManager.APP_NAME)) == null) {
|
||||
sleep(1000);
|
||||
}
|
||||
|
||||
WindowsUpdatePostProcessor 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 {
|
||||
String path_override = System.getenv("I2P_CONFIG");
|
||||
if (path_override != null) {
|
||||
File path = new File(path_override);
|
||||
if (path != null && path.exists()) {
|
||||
if (path.isDirectory())
|
||||
return path.getAbsoluteFile();
|
||||
else
|
||||
throw new RuntimeException("I2P_CONFIG is not a directory: " + path);
|
||||
}
|
||||
}
|
||||
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");
|
||||
logger.info("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");
|
||||
logger.info("Linux portable jpackage wrapper started, using: " + programs + " as base config");
|
||||
return programs.getAbsoluteFile();
|
||||
}
|
||||
}
|
||||
|
||||
private static File selectProgramFile() {
|
||||
String path_override = System.getenv("I2P");
|
||||
if (path_override != null) {
|
||||
File path = new File(path_override);
|
||||
if (path.exists()) {
|
||||
if (path.isDirectory())
|
||||
return path.getAbsoluteFile();
|
||||
else
|
||||
throw new RuntimeException("I2P is not a directory: " + path);
|
||||
}
|
||||
}
|
||||
if (SystemVersion.isWindows()) {
|
||||
File jrehome = new File(System.getProperty("java.home"));
|
||||
File programs = jrehome.getParentFile();
|
||||
logger.info("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");
|
||||
logger.info("Linux portable jpackage wrapper found, using: " + programs + " as working config");
|
||||
return programs.getAbsoluteFile();
|
||||
}
|
||||
}
|
||||
|
||||
private static File logFile() {
|
||||
File log = new File(selectProgramFile(), "log");
|
||||
if (!log.exists())
|
||||
log.mkdirs();
|
||||
return new File(log, "launcher.log");
|
||||
}
|
||||
}
|
80
java/net/i2p/router/WinUpdateProcess.java
Normal file
80
java/net/i2p/router/WinUpdateProcess.java
Normal file
@ -0,0 +1,80 @@
|
||||
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;
|
||||
private final Log _log;
|
||||
|
||||
WinUpdateProcess(RouterContext ctx, Supplier<String> versionSupplier, Supplier<File> fileSupplier) {
|
||||
this.ctx = ctx;
|
||||
this.versionSupplier = versionSupplier;
|
||||
this.fileSupplier = fileSupplier;
|
||||
this._log = ctx.logManager().getLog(WinUpdateProcess.class);
|
||||
}
|
||||
|
||||
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 workDir;
|
||||
} 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");
|
||||
|
||||
if (logFile.canWrite()) {
|
||||
// check if we can write to the log file. If we can, use the ProcessBuilder to
|
||||
// run the installer.
|
||||
ProcessBuilder pb = new ProcessBuilder(file.getAbsolutePath(), "/S", "/D=" + workingDir.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) {
|
||||
_log.error("Unable to run update-program in background. Update will fail.");
|
||||
}
|
||||
} else {
|
||||
// If we cant write to the log file and we're on Windows, use the elevator to
|
||||
// execute the installer instead of the ProcessBuilder.
|
||||
Elevator.executeAsAdministrator(file.getAbsolutePath(), " /S /D=" + workingDir.getAbsolutePath());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
runUpdateInstaller();
|
||||
} catch (IOException ioe) {
|
||||
_log.error("Error running updater, update may fail." + ioe);
|
||||
}
|
||||
}
|
||||
}
|
101
java/net/i2p/router/WindowsUpdatePostProcessor.java
Normal file
101
java/net/i2p/router/WindowsUpdatePostProcessor.java
Normal file
@ -0,0 +1,101 @@
|
||||
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;
|
||||
private final RouterContext ctx;
|
||||
private final AtomicBoolean hook = new AtomicBoolean();
|
||||
private final String fileName = "i2p-jpackage-update.exe";
|
||||
|
||||
private volatile String version;
|
||||
|
||||
private volatile File positionedFile = null;
|
||||
|
||||
WindowsUpdatePostProcessor(RouterContext ctx) {
|
||||
this.ctx = ctx;
|
||||
this._log = ctx.logManager().getLog(WindowsUpdatePostProcessor.class);
|
||||
}
|
||||
|
||||
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 (SystemVersion.isWindows()) {
|
||||
|
||||
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 {
|
||||
if (this.ctx != 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 {
|
||||
if (this.ctx != null) {
|
||||
File workDir = new File(this.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;
|
||||
}
|
||||
|
||||
}
|
88
license/EPL.txt
Normal file
88
license/EPL.txt
Normal file
@ -0,0 +1,88 @@
|
||||
|
||||
Eclipse Public License - v 2.0
|
||||
|
||||
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
1. DEFINITIONS
|
||||
|
||||
“Contribution” means:
|
||||
|
||||
a) in the case of the initial Contributor, the initial content Distributed under this Agreement, and
|
||||
b) in the case of each subsequent Contributor:
|
||||
i) changes to the Program, and
|
||||
ii) additions to the Program;
|
||||
where such changes and/or additions to the Program originate from and are Distributed by that particular Contributor. A Contribution “originates” from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include changes or additions to the Program that are not Modified Works.
|
||||
|
||||
“Contributor” means any person or entity that Distributes the Program.
|
||||
|
||||
“Licensed Patents” mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
|
||||
|
||||
“Program” means the Contributions Distributed in accordance with this Agreement.
|
||||
|
||||
“Recipient” means anyone who receives the Program under this Agreement or any Secondary License (as applicable), including Contributors.
|
||||
|
||||
“Derivative Works” shall mean any work, whether in Source Code or other form, that is based on (or derived from) the Program and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship.
|
||||
|
||||
“Modified Works” shall mean any work in Source Code or other form that results from an addition to, deletion from, or modification of the contents of the Program, including, for purposes of clarity any new file in Source Code form that contains any contents of the Program. Modified Works shall not include works that contain only declarations, interfaces, types, classes, structures, or files of the Program solely in each case in order to link to, bind by name, or subclass the Program or Modified Works thereof.
|
||||
|
||||
“Distribute” means the acts of a) distributing or b) making available in any manner that enables the transfer of a copy.
|
||||
|
||||
“Source Code” means the form of a Program preferred for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
||||
|
||||
“Secondary License” means either the GNU General Public License, Version 2.0, or any later versions of that license, including any exceptions or additional permissions as identified by the initial Contributor.
|
||||
2. GRANT OF RIGHTS
|
||||
|
||||
a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, Distribute and sublicense the Contribution of such Contributor, if any, and such Derivative Works.
|
||||
b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in Source Code or other form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
|
||||
c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to Distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
|
||||
d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
|
||||
e) Notwithstanding the terms of any Secondary License, no Contributor makes additional grants to any Recipient (other than those set forth in this Agreement) as a result of such Recipient's receipt of the Program under the terms of a Secondary License (if permitted under the terms of Section 3).
|
||||
|
||||
3. REQUIREMENTS
|
||||
|
||||
3.1 If a Contributor Distributes the Program in any form, then:
|
||||
|
||||
a) the Program must also be made available as Source Code, in accordance with section 3.2, and the Contributor must accompany the Program with a statement that the Source Code for the Program is available under this Agreement, and informs Recipients how to obtain it in a reasonable manner on or through a medium customarily used for software exchange; and
|
||||
b) the Contributor may Distribute the Program under a license different than this Agreement, provided that such license:
|
||||
i) effectively disclaims on behalf of all other Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
|
||||
ii) effectively excludes on behalf of all other Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
|
||||
iii) does not attempt to limit or alter the recipients' rights in the Source Code under section 3.2; and
|
||||
iv) requires any subsequent distribution of the Program by any party to be under a license that satisfies the requirements of this section 3.
|
||||
|
||||
3.2 When the Program is Distributed as Source Code:
|
||||
|
||||
a) it must be made available under this Agreement, or if the Program (i) is combined with other material in a separate file or files made available under a Secondary License, and (ii) the initial Contributor attached to the Source Code the notice described in Exhibit A of this Agreement, then the Program may be made available under the terms of such Secondary Licenses, and
|
||||
b) a copy of this Agreement must be included with each copy of the Program.
|
||||
|
||||
3.3 Contributors may not remove or alter any copyright, patent, trademark, attribution notices, disclaimers of warranty, or limitations of liability (‘notices’) contained within the Program from any copy of the Program which they Distribute, provided that Contributors may add their own appropriate notices.
|
||||
4. COMMERCIAL DISTRIBUTION
|
||||
|
||||
Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (“Commercial Contributor”) hereby agrees to defend and indemnify every other Contributor (“Indemnified Contributor”) against any losses, damages and costs (collectively “Losses”) arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
|
||||
|
||||
For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
|
||||
5. NO WARRANTY
|
||||
|
||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
|
||||
6. DISCLAIMER OF LIABILITY
|
||||
|
||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
7. GENERAL
|
||||
|
||||
If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
|
||||
|
||||
If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
|
||||
|
||||
All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
|
||||
|
||||
Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be Distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to Distribute the Program (including its Contributions) under the new version.
|
||||
|
||||
Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. Nothing in this Agreement is intended to be enforceable by any entity that is not a Contributor or Recipient. No third-party beneficiary rights are created under this Agreement.
|
||||
Exhibit A – Form of Secondary Licenses Notice
|
||||
|
||||
“This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), version(s), and exceptions or additional permissions here}.”
|
||||
|
||||
Simply including a copy of this Agreement, including this Exhibit A is not sufficient to license the Source Code under Secondary Licenses.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
393
license/GPL+CLASSPATH.txt
Normal file
393
license/GPL+CLASSPATH.txt
Normal file
@ -0,0 +1,393 @@
|
||||
|
||||
GNU General Public License, version 2,
|
||||
with the Classpath Exception
|
||||
|
||||
The GNU General Public License (GPL)
|
||||
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||
document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your freedom to share
|
||||
and change it. By contrast, the GNU General Public License is intended to
|
||||
guarantee your freedom to share and change free software--to make sure the
|
||||
software is free for all its users. This General Public License applies to
|
||||
most of the Free Software Foundation's software and to any other program whose
|
||||
authors commit to using it. (Some other Free Software Foundation software is
|
||||
covered by the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our
|
||||
General Public Licenses are designed to make sure that you have the freedom to
|
||||
distribute copies of free software (and charge for this service if you wish),
|
||||
that you receive source code or can get it if you want it, that you can change
|
||||
the software or use pieces of it in new free programs; and that you know you
|
||||
can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid anyone to deny
|
||||
you these rights or to ask you to surrender the rights. These restrictions
|
||||
translate to certain responsibilities for you if you distribute copies of the
|
||||
software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or for
|
||||
a fee, you must give the recipients all the rights that you have. You must
|
||||
make sure that they, too, receive or can get the source code. And you must
|
||||
show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and (2)
|
||||
offer you this license which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain that
|
||||
everyone understands that there is no warranty for this free software. If the
|
||||
software is modified by someone else and passed on, we want its recipients to
|
||||
know that what they have is not the original, so that any problems introduced
|
||||
by others will not reflect on the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software patents. We
|
||||
wish to avoid the danger that redistributors of a free program will
|
||||
individually obtain patent licenses, in effect making the program proprietary.
|
||||
To prevent this, we have made it clear that any patent must be licensed for
|
||||
everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification
|
||||
follow.
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains a notice
|
||||
placed by the copyright holder saying it may be distributed under the terms of
|
||||
this General Public License. The "Program", below, refers to any such program
|
||||
or work, and a "work based on the Program" means either the Program or any
|
||||
derivative work under copyright law: that is to say, a work containing the
|
||||
Program or a portion of it, either verbatim or with modifications and/or
|
||||
translated into another language. (Hereinafter, translation is included
|
||||
without limitation in the term "modification".) Each licensee is addressed as
|
||||
"you".
|
||||
|
||||
Activities other than copying, distribution and modification are not covered by
|
||||
this License; they are outside its scope. The act of running the Program is
|
||||
not restricted, and the output from the Program is covered only if its contents
|
||||
constitute a work based on the Program (independent of having been made by
|
||||
running the Program). Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's source code as
|
||||
you receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice and
|
||||
disclaimer of warranty; keep intact all the notices that refer to this License
|
||||
and to the absence of any warranty; and give any other recipients of the
|
||||
Program a copy of this License along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and you may
|
||||
at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion of it, thus
|
||||
forming a work based on the Program, and copy and distribute such modifications
|
||||
or work under the terms of Section 1 above, provided that you also meet all of
|
||||
these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices stating
|
||||
that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in whole or
|
||||
in part contains or is derived from the Program or any part thereof, to be
|
||||
licensed as a whole at no charge to all third parties under the terms of
|
||||
this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively when run,
|
||||
you must cause it, when started running for such interactive use in the
|
||||
most ordinary way, to print or display an announcement including an
|
||||
appropriate copyright notice and a notice that there is no warranty (or
|
||||
else, saying that you provide a warranty) and that users may redistribute
|
||||
the program under these conditions, and telling the user how to view a copy
|
||||
of this License. (Exception: if the Program itself is interactive but does
|
||||
not normally print such an announcement, your work based on the Program is
|
||||
not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If identifiable
|
||||
sections of that work are not derived from the Program, and can be reasonably
|
||||
considered independent and separate works in themselves, then this License, and
|
||||
its terms, do not apply to those sections when you distribute them as separate
|
||||
works. But when you distribute the same sections as part of a whole which is a
|
||||
work based on the Program, the distribution of the whole must be on the terms
|
||||
of this License, whose permissions for other licensees extend to the entire
|
||||
whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest your
|
||||
rights to work written entirely by you; rather, the intent is to exercise the
|
||||
right to control the distribution of derivative or collective works based on
|
||||
the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program with the
|
||||
Program (or with a work based on the Program) on a volume of a storage or
|
||||
distribution medium does not bring the other work under the scope of this
|
||||
License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it, under
|
||||
Section 2) in object code or executable form under the terms of Sections 1 and
|
||||
2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable source
|
||||
code, which must be distributed under the terms of Sections 1 and 2 above
|
||||
on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three years, to
|
||||
give any third party, for a charge no more than your cost of physically
|
||||
performing source distribution, a complete machine-readable copy of the
|
||||
corresponding source code, to be distributed under the terms of Sections 1
|
||||
and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer to
|
||||
distribute corresponding source code. (This alternative is allowed only
|
||||
for noncommercial distribution and only if you received the program in
|
||||
object code or executable form with such an offer, in accord with
|
||||
Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for making
|
||||
modifications to it. For an executable work, complete source code means all
|
||||
the source code for all modules it contains, plus any associated interface
|
||||
definition files, plus the scripts used to control compilation and installation
|
||||
of the executable. However, as a special exception, the source code
|
||||
distributed need not include anything that is normally distributed (in either
|
||||
source or binary form) with the major components (compiler, kernel, and so on)
|
||||
of the operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the source
|
||||
code from the same place counts as distribution of the source code, even though
|
||||
third parties are not compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program except as
|
||||
expressly provided under this License. Any attempt otherwise to copy, modify,
|
||||
sublicense or distribute the Program is void, and will automatically terminate
|
||||
your rights under this License. However, parties who have received copies, or
|
||||
rights, from you under this License will not have their licenses terminated so
|
||||
long as such parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not signed it.
|
||||
However, nothing else grants you permission to modify or distribute the Program
|
||||
or its derivative works. These actions are prohibited by law if you do not
|
||||
accept this License. Therefore, by modifying or distributing the Program (or
|
||||
any work based on the Program), you indicate your acceptance of this License to
|
||||
do so, and all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the Program),
|
||||
the recipient automatically receives a license from the original licensor to
|
||||
copy, distribute or modify the Program subject to these terms and conditions.
|
||||
You may not impose any further restrictions on the recipients' exercise of the
|
||||
rights granted herein. You are not responsible for enforcing compliance by
|
||||
third parties to this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues), conditions
|
||||
are imposed on you (whether by court order, agreement or otherwise) that
|
||||
contradict the conditions of this License, they do not excuse you from the
|
||||
conditions of this License. If you cannot distribute so as to satisfy
|
||||
simultaneously your obligations under this License and any other pertinent
|
||||
obligations, then as a consequence you may not distribute the Program at all.
|
||||
For example, if a patent license would not permit royalty-free redistribution
|
||||
of the Program by all those who receive copies directly or indirectly through
|
||||
you, then the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply and
|
||||
the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any patents or
|
||||
other property right claims or to contest validity of any such claims; this
|
||||
section has the sole purpose of protecting the integrity of the free software
|
||||
distribution system, which is implemented by public license practices. Many
|
||||
people have made generous contributions to the wide range of software
|
||||
distributed through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing to
|
||||
distribute software through any other system and a licensee cannot impose that
|
||||
choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to be a
|
||||
consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in certain
|
||||
countries either by patents or by copyrighted interfaces, the original
|
||||
copyright holder who places the Program under this License may add an explicit
|
||||
geographical distribution limitation excluding those countries, so that
|
||||
distribution is permitted only in or among countries not thus excluded. In
|
||||
such case, this License incorporates the limitation as if written in the body
|
||||
of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions of the
|
||||
General Public License from time to time. Such new versions will be similar in
|
||||
spirit to the present version, but may differ in detail to address new problems
|
||||
or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any later
|
||||
version", you have the option of following the terms and conditions either of
|
||||
that version or of any later version published by the Free Software Foundation.
|
||||
If the Program does not specify a version number of this License, you may
|
||||
choose any version ever published by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free programs
|
||||
whose distribution conditions are different, write to the author to ask for
|
||||
permission. For software which is copyrighted by the Free Software Foundation,
|
||||
write to the Free Software Foundation; we sometimes make exceptions for this.
|
||||
Our decision will be guided by the two goals of preserving the free status of
|
||||
all derivatives of our free software and of promoting the sharing and reuse of
|
||||
software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
|
||||
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
|
||||
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
|
||||
PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
|
||||
YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
|
||||
ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
|
||||
PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
|
||||
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
|
||||
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
|
||||
OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible
|
||||
use to the public, the best way to achieve this is to make it free software
|
||||
which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach
|
||||
them to the start of each source file to most effectively convey the exclusion
|
||||
of warranty; and each file should have at least the "copyright" line and a
|
||||
pointer to where the full notice is found.
|
||||
|
||||
One line to give the program's name and a brief idea of what it does.
|
||||
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc., 59
|
||||
Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this when it
|
||||
starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
|
||||
with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free
|
||||
software, and you are welcome to redistribute it under certain conditions;
|
||||
type 'show c' for details.
|
||||
|
||||
The hypothetical commands 'show w' and 'show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may be
|
||||
called something other than 'show w' and 'show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary. Here
|
||||
is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
'Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
signature of Ty Coon, 1 April 1989
|
||||
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General Public
|
||||
License instead of this License.
|
||||
|
||||
|
||||
"CLASSPATH" EXCEPTION TO THE GPL
|
||||
|
||||
Certain source files distributed by Oracle America and/or its affiliates are
|
||||
subject to the following clarification and special exception to the GPL, but
|
||||
only where Oracle has expressly included in the particular source file's header
|
||||
the words "Oracle designates this particular file as subject to the "Classpath"
|
||||
exception as provided by Oracle in the LICENSE file that accompanied this code."
|
||||
|
||||
Linking this library statically or dynamically with other modules is making
|
||||
a combined work based on this library. Thus, the terms and conditions of
|
||||
the GNU General Public License cover the whole combination.
|
||||
|
||||
As a special exception, the copyright holders of this library give you
|
||||
permission to link this library with independent modules to produce an
|
||||
executable, regardless of the license terms of these independent modules,
|
||||
and to copy and distribute the resulting executable under terms of your
|
||||
choice, provided that you also meet, for each linked independent module,
|
||||
the terms and conditions of the license of that module. An independent
|
||||
module is a module which is not derived from or based on this library. If
|
||||
you modify this library, you may extend this exception to your version of
|
||||
the library, but you are not obligated to do so. If you do not wish to do
|
||||
so, delete this exception statement from your version.
|
||||
|
||||
|
||||
|
||||
|
||||
ADDITIONAL INFORMATION ABOUT LICENSING
|
||||
|
||||
Certain files distributed by Oracle America, Inc. and/or its affiliates are
|
||||
subject to the following clarification and special exception to the GPLv2,
|
||||
based on the GNU Project exception for its Classpath libraries, known as the
|
||||
GNU Classpath Exception.
|
||||
|
||||
Note that Oracle includes multiple, independent programs in this software
|
||||
package. Some of those programs are provided under licenses deemed
|
||||
incompatible with the GPLv2 by the Free Software Foundation and others.
|
||||
For example, the package includes programs licensed under the Apache
|
||||
License, Version 2.0 and may include FreeType. Such programs are licensed
|
||||
to you under their original licenses.
|
||||
|
||||
Oracle facilitates your further distribution of this package by adding the
|
||||
Classpath Exception to the necessary parts of its GPLv2 code, which permits
|
||||
you to use that code in combination with other independent modules not
|
||||
licensed under the GPLv2. However, note that this would not permit you to
|
||||
commingle code under an incompatible license with Oracle's GPLv2 licensed
|
||||
code by, for example, cutting and pasting such code into a file also
|
||||
containing Oracle's GPLv2 licensed code and then distributing the result.
|
||||
|
||||
Additionally, if you were to remove the Classpath Exception from any of the
|
||||
files to which it applies and distribute the result, you would likely be
|
||||
required to license some or all of the other code in that distribution under
|
||||
the GPLv2 as well, and since the GPLv2 is incompatible with the license terms
|
||||
of some items included in the distribution by Oracle, removing the Classpath
|
||||
Exception could therefore effectively compromise your ability to further
|
||||
distribute the package.
|
||||
|
||||
Failing to distribute notices associated with some files may also create
|
||||
unexpected legal consequences.
|
||||
|
||||
Proceed with caution and we recommend that you obtain the advice of a lawyer
|
||||
skilled in open source matters before removing the Classpath Exception or
|
||||
making modifications to this package which may subsequently be redistributed
|
||||
and/or involve the use of third party software.
|
||||
|
403
license/NSS.txt
Normal file
403
license/NSS.txt
Normal file
@ -0,0 +1,403 @@
|
||||
NSS is available under the Mozilla Public License, version 2, a copy of which
|
||||
is below.
|
||||
|
||||
Note on GPL Compatibility
|
||||
-------------------------
|
||||
|
||||
The MPL 2, section 3.3, permits you to combine NSS with code under the GNU
|
||||
General Public License (GPL) version 2, or any later version of that
|
||||
license, to make a Larger Work, and distribute the result under the GPL.
|
||||
The only condition is that you must also make NSS, and any changes you
|
||||
have made to it, available to recipients under the terms of the MPL 2 also.
|
||||
|
||||
Anyone who receives the combined code from you does not have to continue
|
||||
to dual licence in this way, and may, if they wish, distribute under the
|
||||
terms of either of the two licences - either the MPL alone or the GPL
|
||||
alone. However, we discourage people from distributing copies of NSS under
|
||||
the GPL alone, because it means that any improvements they make cannot be
|
||||
reincorporated into the main version of NSS. There is never a need to do
|
||||
this for license compatibility reasons.
|
||||
|
||||
Note on LGPL Compatibility
|
||||
--------------------------
|
||||
|
||||
The above also applies to combining MPLed code in a single library with
|
||||
code under the GNU Lesser General Public License (LGPL) version 2.1, or
|
||||
any later version of that license. If the LGPLed code and the MPLed code
|
||||
are not in the same library, then the copyleft coverage of the two
|
||||
licences does not overlap, so no issues arise.
|
||||
|
||||
|
||||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
28
makefiles/app-profile.mk
Normal file
28
makefiles/app-profile.mk
Normal file
@ -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 build/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
|
40
makefiles/build.mk
Normal file
40
makefiles/build.mk
Normal file
@ -0,0 +1,40 @@
|
||||
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/common.bat:
|
||||
cp src/win/common.bat build/win/common.bat
|
||||
|
||||
build/win/copy-config-profile.bat:
|
||||
cp src/win/copy-config-profile.bat build/win/copy-config-profile.bat
|
||||
|
||||
build/win/copy-profile.bat:
|
||||
cp src/win/launchi2p.bat build/win/copy-profile.bat
|
||||
|
||||
build/win/launchi2p.bat:
|
||||
cp src/win/launchi2p.bat build/win/launchi2p.bat
|
||||
|
||||
build/win/i2pbrowser.bat: build/win/common.bat build/win/copy-config-profile.bat build/win/copy-profile.bat build/win/launchi2p.bat
|
||||
cp src/win/i2pbrowser.bat build/win/i2pbrowser.bat
|
||||
|
||||
build/win/i2pconfig.bat: build/win/common.bat build/win/copy-config-profile.bat build/win/copy-profile.bat build/win/launchi2p.bat
|
||||
cp src/win/i2pconfig.bat build/win/i2pconfig.bat
|
||||
|
||||
build/win/i2pbrowser-private.bat: build/win/common.bat build/win/copy-config-profile.bat build/win/copy-profile.bat build/win/launchi2p.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
|
55
makefiles/debian.mk
Normal file
55
makefiles/debian.mk
Normal file
@ -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
|
12
makefiles/docker.mk
Normal file
12
makefiles/docker.mk
Normal file
@ -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
|
25
makefiles/extensions.mk
Normal file
25
makefiles/extensions.mk
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
build-extensions: extensions build/i2ppb@eyedeekay.github.io.xpi build/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi build/https-everywhere-eff@eff.org.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 `./amo-version.sh https-everywhere` > HTTPSEverywhere.url
|
||||
|
||||
NoScript.url:
|
||||
@echo `./amo-version.sh noscript` > NoScript.url
|
||||
|
||||
i2psetproxy.url:
|
||||
@echo `./amo-version.sh i2p-in-private-browsing` > i2psetproxy.url
|
39
makefiles/install.mk
Normal file
39
makefiles/install.mk
Normal file
@ -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
|
31
makefiles/new-extensions.mk
Normal file
31
makefiles/new-extensions.mk
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
build-new-extensions: build/i2ppb@eyedeekay.github.io.xpi build/uBlock0@raymondhill.net.xpi build/jsr@javascriptrestrictor.xpi build/onioncbt@eyedeekay.github.io.xpi build/{b86e4813-687a-43e6-ab65-0bde4ab75758}.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 `./amo-version.sh ublock-origin` > UBlockOrigin.url
|
||||
|
||||
JShelter.url:
|
||||
@echo "`./amo-version.sh javascript-restrictor`" > JShelter.url
|
||||
|
||||
onioncontainer.url:
|
||||
@echo `./amo-version.sh onion-in-container-browsing` > onioncontainer.url
|
||||
|
||||
LocalCDN.url:
|
||||
@echo `./amo-version.sh localcdn-fork-of-decentraleyes` > 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
|
26
makefiles/profile.mk
Normal file
26
makefiles/profile.mk
Normal file
@ -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 build/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
|
35
makefiles/su-unsigned.mk
Normal file
35
makefiles/su-unsigned.mk
Normal file
@ -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
|
41
makefiles/su.mk
Normal file
41
makefiles/su.mk
Normal file
@ -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
|
4
release.sh
Executable file
4
release.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
./unsigned.sh
|
||||
./sign.sh
|
3
router.config
Normal file
3
router.config
Normal file
@ -0,0 +1,3 @@
|
||||
router.updateURL=http://ekm3fu6fr5pxudhwjmdiea5dovc3jdi66hjgop4c7z7dfaw7spca.b32.i2p/i2pwinupdate.su3
|
||||
router.newsURL=http://dn3tvalnjz432qkqsvpfdqrwpqkw3ye4n4i2uyfr4jexvo3sp5ka.b32.i2p/news/win/beta/news.su3
|
||||
router.backupNewsURL=http://tc73n4kivdroccekirco7rhgxdg5f3cjvbaapabupeyzrqwv5guq.b32.i2p/win/beta/news.su3
|
42
sign.sh
Executable file
42
sign.sh
Executable file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
. i2pversion
|
||||
|
||||
if [ -f i2pversion_override ]; then
|
||||
. i2pversion_override
|
||||
fi
|
||||
|
||||
. config.sh
|
||||
|
||||
if [ -f config_overide.sh ]; then
|
||||
. config_override.sh
|
||||
fi
|
||||
|
||||
linuxsign() {
|
||||
## LINUX SIGNING IS EXPERIMENTAL AND SHOULD NOT BE USED IN DEFAULT STATE.
|
||||
if [ ! -f jsign-4.1.jar ]; then
|
||||
wget -O jsign-4.1.jar https://github.com/ebourg/jsign/releases/download/4.1/jsign-4.1.jar
|
||||
fi
|
||||
if [ ! -f "$HOME/signingkeys/signing-key.jks" ]; then
|
||||
mkdir -p "$HOME/signingkeys/"
|
||||
keytool -genkey -alias server-alias -keyalg RSA -keypass changeit \
|
||||
-storepass changeit -keystore "$HOME/signingkeys/signing-key.jks"
|
||||
fi
|
||||
java -jar jsign-4.1.jar \
|
||||
--keystore "$HOME/signingkeys/signing-key.jks" \
|
||||
--storepass changeit \
|
||||
--keypass changeit \
|
||||
--tsaurl "http://timestamp.sectigo.com" \
|
||||
--name "I2P-Browser-Installer" \
|
||||
--alg "SHA-512" \
|
||||
"$1"
|
||||
}
|
||||
|
||||
if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
|
||||
JAVA_HOME=`type -p java|xargs readlink -f|xargs dirname|xargs dirname`
|
||||
linuxsign I2P-Profile-Installer-$I2P_VERSION.exe
|
||||
cp "I2P-Profile-Installer-$I2P_VERSION.exe" "I2P-Profile-Installer-$I2P_VERSION-signed.exe"
|
||||
else
|
||||
signtool.exe sign "I2P-Profile-Installer-$I2P_VERSION.exe"
|
||||
cp "I2P-Profile-Installer-$I2P_VERSION.exe" "I2P-Profile-Installer-$I2P_VERSION-signed.exe"
|
||||
fi
|
@ -53,3 +53,11 @@ 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);
|
||||
user_pref("browser.display.use_system_colors", false);
|
0
src/app-profile/storage-sync.sqlite
Executable file → Normal file
0
src/app-profile/storage-sync.sqlite
Executable file → Normal file
@ -1,19 +1,18 @@
|
||||
# Overrides for Extension Preferences
|
||||
# Tor Browser Bundle
|
||||
# Do not edit this file.
|
||||
#
|
||||
# This file is modified from a file included in the Tor Browser Bundle.
|
||||
#
|
||||
# Copyright 2017 The Tor Project. See LICENSE.tor for licensing information.
|
||||
/*
|
||||
Overrides#
|
||||
for Extension Preferences# Tor Browser Bundle# Do not edit this file.##This file is modified from a file included in the Tor Browser Bundle.##Copyright 2017 The Tor Project.See LICENSE.tor#
|
||||
for licensing information.
|
||||
|
||||
# HTTPS Everywhere Preferences:
|
||||
HTTPS Everywhere Preferences:
|
||||
*/
|
||||
user_pref("extensions.https_everywhere._observatory.popup_shown", true);
|
||||
user_pref("extensions.https_everywhere.toolbar_hint_shown", true);
|
||||
|
||||
# NoScript Preferences:
|
||||
# In order to disable all scripts by default, uncomment the following line...
|
||||
# user_pref("capability.policy.maonoscript.javascript.enabled", "noAccess");
|
||||
# and comment out the following line
|
||||
/*
|
||||
NoScript Preferences: #In order to disable all scripts by
|
||||
default, uncomment the following line...#user_pref("capability.policy.maonoscript.javascript.enabled", "noAccess");#
|
||||
and comment out the following line
|
||||
*/
|
||||
user_pref("capability.policy.maonoscript.javascript.enabled", "allAccess");
|
||||
user_pref("capability.policy.maonoscript.sites", "[System+Principal] about: about:tbupdate about:tor chrome: resource: blob: mediasource: moz-extension: moz-safe-about: about:neterror about:certerror about:feeds about:tabcrashed about:cache");
|
||||
user_pref("noscript.default", "[System+Principal] about: about:tbupdate about:tor chrome: resource: blob: mediasource: moz-extension: moz-safe-about: about:neterror about:certerror about:feeds about:tabcrashed about:cache");
|
||||
@ -106,7 +105,7 @@ user_pref("network.proxy.ftp_port", 4444);
|
||||
user_pref("network.proxy.socks", "127.0.0.1");
|
||||
user_pref("network.proxy.socks_port", 4444);
|
||||
user_pref("network.proxy.share_proxy_settings", true);
|
||||
user_pref("browser.startup.homepage", "about:blank");
|
||||
user_pref("browser.startup.homepage", "http://127.0.0.1:7657/home");
|
||||
|
||||
// Privacy-harden and disable irrelevant features.
|
||||
user_pref("app.normandy.api_url", "");
|
||||
@ -216,3 +215,10 @@ 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);
|
||||
user_pref("browser.display.use_system_colors", false);
|
@ -1 +1 @@
|
||||
0.4
|
||||
1.7.7
|
||||
|
122
src/nsis/FindProcess.nsh
Normal file
122
src/nsis/FindProcess.nsh
Normal 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
|
@ -1,4 +1,4 @@
|
||||
# uncomment on v3
|
||||
# This now requires v3
|
||||
UniCode true
|
||||
|
||||
!define APPNAME "I2PBrowser-Launcher"
|
||||
@ -6,16 +6,20 @@ UniCode true
|
||||
!define DESCRIPTION "This launches Firefox with a browser profile pre-configured to use i2p"
|
||||
!define FIREFOX_MESSAGE "Could not find Firefox. Please point to where you have installed Firefox. If you have not installed Firefox yet, exit this installer and install Firefox, then start this installer again."
|
||||
!define I2P_MESSAGE "Could not find I2P. Please point to where you have installed I2P. If you have not installed I2P yet, exit this installer and install I2P, then start this installer again."
|
||||
!define LAUNCH_TEXT "Launch the i2p browser?"
|
||||
!define LAUNCH_TEXT "Start I2P?"
|
||||
!define LICENSE_TITLE "Many Licenses"
|
||||
!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
|
||||
Var PARENTOPTIONS
|
||||
|
||||
SetOverwrite on
|
||||
!define FFINSTEXE
|
||||
!define FFNONTORINSTEXE
|
||||
!define FFINSTEXE32 "$PROGRAMFILES32\Mozilla Firefox\"
|
||||
@ -24,22 +28,25 @@ var I2PINSTEXE
|
||||
!define I2PINSTEXE
|
||||
!define I2PINSTEXE32 "$PROGRAMFILES32\i2p"
|
||||
!define I2PINSTEXE64 "$PROGRAMFILES64\i2p"
|
||||
!define I2PINSTEXE_USERMODE "$LOCALAPPDATA\i2p"
|
||||
|
||||
|
||||
!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
|
||||
RequestExecutionLevel user
|
||||
|
||||
!include LogicLib.nsh
|
||||
!include x64.nsh
|
||||
!include FileFunc.nsh
|
||||
!define MUI_ICON ui2pbrowser_icon.ico
|
||||
!define MUI_FINISHPAGE
|
||||
!include "MUI2.nsh"
|
||||
@ -123,6 +130,7 @@ RequestExecutionLevel admin
|
||||
PageEx license
|
||||
licensetext "${LICENSE_TITLE}"
|
||||
licensedata "licenses\LICENSE.index"
|
||||
#PageCallbacks elevatorCallback
|
||||
PageExEnd
|
||||
PageEx directory
|
||||
dirtext "${FIREFOX_MESSAGE}"
|
||||
@ -137,198 +145,146 @@ PageEx directory
|
||||
PageExEnd
|
||||
Page instfiles
|
||||
|
||||
|
||||
!include i2pbrowser-mozcompat.nsi
|
||||
|
||||
Function .onInit
|
||||
StrCpy $I2PINSTEXE "${I2PINSTEXE64}"
|
||||
UserInfo::GetAccountType
|
||||
pop $0
|
||||
${If} $0 != "admin"
|
||||
StrCpy $INSTDIR "$LOCALAPPDATA\${COMPANYNAME}\${APPNAME}"
|
||||
StrCpy $I2PINSTEXE "${I2PINSTEXE_USERMODE}"
|
||||
${EndIf}
|
||||
${If} ${FileExists} "${I2PINSTEXE32}\i2p.exe"
|
||||
StrCpy $I2PINSTEXE "${I2PINSTEXE32}"
|
||||
${EndIf}
|
||||
${If} ${FileExists} "${I2PINSTEXE64}\i2p.exe"
|
||||
StrCpy $I2PINSTEXE "${I2PINSTEXE64}"
|
||||
${EndIf}
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
Call ShouldInstall64Bit
|
||||
${If} $0 == 1
|
||||
${If} ${FileExists} "${FFINSTEXE64}/firefox.exe"
|
||||
${If} ${FileExists} "${FFINSTEXE64}\firefox.exe"
|
||||
StrCpy $FFINSTEXE "${FFINSTEXE64}"
|
||||
StrCpy $FFNONTORINSTEXE "${FFINSTEXE64}"
|
||||
${ElseIf} ${FileExists} "${FFINSTEXE32}/firefox.exe"
|
||||
${ElseIf} ${FileExists} "${FFINSTEXE32}\firefox.exe"
|
||||
StrCpy $FFINSTEXE "${FFINSTEXE32}"
|
||||
StrCpy $FFNONTORINSTEXE "${FFINSTEXE32}"
|
||||
${EndIf}
|
||||
${If} ${FileExists} "$PROFILE/OneDrive/Desktop/Tor Browser/Browser/firefox.exe"
|
||||
StrCpy $FFINSTEXE "$PROFILE/OneDrive/Desktop/Tor Browser/Browser/"
|
||||
${If} ${FileExists} "$PROFILE\OneDrive\Desktop\Tor Browser\Browser\firefox.exe"
|
||||
StrCpy $FFINSTEXE "$PROFILE\OneDrive\Desktop\Tor Browser\Browser\"
|
||||
${EndIf}
|
||||
${If} ${FileExists} "$PROFILE/Desktop/Tor Browser/Browser/firefox.exe"
|
||||
StrCpy $FFINSTEXE "$PROFILE/Desktop/Tor Browser/Browser/"
|
||||
${If} ${FileExists} "$PROFILE\Desktop\Tor Browser\Browser\firefox.exe"
|
||||
StrCpy $FFINSTEXE "$PROFILE\Desktop\Tor Browser\Browser\"
|
||||
${EndIf}
|
||||
${Else}
|
||||
${If} ${FileExists} "${FFINSTEXE32}/firefox.exe"
|
||||
${If} ${FileExists} "${FFINSTEXE32}\firefox.exe"
|
||||
StrCpy $FFINSTEXE "${FFINSTEXE32}"
|
||||
StrCpy $FFNONTORINSTEXE "${FFINSTEXE32}"
|
||||
${EndIf}
|
||||
${If} ${FileExists} "$PROFILE/OneDrive/Desktop/Tor Browser/Browser/firefox.exe"
|
||||
StrCpy $FFINSTEXE "$PROFILE/OneDrive/Desktop/Tor Browser/Browser/"
|
||||
${If} ${FileExists} "$PROFILE\OneDrive\Desktop\Tor Browser\Browser\firefox.exe"
|
||||
StrCpy $FFINSTEXE "$PROFILE\OneDrive\Desktop\Tor Browser\Browser\"
|
||||
${EndIf}
|
||||
${If} ${FileExists} "$PROFILE/Desktop/Tor Browser/Browser/firefox.exe"
|
||||
StrCpy $FFINSTEXE "$PROFILE/Desktop/Tor Browser/Browser/"
|
||||
${If} ${FileExists} "$PROFILE\Desktop\Tor Browser\Browser\firefox.exe"
|
||||
StrCpy $FFINSTEXE "$PROFILE\Desktop\Tor Browser\Browser\"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
${If} ${FileExists} "${I2PINSTEXE32}/i2p.exe"
|
||||
StrCpy $I2PINSTEXE "${I2PINSTEXE32}"
|
||||
${EndIf}
|
||||
${If} ${FileExists} "${I2PINSTEXE64}/i2p.exe"
|
||||
StrCpy $I2PINSTEXE "${I2PINSTEXE64}"
|
||||
${EndIf}
|
||||
# look for user installs
|
||||
FunctionEnd
|
||||
|
||||
Function firefoxDetect
|
||||
${If} ${FileExists} "$FFINSTEXE/firefox.exe"
|
||||
${If} ${FileExists} "$FFINSTEXE\firefox.exe"
|
||||
Abort directory
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Function routerDetect
|
||||
${If} ${FileExists} "$I2PINSTEXE"
|
||||
Abort directory
|
||||
${Else}
|
||||
createDirectory $I2PINSTEXE
|
||||
SetOutPath $I2PINSTEXE
|
||||
File /nonfatal /a /r "I2P\"
|
||||
File /nonfatal /a /r "I2P\I2P.exe"
|
||||
File /nonfatal "I2P\config\jpackaged"
|
||||
|
||||
createDirectory "$I2PINSTEXE\"
|
||||
SetOutPath "$I2PINSTEXE\"
|
||||
File /nonfatal /a /r "I2P/config/*"
|
||||
|
||||
Abort directory
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
# start default section
|
||||
Section Install
|
||||
Function installerFunction
|
||||
${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"
|
||||
# Update jpackaged I2P router, if it exists
|
||||
${If} ${FileExists} "$I2PINSTEXE\jpackaged"
|
||||
FileWrite $0 'start /D "%LOCALAPPDATA%\${APPNAME}" "" "$I2PINSTEXE\i2p.exe"'
|
||||
${Else}
|
||||
FileWrite $0 'start "" "$I2PINSTEXE\i2p.exe"'
|
||||
createDirectory $I2PINSTEXE
|
||||
SetOutPath $I2PINSTEXE
|
||||
|
||||
${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\"
|
||||
File /nonfatal /a /r "I2P/config/*"
|
||||
|
||||
${EndIf}
|
||||
${Else}
|
||||
File /nonfatal /a /r "I2P\"
|
||||
File /nonfatal "I2P\config\jpackaged"
|
||||
|
||||
createDirectory "$I2PINSTEXE\"
|
||||
SetOutPath "$I2PINSTEXE\"
|
||||
File /nonfatal /a /r "I2P/config/*"
|
||||
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
FileWriteByte $0 "13"
|
||||
FileWriteByte $0 "10"
|
||||
FileWrite $0 'if exist "%LOCALAPPDATA%\${APPNAME}\firefox.profile.i2p\" ('
|
||||
FileWrite $0 ' echo "profile is configured"'
|
||||
FileWrite $0 ') else ('
|
||||
FileWrite $0 ' echo "configuring profile"'
|
||||
FileWriteByte $0 "13"
|
||||
FileWriteByte $0 "10"
|
||||
FileWrite $0 ' xcopy /s /i /y "$INSTDIR\firefox.profile.i2p" "%LOCALAPPDATA%\${APPNAME}\firefox.profile.i2p"'
|
||||
FileWrite $0 ')'
|
||||
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
|
||||
|
||||
FileOpen $0 "$INSTDIR\i2pbrowser-private.bat" w
|
||||
FileWrite $0 "@echo off"
|
||||
FileWriteByte $0 "13"
|
||||
FileWriteByte $0 "10"
|
||||
${If} ${FileExists} "$I2PINSTEXE\jpackaged"
|
||||
FileWrite $0 'start /D "%LOCALAPPDATA%\${APPNAME}" "" "$I2PINSTEXE\i2p.exe"'
|
||||
${Else}
|
||||
FileWrite $0 'start "" "$I2PINSTEXE\i2p.exe"'
|
||||
${EndIf}
|
||||
FileWriteByte $0 "13"
|
||||
FileWriteByte $0 "10"
|
||||
FileWrite $0 'if exist "%LOCALAPPDATA%\${APPNAME}\firefox.profile.i2p\" ('
|
||||
FileWrite $0 ' echo "profile is configured"'
|
||||
FileWrite $0 ') else ('
|
||||
FileWrite $0 ' echo "configuring profile"'
|
||||
FileWriteByte $0 "13"
|
||||
FileWriteByte $0 "10"
|
||||
FileWrite $0 ' xcopy /s /i /y "$INSTDIR\firefox.profile.i2p" "%LOCALAPPDATA%\${APPNAME}\firefox.profile.i2p"'
|
||||
FileWrite $0 ')'
|
||||
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
|
||||
|
||||
|
||||
# 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 'if exist "%LOCALAPPDATA%\${APPNAME}\firefox.profile.config.i2p\" ('
|
||||
FileWrite $0 ' echo "profile is configured"'
|
||||
FileWrite $0 ') else ('
|
||||
FileWrite $0 ' echo "configuring profile"'
|
||||
FileWriteByte $0 "13"
|
||||
FileWriteByte $0 "10"
|
||||
FileWrite $0 ' xcopy /s /i /y "$INSTDIR\firefox.profile.config.i2p" "%LOCALAPPDATA%\${APPNAME}\firefox.profile.config.i2p"'
|
||||
FileWrite $0 ')'
|
||||
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
|
||||
# Install the launcher scripts
|
||||
createDirectory "$INSTDIR"
|
||||
SetOutPath "$INSTDIR"
|
||||
File "win/*"
|
||||
|
||||
# Install the licenses
|
||||
createDirectory "$INSTDIR\licenses"
|
||||
SetOutPath "$INSTDIR\licenses"
|
||||
File /r licenses\*.*
|
||||
File /a /r "licenses/*"
|
||||
|
||||
# Install the profile
|
||||
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 "$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
|
||||
File /a /r "profile/*"
|
||||
|
||||
# Install the config profile
|
||||
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 "$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 "$INSTDIR\firefox.profile.config.i2p\chrome"
|
||||
SetOutPath "$INSTDIR\firefox.profile.config.i2p\chrome"
|
||||
File app-profile\chrome\userChrome.css
|
||||
File /a /r "app-profile/*"
|
||||
|
||||
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
|
||||
@ -338,6 +294,9 @@ Section Install
|
||||
FileWrite $0 "routerconsole.browser=$\"$INSTDIR\i2pconfig.bat$\""
|
||||
FileWriteByte $0 "13"
|
||||
FileWriteByte $0 "10"
|
||||
FileWrite $0 "router.disableTunnelTesting=false"
|
||||
FileWriteByte $0 "13"
|
||||
FileWriteByte $0 "10"
|
||||
FileClose $0
|
||||
|
||||
SetShellVarContext current
|
||||
@ -355,6 +314,9 @@ Section Install
|
||||
createDirectory "$I2PAPPDATA"
|
||||
SetOutPath "$I2PAPPDATA"
|
||||
|
||||
IfFileExists "$LOCALAPPDATA\I2P\eepsite\docroot" +2 0
|
||||
File /nonfatal /a /r "I2P\eepsite"
|
||||
|
||||
;# Point the browser config setting in the working config
|
||||
FileOpen $0 "$I2PAPPDATA\router.config" a
|
||||
FileSeek $0 0 END
|
||||
@ -363,6 +325,9 @@ Section Install
|
||||
FileWrite $0 "routerconsole.browser=$\"$INSTDIR\i2pconfig.bat$\""
|
||||
FileWriteByte $0 "13"
|
||||
FileWriteByte $0 "10"
|
||||
FileWrite $0 "router.disableTunnelTesting=false"
|
||||
FileWriteByte $0 "13"
|
||||
FileWriteByte $0 "10"
|
||||
FileClose $0
|
||||
|
||||
createDirectory "$I2PINSTEXE"
|
||||
@ -374,54 +339,54 @@ Section Install
|
||||
|
||||
# create a shortcut to the uninstaller
|
||||
CreateShortCut "$SMPROGRAMS\${APPNAME}\Uninstall-${APPNAME}.lnk" "$INSTDIR\uninstall-i2pbrowser.exe"
|
||||
FunctionEnd
|
||||
|
||||
Function elevatorCallback
|
||||
${GetOptions} $CMDLINE "/p" $PARENTOPTIONS
|
||||
${If} "${PARENTOPTIONS}" != ""
|
||||
StrCpy $PARENTOPTIONS "-ArgumentList '$PARENTOPTIONS'"
|
||||
${EndIf}
|
||||
${If} ${FileExists} "${I2PINSTEXE64}\i2p.exe"
|
||||
ExecShell open "powershell -Command Start-Process .\$EXEFILE -Wait -Verb RunAs $PARENTOPTIONS"
|
||||
#Quit
|
||||
${ElseIf} ${FileExists} "${I2PINSTEXE32}\i2p.exe"
|
||||
ExecShell open "powershell -Command Start-Process .\$EXEFILE -Wait -Verb RunAs $PARENTOPTIONS"
|
||||
#Quit
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
|
||||
# start default section
|
||||
Section Install
|
||||
Call installerFunction
|
||||
SectionEnd
|
||||
|
||||
# uninstaller section start
|
||||
Section "uninstall"
|
||||
|
||||
# Remove the licenses
|
||||
rmDir /r "$INSTDIR\licenses"
|
||||
|
||||
# Uninstall the launcher scripts
|
||||
Delete $INSTDIR\i2pbrowser.bat
|
||||
Delete $INSTDIR\i2pconfig.bat
|
||||
Delete $INSTDIR\i2pbrowser-private.bat
|
||||
Delete $INSTDIR\ui2pbrowser_icon.ico
|
||||
|
||||
# Uninstall the profile
|
||||
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 $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 "$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 "$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 "$INSTDIR\firefox.profile.config.i2p\config\userChrome.css"
|
||||
Delete $INSTDIR\*
|
||||
rmDir /r "$INSTDIR\"
|
||||
${If} ${FileExists} "$I2PINSTEXE\jpackaged"
|
||||
Delete $I2PINSTEXE\*
|
||||
rmDir /r "$I2PINSTEXE"
|
||||
${EndIf}
|
||||
|
||||
|
||||
# Remove shortcuts and folders
|
||||
Delete "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk"
|
||||
Delete "$SMPROGRAMS\${APPNAME}\Private Browsing-${APPNAME}.lnk"
|
||||
Delete "$SMPROGRAMS\Uninstall-${APPNAME}.lnk"
|
||||
Delete "$SMPROGRAMS\${APPNAME}\Browse I2P.lnk"
|
||||
Delete "$DESKTOP\Browse I2P - Temporary Identity.lnk"
|
||||
Delete "$DESKTOP\Browse I2P.lnk"
|
||||
Delete "$DESKTOP\${APPNAME}.lnk"
|
||||
Delete "$DESKTOP\Private Browsing-${APPNAME}.lnk"
|
||||
rmDir "$SMPROGRAMS\${APPNAME}"
|
||||
rmDir "$INSTDIR\firefox.profile.i2p\extensions"
|
||||
rmDir "$INSTDIR\firefox.profile.i2p"
|
||||
rmDir "$LOCALAPPDATA\${APPNAME}"
|
||||
rmDir "$INSTDIR"
|
||||
|
||||
rmDir /r "$SMPROGRAMS\${APPNAME}"
|
||||
rmDir /r "$INSTDIR\firefox.profile.i2p\extensions"
|
||||
rmDir /r "$INSTDIR\firefox.profile.i2p"
|
||||
rmDir /r "$LOCALAPPDATA\${APPNAME}"
|
||||
rmDir /r "$INSTDIR"
|
||||
|
||||
# delete the uninstaller
|
||||
Delete "$INSTDIR\uninstall-i2pbrowser.exe"
|
||||
|
||||
@ -435,5 +400,12 @@ SectionEnd
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
Function LaunchLink
|
||||
ExecShell "" "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk"
|
||||
${If} ${Silent}
|
||||
ReadEnvStr $0 RESTART_I2P
|
||||
${If} $0 != ""
|
||||
ShellExecAsUser::ShellExecAsUser "open" "$DESKTOP\Browse I2P.lnk"
|
||||
${EndIf}
|
||||
${Else}
|
||||
ShellExecAsUser::ShellExecAsUser "open" "$DESKTOP\Browse I2P.lnk"
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
1
src/nsis/i2pbrowser-jpackage.nsi
Normal file
1
src/nsis/i2pbrowser-jpackage.nsi
Normal file
@ -0,0 +1 @@
|
||||
!define I2P_VERSION 1.7.7
|
@ -1,3 +1,3 @@
|
||||
!define VERSIONMAJOR 0
|
||||
!define VERSIONMINOR 04
|
||||
!define VERSIONBUILD
|
||||
!define VERSIONMAJOR 1
|
||||
!define VERSIONMINOR 7
|
||||
!define VERSIONBUILD 7
|
||||
|
@ -51,3 +51,12 @@ 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);
|
||||
user_pref("browser.privatebrowsing.autostart", false);
|
||||
user_pref("browser.display.use_system_colors", false);
|
0
src/profile/storage-sync.sqlite
Executable file → Normal file
0
src/profile/storage-sync.sqlite
Executable file → Normal file
@ -1,19 +1,18 @@
|
||||
# Overrides for Extension Preferences
|
||||
# Tor Browser Bundle
|
||||
# Do not edit this file.
|
||||
#
|
||||
# This file is modified from a file included in the Tor Browser Bundle.
|
||||
#
|
||||
# Copyright 2017 The Tor Project. See LICENSE.tor for licensing information.
|
||||
/*
|
||||
Overrides#
|
||||
for Extension Preferences# Tor Browser Bundle# Do not edit this file.##This file is modified from a file included in the Tor Browser Bundle.##Copyright 2017 The Tor Project.See LICENSE.tor#
|
||||
for licensing information.
|
||||
|
||||
# HTTPS Everywhere Preferences:
|
||||
HTTPS Everywhere Preferences:
|
||||
*/
|
||||
user_pref("extensions.https_everywhere._observatory.popup_shown", true);
|
||||
user_pref("extensions.https_everywhere.toolbar_hint_shown", true);
|
||||
|
||||
# NoScript Preferences:
|
||||
# In order to disable all scripts by default, uncomment the following line...
|
||||
# user_pref("capability.policy.maonoscript.javascript.enabled", "noAccess");
|
||||
# and comment out the following line
|
||||
/*
|
||||
NoScript Preferences: #In order to disable all scripts by
|
||||
default, uncomment the following line...#user_pref("capability.policy.maonoscript.javascript.enabled", "noAccess");#
|
||||
and comment out the following line
|
||||
*/
|
||||
user_pref("capability.policy.maonoscript.javascript.enabled", "allAccess");
|
||||
user_pref("capability.policy.maonoscript.sites", "[System+Principal] about: about:tbupdate about:tor chrome: resource: blob: mediasource: moz-extension: moz-safe-about: about:neterror about:certerror about:feeds about:tabcrashed about:cache");
|
||||
user_pref("noscript.default", "[System+Principal] about: about:tbupdate about:tor chrome: resource: blob: mediasource: moz-extension: moz-safe-about: about:neterror about:certerror about:feeds about:tabcrashed about:cache");
|
||||
@ -83,6 +82,9 @@ user_pref("extensions.torbutton.use_nontor_proxy", true);
|
||||
//user_pref("extensions.torlauncher.socks_port_use_ipc", );
|
||||
//user_pref("extensions.torlauncher.socks_ipc_path", "");
|
||||
|
||||
// TODO: this is a Tor Browser specific setting which is ignored on Firefox. If
|
||||
// I make it true, the SOCKS outproxy will have something to connect to. But I
|
||||
// need to test more to find out if that's prudent.
|
||||
user_pref("extensions.torlauncher.start_tor", false);
|
||||
//user_pref("extensions.torlauncher.default_bridge_type", "");
|
||||
user_pref("extensions.torlauncher.prompt_at_startup", false);
|
||||
@ -106,7 +108,7 @@ user_pref("network.proxy.ftp_port", 4444);
|
||||
user_pref("network.proxy.socks", "127.0.0.1");
|
||||
user_pref("network.proxy.socks_port", 4444);
|
||||
user_pref("network.proxy.share_proxy_settings", true);
|
||||
user_pref("browser.startup.homepage", "about:blank");
|
||||
user_pref("browser.startup.homepage", "http://127.0.0.1:7657/home");
|
||||
|
||||
// Privacy-harden and disable irrelevant features.
|
||||
user_pref("app.normandy.api_url", "");
|
||||
@ -170,7 +172,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 +218,11 @@ 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);
|
||||
user_pref("browser.privatebrowsing.autostart", false);
|
||||
user_pref("browser.display.use_system_colors", false);
|
@ -1 +1 @@
|
||||
0.4
|
||||
1.7.7
|
||||
|
9
src/unix/desktop/i2pbrowser-debian.desktop
Normal file
9
src/unix/desktop/i2pbrowser-debian.desktop
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Exec=/usr/bin/i2pbrowser.sh
|
||||
Name=I2P Browser
|
||||
Categories=Network;WebBrowser;
|
||||
Icon=/var/lib/i2pbrowser/icons/ui2pbrowser_icon.ico
|
9
src/unix/desktop/i2pconfig-debian.desktop
Normal file
9
src/unix/desktop/i2pconfig-debian.desktop
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Exec=/usr/bin/i2pconfig.sh
|
||||
Name=I2P Configuration
|
||||
Categories=Network;WebBrowser;
|
||||
Icon=/var/lib/i2pbrowser/icons/ui2pbrowser_icon.ico
|
@ -40,4 +40,5 @@ if [ -z $FIREFOX ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$FIREFOX --profile "$BROWSING_PROFILE" $@
|
||||
echo $FIREFOX --profile "$BROWSING_PROFILE" $@
|
||||
$FIREFOX --profile "$BROWSING_PROFILE" $@
|
19
src/win/common.bat
Normal file
19
src/win/common.bat
Normal file
@ -0,0 +1,19 @@
|
||||
@echo off
|
||||
|
||||
SET MYPATH=%~dp0
|
||||
|
||||
set ProgramFiles64=%ProgramFiles: (x86)=%
|
||||
set I2PData="%LocalAppData%\I2P\"
|
||||
|
||||
set I2PPath="%ProgramFiles%\I2P\"
|
||||
if exist "%LocalAppData%\I2P\I2P.exe" (
|
||||
set I2PPath="%LocalAppData%\I2P\"
|
||||
)
|
||||
|
||||
if exist "%ProgramFiles64%\I2P\" (
|
||||
set I2PPath="%ProgramFiles64%\I2P\"
|
||||
)
|
||||
|
||||
if exist "%ProgramFiles(x86)%\I2P" (
|
||||
set I2PPath="%ProgramFiles(x86)%\I2P\"
|
||||
)
|
12
src/win/copy-config-profile.bat
Normal file
12
src/win/copy-config-profile.bat
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
SET MYPATH=%~dp0
|
||||
call "%MYPATH%common.bat"
|
||||
|
||||
if exist "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p\" (
|
||||
echo "profile is configured" & xcopy /s /i /y "%I2PData%I2PBrowser-Launcher\firefox.profile.config.i2p\extensions" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p\extensions"
|
||||
) else (
|
||||
echo "configuring profile" & xcopy /s /i /y "%I2PData%I2PBrowser-Launcher\firefox.profile.config.i2p" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p"
|
||||
)
|
||||
|
||||
xcopy /s /i /y "%I2PData%I2PBrowser-Launcher\firefox.profile.config.i2p\user.js" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p\user.js*"
|
||||
xcopy /s /i /y "%I2PData%I2PBrowser-Launcher\firefox.profile.config.i2p\prefs.js" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p\prefs.js*"
|
12
src/win/copy-profile.bat
Normal file
12
src/win/copy-profile.bat
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
SET MYPATH=%~dp0
|
||||
call "%MYPATH%common.bat"
|
||||
|
||||
if exist "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p\" (
|
||||
echo "profile is configured, updating extensions" & xcopy /s /i /y "%I2PData%I2PBrowser-Launcher\firefox.profile.i2p\extensions" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p\extensions"
|
||||
) else (
|
||||
echo "configuring profile" & xcopy /s /i /y "%I2PData%I2PBrowser-Launcher\firefox.profile.i2p" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p"
|
||||
)
|
||||
|
||||
xcopy /s /i /y "%I2PData%I2PBrowser-Launcher\firefox.profile.i2p\user.js" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p\user.js*"
|
||||
xcopy /s /i /y "%I2PData%I2PBrowser-Launcher\firefox.profile.i2p\prefs.js" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p\prefs.js*"
|
27
src/win/i2pbrowser-private.bat
Normal file
27
src/win/i2pbrowser-private.bat
Normal file
@ -0,0 +1,27 @@
|
||||
@echo on
|
||||
|
||||
SET MYPATH=%~dp0
|
||||
call "%MYPATH%common.bat"
|
||||
|
||||
call "%MYPATH%launchi2p.bat"
|
||||
|
||||
call "%MYPATH%copy-profile.bat"
|
||||
|
||||
timeout /t 3
|
||||
|
||||
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
|
27
src/win/i2pbrowser.bat
Normal file
27
src/win/i2pbrowser.bat
Normal file
@ -0,0 +1,27 @@
|
||||
@echo on
|
||||
|
||||
SET MYPATH=%~dp0
|
||||
call "%MYPATH%common.bat"
|
||||
|
||||
call "%MYPATH%launchi2p.bat"
|
||||
|
||||
call "%MYPATH%copy-profile.bat"
|
||||
|
||||
timeout /t 3
|
||||
|
||||
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
|
23
src/win/i2pconfig.bat
Normal file
23
src/win/i2pconfig.bat
Normal file
@ -0,0 +1,23 @@
|
||||
@echo off
|
||||
|
||||
SET MYPATH=%~dp0
|
||||
call "%MYPATH%common.bat"
|
||||
|
||||
call "%MYPATH%copy-config-profile.bat"
|
||||
|
||||
if exist "%ProgramFiles%\Mozilla Firefox\firefox.exe" (
|
||||
start "i2pbrowser" "%ProgramFiles%\Mozilla Firefox\firefox.exe" -no-remote -profile "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p" -url %1
|
||||
exit
|
||||
)
|
||||
|
||||
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.config.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.config.i2p" -url %1
|
||||
exit
|
||||
)
|
||||
|
||||
exit
|
16
src/win/launchi2p.bat
Normal file
16
src/win/launchi2p.bat
Normal file
@ -0,0 +1,16 @@
|
||||
@echo on
|
||||
|
||||
SET MYPATH=%~dp0
|
||||
call "%MYPATH%common.bat"
|
||||
|
||||
echo "check if I2P is already running"
|
||||
::only launch I2P if the proxy is not up on 4444
|
||||
netstat /o /a /n | findstr "LISTENING" | findstr "4444" >nul 2>nul && (
|
||||
echo "I2P is already running, not launching"
|
||||
) || (
|
||||
echo "I2P is not running, launching"
|
||||
echo start "i2p" /D "%I2PPath%" i2p.exe
|
||||
start "i2p" /D "%I2PPath%" i2p.exe
|
||||
)
|
||||
|
||||
|
8
src/win/test.bat
Normal file
8
src/win/test.bat
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
SET MYPATH=%~dp0
|
||||
|
||||
call "%MYPATH%common.bat"
|
||||
|
||||
set TEST=TEST
|
||||
|
||||
echo testing: %TEST% path to me: %MYPATH% path to I2P %I2PPath%
|
8
unsigned.sh
Normal file
8
unsigned.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
./clean.sh
|
||||
wsl make distclean
|
||||
wsl make clean-extensions
|
||||
wsl make extensions
|
||||
./build.sh
|
||||
wsl make
|
Reference in New Issue
Block a user