-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(sqlite) Handle updated filenames and 64-bit tools
Package was failing to build due to updates in the filename format from sqlite-dll-win32-3432000.zip to sqlite-dll-win-x86-3440000.zip. The tools package has also been modified from 32-bit to 64-bit. Modified filename handling in the update script to correctly process the new filename format and modified the install script to handle the 64-bit tools package.
- Loading branch information
1 parent
c37769d
commit 21cad2a
Showing
5 changed files
with
59 additions
and
35 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 = (Get-Item "$toolsDir\*dll*win-x86*.zip") | ||
FileFullPath64 = (Get-Item "$toolsDir\*dll*win-x64*.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 "32-bit version of sqlite tools not available after version 3.43.2" -Category ResourceUnavailable | ||
} | ||
Write-Host "Installing tools" | ||
$packageArgs.FileFullPath = Get-Item "$toolsDir\*tools*win32*.zip" | ||
$packageArgs.FileFullPath64 = Get-Item "$toolsDir\*tools*win-x64*.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