Compare commits

..

13 Commits

Author SHA1 Message Date
eyedeekay
b4c4c20d74 try pinning the older version of crx3 2024-08-20 21:35:32 -04:00
eyedeekay
d874caa490 update extensions, add launcher 2024-08-20 20:59:11 -04:00
eyedeekay
baec921a37 Enable systray on XFCE 2024-07-08 21:29:48 -04:00
eyedeekay
fd0bfb8b3d bail out of search earlier if we start in home 2024-07-08 17:39:29 -04:00
eyedeekay
6ac3a2eb55 Don't search the whole home directory for usable Firefoxes 2024-07-08 17:15:43 -04:00
eyedeekay
50de466282 Don't search the whole home directory for usable Firefoxes 2024-07-08 17:08:48 -04:00
eyedeekay
ad61d69be0 Update changelog 2024-07-08 17:02:39 -04:00
eyedeekay
8b1e908bc1 clangFmt 2024-07-08 16:59:28 -04:00
eyedeekay
19fb2f5378 If this.chromium=false(default) this.firefox=true(also default) 2024-07-08 16:57:33 -04:00
eyedeekay
e0d0a537e7 If this.chromium=false(default) this.firefox=true(also default) 2024-07-08 16:57:02 -04:00
eyedeekay
b4371dad07 clangFmt 2024-07-08 16:16:00 -04:00
eyedeekay
fbbaffddb9 Null check the directory when searching for nearby browsers. 2024-07-08 16:15:19 -04:00
eyedeekay
7f409bfc1f update plugins. Use user's homedir if we're not running in a jpackage. 2024-07-08 13:03:57 -04:00
11 changed files with 93 additions and 69 deletions

View File

@@ -24,7 +24,7 @@ jobs:
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
run: go install github.com/mediabuyerbot/go-crx3/crx3@v1.4.1
- name: install dzip
run: go install github.com/delicb/dzip@latest
- name: install amo-version
@@ -115,7 +115,7 @@ jobs:
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
run: go install github.com/mediabuyerbot/go-crx3/crx3@v1.4.1
- name: install dzip
run: go install github.com/delicb/dzip@latest
- name: install amo-version
@@ -155,7 +155,7 @@ jobs:
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
run: go install github.com/mediabuyerbot/go-crx3/crx3@v1.4.1
- name: install dzip
run: go install github.com/delicb/dzip@latest
- name: install amo-version
@@ -211,7 +211,7 @@ jobs:
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
run: go install github.com/mediabuyerbot/go-crx3/crx3@v1.4.1
- name: install dzip
run: go install github.com/delicb/dzip@latest
- name: install amo-version

View File

@@ -1,3 +1,10 @@
Mon, July 8
-----------
- Fix a bug which caused the profile manager to fail to detect Firefox on some systems
- Fix a bug which caused the profile manager to use an unwritable directory on some systems
- Fix a bug where if user tried to run it from the home directory, the application would make sure that no firefoxes existed in any subdirectory before running
Thu, March 7
------------

View File

@@ -6,23 +6,23 @@ Extension Versions
```md
i2p-in-private-browsing
1.48
https://addons.mozilla.org/firefox/downloads/file/4123613/i2p_in_private_browsing-1.48.xpi
2.6.0
https://addons.mozilla.org/firefox/downloads/file/4339795/i2p_in_private_browsing-2.6.0.xpi
noscript
11.4.29
https://addons.mozilla.org/firefox/downloads/file/4206186/noscript-11.4.29.xpi
11.4.34
https://addons.mozilla.org/firefox/downloads/file/4333280/noscript-11.4.34.xpi
localcdn-fork-of-decentraleyes
2.6.65
https://addons.mozilla.org/firefox/downloads/file/4251866/localcdn_fork_of_decentraleyes-2.6.65.xpi
2.6.72
https://addons.mozilla.org/firefox/downloads/file/4336546/localcdn_fork_of_decentraleyes-2.6.72.xpi
onion-in-container-browsing
0.82
https://addons.mozilla.org/firefox/downloads/file/3904685/onion_in_container_browsing-0.82.xpi
javascript-restrictor
0.17
https://addons.mozilla.org/firefox/downloads/file/4190089/javascript_restrictor-0.17.xpi
0.19
https://addons.mozilla.org/firefox/downloads/file/4339678/javascript_restrictor-0.19.xpi
ublock-origin
1.57.0
https://addons.mozilla.org/firefox/downloads/file/4257361/ublock_origin-1.57.0.xpi
1.59.0
https://addons.mozilla.org/firefox/downloads/file/4328681/ublock_origin-1.59.0.xpi
```
## Chromium
@@ -32,15 +32,15 @@ __MSG_extensionName__
1.29
https://clients2.google.com/service/update2/crx
NoScript
11.4.18
11.4.33
https://clients2.google.com/service/update2/crx
LocalCDN
2.6.65
2.6.72
https://clients2.google.com/service/update2/crx
uBlock Origin
1.57.0
1.59.0
https://clients2.google.com/service/update2/crx
__MSG_extensionName__
0.17
0.19
https://clients2.google.com/service/update2/crx
```

View File

@@ -328,7 +328,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<target name="buildNum">
<buildnumber file="scripts/build.number" />
<property name="release.number" value="1.5.0" />
<property name="release.number" value="1.4.991" />
<exec executable="echo" osfamily="unix">
<arg value="${release.number}-${build.number}" />
</exec>
@@ -522,6 +522,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
<exec executable="rm" failonerror="true" osfamily="windows">
<arg value="-rf" />
@@ -557,6 +558,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="1.0.0"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
@@ -574,6 +576,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--icon"/> <arg value="src/icon.png"/>
<arg value="--app-version"/> <arg value="${release.number}"/>
<arg value="--input"/> <arg value="src/build"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
</exec>
@@ -592,6 +595,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="fedora-release" depends="jar">
@@ -608,6 +612,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="windows" depends="jar">
@@ -628,6 +633,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="windows-release" depends="jar">
@@ -648,6 +654,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="windows-msi" depends="jar">
@@ -668,6 +675,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="windows-msi-release" depends="jar">
@@ -688,6 +696,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="windows-portable" depends="jar">
@@ -700,6 +709,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
<copy file="LICENSE.md" todir="i2pbrowser-portable" overwrite="true"/>
<delete file="i2pbrowser-portable.zip"/>
@@ -719,6 +729,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
<copy file="LICENSE.md" todir="i2pbrowser-portable" overwrite="true"/>
<delete file="i2pbrowser-portable.zip"/>
@@ -742,6 +753,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="macos-release" depends="jar">
@@ -757,6 +769,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="macos-pkg" depends="jar">
@@ -772,6 +785,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>
<target name="macos-pkg-release" depends="jar">
@@ -787,6 +801,7 @@ Linux(because the top command will be run and the script will exit).\n\nBoth det
<arg value="--input"/> <arg value="src/build"/>
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
<arg value="--add-launcher"/> <arg value="i2pbrowser-usability=src/usability.properties"/>
</exec>
</target>

View File

@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Thu Apr 04 12:21:54 EDT 2024
build.number=722
#Tue Aug 20 20:53:41 EDT 2024
build.number=731

View File

@@ -253,6 +253,8 @@ public class I2PBrowser extends I2PGenericUnsafeBrowser {
}
}
}
if (!this.chromium)
this.firefox = true;
}
return visitURL;
}

View File

@@ -295,7 +295,7 @@ public class I2PChromium extends I2PChromiumProfileUnpacker {
}
// now, do the same thing, but with user.dir instead of plugin
// list the directories in the user.dir directory
File userDir = new File(System.getProperty("user.dir"));
File userDir = userHomeDir();
if (userDir.exists()) {
if (isWindows()) {
File searchResult = searchFile(userDir, "ungoogled-chromium.exe");

View File

@@ -194,15 +194,17 @@ public class I2PCommonBrowser {
*
* @return the log file for the browser launcher
*/
/*private File logFile() {
// validateUserDirectory();
String userDirectory = System.getProperty("user.dir");
File logDirectory = new File(userDirectory, "logs");
if (!logDirectory.exists()) {
logDirectory.mkdirs();
}
return new File(logDirectory, "browserlauncher.log");
}*/
/*
* private File logFile() {
* // validateUserDirectory();
* String userDirectory = System.getProperty("user.dir");
* File logDirectory = new File(userDirectory, "logs");
* if (!logDirectory.exists()) {
* logDirectory.mkdirs();
* }
* return new File(logDirectory, "browserlauncher.log");
* }
*/
/**
* Get the runtime directory, creating it if create=true.
@@ -225,7 +227,7 @@ public class I2PCommonBrowser {
* Returns the runtime directory path based on the given override parameter.
*
* @param override the name of the environment variable to override the
* runtime
* runtime
* directory
* @return the runtime directory path as a string
*/
@@ -588,6 +590,13 @@ public class I2PCommonBrowser {
* @return the found file or null if not found
*/
public File searchFile(File directory, String search) {
File hd = new File(System.getProperty("user.home"));
if (hd != null) {
if (directory.getAbsolutePath().equals(hd.getAbsolutePath()))
return null;
}
if (directory == null || !directory.exists() || !directory.canRead())
return null;
if (directory.isDirectory()) {
File[] files = directory.listFiles();
for (File file : files) {
@@ -602,4 +611,18 @@ public class I2PCommonBrowser {
}
return null;
}
public File userHomeDir() {
File rd = new File(System.getProperty("user.dir"));
File hd = new File(System.getProperty("user.home"));
if (rd == null || !rd.exists()) {
if (hd == null || !hd.exists()) {
if (rd.getAbsolutePath().equals(hd.getAbsolutePath()))
return null;
}
return rd;
}
logger.info("Runtime directory discovered at: " + rd);
return rd;
}
}

View File

@@ -292,7 +292,7 @@ public class I2PFirefox extends I2PFirefoxProfileUnpacker {
}
// now, do the same thing, but with user.dir instead of plugin
// list the directories in the user.dir directory
File userDir = new File(System.getProperty("user.dir"));
File userDir = userHomeDir();
if (userDir.exists()) {
if (isWindows()) {
File searchResult = searchFile(userDir, "firefox-esr.exe");

View File

@@ -42,13 +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 SafeHandleLauncher;
private MenuHandle FlexibleHandleLauncher;
// MenuHandles for app-mode launchers
private MenuHandle ConsoleHandleLauncher;
private MenuHandle SnarkHandleLauncher;
private MenuHandle SusimailHandleLauncher;
private MenuHandle TunnelHanleLauncher;
private MenuHandle lmhs;
private MenuHandle lmhf;
/**
* @since 1.4.0
* @return
@@ -105,8 +100,8 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
} catch (InterruptedException ie) {
}
if (dtg != null) {
dtg.removeMenu(SafeHandleLauncher);
dtg.removeMenu(FlexibleHandleLauncher);
dtg.removeMenu(lmhs);
dtg.removeMenu(lmhf);
}
}
changeState(ClientAppState.STOPPED);
@@ -137,14 +132,14 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
}
if (dtg != null) {
_log.info("I2P Browser integrating with I2P tray manager");
SafeHandleLauncher =
lmhs =
dtg.addMenu("Launch I2P Browser (Safe Mode)", new Starter(dtg));
dtg.showMenu(SafeHandleLauncher);
dtg.enableMenu(SafeHandleLauncher);
FlexibleHandleLauncher = dtg.addMenu("Launch I2P Browser (Flexible Mode)",
dtg.showMenu(lmhs);
dtg.enableMenu(lmhs);
lmhf = dtg.addMenu("Launch I2P Browser (Flexible Mode)",
new FlexStarter(dtg));
dtg.showMenu(FlexibleHandleLauncher);
dtg.enableMenu(FlexibleHandleLauncher);
dtg.showMenu(lmhf);
dtg.enableMenu(lmhf);
} else {
_log.info("I2P Browser tray manager not found");
}
@@ -157,26 +152,6 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
}
}
public MenuHandle addMenuHandle(String launchMessage){
try {
_log.info(
"Starting I2P Browser tray manager by testing http://proxy.i2p");
MenuService dtg = startTrayApp();
if (dtg != null) {
_log.info("I2P Browser integrating with I2P tray manager");
MenuHandle handle =
dtg.addMenu(launchMesssage, new Starter(dtg));
dtg.showMenu(SafeHandleLauncher);
dtg.enableMenu(SafeHandleLauncher);
return handle;
} else {
_log.info("I2P Browser tray manager not found");
}
} catch (Exception e) {
_log.error("Error starting I2P Browser tray manager", e);
}
}
// Copied directly from I2PSnark-standalone
/**
* @since 1.4.0
@@ -215,7 +190,7 @@ public class I2PBrowserPlugin extends I2PBrowser implements ClientApp {
// Ubuntu GNOME does not work, SystemTray.isSupported() returns false
String xdg = System.getenv("XDG_CURRENT_DESKTOP");
boolean dflt = SystemVersion.isWindows() || SystemVersion.isMac() ||
//"XFCE".equals(xdg) ||
"XFCE".equals(xdg) ||
"KDE".equals(xdg) || "LXDE".equals(xdg);
return _context.getProperty(PROP_DTG_ENABLED, dflt);
}

2
src/usability.properties Normal file
View File

@@ -0,0 +1,2 @@
main-class=net.i2p.i2pfirefox.I2PBrowser
arguments=-usability