-
Notifications
You must be signed in to change notification settings - Fork 372
/
chocolateyInstall.ps1
39 lines (30 loc) · 1.6 KB
/
chocolateyInstall.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
$ErrorActionPreference = 'Stop'
$toolsPath = Split-Path $MyInvocation.MyCommand.Definition
. $toolsPath\helpers.ps1
Close-VSCodeInsiders
$pp = Get-PackageParameters
function Get-MergeTasks {
$t = "!runCode"
$t += ', ' + '!' * $pp.NoDesktopIcon + 'desktopicon'
$t += ', ' + '!' * $pp.NoQuicklaunchIcon + 'quicklaunchicon'
$t += ', ' + '!' * $pp.NoContextMenuFiles + 'addcontextmenufiles'
$t += ', ' + '!' * $pp.NoContextMenuFolders + 'addcontextmenufolders'
$t += ', ' + '!' * $pp.DontAssociateWithFiles + 'associatewithfiles'
$t += ', ' + '!' * $pp.DontAddToPath + 'addtopath'
Write-Host "Merge Tasks: $t"
$t
}
$packageArgs = @{
packageName = "$env:ChocolateyPackageName"
fileType = 'exe'
url = 'https://az764295.vo.msecnd.net/insider/b3546b4bb5aff5254ef857cfd68a3da8534c068f/VSCodeSetup-ia32-1.72.0-insider.exe'
url64bit = 'https://az764295.vo.msecnd.net/insider/b3546b4bb5aff5254ef857cfd68a3da8534c068f/VSCodeSetup-x64-1.72.0-insider.exe'
softwareName = 'Microsoft Visual Studio Code Insiders'
checksum = 'e412584db50e00a8c9befb1a9ccd5eaa0b87358c0e249a854592c9db59fa5c2e739e68a6331e9ea5aad4e80c1c1579954f8158162e35066aab47da607b13b54f'
checksumType = 'sha512'
checksum64 = 'e494ddacdb13092298c79cfffe418e96142583ea154ea764e8f3a5d52836c310d988bf2c633296bc3a8d10c5ae6515a3f71eca24f10090534962fdd6f203077e'
checksumType64 = 'sha512'
silentArgs = '/verysilent /suppressmsgboxes /mergetasks="{0}" /log="{1}\install.log"' -f (Get-MergeTasks), (Get-PackageCacheLocation)
validExitCodes = @(0, 3010, 1641)
}
Install-ChocolateyPackage @packageArgs