mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #21861 from twangboy/build
Final (hopefully) improvements to the new build structure
This commit is contained in:
commit
af01dc7ca5
@ -1,6 +1,9 @@
|
||||
@ echo off
|
||||
@ echo Salt Windows Build Script
|
||||
@ echo.
|
||||
:: Define Variables
|
||||
@ echo Defining Variables...
|
||||
@ echo ---------------------
|
||||
Set "CurrDir=%cd%"
|
||||
Set "BinDir=%cd%\buildenv\bin"
|
||||
Set "InsDir=%cd%\installer"
|
||||
@ -13,41 +16,51 @@ If Exist "C:\Program Files\NSIS\" (
|
||||
Set NSIS="C:\Program Files (x86)\NSIS\"
|
||||
)
|
||||
Set "PATH=%NSIS%;%PATH%"
|
||||
@ echo.
|
||||
|
||||
@ echo Copying C:\Python27 to bin...
|
||||
@ echo -----------------------------
|
||||
:: Check for existing bin directory and remove
|
||||
If Exist "%BinDir%\" rd "%BinDir%" /S /Q
|
||||
If Exist "%BinDir%\" rd /S /Q "%BinDir%"
|
||||
|
||||
:: Copy the Python27 directory to bin
|
||||
xcopy /S /E %PyDir% %CurrDir%\buildenv\bin\
|
||||
@echo xcopy /S /E "%PyDir%" "%BinDir%\"
|
||||
xcopy /S /E "%PyDir%" "%BinDir%\"
|
||||
@ echo.
|
||||
|
||||
@ echo Cleaning up unused files and directories...
|
||||
@ echo -------------------------------------------
|
||||
:: Remove all Compiled Python files (.pyc)
|
||||
del /S /Q %BinDir%\*.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
|
||||
If Exist "%BinDir%\Doc" rd /S /Q "%BinDir%\Doc"
|
||||
If Exist "%BinDir%\share" rd /S /Q "%BinDir%\share"
|
||||
If Exist "%BinDir%\tcl" rd /S /Q "%BinDir%\tcl"
|
||||
If Exist "%BinDir%\Lib\idlelib" rd /S /Q "%BinDir%\Lib\idlelib"
|
||||
If Exist "%BinDir%\Lib\lib-tk" rd /S /Q "%BinDir%\Lib\lib-tk"
|
||||
If Exist "%BinDir%\Lib\test" rd /S /Q "%BinDir%\Lib\test"
|
||||
If Exist "%BinDir%\Lib\unit-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
|
||||
If Exist "%BinDir%\DLLs\tcl85.dll" del /S /Q "%BinDir%\DLLs\tcl85.dll"
|
||||
If Exist "%BinDir%\DLLs\tclpip85.dll" del /S /Q "%BinDir%\DLLs\tclpip85.dll"
|
||||
If Exist "%BinDir%\DLLs\tk85.dll" del /S /Q "%BinDir%\DLLs\tk85.dll"
|
||||
|
||||
:: Delete .txt files
|
||||
del /q %BinDir%\NEWS.txt
|
||||
del /q %BinDir%\README.txt
|
||||
If Exist "%BinDir%\NEWS.txt" del /q "%BinDir%\NEWS.txt"
|
||||
If Exist "%BinDir%\README.txt" del /q "%BinDir%\README.txt"
|
||||
@ echo.
|
||||
|
||||
@ echo Building the installer...
|
||||
makensis.exe "%InsDir%\Salt-Minion-Setup.nsi
|
||||
@ echo -------------------------
|
||||
makensis.exe "%InsDir%\Salt-Minion-Setup.nsi"
|
||||
@ echo.
|
||||
|
||||
@ echo.
|
||||
@ echo ===================
|
||||
@ echo Script completed...
|
||||
@ echo -------------------
|
||||
@ echo Installation file can be found in the following directory:
|
||||
@ echo %InsDir%
|
||||
pause
|
||||
|
9
pkg/windows/buildenv/salt-call.bat
Normal file
9
pkg/windows/buildenv/salt-call.bat
Normal file
@ -0,0 +1,9 @@
|
||||
@ echo off
|
||||
:: Script for starting the Salt-Minion
|
||||
:: Accepts all parameters that Salt-Minion Accepts
|
||||
|
||||
:: Define Variables
|
||||
Set Python="%cd%\bin\python.exe"
|
||||
Set Script="%cd%\bin\Scripts\salt-call"
|
||||
|
||||
"%Python%" "%Script%" %*
|
9
pkg/windows/buildenv/salt-cp.bat
Normal file
9
pkg/windows/buildenv/salt-cp.bat
Normal file
@ -0,0 +1,9 @@
|
||||
@ echo off
|
||||
:: Script for starting the Salt-Minion
|
||||
:: Accepts all parameters that Salt-Minion Accepts
|
||||
|
||||
:: Define Variables
|
||||
Set Python="%cd%\bin\python.exe"
|
||||
Set Script="%cd%\bin\Scripts\salt-cp"
|
||||
|
||||
"%Python%" "%Script%" %*
|
9
pkg/windows/buildenv/salt-minion.bat
Normal file
9
pkg/windows/buildenv/salt-minion.bat
Normal file
@ -0,0 +1,9 @@
|
||||
@ echo off
|
||||
:: Script for starting the Salt-Minion
|
||||
:: Accepts all parameters that Salt-Minion Accepts
|
||||
|
||||
:: Define Variables
|
||||
Set Python="%cd%\bin\python.exe"
|
||||
Set Script="%cd%\bin\Scripts\salt-minion"
|
||||
|
||||
"%Python%" "%Script%" %*
|
9
pkg/windows/buildenv/salt-unity.bat
Normal file
9
pkg/windows/buildenv/salt-unity.bat
Normal file
@ -0,0 +1,9 @@
|
||||
@ echo off
|
||||
:: Script for starting the Salt-Minion
|
||||
:: Accepts all parameters that Salt-Minion Accepts
|
||||
|
||||
:: Define Variables
|
||||
Set Python="%cd%\bin\python.exe"
|
||||
Set Script="%cd%\bin\Scripts\salt-unity"
|
||||
|
||||
"%Python%" "%Script%" %*
|
@ -12,8 +12,15 @@
|
||||
!include "nsDialogs.nsh"
|
||||
!include "LogicLib.nsh"
|
||||
!include "FileFunc.nsh"
|
||||
!include "x64.nsh"
|
||||
|
||||
!include x64.nsh
|
||||
!if "$%PROCESSOR_ARCHITECTURE%" == "AMD64"
|
||||
!define CPUARCH "AMD64"
|
||||
!else if "$%PROCESSOR_ARCHITEW6432%" == "AMD64"
|
||||
!define CPUARCH "AMD64"
|
||||
!else
|
||||
!define CPUARCH "x86"
|
||||
!endif
|
||||
|
||||
Var Dialog
|
||||
Var Label
|
||||
@ -130,9 +137,8 @@ Function MsiQueryProductState
|
||||
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
||||
OutFile "Salt-Minion-${PRODUCT_VERSION}-$%PROCESSOR_ARCHITEW6432%-Setup.exe"
|
||||
OutFile "Salt-Minion-${PRODUCT_VERSION}-${CPUARCH}-Setup.exe"
|
||||
InstallDir "c:\salt"
|
||||
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
|
||||
ShowInstDetails show
|
||||
@ -202,11 +208,11 @@ FunctionEnd
|
||||
|
||||
Function un.onUninstSuccess
|
||||
HideWindow
|
||||
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
|
||||
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." /SD IDOK
|
||||
FunctionEnd
|
||||
|
||||
Function un.onInit
|
||||
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
|
||||
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" /SD IDYES IDYES +2
|
||||
Abort
|
||||
FunctionEnd
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user