diff --git a/pkg/windows/BuildSalt.bat b/pkg/windows/BuildSalt.bat new file mode 100644 index 000000000000..a8898e8e7219 --- /dev/null +++ b/pkg/windows/BuildSalt.bat @@ -0,0 +1,54 @@ +@ echo off +:: Define Variables +@ echo Defining Variables... +Set "CurrDir=%cd%" +Set "BinDir=%cd%\buildenv\bin" +Set "InsDir=%cd%\installer" +Set "PyDir=C:\Python27" + +:: Find the NSIS Installer +If Exist "C:\Program Files\NSIS\" ( + Set NSIS="C:\Program Files\NSIS\" +) Else ( + Set NSIS="C:\Program Files (x86)\NSIS\" +) +Set "PATH=%NSIS%;%PATH%" + +@ echo Copying C:\Python27 to bin... +:: Check for existing bin directory and remove +If Exist "%BinDir%\" rd "%BinDir%" /S /Q + +:: Copy the Python27 directory to bin +xcopy /S /E %PyDir% %CurrDir%\buildenv\bin\ + +@ echo Cleaning up unused files and directories... +:: Remove all Compiled Python files (.pyc) +del /S /Q %BinDir%\*.pyc + +:: Delete Unused Docs and Modules +rd /S /Q %BinDir%\Doc +rd /S /Q %BinDir%\share +rd /S /Q %BinDir%\tcl +rd /S /Q %BinDir%\Lib\idlelib +rd /S /Q %BinDir%\Lib\lib-tk +rd /S /Q %BinDir%\Lib\test +rd /S /Q %BinDir%\Lib\unit-test + +:: Delete Unused .dll files +del /S /Q %BinDir%\DLLs\tcl85.dll +del /S /Q %BinDir%\DLLs\tclpip85.dll +del /S /Q %BinDir%\DLLs\tk85.dll + +:: Delete .txt files +del /q %BinDir%\NEWS.txt +del /q %BinDir%\README.txt + +@ echo Building the installer... +makensis.exe "%InsDir%\Salt-Minion-Setup.nsi + +@ echo. +@ echo Script completed... +@ echo Installation file can be found in the following directory: +@ echo %InsDir% +pause +cls diff --git a/pkg/windows/installer/Salt-Minion-Setup.nsi b/pkg/windows/installer/Salt-Minion-Setup.nsi index 8f06cac7366f..6a4ab7c2de62 100644 --- a/pkg/windows/installer/Salt-Minion-Setup.nsi +++ b/pkg/windows/installer/Salt-Minion-Setup.nsi @@ -1,5 +1,5 @@ !define PRODUCT_NAME "Salt Minion" -!define PRODUCT_VERSION "2014.7.2" +!define PRODUCT_VERSION "{{ salt_version }}" !define PRODUCT_PUBLISHER "SaltStack, Inc" !define PRODUCT_WEB_SITE "http://saltstack.org" !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\salt-minion.exe" @@ -158,7 +158,7 @@ Section -Prerequisites ; ${EndIf} ; Push $VcRedistGuid -; Call MsiQueryProductState + Call MsiQueryProductState ; ${If} $NeedVcRedist == "True" ; NSISdl::download /TIMEOUT=30000 $VcRedistUri $TEMP\vcredist.exe ; Pop $R0 diff --git a/pkg/windows/installer/SlimPython.bat b/pkg/windows/installer/SlimPython.bat deleted file mode 100644 index 7ec44e9047df..000000000000 --- a/pkg/windows/installer/SlimPython.bat +++ /dev/null @@ -1,20 +0,0 @@ -:: Remove all Compiled Python files (.pyc) -del /S /Q .\bin\*.pyc - -:: Delete Unused Docs and Modules -rd /S /Q .\bin\Doc -rd /S /Q .\bin\share -rd /S /Q .\bin\tcl -rd /S /Q .\bin\Lib\idlelib -rd /S /Q .\bin\Lib\lib-tk -rd /S /Q .\bin\Lib\test -rd /S /Q .\bin\Lib\unit-test - -:: Delete Unused .dll files -del /S /Q .\bin\DLLs\tcl85.dll -del /S /Q .\bin\DLLs\tclpip85.dll -del /S /Q .\bin\DLLs\tk85.dll - -:: Delete .txt files -del /q .\bin\NEWS.txt -del /q .\bin\README.txt