Add plugin zip to CI
This commit is contained in:
7
.github/workflows/ant.yml
vendored
7
.github/workflows/ant.yml
vendored
@ -36,7 +36,7 @@ jobs:
|
||||
- name: build with Ant
|
||||
run: |
|
||||
export PATH=$PATH:$(go env GOPATH)/bin
|
||||
ant distclean jpackage debian
|
||||
ant distclean jpackage debian pluginzip
|
||||
- name: Upload Firefox Profile Strict
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
@ -77,6 +77,11 @@ jobs:
|
||||
with:
|
||||
name: i2pbrowser_${{ github.sha }}_amd64.deb
|
||||
path: ./i2pbrowser_1.0.0_amd64.deb
|
||||
- name: Upload i2pfirefox.zip (unsigned plugin)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: i2pfirefox-${{ github.sha }}_amd64.zip
|
||||
path: ./plugin.zip
|
||||
|
||||
|
||||
buildrpm:
|
||||
|
52
build.xml
52
build.xml
@ -340,6 +340,51 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="pluginzip" depends="all, buildNum">
|
||||
<delete>
|
||||
<!-- in installer but not update -->
|
||||
<fileset dir="plugin/" includes="i2ptunnel.config i2pfirefox.config eepsite/docroot/index.html eepsite/docroot/robots.txt" />
|
||||
</delete>
|
||||
<delete dir="plugin/eepsite/docroot/torrents/" />
|
||||
<!-- get version number -->
|
||||
|
||||
|
||||
<!-- make the update xpi2p -->
|
||||
<!-- this contains everything except i2ptunnel.config -->
|
||||
<copy file="LICENSE.md" todir="plugin/" overwrite="true" />
|
||||
<copy file="README.md" todir="plugin/" overwrite="true" />
|
||||
<copy file="CHANGES.md" todir="plugin/" overwrite="true" />
|
||||
<copy file="scripts/plugin.config" todir="plugin/" overwrite="true" />
|
||||
<mkdir dir="plugin/lib/" />
|
||||
<copy file="src/build/i2pfirefox.jar" todir="plugin/lib/" overwrite="true" />
|
||||
<copy file="src/build/i2pfirefox-plugin.jar" todir="plugin/lib/" overwrite="true" />
|
||||
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
|
||||
<arg value="update-only=true" />
|
||||
</exec>
|
||||
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
|
||||
<arg value="version=${release.number}-${build.number}" />
|
||||
</exec>
|
||||
<input message="Enter su3 signing key password:" addproperty="release.password.su3" />
|
||||
<fail message="You must enter a password." >
|
||||
<condition>
|
||||
<equals arg1="${release.password.su3}" arg2=""/>
|
||||
</condition>
|
||||
</fail>
|
||||
|
||||
<!-- make the install xpi2p -->
|
||||
<copy file="scripts/plugin.config" todir="plugin/" overwrite="true" />
|
||||
<!-- Files in installer but not update. Be sure to Add to delete fileset above and clean target below -->
|
||||
<copy file="scripts/i2ptunnel.config" todir="plugin/" overwrite="true" />
|
||||
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
|
||||
<arg value="version=${release.number}-${build.number}" />
|
||||
</exec>
|
||||
<exec executable="zip">
|
||||
<arg value="-r"/>
|
||||
<arg value="plugin.zip"/>
|
||||
<arg value="plugin"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="plugin" depends="all, buildNum">
|
||||
<delete>
|
||||
<!-- in installer but not update -->
|
||||
@ -370,12 +415,6 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
||||
<equals arg1="${release.password.su3}" arg2=""/>
|
||||
</condition>
|
||||
</fail>
|
||||
<!-- this will fail if no su3 keys exist, as it needs the password twice -->
|
||||
<exec executable="scripts/makeplugin.sh" inputstring="${release.password.su3}" failonerror="true" >
|
||||
<arg value="plugin" />
|
||||
</exec>
|
||||
<move file="i2pfirefox.xpi2p" tofile="i2pfirefox-update.xpi2p" overwrite="true" />
|
||||
<move file="i2pfirefox.su3" tofile="i2pfirefox-update.su3" overwrite="true" />
|
||||
|
||||
<!-- make the install xpi2p -->
|
||||
<copy file="scripts/plugin.config" todir="plugin/" overwrite="true" />
|
||||
@ -384,6 +423,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
|
||||
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
|
||||
<arg value="version=${release.number}-${build.number}" />
|
||||
</exec>
|
||||
|
||||
<exec executable="scripts/makeplugin.sh" inputstring="${release.password.su3}" failonerror="true" >
|
||||
<arg value="plugin" />
|
||||
</exec>
|
||||
|
@ -1,3 +1,3 @@
|
||||
#Build Number for ANT. Do not edit!
|
||||
#Mon Mar 04 20:11:29 EST 2024
|
||||
build.number=640
|
||||
#Tue Mar 05 16:05:51 EST 2024
|
||||
build.number=649
|
||||
|
@ -55,27 +55,30 @@ public class I2PBrowser extends I2PGenericUnsafeBrowser {
|
||||
private boolean outputConfig = false;
|
||||
private boolean useSystray = true;
|
||||
|
||||
private void launchFirefox(int privateWindow, String[] url) {
|
||||
logger.info("I2PFirefox" + privateWindow);
|
||||
public void launchFirefox(int privateWindow, String[] url) {
|
||||
String priv = privateWindow == 1 ? "private-window" : "long-profile";
|
||||
logger.info("I2PFirefox" + priv);
|
||||
i2pFirefox.usability = usability;
|
||||
if (outputConfig)
|
||||
i2pFirefox.storeFirefoxDefaults();
|
||||
i2pFirefox.launch(privateWindow, url);
|
||||
}
|
||||
private void launchChromium(int privateWindow, String[] url) {
|
||||
logger.info("I2PChromium" + privateWindow);
|
||||
public void launchChromium(int privateWindow, String[] url) {
|
||||
String priv = privateWindow == 1 ? "private-window" : "long-profile";
|
||||
logger.info("I2PChromium" + priv);
|
||||
i2pChromium.usability = usability;
|
||||
if (outputConfig)
|
||||
i2pChromium.storeChromiumDefaults();
|
||||
i2pChromium.launch(privateWindow, url);
|
||||
}
|
||||
private void launchGeneric(int privateWindowInt, String[] url) {
|
||||
String priv = privateWindowInt == 1 ? "private-window" : "long-profile";
|
||||
boolean privateWindow = false;
|
||||
if (privateWindowInt == 1)
|
||||
privateWindow = true;
|
||||
if (outputConfig)
|
||||
i2pGeneral.storeGenericDefaults();
|
||||
logger.info("I2PGeneric" + privateWindowInt);
|
||||
logger.info("I2PGeneric" + priv);
|
||||
i2pGeneral.launch(privateWindow, url);
|
||||
}
|
||||
|
||||
|
@ -52,6 +52,9 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
||||
pluginDir = new File(_context.getAppDir(), "plugins/i2pfirefox/");
|
||||
profileDir = new File(pluginDir, "profile/");
|
||||
i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath());
|
||||
i2pBrowser.firefox = true;
|
||||
i2pBrowser.chromiumFirst = false;
|
||||
i2pBrowser.generic = false;
|
||||
}
|
||||
public I2PBrowserPlugin(I2PAppContext ctx, ClientAppManager mgr,
|
||||
String args[]) {
|
||||
@ -62,6 +65,9 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
||||
pluginDir = new File(_context.getAppDir(), "plugins/i2pfirefox/");
|
||||
profileDir = new File(pluginDir, "profile/");
|
||||
i2pBrowser = new I2PBrowser(profileDir.getAbsolutePath());
|
||||
i2pBrowser.firefox = true;
|
||||
i2pBrowser.chromiumFirst = false;
|
||||
i2pBrowser.generic = false;
|
||||
}
|
||||
public String getDisplayName() { return "I2P Browser"; }
|
||||
public String getName() { return "I2P Browser"; }
|
||||
@ -69,7 +75,6 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
||||
if (i2pBrowser == null)
|
||||
return ClientAppState.STOPPED;
|
||||
if (!isSystrayEnabled())
|
||||
return ClientAppState.STOPPED;
|
||||
if (!i2pBrowser.running())
|
||||
return ClientAppState.STOPPED;
|
||||
if (i2pBrowser.running())
|
||||
@ -78,7 +83,7 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
||||
}
|
||||
public void shutdown(String[] args) {
|
||||
if (!isSystrayEnabled()) {
|
||||
System.out.println("I2P Browser tray manager not supported");
|
||||
i2pBrowser.logger.info("I2P Browser tray manager not supported");
|
||||
i2pBrowser.stop();
|
||||
changeState(ClientAppState.STOPPED);
|
||||
return;
|
||||
@ -86,10 +91,10 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
||||
}
|
||||
public void startup() {
|
||||
if (!isSystrayEnabled()) {
|
||||
System.out.println("I2P Browser tray manager not supported");
|
||||
i2pBrowser.logger.info("I2P Browser tray manager not supported");
|
||||
try {
|
||||
String url = "http://proxy.i2p";
|
||||
i2pBrowser.launch(false, new String[] {url});
|
||||
i2pBrowser.launchFirefox(0, new String[] {url});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -97,14 +102,14 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
||||
}
|
||||
try {
|
||||
String url = "http://proxy.i2p";
|
||||
System.out.println(
|
||||
i2pBrowser.logger.info(
|
||||
"Starting I2P Browser tray manager by testing http://proxy.i2p");
|
||||
MenuService dtg = startTrayApp();
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException ie) {
|
||||
}
|
||||
i2pBrowser.launch(false, new String[] {url});
|
||||
i2pBrowser.launchFirefox(0, new String[] {url});
|
||||
if (dtg != null) {
|
||||
dtg.addMenu("Launch I2P Browser", new Starter(dtg));
|
||||
dtg.addMenu("Quit I2P Browser", new Stopper(dtg));
|
||||
@ -131,7 +136,7 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
||||
}
|
||||
|
||||
// Copied directly from I2PSnark-standalone where it is used to determine
|
||||
// whether to launch the tray app Our environment should basically never be
|
||||
// whether to launchFirefox the tray app Our environment should basically never be
|
||||
// headless, that doesn't make any sense, but something tells me I should
|
||||
// leave that check in.
|
||||
private boolean isSystrayEnabled() {
|
||||
@ -171,7 +176,7 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
|
||||
*/
|
||||
public class StarterThread implements Runnable {
|
||||
public void run() {
|
||||
i2pBrowser.launch(false);
|
||||
i2pBrowser.launchFirefox(0, null);
|
||||
changeState(ClientAppState.RUNNING);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user