Skip to content

Commit

Permalink
AU: 1 updated - chromium
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocolatey committed Jan 20, 2018
1 parent b07556d commit 3dafa2a
Show file tree
Hide file tree
Showing 8 changed files with 176 additions and 176 deletions.
16 changes: 8 additions & 8 deletions automatic/chromium/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# <img src="https://cdn.rawgit.com/chocolatey/chocolatey-coreteampackages/edba4a5849ff756e767cba86641bea97ff5721fe/icons/chromium.svg" width="48" height="48"/> [chromium](https://chocolatey.org/packages/chromium)

Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all Internet users to experience the web. This site contains design documents, architecture overviews, testing information, and more to help you learn to build and work with the Chromium source code.

## Notes

- This package installs by default to the `%programfiles(x86)%` instead of `%localappdata%\Chromium`.
- If you have installed this package in the past to the `%localappdata%\Chromium` location it will continue to be installed in this location.
# <img src="https://cdn.rawgit.com/chocolatey/chocolatey-coreteampackages/edba4a5849ff756e767cba86641bea97ff5721fe/icons/chromium.svg" width="48" height="48"/> [chromium](https://chocolatey.org/packages/chromium)

Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all Internet users to experience the web. This site contains design documents, architecture overviews, testing information, and more to help you learn to build and work with the Chromium source code.

## Notes

- This package installs by default to the `%programfiles(x86)%` instead of `%localappdata%\Chromium`.
- If you have installed this package in the past to the `%localappdata%\Chromium` location it will continue to be installed in this location.
2 changes: 1 addition & 1 deletion automatic/chromium/chromium.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>chromium</id>
<version>66.0.3326.0-snapshots</version>
<version>66.0.3327.0-snapshots</version>
<title>Chromium Snapshots</title>
<owners>chocolatey</owners>
<authors>The Chromium Authors</authors>
Expand Down
52 changes: 26 additions & 26 deletions automatic/chromium/legal/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
// Copyright 2015 The Chromium Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// Copyright 2015 The Chromium Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8 changes: 4 additions & 4 deletions automatic/chromium/legal/VERIFICATION.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ location on <https://github.com/henrypp/chromium/releases/> (the listed mirrors
and can be verified by doing the following:

1. Download the following:
32-Bit software: <https://storage.googleapis.com/chromium-browser-snapshots/Win/530421/mini_installer.exe>
64-Bit software: <https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/530421/mini_installer.exe>
32-Bit software: <https://storage.googleapis.com/chromium-browser-snapshots/Win/530748/mini_installer.exe>
64-Bit software: <https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/530743/mini_installer.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
checksum32: DA318654A183DF4791CEF63AF51E0DD0ED184104DE34E74B918A14B67877CDFF
checksum64: 3F0C22708379F280D8E95A9DFCD462ECC7CE8BCFCF0EB24F4E0A6969B5EE3680
checksum32: 7FFDA7C816D8F28F2D94517372A1334E435A93C2A4CFA889114B4BA18A84BFA3
checksum64: 006CCE2A8D5D0CC0EDC72975D7250387E84356F7186F4F38FFE50543E292DE9D

The file 'LICENSE.txt' has been obtained from <https://chromium.googlesource.com/chromium/src.git/+/master/LICENSE>
2 changes: 1 addition & 1 deletion automatic/chromium/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$scriptDir=$toolsDir = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
. (Join-Path $scriptDir 'helper.ps1')

$version = "66.0.3326.0-snapshots"
$version = "66.0.3327.0-snapshots"
$hive = "hkcu"
$chromium_string = "\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Chromium"
$Chromium = $hive + ":" + $chromium_string
Expand Down
34 changes: 17 additions & 17 deletions automatic/chromium/tools/chocolateyUninstall.ps1
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
$registry = Get-UninstallRegistryKey -SoftwareName "chromium*"
$file = $registry.UninstallString
$Arg_chk = ($file -match "--system-level")
$chromiumArgs = @{$true = "--uninstall --system-level"; $false = "--uninstall"}[ $Arg_chk ]
$silentArgs = @{$true = '--uninstall --system-level --force-uninstall'; $false = '--uninstall --force-uninstall'}[ $Arg_chk ]
$myfile = $file -replace ( $chromiumArgs )
# All arguments for the Uninstallation of this package
$packageArgs = @{
PackageName = 'Chromium'
FileType = 'exe'
SilentArgs = $silentArgs
validExitCodes = @(0, 19, 21)
File = $myfile
}
# Now to Uninstall the Package
Uninstall-ChocolateyPackage @packageArgs
# This at the moment does not remove the libs\Chromium folder
$registry = Get-UninstallRegistryKey -SoftwareName "chromium*"
$file = $registry.UninstallString
$Arg_chk = ($file -match "--system-level")
$chromiumArgs = @{$true = "--uninstall --system-level"; $false = "--uninstall"}[ $Arg_chk ]
$silentArgs = @{$true = '--uninstall --system-level --force-uninstall'; $false = '--uninstall --force-uninstall'}[ $Arg_chk ]
$myfile = $file -replace ( $chromiumArgs )
# All arguments for the Uninstallation of this package
$packageArgs = @{
PackageName = 'Chromium'
FileType = 'exe'
SilentArgs = $silentArgs
validExitCodes = @(0, 19, 21)
File = $myfile
}
# Now to Uninstall the Package
Uninstall-ChocolateyPackage @packageArgs
# This at the moment does not remove the libs\Chromium folder
30 changes: 15 additions & 15 deletions automatic/chromium/tools/helper.ps1
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

function Get-CompareVersion {
param(
[string]$version,
[string]$notation,
[string]$package
)
$vorgehen = $true;
$packver = @{$true = $version; $false = ($version -replace($notation,""))}[ ( $version -notmatch $notation ) ]
[array]$key = Get-UninstallRegistryKey -SoftwareName "$package*"
if ($packver -eq ( $key.Version )) {
$vorgehen = $false
}
return $vorgehen
}

function Get-CompareVersion {
param(
[string]$version,
[string]$notation,
[string]$package
)
$vorgehen = $true;
$packver = @{$true = $version; $false = ($version -replace($notation,""))}[ ( $version -notmatch $notation ) ]
[array]$key = Get-UninstallRegistryKey -SoftwareName "$package*"
if ($packver -eq ( $key.Version )) {
$vorgehen = $false
}
return $vorgehen
}
208 changes: 104 additions & 104 deletions automatic/chromium/update.ps1
Original file line number Diff line number Diff line change
@@ -1,104 +1,104 @@

import-module au
$releases_stable = 'https://api.github.com/repos/henrypp/chromium/releases'
$releases_snapshots = 'https://chromium.woolyss.com/api/v2/?os=windows&bit=<bit>&out=string'
$ChecksumType = 'sha256'

function global:au_SearchReplace {
@{
".\legal\verification.txt" = @{
"(?i)(\s*32\-Bit Software.*)\<.*\>" = "`${1}<$($Latest.URL32)>"
"(?i)(\s*64\-Bit Software.*)\<.*\>" = "`${1}<$($Latest.URL64)>"
"(?i)(^\s*checksum\s*type\:).*" = "`${1} $($Latest.ChecksumType32)"
"(?i)(^\s*checksum32\:).*" = "`${1} $($Latest.Checksum32)"
"(?i)(^\s*checksum64\:).*" = "`${1} $($Latest.Checksum64)"
}
".\tools\chocolateyInstall.ps1" = @{
'(^[$]version\s*=\s*)(".*")' = "`$1""$($Latest.Version)"""
"(?i)(^\s*file\s*=\s*`"[$]toolsdir\\).*" = "`${1}$($Latest.FileName32)`""
"(?i)(^\s*file64\s*=\s*`"[$]toolsdir\\).*" = "`${1}$($Latest.FileName64)`""
}
".\chromium.nuspec" = @{
"(?i)(^\s*\<title\>).*(\<\/title\>)" = "`${1}$($Latest.Title)`${2}"
}
}
}

function global:au_BeforeUpdate {
Get-RemoteFiles -Purge -FileNameBase "$($Latest.PackageName)"
}


function Get-Snapshots {
param(
[string]$releases,
[string]$Title
)

$releases_x32 = $releases -replace('<bit>','32')
$releases_x64 = $releases -replace('<bit>','64')
$download_page32 = Invoke-WebRequest -Uri $releases_x32
$download_page64 = Invoke-WebRequest -Uri $releases_x64

$val32 = $download_page32 -split ";"
$val64 = $download_page64 -split ";"

$chromium32 = $val32 | out-string | ConvertFrom-StringData
$chromium64 = $val64 | out-string | ConvertFrom-StringData

$version = $chromium32.version + "-snapshots"
$Pre_Url = 'https://storage.googleapis.com/chromium-browser-snapshots/'
$url32 = $Pre_Url+"Win/<revision>/mini_installer.exe"
$url64 = $Pre_Url+"Win_x64/<revision>/mini_installer.exe"
$url32 = $url32 -replace '<revision>', $chromium32.revision
$url64 = $url64 -replace '<revision>', $chromium64.revision

@{
Title = $Title
URL32 = $url32
URL64 = $url64
Version = $version
ChecksumType32 = $ChecksumType
ChecksumType64 = $ChecksumType
}
}

function Get-Stable {
param(
[string]$releases,
[string]$Title
)

$allVersions = Invoke-WebRequest -Uri $releases -UseBasicParsing | ConvertFrom-Json
$allStableVersions = $allVersions | Where-Object {$_.body -match "stable" -and $_.body -match "windows x86 and x64"}
$latestStableVersionNumber = ($allStableVersions[0].tag_name.split('-') | Select-Object -First 1) -replace 'v', ''
$anyArchLatestStablesVersions = $allVersions | Where-Object {$_.tag_name -match $latestStableVersionNumber}

$32LatestVersion = $anyArchLatestStablesVersions | Where-Object {$_.tag_name -match $latestStableVersionNumber -and $_.tag_name -match "win32"}
$32LatestSyncInstallUrl = ($32LatestVersion.assets | Where-Object name -match "-sync.exe").browser_download_url

$64LatestVersion = $anyArchLatestStablesVersions | Where-Object {$_.tag_name -match $latestStableVersionNumber -and $_.tag_name -match "win64"}
$64LatestSyncInstallUrl = ($64LatestVersion.assets | Where-Object name -match "-sync.exe").browser_download_url

@{
Title = $Title
URL32 = $32LatestSyncInstallUrl
URL64 = $64LatestSyncInstallUrl
Version = $latestStableVersionNumber
ChecksumType32 = $ChecksumType
ChecksumType64 = $ChecksumType
}

}

function global:au_GetLatest {
$streams = [ordered] @{
stable = Get-Stable -releases $releases_stable -Title "Chromium"
snapshots = Get-Snapshots -releases $releases_snapshots -Title "Chromium Snapshots"
}

return @{ Streams = $streams }
}


update -ChecksumFor none

import-module au
$releases_stable = 'https://api.github.com/repos/henrypp/chromium/releases'
$releases_snapshots = 'https://chromium.woolyss.com/api/v2/?os=windows&bit=<bit>&out=string'
$ChecksumType = 'sha256'

function global:au_SearchReplace {
@{
".\legal\verification.txt" = @{
"(?i)(\s*32\-Bit Software.*)\<.*\>" = "`${1}<$($Latest.URL32)>"
"(?i)(\s*64\-Bit Software.*)\<.*\>" = "`${1}<$($Latest.URL64)>"
"(?i)(^\s*checksum\s*type\:).*" = "`${1} $($Latest.ChecksumType32)"
"(?i)(^\s*checksum32\:).*" = "`${1} $($Latest.Checksum32)"
"(?i)(^\s*checksum64\:).*" = "`${1} $($Latest.Checksum64)"
}
".\tools\chocolateyInstall.ps1" = @{
'(^[$]version\s*=\s*)(".*")' = "`$1""$($Latest.Version)"""
"(?i)(^\s*file\s*=\s*`"[$]toolsdir\\).*" = "`${1}$($Latest.FileName32)`""
"(?i)(^\s*file64\s*=\s*`"[$]toolsdir\\).*" = "`${1}$($Latest.FileName64)`""
}
".\chromium.nuspec" = @{
"(?i)(^\s*\<title\>).*(\<\/title\>)" = "`${1}$($Latest.Title)`${2}"
}
}
}

function global:au_BeforeUpdate {
Get-RemoteFiles -Purge -FileNameBase "$($Latest.PackageName)"
}


function Get-Snapshots {
param(
[string]$releases,
[string]$Title
)

$releases_x32 = $releases -replace('<bit>','32')
$releases_x64 = $releases -replace('<bit>','64')
$download_page32 = Invoke-WebRequest -Uri $releases_x32
$download_page64 = Invoke-WebRequest -Uri $releases_x64

$val32 = $download_page32 -split ";"
$val64 = $download_page64 -split ";"

$chromium32 = $val32 | out-string | ConvertFrom-StringData
$chromium64 = $val64 | out-string | ConvertFrom-StringData

$version = $chromium32.version + "-snapshots"
$Pre_Url = 'https://storage.googleapis.com/chromium-browser-snapshots/'
$url32 = $Pre_Url+"Win/<revision>/mini_installer.exe"
$url64 = $Pre_Url+"Win_x64/<revision>/mini_installer.exe"
$url32 = $url32 -replace '<revision>', $chromium32.revision
$url64 = $url64 -replace '<revision>', $chromium64.revision

@{
Title = $Title
URL32 = $url32
URL64 = $url64
Version = $version
ChecksumType32 = $ChecksumType
ChecksumType64 = $ChecksumType
}
}

function Get-Stable {
param(
[string]$releases,
[string]$Title
)

$allVersions = Invoke-WebRequest -Uri $releases -UseBasicParsing | ConvertFrom-Json
$allStableVersions = $allVersions | Where-Object {$_.body -match "stable" -and $_.body -match "windows x86 and x64"}
$latestStableVersionNumber = ($allStableVersions[0].tag_name.split('-') | Select-Object -First 1) -replace 'v', ''
$anyArchLatestStablesVersions = $allVersions | Where-Object {$_.tag_name -match $latestStableVersionNumber}

$32LatestVersion = $anyArchLatestStablesVersions | Where-Object {$_.tag_name -match $latestStableVersionNumber -and $_.tag_name -match "win32"}
$32LatestSyncInstallUrl = ($32LatestVersion.assets | Where-Object name -match "-sync.exe").browser_download_url

$64LatestVersion = $anyArchLatestStablesVersions | Where-Object {$_.tag_name -match $latestStableVersionNumber -and $_.tag_name -match "win64"}
$64LatestSyncInstallUrl = ($64LatestVersion.assets | Where-Object name -match "-sync.exe").browser_download_url

@{
Title = $Title
URL32 = $32LatestSyncInstallUrl
URL64 = $64LatestSyncInstallUrl
Version = $latestStableVersionNumber
ChecksumType32 = $ChecksumType
ChecksumType64 = $ChecksumType
}

}

function global:au_GetLatest {
$streams = [ordered] @{
stable = Get-Stable -releases $releases_stable -Title "Chromium"
snapshots = Get-Snapshots -releases $releases_snapshots -Title "Chromium Snapshots"
}

return @{ Streams = $streams }
}


update -ChecksumFor none

0 comments on commit 3dafa2a

Please sign in to comment.