aboutsummaryrefslogtreecommitdiff
path: root/tools/buildsteps
diff options
context:
space:
mode:
authorfuzzard <fuzzard@users.noreply.github.com>2021-06-20 06:20:50 +1000
committerGitHub <noreply@github.com>2021-06-20 06:20:50 +1000
commit7e3ba7e36b800f6f195b2620f3e5f1d2c282d0f8 (patch)
tree234445b740ea266c873218fd7158ef24f56baf34 /tools/buildsteps
parent9c2c8913a80a32aee0dc582bc737744c2989a32c (diff)
parent8d6901cf09142a33c5fb81606a0f7a63717c53a6 (diff)
Merge pull request #19617 from thexai/fix-error-NSIS
[Windows] Removes unnecessary ERROR log lines when is build NSIS installer
Diffstat (limited to 'tools/buildsteps')
-rw-r--r--tools/buildsteps/windows/BuildSetup.bat34
1 files changed, 12 insertions, 22 deletions
diff --git a/tools/buildsteps/windows/BuildSetup.bat b/tools/buildsteps/windows/BuildSetup.bat
index 45ba7c0a48..4be17dc9c4 100644
--- a/tools/buildsteps/windows/BuildSetup.bat
+++ b/tools/buildsteps/windows/BuildSetup.bat
@@ -214,39 +214,29 @@ set WORKSPACE=%base_dir%\kodi-build.%TARGET_PLATFORM%
SET APP_PDBFILE=%APP_NAME%Setup-%GIT_REV%-%BRANCH%-%TARGET_ARCHITECTURE%.pdb
ECHO Creating installer %APP_SETUPFILE%...
IF EXIST %APP_SETUPFILE% del %APP_SETUPFILE% > NUL
+
+ rem determine if current system is 32 or 64 bits
+ IF %PROCESSOR_ARCHITECTURE% == AMD64 (
+ SET NSIS_REG_KEY=HKLM\Software\Wow6432Node\NSIS
+ ) ELSE (
+ SET NSIS_REG_KEY=HKLM\Software\NSIS
+ )
+
rem get path to makensis.exe from registry, first try tab delim
- FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B
+ FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "%NSIS_REG_KEY%" /ve') DO SET NSISExePath=%%B
IF NOT EXIST "%NSISExePath%" (
rem try with space delim instead of tab
- FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B
+ FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "%NSIS_REG_KEY%" /ve') DO SET NSISExePath=%%B
)
IF NOT EXIST "%NSISExePath%" (
rem fails on localized windows (Default) becomes (Par D�faut)
- FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B
+ FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "%NSIS_REG_KEY%" /ve') DO SET NSISExePath=%%B
)
IF NOT EXIST "%NSISExePath%" (
- FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "HKLM\Software\NSIS" /ve') DO SET NSISExePath=%%B
- )
-
- rem proper x64 registry checks
- IF NOT EXIST "%NSISExePath%" (
- ECHO using x64 registry entries
- FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B
- )
- IF NOT EXIST "%NSISExePath%" (
- rem try with space delim instead of tab
- FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B
- )
- IF NOT EXIST "%NSISExePath%" (
- rem on win 7 x64, the previous fails
- FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B
- )
- IF NOT EXIST "%NSISExePath%" (
- rem try with space delim instead of tab
- FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "HKLM\Software\Wow6432Node\NSIS" /ve') DO SET NSISExePath=%%B
+ FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "%NSIS_REG_KEY%" /ve') DO SET NSISExePath=%%B
)
SET NSISExe=%NSISExePath%\makensis.exe