forked from AnthonyMastrean/chocolateypackages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
intellijidea: choose the correct path
- Loading branch information
Zed
committed
Jun 8, 2019
1 parent
b463344
commit 22037c3
Showing
2 changed files
with
52 additions
and
38 deletions.
There are no files selected for viewing
44 changes: 25 additions & 19 deletions
44
packages/intellijidea-community/tools/chocolateyInstall.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,43 @@ | ||
$ErrorActionPreference = 'Stop'; | ||
|
||
$url = 'https://download.jetbrains.com/idea/ideaIC-2019.1.3.exe' | ||
$sha256sum = '7398b3e580c11ec7289b8cc86761a446007a7027a50fcc2a13206abb2a6e0bf7' | ||
$url = 'https://download.jetbrains.com/idea/ideaIC-2019.1.3.exe' | ||
$sha256sum = '7398b3e580c11ec7289b8cc86761a446007a7027a50fcc2a13206abb2a6e0bf7' | ||
|
||
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | ||
$programFiles = (${env:ProgramFiles(x86)}, ${env:ProgramFiles} -ne $null)[0] | ||
$pp = Get-PackageParameters | ||
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | ||
if ([System.Environment]::Is64BitOperatingSystem) { | ||
$programFiles = $env:ProgramFiles | ||
} | ||
else { | ||
$programFiles = ${env:ProgramFiles(x86)} | ||
} | ||
$installDir = "$programFiles\JetBrains\IntelliJ IDEA Community Edition $env:ChocolateyPackageVersion" | ||
|
||
$pp = Get-PackageParameters | ||
if ($pp.InstallDir) { | ||
$installDir = $pp.InstallDir | ||
} | ||
|
||
$silentArgs = "/S /CONFIG=$toolsDir\silent.config " | ||
$silentArgs += "/D=`"$installDir`"" | ||
$silentArgs = "/S /CONFIG=$toolsDir\silent.config " | ||
$silentArgs += "/D=`"$installDir`"" | ||
|
||
New-Item -ItemType Directory -Force -Path $installDir | ||
|
||
$packageArgs = @{ | ||
packageName = $env:ChocolateyPackageName | ||
unzipLocation = $toolsDir | ||
fileType = 'exe' | ||
url = $url | ||
url64bit = $url | ||
packageName = $env:ChocolateyPackageName | ||
unzipLocation = $toolsDir | ||
fileType = 'exe' | ||
url = $url | ||
url64bit = $url | ||
|
||
softwareName = 'IntelliJ IDEA Community Edition*' | ||
softwareName = 'IntelliJ IDEA Community Edition*' | ||
|
||
checksum = $sha256sum | ||
checksumType = 'sha256' | ||
checksum64 = $sha256sum | ||
checksumType64 = 'sha256' | ||
checksum = $sha256sum | ||
checksumType = 'sha256' | ||
checksum64 = $sha256sum | ||
checksumType64 = 'sha256' | ||
|
||
silentArgs = $silentArgs | ||
validExitCodes = @(0, 1641, 3010) | ||
silentArgs = $silentArgs | ||
validExitCodes = @(0, 1641, 3010) | ||
} | ||
|
||
Install-ChocolateyPackage @packageArgs |
46 changes: 27 additions & 19 deletions
46
packages/intellijidea-ultimate/tools/chocolateyInstall.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,45 @@ | ||
$ErrorActionPreference = 'Stop'; | ||
|
||
$url = 'https://download.jetbrains.com/idea/ideaIU-2019.1.3.exe' | ||
$sha256sum = '05fd4734a5bdaa2043738a9d03c4bd5208aca6a71b817c5c88f65996c7195b5c' | ||
$url = 'https://download.jetbrains.com/idea/ideaIU-2019.1.3.exe' | ||
$sha256sum = '05fd4734a5bdaa2043738a9d03c4bd5208aca6a71b817c5c88f65996c7195b5c' | ||
|
||
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | ||
if ([System.Environment]::Is64BitOperatingSystem) { | ||
$programFiles = $env:ProgramFiles | ||
} else { | ||
$programFiles = ${env:ProgramFiles(x86)} | ||
} | ||
|
||
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | ||
$programFiles = (${env:ProgramFiles(x86)}, ${env:ProgramFiles} -ne $null)[0] | ||
$pp = Get-PackageParameters | ||
$installDir = "$programFiles\JetBrains\IntelliJ IDEA $env:ChocolateyPackageVersion" | ||
|
||
$pp = Get-PackageParameters | ||
if ($pp.InstallDir) { | ||
$installDir = $pp.InstallDir | ||
} | ||
|
||
$silentArgs = "/S /CONFIG=$toolsDir\silent.config " | ||
$silentArgs += "/D=`"$installDir`"" | ||
|
||
|
||
$silentArgs = "/S /CONFIG=$toolsDir\silent.config " | ||
$silentArgs += "/D=`"$installDir`"" | ||
|
||
New-Item -ItemType Directory -Force -Path $installDir | ||
|
||
$packageArgs = @{ | ||
packageName = $env:ChocolateyPackageName | ||
unzipLocation = $toolsDir | ||
fileType = 'exe' | ||
url = $url | ||
url64bit = $url | ||
packageName = $env:ChocolateyPackageName | ||
unzipLocation = $toolsDir | ||
fileType = 'exe' | ||
url = $url | ||
url64bit = $url | ||
|
||
softwareName = 'IntelliJ IDEA*' | ||
softwareName = 'IntelliJ IDEA*' | ||
|
||
checksum = $sha256sum | ||
checksumType = 'sha256' | ||
checksum64 = $sha256sum | ||
checksumType64 = 'sha256' | ||
checksum = $sha256sum | ||
checksumType = 'sha256' | ||
checksum64 = $sha256sum | ||
checksumType64 = 'sha256' | ||
|
||
silentArgs = $silentArgs | ||
validExitCodes = @(0, 1641, 3010) | ||
silentArgs = $silentArgs | ||
validExitCodes = @(0, 1641, 3010) | ||
} | ||
|
||
Install-ChocolateyPackage @packageArgs |