forked from leoniv/v8unpack
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from e8tools/develop
3.0.42 `-P16` support
- Loading branch information
Showing
13 changed files
with
777 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# This runs in 0.9.10+ before upgrade and uninstall. | ||
# Use this file to do things like stop services prior to upgrade or uninstall. | ||
# NOTE: It is an anti-pattern to call chocolateyUninstall.ps1 from here. If you | ||
# need to uninstall an MSI prior to upgrade, put the functionality in this | ||
# file without calling the uninstall script. Make it idempotent in the | ||
# uninstall script so that it doesn't fail when it is already uninstalled. | ||
# NOTE: For upgrades - like the uninstall script, this script always runs from | ||
# the currently installed version, not from the new upgraded package version. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
$ErrorActionPreference = 'Stop'; | ||
|
||
$packageName= 'v8unpack' | ||
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | ||
$url = "https://github.com/e8tools/v8unpack/releases/download/v.$version/v8unpack-$version.msi" | ||
$url64 = '' | ||
|
||
$packageArgs = @{ | ||
packageName = $packageName | ||
unzipLocation = $toolsDir | ||
fileType = 'MSI' | ||
url = $url | ||
url64bit = $url64 | ||
#file = $fileLocation | ||
|
||
softwareName = 'V8 Unpack tool' | ||
|
||
checksum = '' | ||
checksumType = 'sha256' | ||
checksum64 = '' | ||
checksumType64= 'sha256' | ||
|
||
#MSI | ||
silentArgs = "/qn /norestart /l*v `"$($env:TEMP)\$($packageName).$($env:chocolateyPackageVersion).MsiInstall.log`"" | ||
validExitCodes= @(0, 3010, 1641) | ||
} | ||
|
||
Install-ChocolateyPackage @packageArgs | ||
|
||
##Install-ChocolateyPackage $packageName $fileType $silentArgs $url [$url64 -validExitCodes $validExitCodes -checksum $checksum -checksumType $checksumType -checksum64 $checksum64 -checksumType64 $checksumType64] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
$ErrorActionPreference = 'Stop'; | ||
|
||
$packageName = 'v8unpack' | ||
$softwareName = 'V8 Unpack tool' | ||
$installerType = 'MSI' | ||
|
||
$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') { | ||
$validExitCodes = @(0) | ||
} | ||
|
||
$uninstalled = $false | ||
[array]$key = Get-UninstallRegistryKey -SoftwareName $softwareName | ||
|
||
if ($key.Count -eq 1) { | ||
$key | % { | ||
$file = "$($_.UninstallString)" | ||
|
||
if ($installerType -eq 'MSI') { | ||
|
||
$silentArgs = "$($_.PSChildName) $silentArgs" | ||
|
||
$file = '' | ||
} | ||
|
||
Uninstall-ChocolateyPackage -PackageName $packageName ` | ||
-FileType $installerType ` | ||
-SilentArgs "$silentArgs" ` | ||
-ValidExitCodes $validExitCodes ` | ||
-File "$file" | ||
} | ||
} elseif ($key.Count -eq 0) { | ||
|
||
Write-Warning "$packageName has already been uninstalled by other means." | ||
|
||
} elseif ($key.Count -gt 1) { | ||
|
||
Write-Warning "$key.Count matches found!" | ||
Write-Warning "To prevent accidental data loss, no programs will be uninstalled." | ||
Write-Warning "Please alert package maintainer the following keys were matched:" | ||
$key | % {Write-Warning "- $_.DisplayName"} | ||
|
||
} |
Oops, something went wrong.