From 9305301bf5925a209c413b29b8416d86a5768c2f Mon Sep 17 00:00:00 2001 From: idk Date: Thu, 5 May 2022 16:21:20 -0400 Subject: [PATCH] Fix I2P router detection priorities in Windows launcher scripts #17 --- src/win/i2pbrowser-private.bat | 9 ++++----- src/win/i2pbrowser.bat | 9 ++++----- src/win/i2pconfig.bat | 9 ++++----- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/win/i2pbrowser-private.bat b/src/win/i2pbrowser-private.bat index bbdd2b9..2030703 100644 --- a/src/win/i2pbrowser-private.bat +++ b/src/win/i2pbrowser-private.bat @@ -1,6 +1,10 @@ @echo on set "I2PPath=%ProgramFiles%\I2P\" +if exist "%LocalAppData%\I2P\I2P.exe" ( + set "I2PPath=%LocalAppData%\I2P\" +) + if exist "%ProgramFiles%\I2P\" ( set "I2PPath=%ProgramFiles%\I2P\" ) @@ -9,11 +13,6 @@ if exist "%ProgramFiles(x86)%\I2P" ( set "I2PPath=%ProgramFiles(x86)%\I2P" ) -set "I2PPath=%LocalAppData%\I2P\" -if exist "%LocalAppData%\I2P\I2P.exe" ( - set "I2PPath=%LocalAppData%\I2P\" -) - if exist "%I2PPath%\jpackaged" ( cd "%LOCALAPPDATA%\I2P" start "i2p" /D "%LOCALAPPDATA%\I2P" "%I2PPath%\i2p.exe" diff --git a/src/win/i2pbrowser.bat b/src/win/i2pbrowser.bat index aaca3f7..8247f1d 100644 --- a/src/win/i2pbrowser.bat +++ b/src/win/i2pbrowser.bat @@ -1,6 +1,10 @@ @echo on set "I2PPath=%ProgramFiles%\I2P\" +if exist "%LocalAppData%\I2P\I2P.exe" ( + set "I2PPath=%LocalAppData%\I2P\" +) + if exist "%ProgramFiles%\I2P\" ( set "I2PPath=%ProgramFiles%\I2P\" ) @@ -9,11 +13,6 @@ if exist "%ProgramFiles(x86)%\I2P" ( set "I2PPath=%ProgramFiles(x86)%\I2P" ) -set "I2PPath=%LocalAppData%\I2P\" -if exist "%LocalAppData%\I2P\I2P.exe" ( - set "I2PPath=%LocalAppData%\I2P\" -) - if exist "%I2PPath%\jpackaged" ( cd "%LOCALAPPDATA%\I2P" start "i2p" /D "%LOCALAPPDATA%\I2P" "%I2PPath%\i2p.exe" diff --git a/src/win/i2pconfig.bat b/src/win/i2pconfig.bat index b66e1c5..e63f0c3 100644 --- a/src/win/i2pconfig.bat +++ b/src/win/i2pconfig.bat @@ -1,6 +1,10 @@ @echo on set "I2PPath=%ProgramFiles%\I2P\" +if exist "%LocalAppData%\I2P\I2P.exe" ( + set "I2PPath=%LocalAppData%\I2P\" +) + if exist "%ProgramFiles%\I2P\" ( set "I2PPath=%ProgramFiles%\I2P\" ) @@ -9,11 +13,6 @@ if exist "%ProgramFiles(x86)%\I2P" ( set "I2PPath=%ProgramFiles(x86)%\I2P" ) -set "I2PPath=%LocalAppData%\I2P\" -if exist "%LocalAppData%\I2P\I2P.exe" ( - set "I2PPath=%LocalAppData%\I2P\" -) - if exist "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p\" ( echo "profile is configured" xcopy /s /i /y "%I2PPath%\I2PBrowser-Launcher\firefox.profile.config.i2p\extensions" "%LOCALAPPDATA%\I2PBrowser-Launcher\firefox.profile.config.i2p\extensions"