I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 9e6f993a authored by kytv's avatar kytv
Browse files

De-fuglify the service path in Windows

The default service path in Windows is fugly and not very convenient. I2P uses
the correct path, but if you want to access snark or eepsite data, one must go to
%SYSTEMROOT%\config\systemprofile\AppData\Roaming\I2P\ (Vista/7) or
%SYSTEMROOT%\system32\config\systemprofile\Application Data\I2P (XP/2003). If
this wasn't bad enough, in some cases one must take ownership of this path and
grant permission to him- or herself to access the folder.

With this changeset, I'm setting the path to %ALLUSERSPROFILE%\Application
Data\I2P as well as adding a shortcut to the I2P folder in the Start menu.
parent b328b47b
No related branches found
No related tags found
No related merge requests found
......@@ -141,7 +141,7 @@
<condition type="variable" id="is64bit">
<name>SYSTEM_sun_arch_data_model</name>
<value>64</value>
</condition>
</condition>
</conditions>
<!-- postinstall stuff for windows -->
<!-- Wrapper for 32bit Windows JVM -->
......@@ -237,7 +237,7 @@
<pack name="Windows Service" required="no">
<description>Automatically start I2P in the background</description>
<os family="windows" />
<!-- <executable targetfile="$INSTALL_PATH/set_config_dir_for_nt_service.bat" stage="postinstall" failure="warn" keep="false" /> -->
<executable targetfile="$INSTALL_PATH/set_config_dir_for_nt_service.bat" stage="postinstall" failure="warn" keep="true" />
<executable targetfile="$INSTALL_PATH/install_i2p_service_winnt.bat" stage="postinstall" failure="warn" keep="true">
<args>
<arg value="$INSTALL_PATH\wrapper.config" />
......
......@@ -25,6 +25,8 @@ set _WRAPPER_CONF="%~f1"
if not %_WRAPPER_CONF%=="" goto startup
set _WRAPPER_CONF="%_REALPATH%wrapper.config"
call "%_REALPATH%"\set_config_dir_for_nt_service.bat install
rem
rem Install the Wrapper as an NT service.
rem
......@@ -32,7 +34,7 @@ rem
:: We remove the existing service to
:: 1) force the service to stop
:: 2) update service configuration in case wrapper.config was edited
:: 3) prevent hanging the installer if 'install as service' is selected
:: 3) prevent hanging the installer if 'install as service' is selected
:: and it's already enabled as a service.
"%_WRAPPER_EXE%" -r %_WRAPPER_CONF%
"%_WRAPPER_EXE%" -i %_WRAPPER_CONF%
......
@echo off
rem %~dp0 is location of current script under NT
set _REALPATH=%~dp0
set _WRAPPER_CONF="%_REALPATH%wrapper.config"
cd /d %~dp0
echo.
echo wrapper.java.additional.5=-Di2p.dir.config="%APPDATA%\i2p">>wrapper.config
if "%1"=="uninstall" (
FINDSTR /I /v "^wrapper.java.additional.5=-Di2p.dir.config=" %_WRAPPER_CONF% >> %_WRAPPER_CONF%.new
move %_WRAPPER_CONF%.new %_WRAPPER_CONF%
goto end
) else (
FINDSTR /I "^wrapper.java.additional.5=-Di2p.dir.config=" %_WRAPPER_CONF%
if not errorlevel 1 goto end
echo wrapper.java.additional.5=-Di2p.dir.config="%ALLUSERSPROFILE%\Application Data\i2p" >> %_WRAPPER_CONF%
goto end
)
:end
<?xml version="1.0" encoding="UTF-8"?>
<shortcuts>
<programGroup defaultName="I2P" location="startMenu" />
<shortcut name="Open I2P Profile Folder (service)"
target="explorer"
commandLine="&quot;%allusersprofile%\Application Data\i2p&quot;"
iconFile="%systemroot%\system32\shell32.dll"
iconIndex="3"
initialState="normal"
startMenu="no"
programGroup="yes"
desktop="no"
startup="no" />
<shortcut name="Start I2P (no window)"
target="$INSTALL_PATH\I2P.exe"
commandLine=""
......
......@@ -16,6 +16,7 @@ rem
rem %~dp0 is location of current script under NT
set _REALPATH=%~dp0
set _WRAPPER_EXE=%_REALPATH%I2Psvc.exe
call "%_REALPATH%"\set_config_dir_for_nt_service.bat uninstall
rem
rem Find the wrapper.conf
......
......@@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 6;
public final static long BUILD = 7;
/** for example "-test" */
public final static String EXTRA = "";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment