diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a2903aa --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,245 @@ +name: Release + +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - '*.*.*' # Release 1.2.3 + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: dependencies + run: sudo apt install gettext golang-go git ant + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + - name : Generate override.properties + run: | + rm -f override.properties + echo "build.built-by=GitHub Actions" >> override.properties + echo "noExe=true" >> override.properties + - name: install crx3 + run: go install github.com/mediabuyerbot/go-crx3/crx3@latest + - name: install dzip + run: go install github.com/delicb/dzip@latest + - name: install amo-version + run: go install github.com/eyedeekay/amo-version@a4f4119eac453a14d6b6184b656320eb72b5da3c + - name: install manifest-json-version + run: go install github.com/eyedeekay/manifest-json-version@latest + - run: git clone https://github.com/i2p/i2p.i2p ../i2p.i2p + - run: cd ../i2p.i2p && ant builddep + - name: build with Ant + run: | + export PATH=$PATH:$(go env GOPATH)/bin + ant distclean jpackage debian + - name: Upload Firefox Profile Strict + uses: actions/upload-artifact@v4 + with: + name: i2p.firefox.base.profile-${{ github.sha }}.zip + path: ./src/i2p.firefox.base.profile.zip + - name: Upload Firefox Profile Usability + uses: actions/upload-artifact@v4 + with: + name: i2p.firefox.usability.profile-${{ github.sha }}.zip + path: ./src/i2p.firefox.usability.profile.zip + - name: Upload Chromium Profile Strict + uses: actions/upload-artifact@v4 + with: + name: i2p.chromium.base.profile-${{ github.sha }}.zip + path: ./src/i2p.chromium.base.profile.zip + - name: Upload Chromium Profile Usability + uses: actions/upload-artifact@v4 + with: + name: i2p.chromium.usability.profile-${{ github.sha }}.zip + path: ./src/i2p.chromium.usability.profile.zip + - name: Upload i2pfirefox.jar + uses: actions/upload-artifact@v4 + with: + name: i2pfirefox-${{ github.sha }}.jar + path: ./src/build/i2pfirefox.jar + - name: Upload i2pfirefox-plugin.jar + uses: actions/upload-artifact@v4 + with: + name: i2pfirefox-plugin-${{ github.sha }}.jar + path: ./src/build/i2pfirefox-plugin.jar + - name: Upload i2pbrowser.tar.gz + uses: actions/upload-artifact@v4 + with: + name: i2pbrowser-${{ github.sha }}.tar.gz + path: ./i2pbrowser.tar.gz + - name: Upload i2pbrowser.deb + uses: actions/upload-artifact@v4 + with: + name: i2pbrowser_${{ github.sha }}_amd64.deb + path: ./i2pbrowser_1.0.0_amd64.deb + - name: build plugin with Ant + run: | + export PATH=$PATH:$(go env GOPATH)/bin + ant distclean pluginzip + - name: Upload i2pfirefox.zip (unsigned plugin) + uses: actions/upload-artifact@v4 + with: + name: i2pfirefox-${{ github.sha }}.zip + path: ./plugin.zip + - name: Run release upload script + run: | + ./preprelease.sh + ./release.sh + + + buildrpm: + runs-on: ubuntu-latest + container: fedora + + steps: + - name: dependencies + run: sudo yum install -y gettext golang-go git ant jq wget curl gpg xz ca-certificates rpm-build + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + - run: echo [Adoptium] >> /etc/yum.repos.d/adoptium.repo + - run: echo name=Adoptium >> /etc/yum.repos.d/adoptium.repo + - run: . /etc/os-release; echo baseurl=https://packages.adoptium.net/artifactory/rpm/fedora/$VERSION_ID/x86_64/ >> /etc/yum.repos.d/adoptium.repo + - run: echo enabled=1 >> /etc/yum.repos.d/adoptium.repo + - run: echo gpgcheck=1 >> /etc/yum.repos.d/adoptium.repo + - run: echo gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public >> /etc/yum.repos.d/adoptium.repo + - run: dnf clean all && rm -r /var/cache/dnf && dnf upgrade -y && dnf update -y + - run: dnf install -y temurin-21-jdk + - name: Generate override.properties + run: | + rm -f override.properties + echo "build.built-by=GitHub Actions" >> override.properties + echo "noExe=true" >> override.properties + - name: install crx3 + run: go install github.com/mediabuyerbot/go-crx3/crx3@latest + - name: install dzip + run: go install github.com/delicb/dzip@latest + - name: install amo-version + run: go install github.com/eyedeekay/amo-version@a4f4119eac453a14d6b6184b656320eb72b5da3c + - name: install manifest-json-version + run: go install github.com/eyedeekay/manifest-json-version@latest + - run: git clone https://github.com/i2p/i2p.i2p ../i2p.i2p + - run: cd ../i2p.i2p && ant builddep + - name: build with Ant + run: | + export PATH=$PATH:$(go env GOPATH)/bin + ant distclean jpackage fedora + find . -name '*.rpm' + - name: Upload i2pbrowser.rpm + uses: actions/upload-artifact@v4 + with: + name: i2pbrowser-${{ github.sha }}.x86_64.rpm + path: ./i2pbrowser-1.0.0-1.x86_64.rpm + + + buildwin: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + - uses: actions/setup-go@v5 + with: + go-version: '1.21' + - name : Generate override.properties + run: | + bash -c 'rm -f override.properties' + bash -c 'echo "build.built-by=GitHub Actions" >> override.properties' + bash -c 'echo "noExe=true" >> override.properties' + - name: install crx3 + run: go install github.com/mediabuyerbot/go-crx3/crx3@latest + - name: install dzip + run: go install github.com/delicb/dzip@latest + - name: install amo-version + run: go install github.com/eyedeekay/amo-version@a4f4119eac453a14d6b6184b656320eb72b5da3c + - name: install manifest-json-version + run: go install github.com/eyedeekay/manifest-json-version@latest + - run: git clone https://github.com/i2p/i2p.i2p ../i2p.i2p + - run: cd ../i2p.i2p && ant builddep + - name: build exe with Ant + run: | + ant windows + bash -c 'ls *.exe' + - name: Upload Firefox Profile EXE Installer + uses: actions/upload-artifact@v4 + with: + name: i2pbrowser-1.0.0-${{ github.sha }}.exe + path: ./i2pbrowser-1.0.0.exe + - name: build msi with Ant + run: | + ant windows-msi + bash -c 'ls *.msi' + - name: Upload Firefox Profile MSI Installer + uses: actions/upload-artifact@v4 + with: + name: i2pbrowser-1.0.0-${{ github.sha }}.msi + path: ./i2pbrowser-1.0.0.msi + - name: build portable zip with Ant + run: | + ant windows-portable + bash -c 'ls *.zip' + - name: Upload Firefox Profile Portable Zip + uses: actions/upload-artifact@v4 + with: + name: i2pbrowser-portable-${{ github.sha }}.zip + path: ./i2pbrowser-portable.zip + + buildmac: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + - uses: actions/setup-go@v5 + with: + go-version: '1.21' + - name : Generate override.properties + run: | + bash -c 'rm -f override.properties' + bash -c 'echo "build.built-by=GitHub Actions" >> override.properties' + bash -c 'echo "noExe=true" >> override.properties' + - name: install crx3 + run: go install github.com/mediabuyerbot/go-crx3/crx3@latest + - name: install dzip + run: go install github.com/delicb/dzip@latest + - name: install amo-version + run: go install github.com/eyedeekay/amo-version@a4f4119eac453a14d6b6184b656320eb72b5da3c + - name: install manifest-json-version + run: go install github.com/eyedeekay/manifest-json-version@latest + - run: git clone https://github.com/i2p/i2p.i2p ../i2p.i2p + - run: cd ../i2p.i2p && ant builddep + - name: build dmg with Ant + run: | + ant macos + bash -c 'ls *.dmg' + - name: Upload Firefox Profile DMG Installer + uses: actions/upload-artifact@v4 + with: + name: i2pbrowser-1.0.0-${{ github.sha }}.dmg + path: ./i2pbrowser-1.0.0.dmg + - name: build pkg with Ant + run: | + ant macos-pkg + bash -c 'ls *.pkg' + - name: Upload Firefox Profile PKG Installer + uses: actions/upload-artifact@v4 + with: + name: i2pbrowser-1.0.0-${{ github.sha }}.pkg + path: ./i2pbrowser-1.0.0.pkg \ No newline at end of file diff --git a/config.sh b/config.sh index 2461f96..503a970 100755 --- a/config.sh +++ b/config.sh @@ -3,4 +3,4 @@ export GITHUB_USER=eyedeekay export GITHUB_REPO=i2p.plugins.firefox export GITHUB_NAME="Updates extensions, plugin support temporarily removed(Stay on the old version)" export GITHUB_DESCRIPTION=$(cat CHANGES.md VERSION.md) -export GITHUB_TAG=1.3.0 \ No newline at end of file +export GITHUB_TAG=1.3.1 \ No newline at end of file diff --git a/i2p.plugins.firefox.torrent b/i2p.plugins.firefox.torrent index 32ec2ed..bd29aa4 100644 Binary files a/i2p.plugins.firefox.torrent and b/i2p.plugins.firefox.torrent differ diff --git a/preprelease.sh b/preprelease.sh index bacace0..2ba4136 100755 --- a/preprelease.sh +++ b/preprelease.sh @@ -12,4 +12,4 @@ READMELINE=`grep 'i2p.plugins.firefox/releases/download' docs/OSX.md | grep i2pf sed -i "s|${READMELINE}|wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/${GITHUB_TAG}/i2pfirefox.zip|g" docs/OSX.md sed -i "s|${NUMLINE}| |g" build.xml edgar && git push --all -ant distclean versionMd jar plugin torrent freeZip jpackage debian fedora tarball +ant distclean versionMd jar plugin torrent freeZip jpackage debian tarball diff --git a/scripts/build.number b/scripts/build.number index c831c6c..b10043d 100644 --- a/scripts/build.number +++ b/scripts/build.number @@ -1,3 +1,3 @@ #Build Number for ANT. Do not edit! -#Thu Mar 07 11:33:56 EST 2024 -build.number=700 +#Thu Mar 07 12:01:15 EST 2024 +build.number=707 diff --git a/src/plugin/net/i2p/i2pfirefox/plugin/plugin/I2PBrowserPlugin.java b/src/plugin/net/i2p/i2pfirefox/plugin/plugin/I2PBrowserPlugin.java index 2440f4c..1103292 100644 --- a/src/plugin/net/i2p/i2pfirefox/plugin/plugin/I2PBrowserPlugin.java +++ b/src/plugin/net/i2p/i2pfirefox/plugin/plugin/I2PBrowserPlugin.java @@ -42,7 +42,8 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp { private static final String PROP_DTG_ENABLED = "desktopgui.enabled"; private final File pluginDir; private final File profileDir; - private MenuHandle lmh; + private MenuHandle lmhs; + private MenuHandle lmhf; public I2PBrowserPlugin() { _context = new I2PAppContext(); _mgr = null; @@ -74,7 +75,8 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp { } catch (InterruptedException ie) { } if (dtg != null) { - dtg.removeMenu(lmh); + dtg.removeMenu(lmhs); + dtg.removeMenu(lmhf); } } changeState(ClientAppState.STOPPED); @@ -101,9 +103,12 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp { } if (dtg != null) { _log.info("I2P Browser integrating with I2P tray manager"); - lmh = dtg.addMenu("Launch I2P Browser", new Starter(dtg)); - dtg.showMenu(lmh); - dtg.enableMenu(lmh); + lmhs = dtg.addMenu("Launch I2P Browser (Safe Mode)", new Starter(dtg)); + dtg.showMenu(lmhs); + dtg.enableMenu(lmhs); + lmhf = dtg.addMenu("Launch I2P Browser (Flexible Mode)", new FlexStarter(dtg)); + dtg.showMenu(lmhf); + dtg.enableMenu(lmhf); } else { _log.info("I2P Browser tray manager not found"); } @@ -174,6 +179,26 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp { } } + public class FlexStarter implements MenuCallback { + private final MenuService _ms; + public Starter(MenuService ms) { _ms = ms; } + public void clicked(MenuHandle menu) { + // Thread t = new I2PAppThread(new StarterThread(), + //"I2PBrowser-Launcher start", true); + // t.start(); + _log.info("I2P Browser starting up"); + try { + I2PBrowser i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath()); + i2pBrowser.usability = true; + String[] args = {"http://proxy.i2p"}; + i2pBrowser.launchFirefox(0, args); + } catch (Exception e) { + _log.error("Error starting I2P Browser", e); + } + _log.info("I2P Browser ran"); + } + } + public class StarterThread implements Runnable { public void run() { _log.info("I2P Browser starting up");