Changeset 9e6f993


Ignore:
Timestamp:
Aug 31, 2011 5:11:23 PM (8 years ago)
Author:
kytv <kytv@…>
Branches:
master
Children:
c968764
Parents:
b328b47
Message:

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.

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • installer/install.xml

    rb328b47 r9e6f993  
    142142                    <name>SYSTEM_sun_arch_data_model</name>
    143143                    <value>64</value>
    144                 </condition> 
     144                </condition>
    145145            </conditions>
    146146            <!-- postinstall stuff for windows -->
     
    238238            <description>Automatically start I2P in the background</description>
    239239            <os family="windows" />
    240 <!--            <executable targetfile="$INSTALL_PATH/set_config_dir_for_nt_service.bat" stage="postinstall" failure="warn" keep="false" /> -->
     240            <executable targetfile="$INSTALL_PATH/set_config_dir_for_nt_service.bat" stage="postinstall" failure="warn" keep="true" />
    241241            <executable targetfile="$INSTALL_PATH/install_i2p_service_winnt.bat" stage="postinstall" failure="warn" keep="true">
    242242                <args>
  • installer/resources/install_i2p_service_winnt.bat

    rb328b47 r9e6f993  
    2626set _WRAPPER_CONF="%_REALPATH%wrapper.config"
    2727
     28call "%_REALPATH%"\set_config_dir_for_nt_service.bat install
     29
    2830rem
    2931rem Install the Wrapper as an NT service.
     
    3335:: 1) force the service to stop
    3436:: 2) update service configuration in case wrapper.config was edited
    35 :: 3) prevent hanging the installer if 'install as service' is selected 
     37:: 3) prevent hanging the installer if 'install as service' is selected
    3638::    and it's already enabled as a service.
    3739"%_WRAPPER_EXE%" -r %_WRAPPER_CONF%
  • installer/resources/set_config_dir_for_nt_service.bat

    rb328b47 r9e6f993  
    11@echo off
     2rem %~dp0 is location of current script under NT
     3set _REALPATH=%~dp0
     4set _WRAPPER_CONF="%_REALPATH%wrapper.config"
     5
    26cd /d %~dp0
    3 echo.
    4 echo wrapper.java.additional.5=-Di2p.dir.config="%APPDATA%\i2p">>wrapper.config
     7if "%1"=="uninstall" (
     8    FINDSTR /I /v "^wrapper.java.additional.5=-Di2p.dir.config=" %_WRAPPER_CONF% >> %_WRAPPER_CONF%.new
     9    move %_WRAPPER_CONF%.new %_WRAPPER_CONF%
     10    goto end
     11) else (
     12    FINDSTR /I "^wrapper.java.additional.5=-Di2p.dir.config=" %_WRAPPER_CONF%
     13    if not errorlevel 1 goto end
     14    echo wrapper.java.additional.5=-Di2p.dir.config="%ALLUSERSPROFILE%\Application Data\i2p" >> %_WRAPPER_CONF%
     15    goto end
     16)
     17 
     18:end
  • installer/resources/shortcutSpec.xml

    rb328b47 r9e6f993  
    22<shortcuts>
    33 <programGroup defaultName="I2P" location="startMenu" />
     4 <shortcut name="Open I2P Profile Folder (service)"
     5          target="explorer"
     6          commandLine="&quot;%allusersprofile%\Application Data\i2p&quot;"
     7          iconFile="%systemroot%\system32\shell32.dll"
     8          iconIndex="3"
     9          initialState="normal"
     10          startMenu="no"
     11          programGroup="yes"
     12          desktop="no"
     13          startup="no" />
    414 <shortcut name="Start I2P (no window)"
    515           target="$INSTALL_PATH\I2P.exe"
  • installer/resources/uninstall_i2p_service_winnt.bat

    rb328b47 r9e6f993  
    1717set _REALPATH=%~dp0
    1818set _WRAPPER_EXE=%_REALPATH%I2Psvc.exe
     19call "%_REALPATH%"\set_config_dir_for_nt_service.bat uninstall
    1920
    2021rem
  • router/java/src/net/i2p/router/RouterVersion.java

    rb328b47 r9e6f993  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 6;
     21    public final static long BUILD = 7;
    2222
    2323    /** for example "-test" */
Note: See TracChangeset for help on using the changeset viewer.