Skip to content

Commit

Permalink
gcompris
Browse files Browse the repository at this point in the history
  • Loading branch information
tunisiano187 committed Jun 27, 2024
1 parent abeedb0 commit 6f38fa1
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 10 deletions.
File renamed without changes.
20 changes: 20 additions & 0 deletions automatic/gcompris/legal/VERIFICATION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
VERIFICATION
Verification is intended to assist the Chocolatey moderators and community
in verifying that this package's contents are trustworthy.

1. Download the installer:

x32: https://github.com/Ryochan7/DS4Windows/releases/download/v3.1.11/DS4Windows_3.1.11_x64.zip
x64: https://github.com/Ryochan7/DS4Windows/releases/download/v3.1.11/DS4Windows_3.1.11_x64.zip

2. You can use one of the following methods to obtain the checksum:
- Use powershell function 'Get-FileHash'
- Use Chocolatey utility 'checksum.exe'
- Using AU:
Get-RemoteChecksum https://github.com/Ryochan7/DS4Windows/releases/download/v3.1.11/DS4Windows_3.1.11_x64.zip

ChecksumType: 0
3. Compare to Checksum:

checksum32: 343F507682F5F0D799C99135DA1E812E1FB972CE6CCC27ACC7304FD1D5C99A24
checksum64: 343F507682F5F0D799C99135DA1E812E1FB972CE6CCC27ACC7304FD1D5C99A24
4 changes: 2 additions & 2 deletions automatic/gcompris/tools/ChocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$packageArgs = @{
packageName = $packageName
fileType = 'EXE'
file = "$toolsDir\gcompris-qt-3.3-win32-gcc.exe"
file64 = "$toolsDir\gcompris-qt-3.3-win64-gcc.exe"
file = "$toolsDir\gcompris-qt-win32-gcc.exe"
file64 = "$toolsDir\gcompris-qt-win64-gcc.exe"
silentArgs = '/S'
validExitCodes = @(0,1)
softwareName = 'GCompris Educational Software'
Expand Down
8 changes: 0 additions & 8 deletions automatic/gcompris/tools/VERIFICATION.txt

This file was deleted.

37 changes: 37 additions & 0 deletions automatic/gcompris/update.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import-module au

$releases = 'https://gcompris.net/downloads-fr.html#windows'

function global:au_SearchReplace {
@{
'.\legal\VERIFICATION.txt' = @{
"(?i)(\s+x32:).*" = "`${1} $($Latest.URL32)"
"(?i)(Get-RemoteChecksum).*" = "`${1} $($Latest.URL32)"
"(?i)(\s+checksum32:).*" = "`${1} $($Latest.Checksum32)"
"(?i)(\s+ChecksumType:).*" = "`${1} $($Latest.ChecksumType32)"
"(?i)(\s+x64:).*" = "`${1} $($Latest.URL64)"
"(?i)(\s+checksum64:).*" = "`${1} $($Latest.Checksum64)"
}
}
}

function global:au_AfterUpdate($Package) {
Invoke-VirusTotalScan $Package
}

function global:au_GetLatest {
$urls = ((Invoke-WebRequest -Uri $releases -UseBasicParsing).Links | Where-Object {$_.href -match "-gcc.exe$"}).href
$url32 = $urls | Where-Object {$_ -match "32"}
$url64 = $urls | Where-Object {$_ -match "64"}
. ..\..\scripts\Get-FileVersion.ps1
$FileVersion32 = Get-FileVersion $url32 -keep
$FileVersion64 = Get-FileVersion $url64 -keep

Move-Item -Path $FileVersion32.TempFile -Destination 'tools/gcompris-qt-win32-gcc.exe'
Move-Item -Path $FileVersion64.TempFile -Destination 'tools/gcompris-qt-win64-gcc.exe'

$Latest = @{ URL32 = $url32; Checksum32 = $FileVersion32.CHECKSUM; ChecksumType32 = $FileVersion32.ChecksumType; URL64 = $url64; Checksum64 = $FileVersion64.CHECKSUM; ChecksumType64 = $FileVersion64.ChecksumType; Version = $version }
return $Latest
}

update -ChecksumFor none

0 comments on commit 6f38fa1

Please sign in to comment.