Compare commits
21 Commits
20220919.j
...
20220919
Author | SHA1 | Date | |
---|---|---|---|
![]() |
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
|
*.so
|
||||||
*.jar
|
*.jar
|
||||||
*.zip
|
*.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
|
distclean: clean
|
||||||
rm -rf I2P
|
rm -rf I2P
|
||||||
git clean -fd
|
|
||||||
|
|
||||||
I2P:
|
I2P:
|
||||||
./build.sh
|
./build.sh
|
||||||
|
3
build.sh
3
build.sh
@@ -38,6 +38,9 @@ make src/I2P/config
|
|||||||
$JPACKAGE_OPTS \
|
$JPACKAGE_OPTS \
|
||||||
--resource-dir build \
|
--resource-dir build \
|
||||||
--app-content src/I2P/config \
|
--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
|
--input build --main-jar launcher.jar --main-class net.i2p.router.WinLauncher
|
||||||
|
|
||||||
cp "$I2P_PKG/licenses/"* license/
|
cp "$I2P_PKG/licenses/"* license/
|
||||||
|
@@ -36,12 +36,12 @@ fi
|
|||||||
TODAYSDATE=$(date +%Y%m%d)
|
TODAYSDATE=$(date +%Y%m%d)
|
||||||
|
|
||||||
if [ -z "$DESCRIPTION" ]; then
|
if [ -z "$DESCRIPTION" ]; then
|
||||||
DESCRIPTION="Daily unsigned build of i2p.firefox for $TODAYSDATE"
|
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."
|
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."
|
They are intended for testing purposes only, use them at your own risk.
|
||||||
DESCRIPTION+=""
|
"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo github-release release -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
|
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"
|
. "$SCRIPT_DIR/i2pversion_override"
|
||||||
fi
|
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:
|
### How to set up this script:
|
||||||
#
|
#
|
||||||
@@ -27,6 +24,7 @@ fi
|
|||||||
# GITHUB_USERNAME=your github username
|
# GITHUB_USERNAME=your github username
|
||||||
git clean -fd
|
git clean -fd
|
||||||
git checkout .
|
git checkout .
|
||||||
|
cp -v "$SCRIPT_DIR/config_override.example.sh" config_override.sh
|
||||||
./unsigned.sh
|
./unsigned.sh
|
||||||
|
|
||||||
. "$HOME/github-release-config.sh"
|
. "$HOME/github-release-config.sh"
|
||||||
@@ -38,12 +36,12 @@ fi
|
|||||||
TODAYSDATE="$(date +%Y%m%d).java.19.dev.build"
|
TODAYSDATE="$(date +%Y%m%d).java.19.dev.build"
|
||||||
|
|
||||||
if [ -z "$DESCRIPTION" ]; then
|
if [ -z "$DESCRIPTION" ]; then
|
||||||
DESCRIPTION="Daily unsigned build of i2p.firefox for $TODAYSDATE"
|
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."
|
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."
|
They are intended for testing purposes only, use them at your own risk.
|
||||||
DESCRIPTION+=""
|
"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo github-release release -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
|
echo github-release release -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
|
||||||
|
16
daily.sh
16
daily.sh
@@ -11,10 +11,6 @@ fi
|
|||||||
|
|
||||||
. "$SCRIPT_DIR/config.sh"
|
. "$SCRIPT_DIR/config.sh"
|
||||||
|
|
||||||
if [ -f config_overide.sh ]; then
|
|
||||||
. "$SCRIPT_DIR/config_override.sh"
|
|
||||||
fi
|
|
||||||
|
|
||||||
### How to set up this script:
|
### How to set up this script:
|
||||||
#
|
#
|
||||||
# This script will not work unless you give it a Github API key.
|
# This script will not work unless you give it a Github API key.
|
||||||
@@ -36,12 +32,12 @@ fi
|
|||||||
TODAYSDATE=$(date +%Y%m%d)
|
TODAYSDATE=$(date +%Y%m%d)
|
||||||
|
|
||||||
if [ -z "$DESCRIPTION" ]; then
|
if [ -z "$DESCRIPTION" ]; then
|
||||||
DESCRIPTION="Daily unsigned build of i2p.firefox for $TODAYSDATE"
|
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."
|
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."
|
They are intended for testing purposes only, use them at your own risk.
|
||||||
DESCRIPTION+=""
|
"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo github-release release -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
|
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" \
|
--java-options "--add-opens java.base/java.util.Properties.defaults=ALL-UNNAMED" \
|
||||||
$JPACKAGE_OPTS \
|
$JPACKAGE_OPTS \
|
||||||
--app-content src/I2P/config \
|
--app-content src/I2P/config \
|
||||||
|
--app-content src/icons/windowsUIToopie2.png \
|
||||||
|
--icon src/icons/windowsUIToopie2.png \
|
||||||
--input build \
|
--input build \
|
||||||
--verbose \
|
--verbose \
|
||||||
--type exe \
|
--type exe \
|
||||||
|
@@ -5,7 +5,7 @@ cd "$SCRIPT_DIR" || exit 1
|
|||||||
|
|
||||||
. "$SCRIPT_DIR/config.sh"
|
. "$SCRIPT_DIR/config.sh"
|
||||||
|
|
||||||
if [ -f config_overide.sh ]; then
|
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
|
||||||
. "$SCRIPT_DIR/config_override.sh"
|
. "$SCRIPT_DIR/config_override.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@ import java.util.logging.FileHandler;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.logging.SimpleFormatter;
|
import java.util.logging.SimpleFormatter;
|
||||||
|
|
||||||
public class CopyConfigDir {
|
public class CopyConfigDir extends WindowsServiceUtil {
|
||||||
static final Logger logger = Logger.getLogger("configlog");
|
static final Logger logger = Logger.getLogger("configlog");
|
||||||
|
|
||||||
public static void initLogger() {
|
public static void initLogger() {
|
||||||
@@ -152,20 +152,6 @@ public class CopyConfigDir {
|
|||||||
return i2p;
|
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
|
* 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,
|
* 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;
|
static WindowsUpdatePostProcessor wupp = null;
|
||||||
private static Router i2pRouter;
|
private static Router i2pRouter;
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) {
|
||||||
setupLauncher();
|
setupLauncher();
|
||||||
initLogger();
|
initLogger();
|
||||||
boolean privateBrowsing = false;
|
boolean privateBrowsing = false;
|
||||||
@@ -88,6 +88,18 @@ public class WinLauncher extends CopyConfigDir {
|
|||||||
File programs = programFile();
|
File programs = programFile();
|
||||||
File home = homeDir();
|
File home = homeDir();
|
||||||
|
|
||||||
|
boolean continuerunning = promptServiceStartIfAvailable("i2p");
|
||||||
|
if (!continuerunning) {
|
||||||
|
logger.severe(
|
||||||
|
"Service startup failure, please start I2P service with services.msc");
|
||||||
|
System.exit(2);
|
||||||
|
}
|
||||||
|
continuerunning = promptUserInstallStartIfAvailable();
|
||||||
|
if (!continuerunning) {
|
||||||
|
logger.severe("User-install startup required.");
|
||||||
|
System.exit(2);
|
||||||
|
}
|
||||||
|
|
||||||
// This actually does most of what we use NSIS for if NSIS hasn't
|
// This actually does most of what we use NSIS for if NSIS hasn't
|
||||||
// already done it, which essentially makes this whole thing portable.
|
// already done it, which essentially makes this whole thing portable.
|
||||||
if (!copyConfigDir()) {
|
if (!copyConfigDir()) {
|
||||||
@@ -115,12 +127,14 @@ public class WinLauncher extends CopyConfigDir {
|
|||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
i2pRouter = new Router(routerConfig(), System.getProperties());
|
i2pRouter = new Router(routerConfig(), System.getProperties());
|
||||||
if (i2pRouter.saveConfig("routerconsole.browser", null)) {
|
if (!isInstalled("i2p")) {
|
||||||
logger.info("removed routerconsole.browser config");
|
if (i2pRouter.saveConfig("routerconsole.browser", null)) {
|
||||||
}
|
logger.info("removed routerconsole.browser config");
|
||||||
if (i2pRouter.saveConfig("routerconsole.browser",
|
}
|
||||||
appImageExe() + " -noproxycheck")) {
|
if (i2pRouter.saveConfig("routerconsole.browser",
|
||||||
logger.info("updated routerconsole.browser config " + appImageExe());
|
appImageExe() + " -noproxycheck")) {
|
||||||
|
logger.info("updated routerconsole.browser config " + appImageExe());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
logger.info("Router is configured");
|
logger.info("Router is configured");
|
||||||
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
package net.i2p.router;
|
package net.i2p.router;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
@@ -105,31 +106,106 @@ public class WindowsServiceUtil {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void promptServiceStartIfAvailable(String serviceName) {
|
public static boolean promptServiceStartIfAvailable(String serviceName) {
|
||||||
|
if (osName() != "windows") {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (isInstalled(serviceName)) {
|
if (isInstalled(serviceName)) {
|
||||||
if (!isStart(serviceName)) {
|
if (!isStart(serviceName)) {
|
||||||
int a;
|
int a;
|
||||||
String message =
|
String message =
|
||||||
"It appears you have an existing I2P service installed.\n";
|
"It appears you have an existing I2P service installed.\n";
|
||||||
message +=
|
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,
|
a = JOptionPane.showConfirmDialog(null, message,
|
||||||
"I2P Service detected not running",
|
"I2P Service detected not running",
|
||||||
JOptionPane.YES_NO_OPTION);
|
JOptionPane.YES_NO_OPTION);
|
||||||
if (a == JOptionPane.NO_OPTION) {
|
if (a == JOptionPane.NO_OPTION) {
|
||||||
// Do nothing here, this will continue on to launch a jpackaged router
|
// Do nothing here, this will continue on to launch a jpackaged router
|
||||||
|
return true;
|
||||||
} else {
|
} else {
|
||||||
// We can't just call `net start` or `sc start` directly, that throws
|
// We can't just call `net start` or `sc start` directly, that throws
|
||||||
// a permission error. We can start services.msc though, where the
|
// a permission error. We can start services.msc though, where the
|
||||||
// user can start the service themselves. OR maybe we ask for
|
// user can start the service themselves. OR maybe we ask for
|
||||||
// elevation here? May need to refactor Elevator and Shell32X to
|
// elevation here? May need to refactor Elevator and Shell32X to
|
||||||
// achieve it though
|
// 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 getProgramFilesInstall() {
|
||||||
|
String programFiles = System.getenv("PROGRAMFILES");
|
||||||
|
File programFilesI2P = new File(programFiles, "i2p/i2p.exe");
|
||||||
|
if (programFilesI2P.exists())
|
||||||
|
return programFilesI2P.getAbsolutePath();
|
||||||
|
String programFiles86 = System.getenv("PROGRAMFILES86");
|
||||||
|
File programFiles86I2P = new File(programFiles86, "i2p/i2p.exe");
|
||||||
|
if (programFiles86I2P.exists())
|
||||||
|
return programFiles86I2P.getAbsolutePath();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean checkProgramFilesInstall() {
|
||||||
|
String programFiles = System.getenv("PROGRAMFILES");
|
||||||
|
File programFilesI2P = new File(programFiles, "i2p/i2p.exe");
|
||||||
|
if (programFilesI2P.exists())
|
||||||
|
return true;
|
||||||
|
String programFiles86 = System.getenv("PROGRAMFILES86");
|
||||||
|
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 {
|
} else {
|
||||||
// Here, the service is already started, so I2P should appear to be
|
try {
|
||||||
// running to the other checks.
|
Runtime.getRuntime().exec(getProgramFilesInstall());
|
||||||
|
} catch (IOException e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getServiceState(String serviceName) {
|
public static String getServiceState(String serviceName) {
|
||||||
@@ -160,6 +236,20 @@ public class WindowsServiceUtil {
|
|||||||
}
|
}
|
||||||
return stateString;
|
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[]) {
|
public static void main(String args[]) {
|
||||||
// when querying the I2P router service installed by the IzPack installer
|
// when querying the I2P router service installed by the IzPack installer
|
||||||
// this is the correct call.
|
// this is the correct call.
|
||||||
|
@@ -12,7 +12,7 @@ fi
|
|||||||
|
|
||||||
. "$SCRIPT_DIR/config.sh"
|
. "$SCRIPT_DIR/config.sh"
|
||||||
|
|
||||||
if [ -f config_overide.sh ]; then
|
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
|
||||||
. "$SCRIPT_DIR/config_override.sh"
|
. "$SCRIPT_DIR/config_override.sh"
|
||||||
fi
|
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" \
|
--java-options "--add-opens java.base/java.util.Properties.defaults=ALL-UNNAMED" \
|
||||||
$JPACKAGE_OPTS \
|
$JPACKAGE_OPTS \
|
||||||
--app-content src/I2P/config \
|
--app-content src/I2P/config \
|
||||||
|
--app-content src/icons/windowsUIToopie2.png \
|
||||||
|
--icon src/icons/windowsUIToopie2.png \
|
||||||
--input build \
|
--input build \
|
||||||
--verbose \
|
--verbose \
|
||||||
--type msi \
|
--type msi \
|
||||||
|
@@ -5,7 +5,7 @@ cd "$SCRIPT_DIR" || exit 1
|
|||||||
|
|
||||||
. "$SCRIPT_DIR/config.sh"
|
. "$SCRIPT_DIR/config.sh"
|
||||||
|
|
||||||
if [ -f config_overide.sh ]; then
|
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
|
||||||
. "$SCRIPT_DIR/config_override.sh"
|
. "$SCRIPT_DIR/config_override.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
2
sign.sh
2
sign.sh
@@ -11,7 +11,7 @@ fi
|
|||||||
|
|
||||||
. "$SCRIPT_DIR/config.sh"
|
. "$SCRIPT_DIR/config.sh"
|
||||||
|
|
||||||
if [ -f config_overide.sh ]; then
|
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
|
||||||
. "$SCRIPT_DIR/config_override.sh"
|
. "$SCRIPT_DIR/config_override.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
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\"
|
File /a /r "I2P\runtime\"
|
||||||
SetOutPath $I2PINSTEXE
|
SetOutPath $I2PINSTEXE
|
||||||
File /a /r "I2P\I2P.exe"
|
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"
|
File "I2P\config\jpackaged"
|
||||||
|
|
||||||
createDirectory "$I2PINSTEXE\"
|
createDirectory "$I2PINSTEXE\"
|
||||||
|
2
targz.sh
2
targz.sh
@@ -5,7 +5,7 @@ cd "$SCRIPT_DIR" || exit 1
|
|||||||
|
|
||||||
. "$SCRIPT_DIR/config.sh"
|
. "$SCRIPT_DIR/config.sh"
|
||||||
|
|
||||||
if [ -f config_overide.sh ]; then
|
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
|
||||||
. "$SCRIPT_DIR/config_override.sh"
|
. "$SCRIPT_DIR/config_override.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@ cd "$SCRIPT_DIR" || exit 1
|
|||||||
|
|
||||||
. "$SCRIPT_DIR/config.sh"
|
. "$SCRIPT_DIR/config.sh"
|
||||||
|
|
||||||
if [ -f config_overide.sh ]; then
|
if [ -f "$SCRIPT_DIR/config_override.sh" ]; then
|
||||||
. "$SCRIPT_DIR/config_override.sh"
|
. "$SCRIPT_DIR/config_override.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user