Compare commits
46 Commits
20220919.j
...
20221008
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
67e0b87d97 | ||
|
|
1424913447 | ||
|
|
c0cb68f972 | ||
|
|
52c91e1e65 | ||
|
|
9e6ea435af | ||
|
|
308055143f | ||
|
|
53f731f945 | ||
|
|
7ec56455cd | ||
|
|
c11f982088 | ||
|
|
58e1276072 | ||
|
|
20240c9e75 | ||
|
|
4079d6a8b1 | ||
|
|
8b893d1116 | ||
|
|
0d209bb2a8 | ||
|
|
186493b154 | ||
|
|
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
|
*.so
|
||||||
*.jar
|
*.jar
|
||||||
*.zip
|
*.zip
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
|
config_override.sh
|
||||||
2
Makefile
2
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
|
||||||
@@ -73,7 +72,6 @@ build/I2P: I2P build
|
|||||||
src/I2P/config:
|
src/I2P/config:
|
||||||
mkdir -p src/I2P/config
|
mkdir -p src/I2P/config
|
||||||
rm -rf src/I2P/config/geoip src/I2P/config/webapps src/I2P/config/certificates
|
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)/clients.config src/I2P/config/
|
||||||
cp -v $(RES_DIR)/wrapper.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
|
#grep -v 'router.updateURL' $(RES_DIR)/router.config > src/I2P/config/router.config
|
||||||
|
|||||||
@@ -234,7 +234,8 @@ testing.
|
|||||||
|
|
||||||
**The only remotely interesting Unix functionality that remains in this**
|
**The only remotely interesting Unix functionality that remains in this**
|
||||||
**repository is the construction of a portable. You can use `targz.sh` to**
|
**repository is the construction of a portable. You can use `targz.sh` to**
|
||||||
**generate that.**
|
**generate that. Once generated, `cd I2P && ./lib/torbrowser.sh` to complete**
|
||||||
|
**setup, and `./bin/I2P` to run it.**
|
||||||
|
|
||||||
Issues
|
Issues
|
||||||
------
|
------
|
||||||
|
|||||||
4
build.sh
4
build.sh
@@ -38,6 +38,10 @@ 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/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
|
--input build --main-jar launcher.jar --main-class net.i2p.router.WinLauncher
|
||||||
|
|
||||||
cp "$I2P_PKG/licenses/"* license/
|
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
|
2022-09-18 idk
|
||||||
* remove unstable/deprecated targets from Makefile.
|
* 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
|
* 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)
|
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"
|
||||||
|
|||||||
17
daily.sh
17
daily.sh
@@ -9,12 +9,9 @@ if [ -f i2pversion_override ]; then
|
|||||||
. "$SCRIPT_DIR/i2pversion_override"
|
. "$SCRIPT_DIR/i2pversion_override"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mv "$SCRIPT_DIR/config_override.sh" "$SCRIPT_DIR/config_override.sh.bak"
|
||||||
. "$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 +33,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
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
JNA_VERSION=5.11.0
|
JNA_VERSION=5.11.0
|
||||||
export JNA_VERSION=5.11.0
|
export JNA_VERSION=5.11.0
|
||||||
I2PFIREFOX_VERSION=0.0.34
|
I2PFIREFOX_VERSION=1.0.1
|
||||||
export I2PFIREFOX_VERSION=0.0.36
|
export I2PFIREFOX_VERSION=1.0.1
|
||||||
# Comment this out to build from an alternate branch or
|
# Comment this out to build from an alternate branch or
|
||||||
# the tip of the master branch.
|
# the tip of the master branch.
|
||||||
VERSIONMAJOR=1
|
VERSIONMAJOR=1
|
||||||
VERSIONMINOR=9
|
VERSIONMINOR=9
|
||||||
VERSIONBUILD=6
|
VERSIONBUILD=7
|
||||||
I2P_VERSION="$VERSIONMAJOR.$VERSIONMINOR.$VERSIONBUILD"
|
I2P_VERSION="$VERSIONMAJOR.$VERSIONMINOR.$VERSIONBUILD"
|
||||||
export I2P_VERSION="$VERSIONMAJOR.$VERSIONMINOR.$VERSIONBUILD"
|
export I2P_VERSION="$VERSIONMAJOR.$VERSIONMINOR.$VERSIONBUILD"
|
||||||
VERSION=i2p-jpackage-1.9.4
|
VERSION=i2p-jpackage-1.9.4
|
||||||
|
|||||||
@@ -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() {
|
||||||
@@ -46,7 +46,7 @@ public class CopyConfigDir {
|
|||||||
if (copyDirectory(file, new File(newPath)))
|
if (copyDirectory(file, new File(newPath)))
|
||||||
return false;
|
return false;
|
||||||
if (file.isFile())
|
if (file.isFile())
|
||||||
if (!copyFile(file, new File(newPath), true))
|
if (0 == copyFile(file, new File(newPath), true))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -61,37 +61,49 @@ public class CopyConfigDir {
|
|||||||
if (file.isDirectory())
|
if (file.isDirectory())
|
||||||
if (!copyConfigDirectory(file, new File(newPath)))
|
if (!copyConfigDirectory(file, new File(newPath)))
|
||||||
return false;
|
return false;
|
||||||
if (file.isFile())
|
if (file.isFile()) {
|
||||||
if (!copyFileNeverOverwrite(
|
int cnr = copyFileNeverOverwrite(file, new File(newPath));
|
||||||
file,
|
if (0 == cnr)
|
||||||
new File(newPath))) // new File(workDir, file.toString())))
|
|
||||||
return false;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean copyFileNeverOverwrite(String basePath,
|
public static int copyFileNeverOverwrite(String basePath, String workPath) {
|
||||||
String workPath) {
|
|
||||||
File baseFile = new File(basePath);
|
File baseFile = new File(basePath);
|
||||||
File workFile = new File(workPath);
|
File workFile = new File(workPath);
|
||||||
return copyFileNeverOverwrite(baseFile, workFile);
|
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);
|
return copyFile(basePath, workPath, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean copyFile(File basePath, File workPath,
|
public static int copyFile(File basePath, File workPath, boolean overWrite) {
|
||||||
boolean overWrite) {
|
|
||||||
if (!basePath.exists()) {
|
if (!basePath.exists()) {
|
||||||
logger.info(basePath.getAbsolutePath() + " doesn't exist, not copying");
|
logger.info(basePath.getAbsolutePath() + " doesn't exist, not copying");
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!overWrite && workPath.exists()) {
|
if (!overWrite && workPath.exists()) {
|
||||||
logger.info(workPath.getAbsolutePath() +
|
logger.info(workPath.getAbsolutePath() +
|
||||||
" already exists, not overwriting");
|
" already exists, not overwriting");
|
||||||
return true;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
File workDir = workPath.getParentFile();
|
File workDir = workPath.getParentFile();
|
||||||
@@ -111,12 +123,12 @@ public class CopyConfigDir {
|
|||||||
}
|
}
|
||||||
in.close();
|
in.close();
|
||||||
out.close();
|
out.close();
|
||||||
return true;
|
return 1;
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.warning(e.toString());
|
logger.warning(e.toString());
|
||||||
logger.warning("failed to copy " + basePath.getAbsolutePath() + " to " +
|
logger.warning("failed to copy " + basePath.getAbsolutePath() + " to " +
|
||||||
workPath.getAbsolutePath());
|
workPath.getAbsolutePath());
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,20 +164,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,10 +33,10 @@ 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;
|
int privateBrowsing = 0;
|
||||||
boolean usabilityMode = false;
|
boolean usabilityMode = false;
|
||||||
boolean chromiumFirst = false;
|
boolean chromiumFirst = false;
|
||||||
int proxyTimeoutTime = 200;
|
int proxyTimeoutTime = 200;
|
||||||
@@ -46,7 +46,7 @@ public class WinLauncher extends CopyConfigDir {
|
|||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
for (String arg : args) {
|
for (String arg : args) {
|
||||||
if (arg.equals("-private")) {
|
if (arg.equals("-private")) {
|
||||||
privateBrowsing = true;
|
privateBrowsing = 1;
|
||||||
logger.info(
|
logger.info(
|
||||||
"Private browsing is true, profile will be discarded at end of session.");
|
"Private browsing is true, profile will be discarded at end of session.");
|
||||||
} else if (arg.equals("-chromium")) {
|
} else if (arg.equals("-chromium")) {
|
||||||
@@ -88,13 +88,6 @@ public class WinLauncher extends CopyConfigDir {
|
|||||||
File programs = programFile();
|
File programs = programFile();
|
||||||
File home = homeDir();
|
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.base", programs.getAbsolutePath());
|
||||||
System.setProperty("i2p.dir.config", home.getAbsolutePath());
|
System.setProperty("i2p.dir.config", home.getAbsolutePath());
|
||||||
System.setProperty("router.pid",
|
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.base"));
|
||||||
logger.info("\t" + System.getProperty("i2p.dir.config"));
|
logger.info("\t" + System.getProperty("i2p.dir.config"));
|
||||||
logger.info("\t" + System.getProperty("router.pid"));
|
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,
|
if (launchBrowser(privateBrowsing, usabilityMode, chromiumFirst,
|
||||||
proxyTimeoutTime, newArgsList)) {
|
proxyTimeoutTime, newArgsList)) {
|
||||||
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");
|
||||||
|
|
||||||
@@ -134,6 +152,62 @@ public class WinLauncher extends CopyConfigDir {
|
|||||||
i2pRouter.runRouter();
|
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() {
|
private static void setupLauncher() {
|
||||||
File jrehome = javaHome();
|
File jrehome = javaHome();
|
||||||
logger.info("jre home is: " + jrehome.getAbsolutePath());
|
logger.info("jre home is: " + jrehome.getAbsolutePath());
|
||||||
@@ -167,7 +241,7 @@ public class WinLauncher extends CopyConfigDir {
|
|||||||
return home;
|
return home;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean launchBrowser(boolean privateBrowsing,
|
private static boolean launchBrowser(int privateBrowsing,
|
||||||
boolean usabilityMode,
|
boolean usabilityMode,
|
||||||
boolean chromiumFirst,
|
boolean chromiumFirst,
|
||||||
int proxyTimeoutTime,
|
int proxyTimeoutTime,
|
||||||
|
|||||||
@@ -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,124 @@ 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 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 {
|
} else {
|
||||||
// Here, the service is already started, so I2P should appear to be
|
try {
|
||||||
// running to the other checks.
|
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) {
|
public static String getServiceState(String serviceName) {
|
||||||
@@ -160,6 +254,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
|
||||||
|
|
||||||
@@ -40,10 +40,11 @@ sleep 5s
|
|||||||
|
|
||||||
HERE="$PWD"
|
HERE="$PWD"
|
||||||
if [ ! -d "$HERE/../i2p.i2p.jpackage-build/" ]; then
|
if [ ! -d "$HERE/../i2p.i2p.jpackage-build/" ]; then
|
||||||
git clone -b "$VERSION" https://i2pgit.org/i2p-hackers/i2p.i2p "$HERE/../i2p.i2p.jpackage-build/"
|
git clone --depth=1 -b "$VERSION" https://i2pgit.org/i2p-hackers/i2p.i2p "$HERE/../i2p.i2p.jpackage-build/"
|
||||||
tar --exclude="$HERE/../i2p.i2p.jpackage-build/.git" -cvzf i2p.i2p.jpackage-build.tar.gz "$HERE/../i2p.i2p.jpackage-build/"
|
tar --exclude="$HERE/../i2p.i2p.jpackage-build/.git" -cvzf i2p.i2p.jpackage-build.tar.gz "$HERE/../i2p.i2p.jpackage-build/"
|
||||||
fi
|
fi
|
||||||
cd "$HERE/../i2p.i2p.jpackage-build/"
|
cd "$HERE/../i2p.i2p.jpackage-build/"
|
||||||
|
git pull --all
|
||||||
for i in $COUNT; do
|
for i in $COUNT; do
|
||||||
echo -n "$i...."; sleep 1s
|
echo -n "$i...."; sleep 1s
|
||||||
done
|
done
|
||||||
|
|||||||
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
|
||||||
|
|
||||||
|
|||||||
@@ -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 |
@@ -4,7 +4,7 @@ UniCode true
|
|||||||
!define APPNAME "I2PBrowser-Launcher"
|
!define APPNAME "I2PBrowser-Launcher"
|
||||||
!define COMPANYNAME "I2P"
|
!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 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 LAUNCH_TEXT "Start I2P?"
|
||||||
!define LICENSE_TITLE "Many Licenses"
|
!define LICENSE_TITLE "Many Licenses"
|
||||||
!define CONSOLE_URL "http://127.0.0.1:7657/home"
|
!define CONSOLE_URL "http://127.0.0.1:7657/home"
|
||||||
@@ -13,12 +13,12 @@ UniCode true
|
|||||||
!include i2pbrowser-jpackage.nsi
|
!include i2pbrowser-jpackage.nsi
|
||||||
!include FindProcess.nsh
|
!include FindProcess.nsh
|
||||||
|
|
||||||
var I2PINSTEXE
|
var INSTDIR
|
||||||
|
|
||||||
SetOverwrite on
|
SetOverwrite on
|
||||||
|
|
||||||
!define I2PINSTEXE
|
!define INSTDIR
|
||||||
!define I2PINSTEXE_USERMODE "$LOCALAPPDATA\i2p"
|
!define I2PINSTEXE_USERMODE "$LOCALAPPDATA\i2peasy"
|
||||||
|
|
||||||
!define RAM_NEEDED_FOR_64BIT 0x80000000
|
!define RAM_NEEDED_FOR_64BIT 0x80000000
|
||||||
|
|
||||||
@@ -122,18 +122,20 @@ PageEx license
|
|||||||
PageExEnd
|
PageExEnd
|
||||||
PageEx directory
|
PageEx directory
|
||||||
dirtext "${I2P_MESSAGE}"
|
dirtext "${I2P_MESSAGE}"
|
||||||
dirvar $I2PINSTEXE
|
dirvar $INSTDIR
|
||||||
PageCallbacks routerDetect
|
PageCallbacks routerDetect
|
||||||
PageExEnd
|
PageExEnd
|
||||||
Page instfiles
|
Page instfiles
|
||||||
|
|
||||||
Function .onInit
|
Function .onInit
|
||||||
StrCpy $I2PINSTEXE "${I2PINSTEXE_USERMODE}"
|
# Note: This is all redundant and I know it.
|
||||||
|
# Admin installs have been migrated to user-mode installs.
|
||||||
|
# But I'm leaving it because I might need it again if I support service installs.
|
||||||
|
StrCpy $INSTDIR "${I2PINSTEXE_USERMODE}"
|
||||||
UserInfo::GetAccountType
|
UserInfo::GetAccountType
|
||||||
pop $0
|
pop $0
|
||||||
${If} $0 != "admin"
|
${If} $0 != "admin"
|
||||||
StrCpy $INSTDIR "$LOCALAPPDATA\${COMPANYNAME}\${APPNAME}"
|
StrCpy $INSTDIR "${I2PINSTEXE_USERMODE}"
|
||||||
StrCpy $I2PINSTEXE "${I2PINSTEXE_USERMODE}"
|
|
||||||
${EndIf}
|
${EndIf}
|
||||||
!insertmacro MUI_LANGDLL_DISPLAY
|
!insertmacro MUI_LANGDLL_DISPLAY
|
||||||
#Call ShouldInstall64Bit
|
#Call ShouldInstall64Bit
|
||||||
@@ -141,33 +143,22 @@ Function .onInit
|
|||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function routerDetect
|
Function routerDetect
|
||||||
createDirectory $I2PINSTEXE
|
createDirectory $INSTDIR
|
||||||
SetOutPath $I2PINSTEXE\app
|
SetOutPath $INSTDIR\app
|
||||||
File /a /r "I2P\app\"
|
File /a /r "I2P\app\"
|
||||||
SetOutPath $I2PINSTEXE\runtime
|
SetOutPath $INSTDIR\runtime
|
||||||
File /a /r "I2P\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.exe"
|
||||||
File /a /r "I2P\I2P.ico"
|
# The NSIS Installer uses an ico icon, the jpackage-only ones use png
|
||||||
File "I2P\config\jpackaged"
|
File /a /r "I2P\ui2pbrowser_icon.ico"
|
||||||
|
|
||||||
createDirectory "$I2PINSTEXE\"
|
createDirectory "$INSTDIR\"
|
||||||
SetOutPath "$I2PINSTEXE\"
|
SetOutPath "$INSTDIR\"
|
||||||
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"
|
|
||||||
File /a /r "I2P/config/certificates"
|
File /a /r "I2P/config/certificates"
|
||||||
File /a /r "I2P/config/geoip"
|
File /a /r "I2P/config/geoip"
|
||||||
File /a /r "I2P/config/i2ptunnel.config"
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function installerFunction
|
Function installerFunction
|
||||||
@@ -177,68 +168,44 @@ Function installerFunction
|
|||||||
Sleep 500
|
Sleep 500
|
||||||
${LoopWhile} $0 <> 0
|
${LoopWhile} $0 <> 0
|
||||||
${EndIf}
|
${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
|
# set the installation directory as the destination for the following actions
|
||||||
createDirectory $INSTDIR
|
createDirectory $INSTDIR
|
||||||
SetOutPath $INSTDIR
|
SetOutPath $INSTDIR
|
||||||
File ui2pbrowser_icon.ico
|
File ui2pbrowser_icon.ico
|
||||||
|
|
||||||
# Update jpackaged I2P router, if it exists
|
# Update jpackaged I2P router
|
||||||
${If} ${FileExists} "$I2PINSTEXE\jpackaged"
|
call routerDetect
|
||||||
createDirectory $I2PINSTEXE
|
|
||||||
SetOutPath $I2PINSTEXE
|
|
||||||
|
|
||||||
${If} ${Silent}
|
|
||||||
ReadEnvStr $0 OLD_I2P_VERSION
|
|
||||||
${If} $0 < ${I2P_VERSION}
|
|
||||||
call routerDetect
|
|
||||||
|
|
||||||
${EndIf}
|
|
||||||
${Else}
|
|
||||||
call routerDetect
|
|
||||||
|
|
||||||
${EndIf}
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
# Install the launcher scripts
|
# Install the launcher scripts
|
||||||
createDirectory "$INSTDIR"
|
createDirectory "$INSTDIR"
|
||||||
#SetOutPath "$INSTDIR"
|
|
||||||
#File "win/*"
|
|
||||||
|
|
||||||
# Install the licenses
|
# Install the licenses
|
||||||
createDirectory "$INSTDIR\licenses"
|
createDirectory "$INSTDIR\licenses"
|
||||||
SetOutPath "$INSTDIR\licenses"
|
SetOutPath "$INSTDIR\licenses"
|
||||||
File /a /r "licenses/*"
|
File /a /r "licenses/*"
|
||||||
|
|
||||||
SetOutPath "$I2PINSTEXE"
|
SetOutPath "$INSTDIR"
|
||||||
createDirectory "$SMPROGRAMS\${APPNAME}"
|
createDirectory "$SMPROGRAMS\${APPNAME}"
|
||||||
CreateShortCut "$SMPROGRAMS\${APPNAME}\Browse I2P.lnk" "$I2PINSTEXE\I2P.exe" "" "$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" "$I2PINSTEXE\I2P.exe -private" "" "$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.lnk" "$INSTDIR\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 - Temporary Identity.lnk" "$INSTDIR\I2P.exe -private" "" "$INSTDIR\ui2pbrowser_icon.ico"
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
|
|
||||||
SetShellVarContext current
|
SetShellVarContext current
|
||||||
Var /Global I2PAPPDATA
|
|
||||||
|
|
||||||
IfFileExists "$I2PINSTEXE\clients.config" 0 +2
|
IfFileExists "$INSTDIR\eepsite\docroot" +2 0
|
||||||
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"
|
File /a /r "I2P\eepsite"
|
||||||
|
|
||||||
createDirectory "$I2PINSTEXE"
|
createDirectory "$INSTDIR"
|
||||||
SetOutPath "$I2PINSTEXE"
|
SetOutPath "$INSTDIR"
|
||||||
|
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
# create the uninstaller
|
# create the uninstaller
|
||||||
@@ -257,12 +224,12 @@ SectionEnd
|
|||||||
# uninstaller section start
|
# uninstaller section start
|
||||||
Section "uninstall"
|
Section "uninstall"
|
||||||
# Uninstall the launcher scripts
|
# Uninstall the launcher scripts
|
||||||
Delete $INSTDIR\*
|
rmDir /r "$INSTDIR\app"
|
||||||
rmDir /r "$INSTDIR\"
|
rmDir /r "$INSTDIR\config"
|
||||||
${If} ${FileExists} "$I2PINSTEXE\jpackaged"
|
rmDir /r "$INSTDIR\runtime"
|
||||||
Delete $I2PINSTEXE\*
|
Delete "$INSTDIR\ui2pbrowser_icon.ico"
|
||||||
rmDir /r "$I2PINSTEXE"
|
Delete "$INSTDIR\windowsUItoopie2.png"
|
||||||
${EndIf}
|
Delete "$INSTDIR\I2P.exe"
|
||||||
|
|
||||||
# Remove shortcuts and folders
|
# Remove shortcuts and folders
|
||||||
Delete "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk"
|
Delete "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk"
|
||||||
@@ -274,16 +241,27 @@ Section "uninstall"
|
|||||||
Delete "$DESKTOP\${APPNAME}.lnk"
|
Delete "$DESKTOP\${APPNAME}.lnk"
|
||||||
Delete "$DESKTOP\Private Browsing-${APPNAME}.lnk"
|
Delete "$DESKTOP\Private Browsing-${APPNAME}.lnk"
|
||||||
rmDir /r "$SMPROGRAMS\${APPNAME}"
|
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 the uninstaller
|
||||||
Delete "$INSTDIR\uninstall-i2pbrowser.exe"
|
Delete "$INSTDIR\uninstall-i2pbrowser.exe"
|
||||||
|
|
||||||
# uninstaller section end
|
# uninstaller section end
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
!define MUI_FINISHPAGE_RUN
|
!define MUI_FINISHPAGE_RUN
|
||||||
@@ -292,8 +270,8 @@ SectionEnd
|
|||||||
!insertmacro MUI_PAGE_FINISH
|
!insertmacro MUI_PAGE_FINISH
|
||||||
|
|
||||||
Function LaunchLink
|
Function LaunchLink
|
||||||
SetOutPath "$I2PINSTEXE"
|
SetOutPath "$INSTDIR"
|
||||||
StrCpy $OUTDIR $I2PINSTEXE
|
StrCpy $OUTDIR $INSTDIR
|
||||||
${If} ${Silent}
|
${If} ${Silent}
|
||||||
ReadEnvStr $0 RESTART_I2P
|
ReadEnvStr $0 RESTART_I2P
|
||||||
${If} $0 != ""
|
${If} $0 != ""
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
!define I2P_VERSION 1.9.6
|
!define I2P_VERSION 1.9.7
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
!define VERSIONMAJOR 1
|
!define VERSIONMAJOR 1
|
||||||
!define VERSIONMINOR 9
|
!define VERSIONMINOR 9
|
||||||
!define VERSIONBUILD 6
|
!define VERSIONBUILD 7
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
1.9.6
|
1.9.7
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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" $@
|
|
||||||
@@ -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"
|
|
||||||
@@ -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"
|
|
||||||
@@ -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" $@
|
|
||||||
27
src/unix/torbrowser.sh
Executable file
27
src/unix/torbrowser.sh
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
TORSOCKS=$(which torsocks)
|
||||||
|
if [ -f "${TORSOCKS}" ]; then
|
||||||
|
. "${TORSOCKS}" on
|
||||||
|
fi
|
||||||
|
|
||||||
|
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"
|
||||||
24
targz.sh
24
targz.sh
@@ -5,11 +5,31 @@ 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
|
||||||
|
|
||||||
./clean.sh
|
./clean.sh
|
||||||
wsl make distclean
|
wsl make distclean
|
||||||
./build.sh
|
./build.sh
|
||||||
tar czvf I2P.tar.gz I2P
|
cd "$SCRIPT_DIR/I2P" || exit 1
|
||||||
|
|
||||||
|
TORSOCKS=$(which torsocks)
|
||||||
|
if [ -f "${TORSOCKS}" ]; then
|
||||||
|
. "${TORSOCKS}" on
|
||||||
|
fi
|
||||||
|
./lib/torbrowser.sh
|
||||||
|
version="$(curl -s https://aus1.torproject.org/torbrowser/update_3/release/downloads.json | jq -r ".version")"
|
||||||
|
. "${TORSOCKS}" off
|
||||||
|
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
|
||||||
|
rm -vrf "tor-browser_${locale}"
|
||||||
|
cd "$SCRIPT_DIR" || exit 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
tar czvf I2P.tar.gz I2P
|
||||||
|
|||||||
@@ -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