diff --git a/automatic/scribus/legal/VERIFICATION.txt b/automatic/scribus/legal/VERIFICATION.txt index 1977f7a762a..4f21dbed380 100644 --- a/automatic/scribus/legal/VERIFICATION.txt +++ b/automatic/scribus/legal/VERIFICATION.txt @@ -7,15 +7,15 @@ location on and can be verified by doing the following: 1. Download the following: - 32-Bit software: - 64-Bit software: + 32-Bit software: NOT INCLUDED IN PACKAGE + 64-Bit software: 2. Get the checksum using one of the following methods: - Using powershell function 'Get-FileHash' - Use chocolatey utility 'checksum.exe' 3. The checksums should match the following: checksum type: sha256 - checksum32: 82E7BED899524F2084F698F90FBFC41269C1D3B7C9F22EE8434866F0A51F1CFA - checksum64: 7EAA92581A8262A2F339B7CC4CB8982FA52454D27E6738E23EC14A66DB2A8FED + checksum32: NOT INCLUDED IN PACKAGE + checksum64: 1197587EBAF4622F348DA594F3D96442847024476F078B1C1B515A736A507181 The file 'LICENSE.txt' has been obtained from diff --git a/automatic/scribus/tools/chocolateyInstall.ps1 b/automatic/scribus/tools/chocolateyInstall.ps1 index ec4f3c585aa..e72005c59b7 100644 --- a/automatic/scribus/tools/chocolateyInstall.ps1 +++ b/automatic/scribus/tools/chocolateyInstall.ps1 @@ -1,17 +1,24 @@ -$ErrorActionPreference = 'Stop' +$ErrorActionPreference = 'Stop' $toolsPath = Split-Path -parent $MyInvocation.MyCommand.Definition $packageArgs = @{ packageName = $env:ChocolateyPackageName fileType = 'exe' - file = "$toolsPath\scribus-1.6.1-windows.exe" - file64 = "$toolsPath\scribus-1.6.1-windows-x64.exe" + url = '' + checksum = '' + checksumType = 'sha256' + file64 = "$toolsPath\scribus-1.4.8-windows-x64.exe" softwareName = 'Scribus*' silentArgs = '/S' validExitCodes = @(0) } -Install-ChocolateyInstallPackage @packageArgs +if ((Get-OSArchitectureWidth -compare 32) -or ($env:chocolateyForceX86 -eq $true)) { + Install-ChocolateyPackage @packageArgs +} +else { + Install-ChocolateyInstallPackage @packageArgs +} Get-ChildItem $toolsPath\*.exe | ForEach-Object { Remove-Item $_ -ea 0; if (Test-Path $_) { Set-Content "$_.ignore" } } diff --git a/automatic/scribus/update.ps1 b/automatic/scribus/update.ps1 index 6a963b20b1d..6f738b8254b 100644 --- a/automatic/scribus/update.ps1 +++ b/automatic/scribus/update.ps1 @@ -2,21 +2,23 @@ $releases = 'https://sourceforge.net/projects/scribus/files/scribus/' -function global:au_BeforeUpdate { Get-RemoteFiles -Purge -NoSuffix -FileNameSkip 1 } +function global:au_BeforeUpdate { + Get-RemoteFiles -Purge -NoSuffix -FileNameSkip 1 + Remove-Item "$PSScriptRoot\tools\$($Latest.FileName32)" +} function global:au_SearchReplace { @{ ".\legal\VERIFICATION.txt" = @{ "(?i)(^\s*location on\:?\s*)\<.*\>" = "`${1}<$releases>" - "(?i)(\s*32\-Bit Software.*)\<.*\>" = "`${1}<$($Latest.URL32)>" "(?i)(\s*64\-Bit Software.*)\<.*\>" = "`${1}<$($Latest.URL64)>" - "(?i)(^\s*checksum\s*type\:).*" = "`${1} $($Latest.ChecksumType32)" - "(?i)(^\s*checksum(32)?\:).*" = "`${1} $($Latest.Checksum32)" + "(?i)(^\s*checksum\s*type\:).*" = "`${1} $($Latest.ChecksumType64)" "(?i)(^\s*checksum64\:).*" = "`${1} $($Latest.Checksum64)" } ".\tools\chocolateyInstall.ps1" = @{ - "(?i)(^\s*file\s*=\s*`"[$]toolsPath\\).*" = "`${1}$($Latest.FileName32)`"" "(?i)(^\s*file64\s*=\s*`"[$]toolsPath\\).*" = "`${1}$($Latest.FileName64)`"" + "(?i)(^\s*Url\s*=\s*)''" = "`${1}'$($Latest.URL32)'" + "(?i)(^\s*Checksum\s*=\s*)''" = "`${1}'$($Latest.Checksum32)'" } } }