-
Notifications
You must be signed in to change notification settings - Fork 384
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 #2342 from dgalbraith/sqlite-tools-64-bit-update
(sqlite) Handle updated filenames and 64-bit tools
- Loading branch information
Showing
5 changed files
with
78 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
$ErrorActionPreference = 'Stop' | ||
|
||
$toolsDir = Split-Path $MyInvocation.MyCommand.Definition | ||
$embedded_path = if ((Get-OSArchitectureWidth 64) -and $env:chocolateyForceX86 -ne 'true') { | ||
Write-Host "Installing 64 bit version"; Get-Item "$toolsDir\*dll*win64*.zip" | ||
} else { Write-Host "Installing 32 bit version"; Get-Item "$toolsDir\*dll*win32*.zip" } | ||
|
||
$packageArgs = @{ | ||
PackageName = 'sqlite' | ||
FileFullPath = $embedded_path | ||
Destination = $toolsDir | ||
PackageName = 'sqlite' | ||
FileFullPath = "$toolsDir\sqlite-dll-win-x86-3430200.zip" | ||
FileFullPath64 = "$toolsDir\sqlite-dll-win-x64-3430200.zip" | ||
Destination = $toolsDir | ||
} | ||
Get-ChildItem $toolsDir\* | Where-Object { $_.PSISContainer } | Remove-Item -Recurse -Force #remove older package dirs | ||
Get-ChocolateyUnzip @packageArgs | ||
|
||
$pp = Get-PackageParameters | ||
if (!$pp.NoTools) { | ||
if ((Get-OSArchitectureWidth -Compare 32) -or ($env:chocolateyForceX86 -eq 'true')) { | ||
Write-Error -Message "The 32-bit version of sqlite tools is not available after version 3.43.2" -Category ResourceUnavailable | ||
} | ||
Write-Host "Installing tools" | ||
$packageArgs.FileFullPath = Get-Item "$toolsDir\*tools*win32*.zip" | ||
$packageArgs.FileFullPath64 = "$toolsDir\sqlite-tools-win-x86-3430200.zip" | ||
Get-ChocolateyUnzip @packageArgs | ||
} | ||
|
||
Remove-Item $toolsDir\*.zip -ea 0 | ||
Remove-Item $toolsDir\*.zip -ea 0 |
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