Skip to content

Commit

Permalink
intellijidea: choose the correct path
Browse files Browse the repository at this point in the history
  • Loading branch information
Zed committed Jun 8, 2019
1 parent b463344 commit 22037c3
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 38 deletions.
44 changes: 25 additions & 19 deletions packages/intellijidea-community/tools/chocolateyInstall.ps1
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 packages/intellijidea-ultimate/tools/chocolateyInstall.ps1
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

0 comments on commit 22037c3

Please sign in to comment.