-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(zotero) Add 64-bit installer (re-try) #2613
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
$ErrorActionPreference = 'Stop' | ||
|
||
$toolsPath = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | ||
|
||
$toolsPath = Split-Path -parent $MyInvocation.MyCommand.Definition | ||
$File32Name = 'Zotero-7.0.11_win32_setup.exe' | ||
$File64Name = 'Zotero-7.0.11_x64_setup.exe' | ||
|
||
$File32Path = Join-Path $toolsPath $File32Name | ||
$File64Path = Join-Path $toolsPath $File64Name | ||
|
||
$packageArgs = @{ | ||
packageName = $env:ChocolateyPackageName | ||
fileType = 'exe' | ||
silentArgs = '/S' | ||
validExitCodes = @(0) | ||
softwareName = 'Zotero' | ||
file = "$toolsPath\Zotero-7.0.11_win32_setup.exe" | ||
packageName = $env:ChocolateyPackageName | ||
softwareName = "Zotero*" | ||
fileType = 'exe' | ||
file = "$File32Path" | ||
file64 = "$File64Path" | ||
silentArgs = '/S' | ||
validExitCodes = @(0) | ||
} | ||
|
||
Install-ChocolateyInstallPackage @packageArgs | ||
|
||
Remove-Item -Force -ea 0 "$toolsPath\*.exe","$toolsPath\*.ignore" | ||
Remove-Item "$File32Path","$File64Path" -Force -ea 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,36 @@ | ||
Import-Module Chocolatey-AU | ||
Import-Module "$PSScriptRoot\..\..\scripts\au_extensions.psm1" | ||
|
||
$releases = 'https://www.zotero.org/download/client/dl?channel=release&platform=win32' | ||
$softwareName = 'Zotero' | ||
$releases = 'https://www.zotero.org/download/client/dl?channel=release&platform=win-x64' | ||
|
||
function global:au_BeforeUpdate { Get-RemoteFiles -Purge -NoSuffix } | ||
|
||
function global:au_SearchReplace { | ||
$version = $Latest.Version.ToString() | ||
|
||
@{ | ||
".\legal\VERIFICATION.txt" = @{ | ||
"(?i)(\s*1\..+)\<.*\>" = "`${1}<$($Latest.URL32)>" | ||
"(?i)(^\s*checksum\s*type\:).*" = "`${1} $($Latest.ChecksumType32)" | ||
"(?i)(^\s*checksum(32)?\:).*" = "`${1} $($Latest.Checksum32)" | ||
"(?i)(^\s*x32\:).*" = "`${1} $($Latest.URL32)" | ||
"(?i)(^\s*x64\:).*" = "`${1} $($Latest.URL64)" | ||
"(?i)(^\s*checksum32\:).*" = "`${1} $($Latest.Checksum32)" | ||
"(?i)(^\s*checksum64\:).*" = "`${1} $($Latest.Checksum64)" | ||
} | ||
".\tools\chocolateyInstall.ps1" = @{ | ||
"(?i)^(\s*softwareName\s*=\s*)'.*'" = "`${1}'$softwareName'" | ||
"(?i)(^\s*file\s*=\s*`"[$]toolsPath\\).*" = "`${1}$($Latest.FileName32)`"" | ||
} | ||
".\tools\chocolateyUninstall.ps1" = @{ | ||
"(?i)^(\s*softwareName\s*=\s*)'.*'" = "`${1}'$softwareName'" | ||
} | ||
".\$($Latest.PackageName).nuspec" = @{ | ||
"(\<releaseNotes\>).*(\<\/releaseNotes\>)" = "`${1}https://www.zotero.org/support/$($version.Major).$($version.Minor)_changelog`${2}" | ||
"(?i)(^[$]File32Name =).*" = "`${1} '$($Latest.URL32.split('/')[-1])'" | ||
"(?i)(^[$]File64Name =).*" = "`${1} '$($Latest.URL64.split('/')[-1])'" | ||
} | ||
} | ||
} | ||
|
||
function global:au_GetLatest { | ||
$url = Get-RedirectedUrl -url $releases | ||
$url64 = Get-RedirectedUrl -url $releases | ||
$url32 = $url64 -replace 'x64','win32' | ||
|
||
$version = $url -split '/' | Select-Object -Last 1 -Skip 1 | ||
$version = $url64 -split '/' | Where-Object {$_ -match '^\d+\.\d[0-9.]*$'} | Select-Object -Last 1 | ||
|
||
@{ | ||
Version = $version | ||
URL32 = $url | ||
} | ||
@{ | ||
Version = $version | ||
URL32 = $url32 | ||
URL64 = $url64 | ||
} | ||
} | ||
|
||
update -ChecksumFor none | ||
update -ChecksumFor none -force |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When trying to compare this file against the original, I am finding it hard to follow what's a change of merely moving lines around, and what's a change to line contents. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The only items that changed are There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK. The full, updated copyright has been added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably link directly to the commit that the text comes from, otherwise it is possible the contents change and then this verification becomes invalid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. This is corrected.