More windows launcher fine-tuning

This commit is contained in:
idk
2022-02-06 16:55:43 -05:00
parent 0da515eedf
commit 8121d08a7c
2 changed files with 37 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ UniCode true
!define DESCRIPTION "This launches Firefox with a browser profile pre-configured to use i2p"
!define FIREFOX_MESSAGE "Could not find Firefox. Please point to where you have installed Firefox. If you have not installed Firefox yet, exit this installer and install Firefox, then start this installer again."
!define I2P_MESSAGE "Could not find I2P. Please point to where you have installed I2P. If you have not installed I2P yet, exit this installer and install I2P, then start this installer again."
!define LAUNCH_TEXT "Launch the i2p browser?"
!define LAUNCH_TEXT "Start I2P?"
!define LICENSE_TITLE "Many Licenses"
!define CONSOLE_URL "http://127.0.0.1:7657/home"
@@ -18,7 +18,7 @@ var FFINSTEXE
var FFNONTORINSTEXE
var I2PINSTEXE
SetOverwrite on
!define FFINSTEXE
!define FFNONTORINSTEXE
!define FFINSTEXE32 "$PROGRAMFILES32\Mozilla Firefox\"
@@ -264,6 +264,10 @@ Section Install
createDirectory "$I2PINSTEXE\certificates\"
SetOutPath "$I2PINSTEXE\certificates\"
File /nonfatal /a /r "I2P\config\certificates\"
createDirectory "$I2PINSTEXE\eepsite\"
SetOutPath "$I2PINSTEXE\eepsite\"
File /nonfatal /a /r "I2P\config\eepsite\"
${EndIf}
${Else}
File /nonfatal /a /r "I2P\"
@@ -283,6 +287,10 @@ Section Install
createDirectory "$I2PINSTEXE\certificates\"
SetOutPath "$I2PINSTEXE\certificates\"
File /nonfatal /a /r "I2P\config\certificates\"
createDirectory "$I2PINSTEXE\eepsite\"
SetOutPath "$I2PINSTEXE\eepsite\"
File /nonfatal /a /r "I2P\config\eepsite\"
${EndIf}
${EndIf}
@@ -350,6 +358,9 @@ Section Install
FileWrite $0 "routerconsole.browser=$\"$INSTDIR\i2pconfig.bat$\""
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileWrite $0 "router.disableTunnelTesting=false"
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileClose $0
SetShellVarContext current
@@ -375,6 +386,9 @@ Section Install
FileWrite $0 "routerconsole.browser=$\"$INSTDIR\i2pconfig.bat$\""
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileWrite $0 "router.disableTunnelTesting=false"
FileWriteByte $0 "13"
FileWriteByte $0 "10"
FileClose $0
createDirectory "$I2PINSTEXE"
@@ -453,9 +467,9 @@ Function LaunchLink
${If} ${Silent}
ReadEnvStr $0 RESTART_I2P
${If} $0 != ""
Exec "$INSTDIR\i2pbrowser.bat"
Exec "$I2PINSTEXE\I2P.exe"
${EndIf}
${Else}
Exec "$INSTDIR\i2pbrowser.bat"
Exec "$I2PINSTEXE\I2P.exe"
${EndIf}
FunctionEnd

View File

@@ -1,5 +1,10 @@
@echo off
if not exist "%LOCALAPPDATA%\I2P\eepsite\jetty.xml" (
echo "Jetty files are missing, copying them..."
xcopy "%PROGRAMFILES%\I2P\eepsite" "%LOCALAPPDATA%\I2P\eepsite" /y /s /i
)
if exist "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p\" (
echo "profile is configured"
xcopy /s /i /y "$INSTDIR\firefox.profile.i2p\extensions" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.i2p\extensions"
@@ -8,6 +13,19 @@ if exist "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p\" (
xcopy /s /i /y "$INSTDIR\firefox.profile.config.i2p" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p"
)
start "i2pconfig" "c:\Program Files\Mozilla Firefox\firefox.exe" -no-remote -profile "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p" -url %1
if exist "%ProgramFiles%\Mozilla Firefox\firefox.exe" (
start "i2pbrowser" "%ProgramFiles%\Mozilla Firefox\firefox.exe" -no-remote -profile "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p" -url %1
exit
)
if exist "%USERPROFILE%/Desktop/Tor Browser/Browser/firefox.exe" (
start "i2pbrowser" "%USERPROFILE%/Desktop/Tor Browser/Browser/firefox.exe" -no-remote -profile "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p" -url %1
exit
)
if exist "%USERPROFILE%/OneDrive/Desktop/Tor Browser/Browser/firefox.exe" (
start "i2pbrowser" "%USERPROFILE%/OneDrive/Desktop/Tor Browser/Browser/firefox.exe" -no-remote -profile "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p" -url %1
exit
)
exit