2009-04-06, 08:24
The new BuildSetup.bat was failing for me on my Windows7 x64. I had to change the nsis installer section to this:
Now it works fine and dandy, and should work even if the Nullsoft installer is not in Program Files (x86).
Code:
:NSIS_EXE
ECHO ------------------------------------------------------------
ECHO Generating installer includes...
call genNsisIncludes.bat
ECHO ------------------------------------------------------------
FOR /F "Tokens=2* Delims=]" %%R IN ('FIND /v /n "&_&_&_&" "..\..\.svn\entries" ^| FIND "[11]"') DO SET XBMC_REV=%%R
SET XBMC_SETUPFILE=XBMCSetup-Rev%XBMC_REV%.exe
ECHO Creating installer %XBMC_SETUPFILE%...
IF EXIST %XBMC_SETUPFILE% del %XBMC_SETUPFILE% > NUL
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
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
)
rem proper x64 registry checks
ECHO using x64 registry entires
IF NOT EXIST "%NSISExePath%" (
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
)
SET NSISExe=%NSISExePath%\makensis.exe
"%NSISExe%" /V1 /X"SetCompressor /FINAL lzma" /Dxbmc_root="%CD%\BUILD_WIN32" /Dxbmc_revision="%XBMC_REV%" "XBMC for Windows.nsi"
IF NOT EXIST "%XBMC_SETUPFILE%" (
set DIETEXT=Failed to create %XBMC_SETUPFILE%.
goto DIE
)
del BUILD_WIN32\Xbmc\userdata\sources.xml > NUL
ECHO ------------------------------------------------------------
ECHO Done!
ECHO Setup is located at %CD%\%XBMC_SETUPFILE%
ECHO ------------------------------------------------------------
GOTO VIEWLOG_EXE
Now it works fine and dandy, and should work even if the Nullsoft installer is not in Program Files (x86).