Compare commits
31 Commits
20220919.j
...
20220920.j
Author | SHA1 | Date | |
---|---|---|---|
51a7f0f1d7 | |||
99e3ddb05a | |||
13a5cab2c1 | |||
125b711de2 | |||
a267bb7d65 | |||
c5b2f958c2 | |||
56b8b5470f | |||
15cbddb5b0 | |||
c4bd64a559 | |||
f4f7935cdc | |||
afca98692a | |||
11914ff9aa | |||
4aa4763770 | |||
6b61213625 | |||
51873e9d62 | |||
a54feb9550 | |||
b485d0630f | |||
434546f24c | |||
3d80c32a31 | |||
7156974136 | |||
348c876c59 | |||
630e58ea0a | |||
96806ecc07 | |||
aef946f3c8 | |||
d49ec2330f | |||
0c304b0d11 | |||
3387c03bf4 | |||
037b1265d5 | |||
e68ea5f9ef | |||
51d2b7291e | |||
2d25264023 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -20,4 +20,5 @@ cmd
|
||||
*.so
|
||||
*.jar
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.tar.gz
|
||||
config_override.sh
|
1
Makefile
1
Makefile
@ -60,7 +60,6 @@ export I2P_JBIGI="../i2p.i2p.jpackage-build/installer/lib/jbigi"
|
||||
|
||||
distclean: clean
|
||||
rm -rf I2P
|
||||
git clean -fd
|
||||
|
||||
I2P:
|
||||
./build.sh
|
||||
|
3
build.sh
3
build.sh
@ -38,6 +38,9 @@ make src/I2P/config
|
||||
$JPACKAGE_OPTS \
|
||||
--resource-dir build \
|
||||
--app-content src/I2P/config \
|
||||
--app-content src/icons/windowsUIToopie2.png \
|
||||
--app-content src/icons/ui2pbrowser_icon.ico \
|
||||
--icon src/icons/windowsUIToopie2.png \
|
||||
--input build --main-jar launcher.jar --main-class net.i2p.router.WinLauncher
|
||||
|
||||
cp "$I2P_PKG/licenses/"* license/
|
||||
|
@ -1,3 +1,7 @@
|
||||
2022-09-20 idk
|
||||
* improve compatibility with local service installs and with un-bundled installs side-by-side with bundled intalls
|
||||
* version 1.9.7
|
||||
|
||||
2022-09-18 idk
|
||||
* remove unstable/deprecated targets from Makefile.
|
||||
* make it fatal if a jpackaged I2P is not found, the profile launcher is now part of the jpackage
|
||||
|
@ -36,12 +36,12 @@ fi
|
||||
TODAYSDATE=$(date +%Y%m%d)
|
||||
|
||||
if [ -z "$DESCRIPTION" ]; then
|
||||
DESCRIPTION="Daily unsigned build of i2p.firefox for $TODAYSDATE"
|
||||
DESCRIPTION+="==================================================="
|
||||
DESCRIPTION+=""
|
||||
DESCRIPTION+="These builds are automatically built on a daily basis and may have serious bugs."
|
||||
DESCRIPTION+="They are intended for testing purposes only, use them at your own risk."
|
||||
DESCRIPTION+=""
|
||||
DESCRIPTION="Daily unsigned build of i2p.firefox for $TODAYSDATE
|
||||
===================================================
|
||||
|
||||
These builds are automatically built on a daily basis and may have serious bugs.
|
||||
They are intended for testing purposes only, use them at your own risk.
|
||||
"
|
||||
fi
|
||||
|
||||
echo github-release release -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
|
||||
|
@ -11,11 +11,8 @@ if [ -f i2pversion_override ]; then
|
||||
. "$SCRIPT_DIR/i2pversion_override"
|
||||
fi
|
||||
|
||||
. "$SCRIPT_DIR/config.sh"
|
||||
. "$SCRIPT_DIR/config_override.sh"
|
||||
|
||||
if [ -f config_overide.sh ]; then
|
||||
. "$SCRIPT_DIR/config_override.sh"
|
||||
fi
|
||||
|
||||
### How to set up this script:
|
||||
#
|
||||
@ -27,6 +24,7 @@ fi
|
||||
# GITHUB_USERNAME=your github username
|
||||
git clean -fd
|
||||
git checkout .
|
||||
cp -v "$SCRIPT_DIR/config_override.example.sh" config_override.sh
|
||||
./unsigned.sh
|
||||
|
||||
. "$HOME/github-release-config.sh"
|
||||
@ -38,12 +36,12 @@ fi
|
||||
TODAYSDATE="$(date +%Y%m%d).java.19.dev.build"
|
||||
|
||||
if [ -z "$DESCRIPTION" ]; then
|
||||
DESCRIPTION="Daily unsigned build of i2p.firefox for $TODAYSDATE"
|
||||
DESCRIPTION+="==================================================="
|
||||
DESCRIPTION+=""
|
||||
DESCRIPTION+="These builds are automatically built on a daily basis and may have serious bugs."
|
||||
DESCRIPTION+="They are intended for testing purposes only, use them at your own risk."
|
||||
DESCRIPTION+=""
|
||||
DESCRIPTION="Daily unsigned build of i2p.firefox for $TODAYSDATE
|
||||
===================================================
|
||||
|
||||
These builds are automatically built on a daily basis and may have serious bugs.
|
||||
They are intended for testing purposes only, use them at your own risk.
|
||||
"
|
||||
fi
|
||||
|
||||
echo github-release release -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
|
||||
|
17
daily.sh
17
daily.sh
@ -9,12 +9,9 @@ if [ -f i2pversion_override ]; then
|
||||
. "$SCRIPT_DIR/i2pversion_override"
|
||||
fi
|
||||
|
||||
mv "$SCRIPT_DIR/config_override.sh" "$SCRIPT_DIR/config_override.sh.bak"
|
||||
. "$SCRIPT_DIR/config.sh"
|
||||
|
||||
if [ -f config_overide.sh ]; then
|
||||
. "$SCRIPT_DIR/config_override.sh"
|
||||
fi
|
||||
|
||||
### How to set up this script:
|
||||
#
|
||||
# This script will not work unless you give it a Github API key.
|
||||
@ -36,12 +33,12 @@ fi
|
||||
TODAYSDATE=$(date +%Y%m%d)
|
||||
|
||||
if [ -z "$DESCRIPTION" ]; then
|
||||
DESCRIPTION="Daily unsigned build of i2p.firefox for $TODAYSDATE"
|
||||
DESCRIPTION+="==================================================="
|
||||
DESCRIPTION+=""
|
||||
DESCRIPTION+="These builds are automatically built on a daily basis and may have serious bugs."
|
||||
DESCRIPTION+="They are intended for testing purposes only, use them at your own risk."
|
||||
DESCRIPTION+=""
|
||||
DESCRIPTION="Daily unsigned build of i2p.firefox for $TODAYSDATE
|
||||
===================================================
|
||||
|
||||
These builds are automatically built on a daily basis and may have serious bugs.
|
||||
They are intended for testing purposes only, use them at your own risk.
|
||||
"
|
||||
fi
|
||||
|
||||
echo github-release release -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
|
||||
|
38
edit-release-unstable.sh
Executable file
38
edit-release-unstable.sh
Executable file
@ -0,0 +1,38 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
|
||||
cd "$SCRIPT_DIR" || exit 1
|
||||
|
||||
cp -v "$SCRIPT_DIR/config_override.example.sh" config_override.sh
|
||||
|
||||
. "$SCRIPT_DIR/i2pversion"
|
||||
|
||||
if [ -f i2pversion_override ]; then
|
||||
. "$SCRIPT_DIR/i2pversion_override"
|
||||
fi
|
||||
|
||||
. "$SCRIPT_DIR/config.sh"
|
||||
|
||||
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
|
||||
. "$SCRIPT_DIR/config_override.sh"
|
||||
fi
|
||||
|
||||
. "$HOME/github-release-config.sh"
|
||||
|
||||
if [ -f ./i2pversion_override ]; then
|
||||
. ./i2pversion_override
|
||||
fi
|
||||
|
||||
TODAYSDATE="$(date +%Y%m%d).java.19.dev.build"
|
||||
|
||||
if [ -z "$DESCRIPTION" ]; then
|
||||
DESCRIPTION="Daily unsigned build of i2p.firefox for $TODAYSDATE
|
||||
===================================================
|
||||
|
||||
These builds are automatically built on a daily basis and may have serious bugs.
|
||||
They are intended for testing purposes only, use them at your own risk.
|
||||
"
|
||||
fi
|
||||
|
||||
echo github-release edit -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
|
||||
github-release edit -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
|
36
edit-release.sh
Executable file
36
edit-release.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
|
||||
cd "$SCRIPT_DIR" || exit 1
|
||||
|
||||
. "$SCRIPT_DIR/i2pversion"
|
||||
|
||||
if [ -f i2pversion_override ]; then
|
||||
. "$SCRIPT_DIR/i2pversion_override"
|
||||
fi
|
||||
|
||||
. "$SCRIPT_DIR/config.sh"
|
||||
|
||||
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
|
||||
. "$SCRIPT_DIR/config_override.sh"
|
||||
fi
|
||||
|
||||
. "$HOME/github-release-config.sh"
|
||||
|
||||
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
|
||||
===================================================
|
||||
|
||||
These builds are automatically built on a daily basis and may have serious bugs.
|
||||
They are intended for testing purposes only, use them at your own risk.
|
||||
"
|
||||
fi
|
||||
|
||||
echo github-release edit -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
|
||||
github-release edit -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
|
2
exe.sh
2
exe.sh
@ -17,6 +17,8 @@ jpackage --name I2P-EXE --app-version "$I2P_VERSION" \
|
||||
--java-options "--add-opens java.base/java.util.Properties.defaults=ALL-UNNAMED" \
|
||||
$JPACKAGE_OPTS \
|
||||
--app-content src/I2P/config \
|
||||
--app-content src/icons/windowsUIToopie2.png \
|
||||
--icon src/icons/windowsUIToopie2.png \
|
||||
--input build \
|
||||
--verbose \
|
||||
--type exe \
|
||||
|
@ -5,7 +5,7 @@ cd "$SCRIPT_DIR" || exit 1
|
||||
|
||||
. "$SCRIPT_DIR/config.sh"
|
||||
|
||||
if [ -f config_overide.sh ]; then
|
||||
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
|
||||
. "$SCRIPT_DIR/config_override.sh"
|
||||
fi
|
||||
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
JNA_VERSION=5.11.0
|
||||
export JNA_VERSION=5.11.0
|
||||
I2PFIREFOX_VERSION=0.0.34
|
||||
I2PFIREFOX_VERSION=0.0.36
|
||||
export I2PFIREFOX_VERSION=0.0.36
|
||||
# Comment this out to build from an alternate branch or
|
||||
# the tip of the master branch.
|
||||
VERSIONMAJOR=1
|
||||
VERSIONMINOR=9
|
||||
VERSIONBUILD=6
|
||||
VERSIONBUILD=7
|
||||
I2P_VERSION="$VERSIONMAJOR.$VERSIONMINOR.$VERSIONBUILD"
|
||||
export I2P_VERSION="$VERSIONMAJOR.$VERSIONMINOR.$VERSIONBUILD"
|
||||
VERSION=i2p-jpackage-1.9.4
|
||||
|
@ -12,7 +12,7 @@ import java.util.logging.FileHandler;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.logging.SimpleFormatter;
|
||||
|
||||
public class CopyConfigDir {
|
||||
public class CopyConfigDir extends WindowsServiceUtil {
|
||||
static final Logger logger = Logger.getLogger("configlog");
|
||||
|
||||
public static void initLogger() {
|
||||
@ -152,20 +152,6 @@ public class CopyConfigDir {
|
||||
return i2p;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the OS name(windows, mac, linux only)
|
||||
*
|
||||
* @return os name in lower-case, "windows" "mac" or "linux"
|
||||
*/
|
||||
protected static String osName() {
|
||||
String osName = System.getProperty("os.name").toLowerCase();
|
||||
if (osName.contains("windows"))
|
||||
return "windows";
|
||||
if (osName.contains("mac"))
|
||||
return "mac";
|
||||
return "linux";
|
||||
}
|
||||
|
||||
/**
|
||||
* get the path to the java home, for jpackage this is related to the
|
||||
* executable itself, which is handy to know. It's a directory called runtime,
|
||||
|
@ -33,7 +33,7 @@ public class WinLauncher extends CopyConfigDir {
|
||||
static WindowsUpdatePostProcessor wupp = null;
|
||||
private static Router i2pRouter;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
public static void main(String[] args) {
|
||||
setupLauncher();
|
||||
initLogger();
|
||||
boolean privateBrowsing = false;
|
||||
@ -88,13 +88,6 @@ public class WinLauncher extends CopyConfigDir {
|
||||
File programs = programFile();
|
||||
File home = homeDir();
|
||||
|
||||
// This actually does most of what we use NSIS for if NSIS hasn't
|
||||
// already done it, which essentially makes this whole thing portable.
|
||||
if (!copyConfigDir()) {
|
||||
logger.severe("Cannot copy the configuration directory");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
System.setProperty("i2p.dir.base", programs.getAbsolutePath());
|
||||
System.setProperty("i2p.dir.config", home.getAbsolutePath());
|
||||
System.setProperty("router.pid",
|
||||
@ -110,17 +103,42 @@ public class WinLauncher extends CopyConfigDir {
|
||||
logger.info("\t" + System.getProperty("i2p.dir.base"));
|
||||
logger.info("\t" + System.getProperty("i2p.dir.config"));
|
||||
logger.info("\t" + System.getProperty("router.pid"));
|
||||
boolean continuerunning = promptServiceStartIfAvailable("i2p");
|
||||
if (!continuerunning) {
|
||||
logger.severe(
|
||||
"Service startup failure, please start I2P service with services.msc");
|
||||
System.exit(2);
|
||||
} else {
|
||||
fixServiceConfig();
|
||||
}
|
||||
continuerunning = promptUserInstallStartIfAvailable();
|
||||
if (!continuerunning) {
|
||||
logger.severe("User-install startup required.");
|
||||
System.exit(2);
|
||||
} else {
|
||||
fixServiceConfig();
|
||||
}
|
||||
|
||||
// This actually does most of what we use NSIS for if NSIS hasn't
|
||||
// already done it, which essentially makes this whole thing portable.
|
||||
if (!copyConfigDir()) {
|
||||
logger.severe("Cannot copy the configuration directory");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
if (launchBrowser(privateBrowsing, usabilityMode, chromiumFirst,
|
||||
proxyTimeoutTime, newArgsList)) {
|
||||
System.exit(0);
|
||||
}
|
||||
i2pRouter = new Router(routerConfig(), System.getProperties());
|
||||
if (i2pRouter.saveConfig("routerconsole.browser", null)) {
|
||||
logger.info("removed routerconsole.browser config");
|
||||
}
|
||||
if (i2pRouter.saveConfig("routerconsole.browser",
|
||||
appImageExe() + " -noproxycheck")) {
|
||||
logger.info("updated routerconsole.browser config " + appImageExe());
|
||||
if (!isInstalled("i2p")) {
|
||||
if (i2pRouter.saveConfig("routerconsole.browser", null)) {
|
||||
logger.info("removed routerconsole.browser config");
|
||||
}
|
||||
if (i2pRouter.saveConfig("routerconsole.browser",
|
||||
appImageExe() + " -noproxycheck")) {
|
||||
logger.info("updated routerconsole.browser config " + appImageExe());
|
||||
}
|
||||
}
|
||||
logger.info("Router is configured");
|
||||
|
||||
@ -134,6 +152,51 @@ public class WinLauncher extends CopyConfigDir {
|
||||
i2pRouter.runRouter();
|
||||
}
|
||||
|
||||
private static void fixServiceConfig() {
|
||||
// If the user installed the Easy bundle before installing the
|
||||
// regulalr bundle, then they have a config file which contains the
|
||||
// wrong update URL. Check for it, and change it back if necessary.
|
||||
// closes #23
|
||||
i2pRouter = new Router(routerConfig(), System.getProperties());
|
||||
if (isInstalled("i2p") || checkProgramFilesInstall()) {
|
||||
String newsURL = i2pRouter.getConfigSetting("router.newsURL");
|
||||
if (newsURL != null) {
|
||||
if (newsURL.contains("win/beta")) {
|
||||
logger.info(
|
||||
"checked router.newsURL config, containes win/beta in a service install, invalid update type");
|
||||
if (i2pRouter.saveConfig("router.newsURL", ServiceUpdaterString())) {
|
||||
logger.info("updated routerconsole.browser config " +
|
||||
appImageExe());
|
||||
}
|
||||
}
|
||||
}
|
||||
String backupNewsURL = i2pRouter.getConfigSetting("router.backupNewsURL");
|
||||
if (backupNewsURL != null) {
|
||||
if (backupNewsURL.contains("win/beta")) {
|
||||
logger.info(
|
||||
"checked router.backupNewsURL config, containes win/beta in a service install, invalid update type");
|
||||
if (i2pRouter.saveConfig("router.backupNewsURL",
|
||||
ServiceBackupUpdaterString())) {
|
||||
logger.info("updated routerconsole.browser config " +
|
||||
appImageExe());
|
||||
}
|
||||
}
|
||||
}
|
||||
String updateURL = i2pRouter.getConfigSetting("router.updateURL");
|
||||
if (updateURL != null) {
|
||||
if (updateURL.contains("i2pwinupdate.su3")) {
|
||||
logger.info(
|
||||
"checked router.updateURL config, containes win/beta in a service install, invalid update type");
|
||||
if (i2pRouter.saveConfig("router.updateURL",
|
||||
ServiceStaticUpdaterString())) {
|
||||
logger.info("updated routerconsole.browser config " +
|
||||
appImageExe());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void setupLauncher() {
|
||||
File jrehome = javaHome();
|
||||
logger.info("jre home is: " + jrehome.getAbsolutePath());
|
||||
|
@ -1,6 +1,7 @@
|
||||
package net.i2p.router;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import javax.swing.JOptionPane;
|
||||
@ -105,31 +106,124 @@ public class WindowsServiceUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void promptServiceStartIfAvailable(String serviceName) {
|
||||
public static boolean promptServiceStartIfAvailable(String serviceName) {
|
||||
if (osName() != "windows") {
|
||||
return true;
|
||||
}
|
||||
if (isInstalled(serviceName)) {
|
||||
if (!isStart(serviceName)) {
|
||||
int a;
|
||||
String message =
|
||||
"It appears you have an existing I2P service installed.\n";
|
||||
message +=
|
||||
"However, it is not running yet. Would you like to start it?\n";
|
||||
"However, it is not running yet. Please start it through `services.msc`.\n";
|
||||
message +=
|
||||
"If you click \"No\", the jpackage router will be launched instead.\n";
|
||||
a = JOptionPane.showConfirmDialog(null, message,
|
||||
"I2P Service detected not running",
|
||||
JOptionPane.YES_NO_OPTION);
|
||||
if (a == JOptionPane.NO_OPTION) {
|
||||
// Do nothing here, this will continue on to launch a jpackaged router
|
||||
return true;
|
||||
} else {
|
||||
// We can't just call `net start` or `sc start` directly, that throws
|
||||
// a permission error. We can start services.msc though, where the
|
||||
// user can start the service themselves. OR maybe we ask for
|
||||
// elevation here? May need to refactor Elevator and Shell32X to
|
||||
// achieve it though
|
||||
ProcessBuilder pb =
|
||||
new ProcessBuilder("C:\\Windows\\System32\\services.msc");
|
||||
try {
|
||||
Process p = pb.start();
|
||||
int exitCode = p.waitFor();
|
||||
if (exitCode != 0) {
|
||||
return false;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
} catch (InterruptedException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return isStart("i2p");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static String ServiceUpdaterString() {
|
||||
return "http://tc73n4kivdroccekirco7rhgxdg5f3cjvbaapabupeyzrqwv5guq.b32.i2p/news.su3";
|
||||
}
|
||||
public static String ServiceBackupUpdaterString() {
|
||||
return "http://dn3tvalnjz432qkqsvpfdqrwpqkw3ye4n4i2uyfr4jexvo3sp5ka.b32.i2p/news.su3";
|
||||
}
|
||||
public static String ServiceStaticUpdaterString() {
|
||||
return "http://echelon.i2p/i2p/i2pupdate.sud,http://stats.i2p/i2p/i2pupdate.sud";
|
||||
}
|
||||
|
||||
public static String getProgramFilesInstall() {
|
||||
String programFiles = System.getenv("PROGRAMFILES");
|
||||
if (programFiles != null) {
|
||||
File programFilesI2P = new File(programFiles, "i2p/i2p.exe");
|
||||
if (programFilesI2P.exists())
|
||||
return programFilesI2P.getAbsolutePath();
|
||||
}
|
||||
String programFiles86 = System.getenv("PROGRAMFILES86");
|
||||
if (programFiles86 != null) {
|
||||
File programFiles86I2P = new File(programFiles86, "i2p/i2p.exe");
|
||||
if (programFiles86I2P.exists())
|
||||
return programFiles86I2P.getAbsolutePath();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean checkProgramFilesInstall() {
|
||||
String programFiles = System.getenv("PROGRAMFILES");
|
||||
if (programFiles != null) {
|
||||
File programFilesI2P = new File(programFiles, "i2p/i2p.exe");
|
||||
if (programFilesI2P.exists())
|
||||
return true;
|
||||
}
|
||||
String programFiles86 = System.getenv("PROGRAMFILES86");
|
||||
if (programFiles86 != null) {
|
||||
File programFiles86I2P = new File(programFiles86, "i2p/i2p.exe");
|
||||
if (programFiles86I2P.exists())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean promptUserInstallStartIfAvailable() {
|
||||
if (osName() != "windows") {
|
||||
return true;
|
||||
}
|
||||
if (checkProgramFilesInstall()) {
|
||||
int a;
|
||||
String message =
|
||||
"It appears you have an existing, unbundled I2P rotuer installed.\n";
|
||||
message +=
|
||||
"However, it is not running yet. Please start it using the shortcut on the desktop.\n";
|
||||
message +=
|
||||
"If you click \"No\", the jpackage router will be launched instead.\n";
|
||||
a = JOptionPane.showConfirmDialog(null, message,
|
||||
"I2P Service detected not running",
|
||||
JOptionPane.YES_NO_OPTION);
|
||||
if (a == JOptionPane.NO_OPTION) {
|
||||
// Do nothing here, this will continue on to launch a jpackaged router
|
||||
return true;
|
||||
} else {
|
||||
// Here, the service is already started, so I2P should appear to be
|
||||
// running to the other checks.
|
||||
try {
|
||||
String pfi = getProgramFilesInstall();
|
||||
if (pfi != null)
|
||||
Runtime.getRuntime().exec(pfi);
|
||||
} catch (IOException e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static String getServiceState(String serviceName) {
|
||||
@ -160,6 +254,20 @@ public class WindowsServiceUtil {
|
||||
}
|
||||
return stateString;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the OS name(windows, mac, linux only)
|
||||
*
|
||||
* @return os name in lower-case, "windows" "mac" or "linux"
|
||||
*/
|
||||
protected static String osName() {
|
||||
String osName = System.getProperty("os.name").toLowerCase();
|
||||
if (osName.contains("windows"))
|
||||
return "windows";
|
||||
if (osName.contains("mac"))
|
||||
return "mac";
|
||||
return "linux";
|
||||
}
|
||||
public static void main(String args[]) {
|
||||
// when querying the I2P router service installed by the IzPack installer
|
||||
// this is the correct call.
|
||||
|
@ -12,7 +12,7 @@ fi
|
||||
|
||||
. "$SCRIPT_DIR/config.sh"
|
||||
|
||||
if [ -f config_overide.sh ]; then
|
||||
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
|
||||
. "$SCRIPT_DIR/config_override.sh"
|
||||
fi
|
||||
|
||||
|
2
msi.sh
2
msi.sh
@ -18,6 +18,8 @@ jpackage --name I2P-MSI --app-version "$I2P_VERSION" \
|
||||
--java-options "--add-opens java.base/java.util.Properties.defaults=ALL-UNNAMED" \
|
||||
$JPACKAGE_OPTS \
|
||||
--app-content src/I2P/config \
|
||||
--app-content src/icons/windowsUIToopie2.png \
|
||||
--icon src/icons/windowsUIToopie2.png \
|
||||
--input build \
|
||||
--verbose \
|
||||
--type msi \
|
||||
|
@ -5,7 +5,7 @@ cd "$SCRIPT_DIR" || exit 1
|
||||
|
||||
. "$SCRIPT_DIR/config.sh"
|
||||
|
||||
if [ -f config_overide.sh ]; then
|
||||
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
|
||||
. "$SCRIPT_DIR/config_override.sh"
|
||||
fi
|
||||
|
||||
|
2
sign.sh
2
sign.sh
@ -11,7 +11,7 @@ fi
|
||||
|
||||
. "$SCRIPT_DIR/config.sh"
|
||||
|
||||
if [ -f config_overide.sh ]; then
|
||||
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
|
||||
. "$SCRIPT_DIR/config_override.sh"
|
||||
fi
|
||||
|
||||
|
@ -1 +1 @@
|
||||
1.9.6
|
||||
1.9.7
|
||||
|
BIN
src/icons/windowsUIToopie2.png
Normal file
BIN
src/icons/windowsUIToopie2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 91 KiB |
@ -148,7 +148,8 @@ Function routerDetect
|
||||
File /a /r "I2P\runtime\"
|
||||
SetOutPath $I2PINSTEXE
|
||||
File /a /r "I2P\I2P.exe"
|
||||
File /a /r "I2P\I2P.ico"
|
||||
# The NSIS Installer uses an ico icon, the jpackage-only ones use png
|
||||
File /a /r "I2P\ui2pbrowser_icon.ico"
|
||||
File "I2P\config\jpackaged"
|
||||
|
||||
createDirectory "$I2PINSTEXE\"
|
||||
@ -220,19 +221,6 @@ Function installerFunction
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
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 "$LOCALAPPDATA\I2P\clients.config" 0 +2
|
||||
StrCpy $I2PAPPDATA "$LOCALAPPDATA\I2P\"
|
||||
|
||||
createDirectory "$I2PAPPDATA"
|
||||
SetOutPath "$I2PAPPDATA"
|
||||
|
||||
IfFileExists "$LOCALAPPDATA\I2P\eepsite\docroot" +2 0
|
||||
File /a /r "I2P\eepsite"
|
||||
|
@ -1 +1 @@
|
||||
!define I2P_VERSION 1.9.6
|
||||
!define I2P_VERSION 1.9.7
|
||||
|
@ -1,3 +1,3 @@
|
||||
!define VERSIONMAJOR 1
|
||||
!define VERSIONMINOR 9
|
||||
!define VERSIONBUILD 6
|
||||
!define VERSIONBUILD 7
|
||||
|
@ -1 +1 @@
|
||||
1.9.6
|
||||
1.9.7
|
||||
|
2
targz.sh
2
targz.sh
@ -5,7 +5,7 @@ cd "$SCRIPT_DIR" || exit 1
|
||||
|
||||
. "$SCRIPT_DIR/config.sh"
|
||||
|
||||
if [ -f config_overide.sh ]; then
|
||||
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
|
||||
. "$SCRIPT_DIR/config_override.sh"
|
||||
fi
|
||||
|
||||
|
@ -5,7 +5,7 @@ cd "$SCRIPT_DIR" || exit 1
|
||||
|
||||
. "$SCRIPT_DIR/config.sh"
|
||||
|
||||
if [ -f config_overide.sh ]; then
|
||||
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
|
||||
. "$SCRIPT_DIR/config_override.sh"
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user