vcarve-pro-trial-11.0: Internalize, bump to 1.5, add update script

This commit is contained in:
Adam Goldsmith 2022-07-20 00:03:16 -04:00
parent 4f810bf331
commit d2bfb17ab1
4 changed files with 31 additions and 4 deletions

4
.gitignore vendored
View File

@ -1,2 +1,6 @@
# Built packages
*.nupkg
# Installers
/*/tools/*.exe
/*/tools/*.msi

View File

@ -1,11 +1,13 @@
$toolsDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
$packageArgs = @{
packageName = $env:ChocolateyPackageName
FileType = 'exe'
SilentArgs = '/S'
Url64 = '\\ucs\software\VCarveProTrialEditionV11008_Setup.exe'
Checksum64 = 'ee90e3be12712cb799ee51cb7e0f8e2e0b723dfc4d97ced0f88f187d0dd22f04'
File64 = Join-Path $toolsDir 'VCarveProTrialEdition_Setup.exe'
Checksum64 = '1088a6b21d6df5edecc7ac2a67b3866be5faf3c600c561404ebfe448a16bbc31'
ChecksumType64 = 'sha256'
ValidExitCodes = @(0, 1223)
}
Install-ChocolateyPackage @packageArgs
Install-ChocolateyInstallPackage @packageArgs

21
vcarve-pro-trial-11.0/update.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
cd -- "$( dirname -- "${BASH_SOURCE[0]}" )"
wget -N "https://storage.googleapis.com/vectric_public/VCarveProTrialEdition_Setup.exe" --directory-prefix tools/
version=$(7z e -so tools/VCarveProTrialEdition_Setup.exe ProductInfo.ini | awk -F= '$1=="product_version" { print $2 }')
major_version=$(awk -F. -v RS='\r\n' '{print $1"."$2}' <<< $version)
minor_version=$(awk -F. -v RS='\r\n' '{print $3"."$4}' <<< $version)
checksum=$(sha256sum tools/VCarveProTrialEdition_Setup.exe | awk '{print $1}')
if [ "$major_version" != "11.0" ]
then
echo "Major version update! This probably won't really work well."
exit 1
fi
echo "Current version for ${PWD##*/}: major=$major_version, minor=$minor_version, checksum=$checksum"
sed -i "s|<version>[^<]*</version>|<version>$minor_version</version>|" vcarve-pro-trial-11.0.nuspec
sed -i "/Checksum64/s|=.*|= '$checksum'|" tools/chocolateyInstall.ps1

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>vcarve-pro-trial-11.0</id>
<version>0.8</version>
<version>1.5</version>
<title>VCarve Pro Trial</title>
<authors>Vectric Ltd</authors>
<owners>Adam</owners>