Compare commits

..

43 Commits

Author SHA1 Message Date
idk
52c91e1e65 update i2pfirefox version 2022-10-01 22:00:58 -04:00
idk
9e6ea435af Comment out Potent Portables 2022-10-01 21:28:00 -04:00
idk
308055143f update i2p.plugins.firefox version 2022-10-01 21:06:48 -04:00
idk
53f731f945 mark torbrowser.sh script executable 2022-10-01 21:01:00 -04:00
idk
7ec56455cd remove obsolete/redundant Unix scripts 2022-10-01 20:51:03 -04:00
idk
c11f982088 be even more specific about the WinLauncher.java URL fixes 2022-09-20 23:24:28 -04:00
idk
58e1276072 get rid of the "jpackaged" file from the NSIS installer, that's only created after a config migration inside the jpackage now 2022-09-20 12:35:59 -04:00
idk
20240c9e75 get rid of the "jpackaged" file from the NSIS installer, that's only created after a config migration inside the jpackage now 2022-09-20 12:34:52 -04:00
idk
4079d6a8b1 remove some NSIS lines that are now automated by the jpackage. 2022-09-20 11:39:24 -04:00
idk
8b893d1116 skip service correction if config is absent 2022-09-20 01:12:22 -04:00
idk
0d209bb2a8 skip service correction if config is absent 2022-09-20 01:07:56 -04:00
idk
186493b154 skip service correction on linux 2022-09-20 00:54:56 -04:00
idk
51a7f0f1d7 move config_override.sh out of the way when doing a daily 2022-09-20 00:17:30 -04:00
idk
99e3ddb05a bump version 2022-09-20 00:15:30 -04:00
idk
13a5cab2c1 bump version 2022-09-20 00:15:01 -04:00
idk
125b711de2 remove a junk section from the NSIS file 2022-09-20 00:12:33 -04:00
idk
a267bb7d65 also fix backupNewsURL in the case of conflicting bundled and un-bundled intalls 2022-09-20 00:09:17 -04:00
idk
c5b2f958c2 fix the router.config file for the user if they installed un-bundled after bundled. closes #23 2022-09-20 00:01:15 -04:00
idk
56b8b5470f fix the router.config file for the user if they installed un-bundled after bundled. closes #23 2022-09-19 23:59:59 -04:00
idk
15cbddb5b0 fix the router.config file for the user if they installed un-bundled after bundled. closes #23 2022-09-19 23:53:38 -04:00
idk
c4bd64a559 fix the router.config file for the user if they installed un-bundled after bundled 2022-09-19 23:50:46 -04:00
idk
f4f7935cdc fix the router.config file for the user if they installed un-bundled after bundled 2022-09-19 23:46:34 -04:00
idk
afca98692a launch services.msc with service prompt 2022-09-19 20:41:28 -04:00
idk
11914ff9aa launch user-installs automatically if they're present and the user consents 2022-09-19 20:25:44 -04:00
idk
4aa4763770 prompt for separate user-installs too 2022-09-19 20:03:57 -04:00
idk
6b61213625 don't change value of routerconsole.browser if we're running alongside a service install 2022-09-19 19:50:13 -04:00
idk
51873e9d62 change message 2022-09-19 19:35:42 -04:00
idk
a54feb9550 change message 2022-09-19 19:31:21 -04:00
idk
b485d0630f remove config_override.sh from daily.sh 2022-09-19 19:01:20 -04:00
idk
434546f24c add app-content of ico 2022-09-19 18:46:37 -04:00
idk
3d80c32a31 comment to clarify icon situation 2022-09-19 18:29:01 -04:00
idk
7156974136 use png ico icon for nsis installer 2022-09-19 18:28:23 -04:00
idk
348c876c59 use png icon instead of ico icon 2022-09-19 18:25:47 -04:00
idk
630e58ea0a icons 2022-09-19 17:57:01 -04:00
idk
96806ecc07 expressly include icon in jpackage output 2022-09-19 17:50:28 -04:00
idk
aef946f3c8 expressly include icon in jpackage output 2022-09-19 17:48:33 -04:00
idk
d49ec2330f fix override sourcing 2022-09-19 17:15:51 -04:00
idk
0c304b0d11 add config_override.sh to gitignore 2022-09-19 17:07:50 -04:00
idk
3387c03bf4 don't git clean in distclean anymore 2022-09-19 16:56:07 -04:00
idk
037b1265d5 make sure that the correct config gets copied before building an unsigned during unstable builds 2022-09-19 16:52:23 -04:00
idk
e68ea5f9ef remove erroneously checked-in file 2022-09-19 16:21:41 -04:00
idk
51d2b7291e edit releases in scripts, fix release text 2022-09-19 16:21:15 -04:00
idk
2d25264023 edit releases 2022-09-19 16:12:43 -04:00
37 changed files with 434 additions and 354 deletions

3
.gitignore vendored
View File

@ -20,4 +20,5 @@ cmd
*.so
*.jar
*.zip
*.tar.gz
*.tar.gz
config_override.sh

View File

@ -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
@ -73,7 +72,6 @@ build/I2P: I2P build
src/I2P/config:
mkdir -p src/I2P/config
rm -rf src/I2P/config/geoip src/I2P/config/webapps src/I2P/config/certificates
echo true | tee src/I2P/config/jpackaged
cp -v $(RES_DIR)/clients.config src/I2P/config/
cp -v $(RES_DIR)/wrapper.config src/I2P/config/
#grep -v 'router.updateURL' $(RES_DIR)/router.config > src/I2P/config/router.config

View File

@ -38,6 +38,10 @@ make src/I2P/config
$JPACKAGE_OPTS \
--resource-dir build \
--app-content src/I2P/config \
--app-content src/unix/torbrowser.sh \
--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/

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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
View 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
View 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
View File

@ -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 \

View File

@ -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

View File

@ -2,13 +2,13 @@
JNA_VERSION=5.11.0
export JNA_VERSION=5.11.0
I2PFIREFOX_VERSION=0.0.34
export I2PFIREFOX_VERSION=0.0.36
I2PFIREFOX_VERSION=1.0.1
export I2PFIREFOX_VERSION=1.0.1
# 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

View File

@ -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() {
@ -46,7 +46,7 @@ public class CopyConfigDir {
if (copyDirectory(file, new File(newPath)))
return false;
if (file.isFile())
if (!copyFile(file, new File(newPath), true))
if (0 == copyFile(file, new File(newPath), true))
return false;
}
return true;
@ -61,37 +61,49 @@ public class CopyConfigDir {
if (file.isDirectory())
if (!copyConfigDirectory(file, new File(newPath)))
return false;
if (file.isFile())
if (!copyFileNeverOverwrite(
file,
new File(newPath))) // new File(workDir, file.toString())))
if (file.isFile()) {
int cnr = copyFileNeverOverwrite(file, new File(newPath));
if (0 == cnr)
return false;
if (1 == cnr) {
logger.info("using jpackaged configs in a jpackaged install, creating jpackaged file");
File jpackagedConfigsInUse = new File(appImageHome(), "jpackaged");
if (!jpackagedConfigsInUse.exists()){
try{
jpackagedConfigsInUse.createNewFile();
}catch(IOException e){
logger.warning("Error creating jpackaged file, delete config files manually when uninstalling");
}
}
}
if (-1 == cnr) {
logger.info("not overwriting existing config file, not creating jpackaged file");
}
}
}
return true;
}
public static boolean copyFileNeverOverwrite(String basePath,
String workPath) {
public static int copyFileNeverOverwrite(String basePath, String workPath) {
File baseFile = new File(basePath);
File workFile = new File(workPath);
return copyFileNeverOverwrite(baseFile, workFile);
}
public static boolean copyFileNeverOverwrite(File basePath, File workPath) {
public static int copyFileNeverOverwrite(File basePath, File workPath) {
return copyFile(basePath, workPath, false);
}
public static boolean copyFile(File basePath, File workPath,
boolean overWrite) {
public static int copyFile(File basePath, File workPath, boolean overWrite) {
if (!basePath.exists()) {
logger.info(basePath.getAbsolutePath() + " doesn't exist, not copying");
return false;
return 0;
}
if (!overWrite && workPath.exists()) {
logger.info(workPath.getAbsolutePath() +
" already exists, not overwriting");
return true;
return -1;
}
File workDir = workPath.getParentFile();
@ -111,12 +123,12 @@ public class CopyConfigDir {
}
in.close();
out.close();
return true;
return 1;
} catch (Throwable e) {
logger.warning(e.toString());
logger.warning("failed to copy " + basePath.getAbsolutePath() + " to " +
workPath.getAbsolutePath());
return false;
return 0;
}
}
@ -152,20 +164,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,

View File

@ -33,10 +33,10 @@ 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;
int privateBrowsing = 0;
boolean usabilityMode = false;
boolean chromiumFirst = false;
int proxyTimeoutTime = 200;
@ -46,7 +46,7 @@ public class WinLauncher extends CopyConfigDir {
if (args.length > 0) {
for (String arg : args) {
if (arg.equals("-private")) {
privateBrowsing = true;
privateBrowsing = 1;
logger.info(
"Private browsing is true, profile will be discarded at end of session.");
} else if (arg.equals("-chromium")) {
@ -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,62 @@ public class WinLauncher extends CopyConfigDir {
i2pRouter.runRouter();
}
private static void fixServiceConfig() {
if (osName() != "windows")
return;
// If the user installed the Easy bundle before installing the
// IzPack installer, then they have a config file which contains the
// wrong update URL. Check for it, and change it back if necessary.
// closes #23
String routerconf = routerConfig();
if (routerconf != null) {
File routerconffile = new File(routerconf);
if (!routerconffile.exists()) {
return;
}
} else {
return;
}
if (isInstalled("i2p") || checkProgramFilesInstall()) {
i2pRouter = new Router(routerconf, System.getProperties());
String newsURL = i2pRouter.getConfigSetting("router.newsURL");
if (newsURL != null) {
if (newsURL.contains("http://dn3tvalnjz432qkqsvpfdqrwpqkw3ye4n4i2uyfr4jexvo3sp5ka.b32.i2p/news/win/beta/news.su3")) {
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("http://tc73n4kivdroccekirco7rhgxdg5f3cjvbaapabupeyzrqwv5guq.b32.i2p/win/beta/news.su3")) {
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("http://ekm3fu6fr5pxudhwjmdiea5dovc3jdi66hjgop4c7z7dfaw7spca.b32.i2p/i2pwinupdate.su3")) {
logger.info(
"checked router.updateURL config, containes easy-intall update 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());
@ -167,7 +241,7 @@ public class WinLauncher extends CopyConfigDir {
return home;
}
private static boolean launchBrowser(boolean privateBrowsing,
private static boolean launchBrowser(int privateBrowsing,
boolean usabilityMode,
boolean chromiumFirst,
int proxyTimeoutTime,

View File

@ -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.

View File

@ -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
View File

@ -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 \

View File

@ -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

View File

@ -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

View File

@ -1 +1 @@
1.9.6
1.9.7

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

View File

@ -4,7 +4,7 @@ UniCode true
!define APPNAME "I2PBrowser-Launcher"
!define COMPANYNAME "I2P"
!define DESCRIPTION "This is a tool which contains an I2P router, a bundled JVM, and a tool for automatically configuring a browser to use with I2P."
!define I2P_MESSAGE "Could not find I2P. Installing portable Jpackaged I2P."
!define I2P_MESSAGE "Please choose a directory."
!define LAUNCH_TEXT "Start I2P?"
!define LICENSE_TITLE "Many Licenses"
!define CONSOLE_URL "http://127.0.0.1:7657/home"
@ -13,11 +13,11 @@ UniCode true
!include i2pbrowser-jpackage.nsi
!include FindProcess.nsh
var I2PINSTEXE
var INSTDIR
SetOverwrite on
!define I2PINSTEXE
!define INSTDIR
!define I2PINSTEXE_USERMODE "$LOCALAPPDATA\i2p"
!define RAM_NEEDED_FOR_64BIT 0x80000000
@ -122,18 +122,18 @@ PageEx license
PageExEnd
PageEx directory
dirtext "${I2P_MESSAGE}"
dirvar $I2PINSTEXE
dirvar $INSTDIR
PageCallbacks routerDetect
PageExEnd
Page instfiles
Function .onInit
StrCpy $I2PINSTEXE "${I2PINSTEXE_USERMODE}"
StrCpy $INSTDIR "${I2PINSTEXE_USERMODE}"
UserInfo::GetAccountType
pop $0
${If} $0 != "admin"
StrCpy $INSTDIR "$LOCALAPPDATA\${COMPANYNAME}\${APPNAME}"
StrCpy $I2PINSTEXE "${I2PINSTEXE_USERMODE}"
StrCpy $INSTDIR "${I2PINSTEXE_USERMODE}"
StrCpy $INSTDIR "${I2PINSTEXE_USERMODE}"
${EndIf}
!insertmacro MUI_LANGDLL_DISPLAY
#Call ShouldInstall64Bit
@ -141,33 +141,22 @@ Function .onInit
FunctionEnd
Function routerDetect
createDirectory $I2PINSTEXE
SetOutPath $I2PINSTEXE\app
createDirectory $INSTDIR
SetOutPath $INSTDIR\app
File /a /r "I2P\app\"
SetOutPath $I2PINSTEXE\runtime
SetOutPath $INSTDIR\runtime
File /a /r "I2P\runtime\"
SetOutPath $I2PINSTEXE
SetOutPath $INSTDIR\config
File /a /r "I2P\config\"
SetOutPath $INSTDIR
File /a /r "I2P\I2P.exe"
File /a /r "I2P\I2P.ico"
File "I2P\config\jpackaged"
# The NSIS Installer uses an ico icon, the jpackage-only ones use png
File /a /r "I2P\ui2pbrowser_icon.ico"
createDirectory "$I2PINSTEXE\"
SetOutPath "$I2PINSTEXE\"
IfFileExists $I2PINSTEXE\router.config +2 0
File /a /r "I2P/config/router.config"
IfFileExists $I2PINSTEXE\clients.config +2 0
File /a /r "I2P/config/clients.config"
IfFileExists $I2PINSTEXE\wrapper.config +2 0
File /a /r "I2P/config/wrapper.config"
IfFileExists $I2PINSTEXE\hosts.txt +2 0
File /a /r "I2P/config/hosts.txt"
IfFileExists $I2PINSTEXE\eepsite +2 0
File /a /r "I2P/config/eepsite"
IfFileExists $I2PINSTEXE\webapps +2 0
File /a /r "I2P/config/webapps"
createDirectory "$INSTDIR\"
SetOutPath "$INSTDIR\"
File /a /r "I2P/config/certificates"
File /a /r "I2P/config/geoip"
File /a /r "I2P/config/i2ptunnel.config"
FunctionEnd
Function installerFunction
@ -177,28 +166,19 @@ Function installerFunction
Sleep 500
${LoopWhile} $0 <> 0
${EndIf}
# delete the jpackaged file for safety. Remove this IMMEDIATELY after the next release.
# early-adopters and daily-build users may have to manually delete config files if they
# uninstall.
# RELATED: line 246
Delete "$INSTDIR\jpackaged"
# set the installation directory as the destination for the following actions
createDirectory $INSTDIR
SetOutPath $INSTDIR
File ui2pbrowser_icon.ico
# Update jpackaged I2P router, if it exists
${If} ${FileExists} "$I2PINSTEXE\jpackaged"
createDirectory $I2PINSTEXE
SetOutPath $I2PINSTEXE
${If} ${Silent}
ReadEnvStr $0 OLD_I2P_VERSION
${If} $0 < ${I2P_VERSION}
call routerDetect
${EndIf}
${Else}
call routerDetect
${EndIf}
${EndIf}
# Update jpackaged I2P router
call routerDetect
# Install the launcher scripts
createDirectory "$INSTDIR"
@ -210,35 +190,22 @@ Function installerFunction
SetOutPath "$INSTDIR\licenses"
File /a /r "licenses/*"
SetOutPath "$I2PINSTEXE"
SetOutPath "$INSTDIR"
createDirectory "$SMPROGRAMS\${APPNAME}"
CreateShortCut "$SMPROGRAMS\${APPNAME}\Browse I2P.lnk" "$I2PINSTEXE\I2P.exe" "" "$INSTDIR\ui2pbrowser_icon.ico"
CreateShortCut "$SMPROGRAMS\${APPNAME}\Browse I2P - Temporary Identity.lnk" "$I2PINSTEXE\I2P.exe -private" "" "$INSTDIR\ui2pbrowser_icon.ico"
CreateShortCut "$SMPROGRAMS\${APPNAME}\Browse I2P.lnk" "$INSTDIR\I2P.exe" "" "$INSTDIR\ui2pbrowser_icon.ico"
CreateShortCut "$SMPROGRAMS\${APPNAME}\Browse I2P - Temporary Identity.lnk" "$INSTDIR\I2P.exe -private" "" "$INSTDIR\ui2pbrowser_icon.ico"
CreateShortCut "$DESKTOP\Browse I2P.lnk" "$I2PINSTEXE\I2P.exe" "" "$INSTDIR\ui2pbrowser_icon.ico"
CreateShortCut "$DESKTOP\Browse I2P - Temporary Identity.lnk" "$I2PINSTEXE\I2P.exe -private" "" "$INSTDIR\ui2pbrowser_icon.ico"
CreateShortCut "$DESKTOP\Browse I2P.lnk" "$INSTDIR\I2P.exe" "" "$INSTDIR\ui2pbrowser_icon.ico"
CreateShortCut "$DESKTOP\Browse I2P - Temporary Identity.lnk" "$INSTDIR\I2P.exe -private" "" "$INSTDIR\ui2pbrowser_icon.ico"
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"
createDirectory "$I2PINSTEXE"
SetOutPath "$I2PINSTEXE"
createDirectory "$INSTDIR"
SetOutPath "$INSTDIR"
SetOutPath "$INSTDIR"
# create the uninstaller
@ -257,12 +224,13 @@ SectionEnd
# uninstaller section start
Section "uninstall"
# Uninstall the launcher scripts
Delete $INSTDIR\*
rmDir /r "$INSTDIR\"
${If} ${FileExists} "$I2PINSTEXE\jpackaged"
Delete $I2PINSTEXE\*
rmDir /r "$I2PINSTEXE"
${EndIf}
rmDir /r "$INSTDIR\app"
rmDir /r "$INSTDIR\config"
rmDir /r "$INSTDIR\runtime"
Delete "$INSTDIR\ui2pbrowser_icon.ico"
Delete "$INSTDIR\windowsUItoopie2.png"
Delete "$INSTDIR\I2P.exe"
# Remove shortcuts and folders
Delete "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk"
@ -274,11 +242,25 @@ Section "uninstall"
Delete "$DESKTOP\${APPNAME}.lnk"
Delete "$DESKTOP\Private Browsing-${APPNAME}.lnk"
rmDir /r "$SMPROGRAMS\${APPNAME}"
rmDir /r "$INSTDIR\firefox.profile.i2p\extensions"
rmDir /r "$INSTDIR\firefox.profile.i2p"
rmDir /r "$LOCALAPPDATA\${APPNAME}"
rmDir /r "$INSTDIR"
#### SUPER SUPER EXTRA IMPORTANT!
### RELATED: line 169
## IF YOU DO THIS WRONG YOU WILL BREAK CONFIGS:
## The purpose of the `jpackaged` file has changed, as has the point
## where it is created.
# 1. The jpackaged file is now created only **after** the jpackage itself
# has migrated default configs into the $INSTDIR. IF THEY ALREADY EXIST,
# it WILL NOT BE CREATED, even if there is a jpackage present. This is
# intentional behavior.
# 2. The jpackaged file now indicates that the configurations were created
# by running the jpackage, and not by an un-bundled router. If it is not
# present, then we have already deleted everything we are responsible for
# and don't need to do the section below.
${If} ${FileExists} "$INSTDIR\jpackaged"
Delete $INSTDIR\*
rmDir /r "$INSTDIR"
${EndIf}
# delete the uninstaller
Delete "$INSTDIR\uninstall-i2pbrowser.exe"
@ -292,8 +274,8 @@ SectionEnd
!insertmacro MUI_PAGE_FINISH
Function LaunchLink
SetOutPath "$I2PINSTEXE"
StrCpy $OUTDIR $I2PINSTEXE
SetOutPath "$INSTDIR"
StrCpy $OUTDIR $INSTDIR
${If} ${Silent}
ReadEnvStr $0 RESTART_I2P
${If} $0 != ""

View File

@ -1 +1 @@
!define I2P_VERSION 1.9.6
!define I2P_VERSION 1.9.7

View File

@ -1,3 +1,3 @@
!define VERSIONMAJOR 1
!define VERSIONMINOR 9
!define VERSIONBUILD 6
!define VERSIONBUILD 7

View File

@ -1 +1 @@
1.9.6
1.9.7

View File

@ -1,9 +0,0 @@
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=/usr/bin/i2pbrowser.sh
Name=I2P Browser
Categories=Network;WebBrowser;
Icon=/var/lib/i2pbrowser/icons/ui2pbrowser_icon.ico

View File

@ -1,9 +0,0 @@
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=/usr/local/bin/i2pbrowser
Name=I2P Browser
Categories=Network;WebBrowser;
Icon=/var/lib/i2pbrowser/icons/ui2pbrowser_icon.ico

View File

@ -1,9 +0,0 @@
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=/usr/bin/i2pconfig.sh
Name=I2P Configuration
Categories=Network;WebBrowser;
Icon=/var/lib/i2pbrowser/icons/ui2pbrowser_icon.ico

View File

@ -1,9 +0,0 @@
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=/usr/local/bin/i2pconfig
Name=I2P Configuration
Categories=Network;WebBrowser;
Icon=/var/lib/i2pbrowser/icons/ui2pbrowser_icon.ico

View File

@ -1,21 +0,0 @@
#! /usr/bin/env sh
# Works for Debian service installs. Sets up minified, custom profile for configuring I2P console.
if grep '^i2psvc:' /etc/passwd; then
I2P_HOME=$(grep '^i2psvc:' /etc/passwd | sed 's|i2psvc:x:||g' | sed 's|:/usr/sbin/nologin||g' | tr -d ':1234567890' | sed 's|ip|i2p|g')
ROUTER_CONFIG=$(sudo -u i2psvc ls $I2P_HOME/i2p-config/router.config)
fi
installer(){
if [ $(sudo -u i2psvc ls $I2P_HOME/i2p-config/router.config) ]; then
echo $I2P_HOME $ROUTER_CONFIG $0
if ! sudo -u i2psvc grep -R 'routerconsole.browser' "$I2P_HOME/i2p-config/router.config" ; then
echo "routerconsole.browser=/usr/local/bin/i2pconfig" | sudo tee -a "$I2P_HOME/i2p-config/router.config"
fi
fi
}
installer

View File

@ -1,44 +0,0 @@
#! /usr/bin/env sh
if [ -f "/etc/i2pbrowser/i2pbrowserrc" ]; then
. /etc/i2pbrowser/i2pbrowserrc
fi
if [ ! -z $I2PROUTER ]; then
"$I2PROUTER" start
fi
if [ -z $BROWSING_PROFILE ]; then
BROWSING_PROFILE="."
fi
if [ ! -d "$BROWSING_PROFILE" ]; then
mkdir -p "$BROWSING_PROFILE"
cp -vr /var/lib/i2pbrowser/profile/* "$BROWSING_PROFILE"
fi
if [ ! -f "$BROWSING_PROFILE/user.js" ]; then
echo "user.js not present in $BROWSING_PROFILE, this is not a Firefox profile"
exit 1
fi
if [ -z $FIREFOX ]; then
if [ -f "firefox/firefox" ]; then
FIREFOX="./firefox/firefox"
fi
FIREFOX=$(which firefox-esr)
if [ -z $FIREFOX ]; then
FIREFOX=$(which firefox)
fi
fi
if [ -z $FIREFOX ]; then
echo "Firefox does not appear to be in your \$PATH."
echo "Please install Firefox via a package manager, or"
echo "or set the FIREFOX variable in your shell to the"
echo "location of a Firefox executable."
exit 1
fi
echo $FIREFOX --profile "$BROWSING_PROFILE" $@
$FIREFOX --profile "$BROWSING_PROFILE" $@

View File

@ -1,17 +0,0 @@
I2PROUTER=$(which i2prouter)
if [ -z $I2PROUTER ]; then
I2PROUTER=/usr/sbin/i2prouter
fi
if [ ! -f $I2PROUTER ]; then
I2PROUTER="$HOME/i2p/i2prouter"
fi
if [ ! -f $I2PROUTER ]; then
I2PROUTER=""
fi
wget -q -O - "http://localhost:7657" >/dev/null && I2PROUTER=""
echo "$I2PROUTER"

View File

@ -1,8 +0,0 @@
if [ -f /etc/i2pbrowser/i2pbrowserdebianrc ]; then
. /etc/i2pbrowser/i2pbrowserdebianrc
fi
CONFIGURING_PROFILE=$HOME/i2p/firefox/webapps
BROWSING_PROFILE=$HOME/i2p/firefox/browsing
ROUTER_CONSOLE="127.0.0.1:7657"

View File

@ -1,60 +0,0 @@
#! /usr/bin/env sh
if [ -f "/etc/i2pbrowser/i2pbrowserrc" ]; then
. /etc/i2pbrowser/i2pbrowserrc
fi
if [ ! -z $I2PROUTER ]; then
"$I2PROUTER" start
fi
if [ -f "$HOME/.i2p/router.config" ]; then
if [ "$0" = "/usr/local/bin/i2pconfig" ]; then
if ! grep -R 'routerconsole.browser' "$HOME/.i2p/router.config" ; then
echo "routerconsole.browser=$0" | tee -a "$HOME/.i2p/router.config"
fi
fi
fi
if [ -z $CONFIGURING_PROFILE ]; then
CONFIGURING_PROFILE="."
fi
if [ -z $ROUTER_CONSOLE ]; then
ROUTER_CONSOLE="$1"
if [ -z $1 ]; then
ROUTER_CONSOLE="http://127.0.0.1:7657"
fi
fi
if [ ! -d "$CONFIGURING_PROFILE" ]; then
mkdir -p "$CONFIGURING_PROFILE"
cp -vr /var/lib/i2pbrowser/app-profile/* "$CONFIGURING_PROFILE"
fi
if [ ! -f "$CONFIGURING_PROFILE/user.js" ]; then
echo "user.js not present in $CONFIGURING_PROFILE, this is not a Firefox profile"
exit 1
fi
if [ -z $FIREFOX ]; then
if [ -f "firefox/firefox" ]; then
FIREFOX="./firefox/firefox"
fi
FIREFOX=$(which firefox-esr)
if [ -z $FIREFOX ]; then
FIREFOX=$(which firefox)
fi
fi
if [ -z $FIREFOX ]; then
echo "Firefox does not appear to be in your \$PATH."
echo "Please install Firefox via a package manager, or"
echo "or set the FIREFOX variable in your shell to the"
echo "location of a Firefox executable."
exit 1
fi
echo $FIREFOX --profile "$CONFIGURING_PROFILE" "$ROUTER_CONSOLE" $@
$FIREFOX --profile "$CONFIGURING_PROFILE" "$ROUTER_CONSOLE" $@

21
src/unix/torbrowser.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
version="$(curl -s https://aus1.torproject.org/torbrowser/update_3/release/downloads.json | jq -r ".version")"
locale="en-US" # mention your locale. default = en-US
if [ -d /etc/default/locale ]; then
. /etc/default/locale
locale=$(echo "${LANG}" | cut -d . -f1)
fi
if [ ! -f ./tor.keyring ]; then
gpg --auto-key-locate nodefault,wkd --locate-keys torbrowser@torproject.org
gpg --output ./tor.keyring --export torbrowser@torproject.org
fi
if [ ! -f "tor-browser-linux64-"$version"_"$locale".tar.xz" ]; then
wget -cv "https://www.torproject.org/dist/torbrowser/"$version"/tor-browser-linux64-"$version"_"$locale".tar.xz"
wget -cv "https://www.torproject.org/dist/torbrowser/"$version"/tor-browser-linux64-"$version"_"$locale".tar.xz.asc"
fi
gpgv --keyring ./tor.keyring "tor-browser-linux64-"$version"_"$locale".tar.xz.asc" "tor-browser-linux64-"$version"_"$locale".tar.xz"
tar xvJf "tor-browser-linux64-"$version"_"$locale".tar.xz"

View File

@ -5,11 +5,14 @@ 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
./clean.sh
wsl make distclean
./build.sh
cd "$SCRIPT_DIR/I2P" || exit 1
# ./lib/torbrowser.sh <- haha just kidding, but uncomment this to make it pack everything it needs into the tar.gz
cd "$SCRIPT_DIR" || exit 1
tar czvf I2P.tar.gz I2P

View File

@ -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