Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions automatic/zotero/legal/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
Zotero is Copyright © 2006, 2007, 2008, 2009, 2010, 2011
Center for History and New Media, George Mason University,
Zotero is Copyright © 2018 Corporation for Digital Scholarship,
Vienna, Virginia, USA http://digitalscholar.org

Copyright © 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
Roy Rosenzweig Center for History and New Media, George Mason University,
Fairfax, Virginia, USA http://zotero.org

The Center for History and New Media distributes the Zotero source code
The Corporation for Digital Scholarship distributes the Zotero source code
under the GNU Affero General Public License, version 3 (AGPLv3). The full text
of this license is given below.

The Zotero name is a registered trademark of George Mason University.
The Zotero name is a registered trademark of the Corporation for Digital Scholarship.
See http://zotero.org/trademark for more information.

Third-party copyright in this distribution is noted where applicable.
Expand Down Expand Up @@ -676,3 +679,4 @@ specific requirements.
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.

19 changes: 12 additions & 7 deletions automatic/zotero/legal/VERIFICATION.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@ VERIFICATION
Verification is intended to assist the Chocolatey moderators and community
in verifying that this package's contents are trustworthy.

The embedded software have been downloaded from the listed download
location on <https://www.zotero.org/download/> (The listed url gets redirected to another one)
and can be verified by doing the following:
Package can be verified like this:

1. Go to

x32: https://download.zotero.org/client/release/7.0.11/Zotero-7.0.11_win32_setup.exe
x64: https://download.zotero.org/client/release/7.0.11/Zotero-7.0.11_x64_setup.exe

to download the installer.

1. Download the following <https://download.zotero.org/client/release/7.0.11/Zotero-7.0.11_win32_setup.exe>
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
checksum: 35F8EEAEB33C5BE35E79707A9F9DC9F0441907C9153F19B00B847700402E59E9
checksum32: 35F8EEAEB33C5BE35E79707A9F9DC9F0441907C9153F19B00B847700402E59E9
checksum64: FDCA78418774B370C33E47934D1606CB0FE298809C07AF537D051F3DD3CFC809

The file 'LICENSE.txt' has been obtained from <https://github.com/zotero/zotero/blob/929288f9811a5026053ae154ca08cc4a9da13c52/COPYING>
The file 'LICENSE.txt' has been obtained from
https://raw.githubusercontent.com/zotero/zotero/refs/heads/main/COPYING
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. This is corrected.

23 changes: 15 additions & 8 deletions automatic/zotero/tools/chocolateyInstall.ps1
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
4 changes: 2 additions & 2 deletions automatic/zotero/tools/chocolateyUninstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

$packageArgs = @{
packageName = $env:ChocolateyPackageName
softwareName = 'Zotero'
softwareName = "Zotero*"
fileType = 'exe'
silentArgs = '/S'
validExitCodes= @(@(0))
Expand All @@ -19,7 +19,7 @@ if ($key.Count -eq 1) {
Uninstall-ChocolateyPackage @packageArgs
}
} elseif ($key.Count -eq 0) {
Write-Warning "$packageName has already been uninstalled by other means."
Write-Warning "$env:ChocolateyPackageName 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."
Expand Down
38 changes: 16 additions & 22 deletions automatic/zotero/update.ps1
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
30 changes: 16 additions & 14 deletions automatic/zotero/zotero.nuspec
Copy link
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only items that changed are <tags>, <authors>, and <releaseNotes> (old path had a "._" leading the directory name). Considering the License and Authors have changed, I would expect the Copyright to change. I'll look into that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. The full, updated copyright has been added.

Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,32 @@
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<!-- == PACKAGE SPECIFIC SECTION == -->
<id>zotero</id>
<title>Zotero</title>
<owners>chocolatey-community</owners>
<version>7.0.11</version>
<authors>Center for History and New Media, et. al.</authors>
<summary>Zotero [zoh-TAIR-oh] is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources. </summary>
<iconUrl>https://cdn.jsdelivr.net/gh/chocolatey-community/chocolatey-packages@53607633ce049d5d75ac668f4408faaeced36bc3/icons/zotero.png</iconUrl>
<!-- Do not touch the description here in the nuspec file. Description is imported during update from the Readme.md file -->
<description><![CDATA[Zotero is free and open-source reference management software to manage bibliographic data and related research materials (such as PDF files). Notable features include web browser integration, online syncing, generation of in-text citations, footnotes and bibliographies, as well as integration with the word processors Microsoft Word, LibreOffice, OpenOffice.org Writer and NeoOffice.


![screenshot](https://cdn.rawgit.com/chocolatey/chocolatey-coreteampackages/d1d9f0154e370315e49f245a26a7d23e89a705cc/automatic/zotero/screenshot.png)
]]></description>
<packageSourceUrl>https://github.com/chocolatey-community/chocolatey-packages/tree/master/automatic/zotero</packageSourceUrl>
<owners>chocolatey-community</owners>
<!-- == SOFTWARE SPECIFIC SECTION == -->
<title>Zotero</title>
<authors>Corporation for Digital Scholarship</authors>
<projectUrl>https://www.zotero.org/</projectUrl>
<tags>zotero references manager bibliography foss cross-platform admin</tags>
<iconUrl>https://cdn.jsdelivr.net/gh/chocolatey-community/chocolatey-packages@53607633ce049d5d75ac668f4408faaeced36bc3/icons/zotero.png</iconUrl>
<copyright>2006-2011, Center for History and New Media, George Mason University, Fairfax, Virginia, USA</copyright>
<licenseUrl>https://github.com/zotero/zotero/blob/master/COPYING</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<releaseNotes>https://www.zotero.org/support/._changelog</releaseNotes>
<packageSourceUrl>https://github.com/chocolatey-community/chocolatey-packages/tree/master/automatic/zotero</packageSourceUrl>
<projectSourceUrl>https://www.zotero.org/support/dev/source_code</projectSourceUrl>
<docsUrl>https://www.zotero.org/support</docsUrl>
<mailingListUrl>https://forums.zotero.org/discussions</mailingListUrl>
<bugTrackerUrl>https://github.com/zotero/zotero/issues</bugTrackerUrl>
<tags>zotero productivity foss cross-platform references manager bibliography citations research embedded</tags>
<summary>Zotero [zoh-TAIR-oh] is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources. </summary>
<!-- Do not touch the description here in the nuspec file. Description is imported during update from the Readme.md file -->
<description><![CDATA[Zotero is free and open-source reference management software to manage bibliographic data and related research materials (such as PDF files). Notable features include web browser integration, online syncing, generation of in-text citations, footnotes and bibliographies, as well as integration with the word processors Microsoft Word, LibreOffice, OpenOffice.org Writer and NeoOffice.


![screenshot](https://cdn.rawgit.com/chocolatey/chocolatey-coreteampackages/d1d9f0154e370315e49f245a26a7d23e89a705cc/automatic/zotero/screenshot.png)
]]></description>
<releaseNotes>https://www.zotero.org/support/changelog</releaseNotes>
<dependencies>
<dependency id="chocolatey-core.extension" version="1.3.3" />
</dependencies>
Expand Down
Loading