build_installer.cmd 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. @echo off
  2. if not defined MAKENSIS set MAKENSIS=C:\Program Files\NSIS\UNICODE\makensis.exe
  3. if not defined WAPROJECTS set WAPROJECTS=c:\projects
  4. if not defined CURSANDBOX set CURSANDBOX=%WAPROJECTS%
  5. set MAKENSIS_COMMON_PARAM=/V1 /P4 /DUSE_MUI /DLZMA
  6. if %TARGET_ARCH%==x64 set MAKENSIS_COMMON_PARAM=%MAKENSIS_COMMON_PARAM% /DWINAMP64
  7. set SCRIPT=%CURSANDBOX%\installer\winamp\main.nsi
  8. if not defined INSTALLER_LANG set INSTALLER_LANG=Mastering\Winamp\installer_beta.lang
  9. if not defined INSTALLER_CONFIG set INSTALLER_CONFIG=Mastering\Winamp\installer_beta.config
  10. SET WINAMP_VERSION_MAJOR=5
  11. SET WINAMP_VERSION_MINOR=9
  12. SET WINAMP_VERSION_MINOR_SECOND=0
  13. for /F %%i in (%CURSANDBOX%\%INSTALLER_LANG%) do (
  14. set MAKENSIS_RUN_PARAM=
  15. for /F "eol=; tokens=1,2,3,4,5,6,7,8,9 delims=," %%j in (%CURSANDBOX%\%INSTALLER_CONFIG%) do (m00stercow
  16. if /I "%%i" NEQ "all" (
  17. set MAKENSIS_RUN_PARAM=/DLANG_USE_%%i /DLANG=%%i
  18. ) else (
  19. set MAKENSIS_RUN_PARAM=/DLANG_USE_%%i
  20. )
  21. if /I "%%k" NEQ "" set MAKENSIS_RUN_PARAM=!MAKENSIS_RUN_PARAM! /D%%k
  22. if /I "%%l" NEQ "" set MAKENSIS_RUN_PARAM=!MAKENSIS_RUN_PARAM! /D%%l
  23. if /I "%%m" NEQ "" set MAKENSIS_RUN_PARAM=!MAKENSIS_RUN_PARAM! /D%%m
  24. if /I "%%n" NEQ "" set MAKENSIS_RUN_PARAM=!MAKENSIS_RUN_PARAM! /D%%n
  25. if /I "%%o" NEQ "" set MAKENSIS_RUN_PARAM=!MAKENSIS_RUN_PARAM! /D%%o
  26. if /I "%%p" NEQ "" set MAKENSIS_RUN_PARAM=!MAKENSIS_RUN_PARAM! /D%%p
  27. if /I "%%q" NEQ "" set MAKENSIS_RUN_PARAM=!MAKENSIS_RUN_PARAM! /D%%q
  28. if /I "%%r" NEQ "" set MAKENSIS_RUN_PARAM=!MAKENSIS_RUN_PARAM! /D%%r
  29. @echo.
  30. @echo.
  31. @echo Executing Makensis [Lang = '%%i', Configuration = '%%~j']
  32. @echo.
  33. @echo.
  34. @echo "%MAKENSIS%" %MAKENSIS_COMMON_PARAM% !MAKENSIS_RUN_PARAM! "%SCRIPT%"
  35. "%MAKENSIS%" %MAKENSIS_COMMON_PARAM% !MAKENSIS_RUN_PARAM! "%SCRIPT%"
  36. if "%errorlevel%" EQU "0" (
  37. @echo.
  38. @echo.
  39. set SIGNNAME=Winamp %WINAMP_VERSION_MAJOR%.%WINAMP_VERSION_MINOR%%WINAMP_VERSION_MINOR_SECOND% %%~j
  40. if /I "%%k" EQU "lite" ( set INSTALLERNAME=%INSTALL_LITE%
  41. ) else ( if /I "%%k" == "std" ( set INSTALLERNAME=%INSTALL_STD%
  42. ) else ( if /I "%%k" == "full" (
  43. if /I "%%l" == "pro" ( set INSTALLERNAME=%INSTALL_PRO%
  44. ) else ( if /I "%%l" == "bundle" ( set INSTALLERNAME=%INSTALL_BUNDLE%
  45. ) else ( if /I "%%l" == "eMusic-7plus" ( set INSTALLERNAME=%INSTALL_EMUSIC%
  46. ) else ( set INSTALLERNAME=%INSTALL_FULL%)))
  47. )
  48. ))
  49. @echo Signing [Configuration='%~2', File='!INSTALLERNAME!_%%i.exe']
  50. @echo.
  51. @echo.
  52. call "%CURSANDBOX%\Mastering\Winamp\simple_sign.cmd" "!SIGNNAME!" "%CURSANDBOX%\installer\winamp\!INSTALLERNAME!_%%i.exe"
  53. ) else (
  54. @echo Makensis Failed
  55. )
  56. )
  57. )