Update build scripts

- Removes 32bit ucrt from 64bit installer
- Removes unused StrStr function from Nullsoft script
This commit is contained in:
twangboy 2020-07-15 16:47:44 -06:00 committed by Daniel Wozniak
parent 46a1e0ed84
commit 5711c12250
2 changed files with 11 additions and 58 deletions

View file

@ -134,21 +134,12 @@ If Defined ProgramFiles(x86) (
If Exist "%PreDir%" rd /s /q "%PreDir%"
mkdir "%PreDir%"
:: UCRT for 32bit is required for both x86 and x64 builds
@echo.
@echo Copying Universal C Runtimes X86 to Prerequisites
@echo ----------------------------------------------------------------------
set Url=http://repo.saltstack.com/windows/dependencies/32/ucrt_x86.zip
set Name=ucrt_x86.zip
@echo - Downloading %Name%
powershell -ExecutionPolicy RemoteSigned -File download_url_file.ps1 -url %Url% -file "%PreDir%\%Name%"
:: 32 bit binaries only needed for x86 installer
:: ProgramFiles(x86) is defined on AMD64 systems
:: If it's defined, skip the x86 binaries
If Defined ProgramFiles(x86) goto vcredist_2013_x64
If Defined ProgramFiles(x86) goto dependencies_x64
:vcredist_2013_x86
:dependencies_x86
@echo.
@echo Copying VCRedist 2013 X86 to Prerequisites
@echo ----------------------------------------------------------------------
@ -157,10 +148,18 @@ set Name=vcredist_x86_2013.exe
@echo - Downloading %Name%
powershell -ExecutionPolicy RemoteSigned -File download_url_file.ps1 -url %Url% -file "%PreDir%\%Name%"
@echo.
@echo Copying Universal C Runtimes X86 to Prerequisites
@echo ----------------------------------------------------------------------
set Url=http://repo.saltstack.com/windows/dependencies/32/ucrt_x86.zip
set Name=ucrt_x86.zip
@echo - Downloading %Name%
powershell -ExecutionPolicy RemoteSigned -File download_url_file.ps1 -url %Url% -file "%PreDir%\%Name%"
goto prereq_end
:: These are only needed on 64bit installer
:vcredist_2013_x64
:dependencies_x64
@echo.
@echo Copying VCRedist 2013 X64 to Prerequisites
@echo ----------------------------------------------------------------------
@ -177,7 +176,6 @@ set Name=ucrt_x64.zip
@echo - Downloading %Name%
powershell -ExecutionPolicy RemoteSigned -File download_url_file.ps1 -url %Url% -file "%PreDir%\%Name%"
:prereq_end
:: Remove the fixed path in .exe files

View file

@ -1014,51 +1014,6 @@ Function Explode
FunctionEnd
#------------------------------------------------------------------------------
# StrStr Function
# - find substring in a string
#
# Usage:
# Push "this is some string"
# Push "some"
# Call StrStr
# Pop $0 # "some string"
#------------------------------------------------------------------------------
!macro StrStr un
Function ${un}StrStr
Exch $R1 # $R1=substring, stack=[old$R1,string,...]
Exch # stack=[string,old$R1,...]
Exch $R2 # $R2=string, stack=[old$R2,old$R1,...]
Push $R3 # $R3=strlen(substring)
Push $R4 # $R4=count
Push $R5 # $R5=tmp
StrLen $R3 $R1 # Get the length of the Search String
StrCpy $R4 0 # Set the counter to 0
loop:
StrCpy $R5 $R2 $R3 $R4 # Create a moving window of the string that is
# the size of the length of the search string
StrCmp $R5 $R1 done # Is the contents of the window the same as
# search string, then done
StrCmp $R5 "" done # Is the window empty, then done
IntOp $R4 $R4 + 1 # Shift the windows one character
Goto loop # Repeat
done:
StrCpy $R1 $R2 "" $R4
Pop $R5
Pop $R4
Pop $R3
Pop $R2
Exch $R1 # $R1=old$R1, stack=[result,...]
FunctionEnd
!macroend
!insertmacro StrStr ""
!insertmacro StrStr "un."
#------------------------------------------------------------------------------
# UninstallMSI Function
# - Uninstalls MSI by product code