From 0f043231afd3340252ab1e1c5d73eecca402da9c Mon Sep 17 00:00:00 2001 From: idk Date: Fri, 19 Mar 2021 16:22:42 -0400 Subject: [PATCH] beautify readme a little. Add a script to fetch the latest addon updates at build time. Outline the Unix support. Priortize local appdata, then roaming appdata, then program files for router.config. --- .gitignore | 2 ++ HTTPSEverywhere.url | 2 +- Makefile | 34 +++++++++++++++++++++++++- NoScript.url | 2 +- README | 40 ------------------------------- amo-version.sh | 3 +++ i2psetproxy.url | 2 +- src/nsis/i2pbrowser-installer.nsi | 6 ++--- 8 files changed, 44 insertions(+), 47 deletions(-) delete mode 100644 README create mode 100755 amo-version.sh diff --git a/.gitignore b/.gitignore index 378eac2..cd9f25e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ build +*.deb +*.tgz \ No newline at end of file diff --git a/HTTPSEverywhere.url b/HTTPSEverywhere.url index 6332e68..5ba3d83 100644 --- a/HTTPSEverywhere.url +++ b/HTTPSEverywhere.url @@ -1 +1 @@ -https://www.eff.org/files/https-everywhere-latest.xpi +https://addons.mozilla.org/firefox/downloads/file/3716461/2021.1.27/https_everywhere-2021.1.27-an+fx.xpi diff --git a/Makefile b/Makefile index af67eb8..086030b 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ build/licenses: build unix2dos build/licenses/LICENSE.index clean: - rm -rf build app-profile-*.tgz profile-*.tgz I2P-Profile-Installer-*.exe + rm -rf build app-profile-*.tgz profile-*.tgz I2P-Profile-Installer-*.exe *.deb build: @echo "creating build directory" @@ -85,6 +85,20 @@ build/NoScript.xpi: NoScript.url build/HTTPSEverywhere.xpi : HTTPSEverywhere.url curl `cat HTTPSEverywhere.url` > build/HTTPSEverywhere.xpi +clean-extensions: + rm -fv i2psetproxy.url NoScript.url HTTPSEverywhere.url + +extensions:HTTPSEverywhere.url NoScript.url i2psetproxy.url + +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/3674169/"`./amo-version.sh i2p-in-private-browsing`"/i2ppb@eyedeekay.github.io.xpi" > i2psetproxy.url + build/profile/extensions: build/profile mkdir -p build/profile/extensions @@ -124,3 +138,21 @@ uninstall: /usr/local/bin/i2pconfig \ /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" \ + --suggests="i2p,i2p-router,syndie,tor,tsocks" \ + --nodoc \ + --deldoc=yes \ + --deldesc=yes \ + --backup=no diff --git a/NoScript.url b/NoScript.url index da4df80..324dfa3 100644 --- a/NoScript.url +++ b/NoScript.url @@ -1 +1 @@ -https://secure.informaction.com/download/releases/noscript-11.1.6.xpi +https://addons.mozilla.org/firefox/downloads/file/3534184/11.2.3/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi diff --git a/README b/README deleted file mode 100644 index 6a53e0f..0000000 --- a/README +++ /dev/null @@ -1,40 +0,0 @@ -To build this, you will need the following software packages (all available in Debian) : - -* make -* nsis -* dos2unix -* curl - -Before you build, you should update the files "NoScript.url" -and "i2psetproxy.url" to point to the latest direct download -links of the respective plugins. "HTTPSEverywhere.url" now -points to the latest stable version of "HTTPS Everywhere" at -all times. If those have changed, `make clean` to ensure that -up to date versions are used in the build. - -After that just type "make". This will produce two files: - -profile.tgz - the firefox profile, plus a shell script which will -launch it if Firefox is found in the $PATH on Unix-Like operating -systems. -install.exe - the windows installer, which sets up shortcuts to -launch Firefox on Windows. - -To report issues against this browser profile, please file issues -at [the official Gitlab](https://i2pgit.org/i2p-hackers/i2p.firefox) -or the [Github Mirror](https://github.com/i2p/i2p.firefox). Issues -pertaining to the plugins may be reported to their upstream -maintainers if it's determined that our configuration is not at -fault. - -NoScript is developed on Github by `hackademix` and the community: - - https://github.com/hackademix/noscript - -HTTPS Everywhere is developed on Github by the EFF: - - https://github.com/EFForg/https-everywhere - -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 - - diff --git a/amo-version.sh b/amo-version.sh new file mode 100755 index 0000000..8f85dbe --- /dev/null +++ b/amo-version.sh @@ -0,0 +1,3 @@ +#! /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 '"' \ No newline at end of file diff --git a/i2psetproxy.url b/i2psetproxy.url index 69ec690..cc0855e 100644 --- a/i2psetproxy.url +++ b/i2psetproxy.url @@ -1 +1 @@ -https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox/releases/download/0.95/i2ppb@eyedeekay.github.io.xpi +https://addons.mozilla.org/firefox/downloads/file/3674169/0.98/i2ppb@eyedeekay.github.io.xpi diff --git a/src/nsis/i2pbrowser-installer.nsi b/src/nsis/i2pbrowser-installer.nsi index b556422..8072427 100644 --- a/src/nsis/i2pbrowser-installer.nsi +++ b/src/nsis/i2pbrowser-installer.nsi @@ -289,13 +289,13 @@ Section Install SetShellVarContext current Var /Global I2PAPPDATA + IfFileExists "$I2PINSTEXE\clients.config" 0 +2 + StrCpy $I2PAPPDATA "$I2PINSTEXE" IfFileExists "$APPDATA\I2P\clients.config.d" 0 +2 StrCpy $I2PAPPDATA "$APPDATA\I2P\" IfFileExists "$LOCALAPPDATA\I2P\clients.config.d" 0 +2 StrCpy $I2PAPPDATA "$LOCALAPPDATA\I2P\" - IfFileExists "$I2PINSTEXE\clients.config" 0 +2 - StrCpy $I2PAPPDATA "$I2PINSTEXE" - StrCpy $I2PAPPDATA "$I2PINSTEXE" + createDirectory "$I2PAPPDATA" SetOutPath "$I2PAPPDATA"