forked from I2P_Developers/i2p.i2p
propagate from branch 'i2p.i2p' (head 879c55c825160c979491a99169a173145cf1d7ad)
to branch 'i2p.i2p.729' (head a0ba4c4c989ba71043b9671a56891688be41b50d)
This commit is contained in:
@@ -29,7 +29,15 @@
|
|||||||
# should have been replaced by the izpack installer.
|
# should have been replaced by the izpack installer.
|
||||||
# If you did not run the installer, replace them with the appropriate paths.
|
# If you did not run the installer, replace them with the appropriate paths.
|
||||||
I2P="%INSTALL_PATH"
|
I2P="%INSTALL_PATH"
|
||||||
I2P_CONFIG_DIR="%USER_HOME/.i2p"
|
if [ "`uname -s`" == "Darwin" ]; then
|
||||||
|
if [ -d "%USER_HOME/Library/Application Support" ]; then
|
||||||
|
I2P_CONFIG_DIR="%USER_HOME/Library/Application Support/i2p"
|
||||||
|
else
|
||||||
|
I2P_CONFIG_DIR="%USER_HOME/.i2p"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
I2P_CONFIG_DIR="%USER_HOME/.i2p"
|
||||||
|
fi
|
||||||
I2PTEMP="%SYSTEM_java_io_tmpdir"
|
I2PTEMP="%SYSTEM_java_io_tmpdir"
|
||||||
# PORTABLE installation:
|
# PORTABLE installation:
|
||||||
# Use the following instead.
|
# Use the following instead.
|
||||||
|
@@ -7,9 +7,9 @@
|
|||||||
<key>OnDemand</key>
|
<key>OnDemand</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>StandardOutPath</key>
|
<key>StandardOutPath</key>
|
||||||
<string>~/.i2p/wrapper.log</string>
|
<string>~/Library/Application Support/i2p/wrapper.log</string>
|
||||||
<key>StandardErrorPath</key>
|
<key>StandardErrorPath</key>
|
||||||
<string>~/.i2p/wrapper.log</string>
|
<string>~/Library/Application Support/i2p/wrapper.log</string>
|
||||||
<key>ProgramArguments</key>
|
<key>ProgramArguments</key>
|
||||||
<array>
|
<array>
|
||||||
<string>COMMAND</string>
|
<string>COMMAND</string>
|
||||||
|
@@ -49,6 +49,7 @@ public class WorkingDir {
|
|||||||
private final static String PROP_BASE_DIR = "i2p.dir.base";
|
private final static String PROP_BASE_DIR = "i2p.dir.base";
|
||||||
private final static String PROP_WORKING_DIR = "i2p.dir.config";
|
private final static String PROP_WORKING_DIR = "i2p.dir.config";
|
||||||
private final static String WORKING_DIR_DEFAULT_WINDOWS = "I2P";
|
private final static String WORKING_DIR_DEFAULT_WINDOWS = "I2P";
|
||||||
|
private final static String WORKING_DIR_DEFAULT_MAC = "i2p";
|
||||||
private final static String WORKING_DIR_DEFAULT = ".i2p";
|
private final static String WORKING_DIR_DEFAULT = ".i2p";
|
||||||
private final static String WORKING_DIR_DEFAULT_DAEMON = "i2p-config";
|
private final static String WORKING_DIR_DEFAULT_DAEMON = "i2p-config";
|
||||||
/** we do a couple of things differently if this is the username */
|
/** we do a couple of things differently if this is the username */
|
||||||
@@ -70,6 +71,7 @@ public class WorkingDir {
|
|||||||
dir = envProps.getProperty(PROP_WORKING_DIR);
|
dir = envProps.getProperty(PROP_WORKING_DIR);
|
||||||
if (dir == null)
|
if (dir == null)
|
||||||
dir = System.getProperty(PROP_WORKING_DIR);
|
dir = System.getProperty(PROP_WORKING_DIR);
|
||||||
|
|
||||||
boolean isWindows = SystemVersion.isWindows();
|
boolean isWindows = SystemVersion.isWindows();
|
||||||
File dirf = null;
|
File dirf = null;
|
||||||
if (dir != null) {
|
if (dir != null) {
|
||||||
@@ -81,6 +83,15 @@ public class WorkingDir {
|
|||||||
if (appdata != null)
|
if (appdata != null)
|
||||||
home = appdata;
|
home = appdata;
|
||||||
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT_WINDOWS);
|
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT_WINDOWS);
|
||||||
|
} else if (SystemVersion.isMac()) {
|
||||||
|
String appdata = "/Library/Application Support/";
|
||||||
|
File old = new File(home,WORKING_DIR_DEFAULT);
|
||||||
|
if (old.exists() && old.isDirectory())
|
||||||
|
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT);
|
||||||
|
else {
|
||||||
|
home = home+appdata;
|
||||||
|
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT_MAC);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (DAEMON_USER.equals(System.getProperty("user.name")))
|
if (DAEMON_USER.equals(System.getProperty("user.name")))
|
||||||
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT_DAEMON);
|
dirf = new SecureDirectory(home, WORKING_DIR_DEFAULT_DAEMON);
|
||||||
|
Reference in New Issue
Block a user