Skip to content

Commit

Permalink
Merge pull request #2572 from TheCakeIsNaOH/inkscape-x64-only
Browse files Browse the repository at this point in the history
(inkscape) drop 32 bit support
  • Loading branch information
corbob authored Feb 8, 2025
2 parents 03b24ca + e55ce7e commit bbca4ba
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 22 deletions.
1 change: 1 addition & 0 deletions automatic/inkscape/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ All Inkscape projects may be exported in formats friendly to web browsers or com

* This software cannot be reinstalled even with the package `--force` option. The installer will not run when the same version is already installed. If you need to reinstall this software, please uninstall the package and then install it again.
* **If the package is out of date please check [Version History](#versionhistory) for the latest submitted version. If you have a question, please ask it in [Chocolatey Community Package Discussions](https://github.com/chocolatey-community/chocolatey-packages/discussions) or raise an issue on the [Chocolatey Community Packages Repository](https://github.com/chocolatey-community/chocolatey-packages/issues) if you have problems with the package. Disqus comments will generally not be responded to.**
* Starting with version 1.4.x, installers for 32bit platforms are no longer available. If this is required, use an older version of the package.
10 changes: 1 addition & 9 deletions automatic/inkscape/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ $toolsPath = Split-Path -parent $MyInvocation.MyCommand.Definition
$packageArgs = @{
packageName = $env:ChocolateyPackageName
fileType = 'msi'
url = 'https://inkscape.org/gallery/item/44620/inkscape-1.3.2_2023-11-25_091e20ef0f-x86.msi'
checksum = 'ADA39E3C380AF0E316630D33D31804A320E06D3EC5D8C093CBBC19A1276F81EE'
checksumType = 'sha256'
file64 = "$toolsPath\inkscape-1.3.2_2023-11-25_091e20e-x64.msi"
softwareName = 'InkScape*'
silentArgs = "/qn /norestart /l*v `"$($env:TEMP)\$($env:chocolateyPackageName).$($env:chocolateyPackageVersion).MsiInstall.log`" ALLUSERS=1"
Expand Down Expand Up @@ -37,12 +34,7 @@ elseif ($key.Count -gt 1) {
Write-Warning "Please uninstall InkScape before installing this package."
}

if ((Get-OSArchitectureWidth 32) -or ($env:chocolateyForceX86 -eq $true)) {
Install-ChocolateyPackage @packageArgs
}
else {
Install-ChocolateyInstallPackage @packageArgs
}
Install-ChocolateyInstallPackage @packageArgs

Get-ChildItem $toolsPath\*.msi | ForEach-Object { Remove-Item $_ -ea 0; if (Test-Path $_) { Set-Content "$_.ignore" } }

Expand Down
13 changes: 0 additions & 13 deletions automatic/inkscape/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ $domain = 'https://inkscape.org'

function global:au_BeforeUpdate {
Get-RemoteFiles -Purge -NoSuffix

Remove-Item "tools/$($Latest.FileName32)" # Embedding 32bit will make the package too large
}

function global:au_SearchReplace {
Expand All @@ -18,9 +16,6 @@ function global:au_SearchReplace {
"(?i)(^\s*checksum64\:).*" = "`${1} $($Latest.Checksum64)"
}
".\tools\chocolateyInstall.ps1" = @{
"(?i)(^\s*url\s*=\s*)'.*'" = "`${1}'$($Latest.URL32)'"
"(?i)(^\s*checksum\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'"
"(?i)(^\s*checksumType\s*=\s*)'.*'" = "`${1}'$($Latest.ChecksumType32)'"
"(?i)(^\s*file64\s*=\s*`"[$]toolsPath\\).*" = "`${1}$($Latest.FileName64)`""
"(?i)(DisplayVersion\s*-eq\s*)'.*'" = "`${1}'$($Latest.RemoteVersion)'"
}
Expand All @@ -31,31 +26,23 @@ function global:au_SearchReplace {
}

function global:au_GetLatest {
# We know the 32bit executable is currently missing, as such
# we will prevent package update for this package until it has
# been decided whether 32bit support will be dropped or not.
throw "Updating of inkscape is disabled until it has been decided whether 32bit support will be dropped or not."

$redirUrl = Get-RedirectedUrl "$domain/release/"

$version = $redirUrl -split '\/(inkscape-)?' | Select-Object -last 1 -skip 1

try {
$32bit_page = Invoke-WebRequest "$redirUrl/windows/32-bit/msi/dl/" -UseBasicParsing
$64bit_page = Invoke-WebRequest "$redirUrl/windows/64-bit/msi/dl/" -UseBasicParsing
}
catch {
throw "Failed to download 32bit or 64bit executeble. Throwing minimized error to allow gist to be updated."
}

$re = '\.msi$'
$url32 = $32bit_page.links | Where-Object href -match $re | Select-Object -first 1 -expand href | ForEach-Object { $domain + $_ }
$url64 = $64bit_page.links | Where-Object href -match $re | Select-Object -first 1 -expand href | ForEach-Object { $domain + $_ }

@{
Version = $version
RemoteVersion = $version
URL32 = $url32
URL64 = $url64
ReleaseNotes = $redirUrl + "#left-column"
UpdateUrl = $redirUrl + "windows"
Expand Down

0 comments on commit bbca4ba

Please sign in to comment.