/
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/edc432e920c3ec2c2af5e8a99b8e4b782633d298/VSCodeSetup-ia32-1.75.0-insider.exe'
url64bit = 'https://az764295.vo.msecnd.net/insider/edc432e920c3ec2c2af5e8a99b8e4b782633d298/VSCodeSetup-x64-1.75.0-insider.exe'
softwareName = 'Microsoft Visual Studio Code Insiders'
checksum = '73ca21be9617319afb5bbcc615265aad4627524e8da3b701daa41b0eed633cc61c21a39e120c21c419aeff9cc28d6471fdd58a83de84f8909e54854fea33e1b1'
checksumType = 'sha512'
checksum64 = '2c0589527b88f642591c12c0d308c11b4f919dd987d3e3c56ec8382d9920498f8efe8f41b46868298eb34b05bb9c7c8ff99588bbd7223c4d3d22d4d65dcd5f1a'
checksumType64 = 'sha512'
silentArgs = '/verysilent /suppressmsgboxes /mergetasks="{0}" /log="{1}\install.log"' -f (Get-MergeTasks), (Get-PackageCacheLocation)
validExitCodes = @(0, 3010, 1641)
}
Install-ChocolateyPackage @packageArgs