clean up tools/* for release
This commit is contained in:
parent
62ba6da912
commit
76dfaee972
3 changed files with 13 additions and 209 deletions
|
@ -1,35 +1,14 @@
|
|||
# IMPORTANT: Before releasing this package, copy/paste the next 2 lines into PowerShell to remove all comments from this file:
|
||||
# $f='c:\path\to\thisFile.ps1'
|
||||
# gc $f | ? {$_ -notmatch "^\s*#"} | % {$_ -replace '(^.*?)\s*?[^``]#.*','$1'} | Out-File $f+".~" -en utf8; mv -fo $f+".~" $f
|
||||
|
||||
|
||||
# If this is an MSI, cleaning up comments is all you need.
|
||||
# If this is an exe, change installerType and silentArgs
|
||||
# Auto Uninstaller should be able to detect and handle registry uninstalls (if it is turned on, it is in preview for 0.9.9).
|
||||
|
||||
$ErrorActionPreference = 'Stop'; # stop on all errors
|
||||
$ErrorActionPreference = 'Stop';
|
||||
|
||||
$packageName = 'UrlRewrite'
|
||||
$softwareName = 'IIS URL Rewrite Module 2' #part or all of the Display Name as you see it in Programs and Features. It should be enough to be unique
|
||||
$softwareName = 'IIS URL Rewrite Module 2'
|
||||
$installerType = 'MSI'
|
||||
#$installerType = 'EXE'
|
||||
|
||||
$silentArgs = '/qn /norestart'
|
||||
# https://msdn.microsoft.com/en-us/library/aa376931(v=vs.85).aspx
|
||||
$validExitCodes = @(0, 3010, 1605, 1614, 1641)
|
||||
if ($installerType -ne 'MSI') {
|
||||
# The below is somewhat naive and built for EXE installers
|
||||
# Uncomment matching EXE type (sorted by most to least common)
|
||||
#$silentArgs = '/S' # NSIS
|
||||
#$silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' # Inno Setup
|
||||
#$silentArgs = '/s' # InstallShield
|
||||
#$silentArgs = '/s /v"/qn"' # InstallShield with MSI
|
||||
#$silentArgs = '/s' # Wise InstallMaster
|
||||
#$silentArgs = '-s' # Squirrel
|
||||
#$silentArgs = '-q' # Install4j
|
||||
#$silentArgs = '-s -u' # Ghost
|
||||
# Note that some installers, in addition to the silentArgs above, may also need assistance of AHK to achieve silence.
|
||||
#$silentArgs = '' # none; make silent with input macro script like AutoHotKey (AHK)
|
||||
# https://chocolatey.org/packages/autohotkey.portable
|
||||
$validExitCodes = @(0)
|
||||
}
|
||||
|
||||
|
@ -47,14 +26,8 @@ if ($key.Count -eq 1) {
|
|||
$file = "$($_.UninstallString)"
|
||||
|
||||
if ($installerType -eq 'MSI') {
|
||||
# The Product Code GUID is all that should be passed for MSI, and very
|
||||
# FIRST, because it comes directly after /x, which is already set in the
|
||||
# Uninstall-ChocolateyPackage msiargs (facepalm).
|
||||
$silentArgs = "$($_.PSChildName) $silentArgs"
|
||||
|
||||
# Don't pass anything for file, it is ignored for msi (facepalm number 2)
|
||||
# Alternatively if you need to pass a path to an msi, determine that and
|
||||
# use it instead of the above in silentArgs, still very first
|
||||
$file = ''
|
||||
}
|
||||
|
||||
|
@ -74,9 +47,4 @@ if ($key.Count -eq 1) {
|
|||
}
|
||||
|
||||
|
||||
## OTHER HELPERS
|
||||
## https://github.com/chocolatey/choco/wiki/HelpersReference
|
||||
#Uninstall-ChocolateyZipPackage
|
||||
#Uninstall-BinFile # Only needed if you added one in the installer script, choco will remove the ones it added automatically.
|
||||
#remove any shortcuts you added
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue