diff --git a/bucket/IntelliJ-IDEA-Ultimate-portable.json b/bucket/IntelliJ-IDEA-Ultimate-portable.json index 6d840fe..922c6a7 100644 --- a/bucket/IntelliJ-IDEA-Ultimate-portable.json +++ b/bucket/IntelliJ-IDEA-Ultimate-portable.json @@ -1,5 +1,5 @@ { - "version": "2020.3.3-203.7717.56", + "version": "2020.3.4-203.8084.24", "description": "IntelliJ IDEA Ultimate. Cross-Platform Java IDE for professional developers by JetBrains.", "homepage": "https://www.jetbrains.com/idea/", "license": { @@ -7,11 +7,11 @@ "url": "https://www.jetbrains.com/store/license.html" }, "url": [ - "https://download.jetbrains.com/idea/ideaIU-2020.3.3.win.zip", - "https://raw.githubusercontent.com/Ash258/Scoop-JetBrains/master/scripts/portable.ps1" + "https://download.jetbrains.com/idea/ideaIU-2020.3.4.win.zip", + "https://code.simaek.com/xueye/scoop-bucket/raw/branch/master/scripts/jetbrains/portable.ps1" ], "hash": [ - "419196bea9995c0577192e72aca1b62669bcd0d55dbfc93ee67928225a4be8a4", + "97aeccda16943855654540c5659db01257070b7628ec3a72d9ed5bee176fe88a", "5b43fc8a57d7d8d519071a50849a5db92c90ecdf56b64ac57f15fdae5b4f0572" ], "extract_to": "IDE", diff --git a/scripts/jetbrains/portable.ps1 b/scripts/jetbrains/portable.ps1 new file mode 100644 index 0000000..edcae6f --- /dev/null +++ b/scripts/jetbrains/portable.ps1 @@ -0,0 +1,29 @@ +<# +.SYNOPSIS + Universal portable mode enabler + IDE subdirectory is needed. +.PARAMETER Directory + Current '$dir' of application +.PARAMETER Persist + Persist directory of application +#> +param([Parameter(Mandatory)][String] $Directory, [Parameter(Mandatory)][String] $Persist) + +$properties = Join-Path 'IDE' 'bin\idea.properties' + +if (-not (Join-Path $Persist $properties | Test-Path)) { + Write-Host 'File' $properties 'does not exists. Creating.' -ForegroundColor Yellow + + $fullProp = Join-path $Directory $properties + $currentForward = (Split-Path $Directory | Join-Path -ChildPath 'current') -replace '\\', '/' + $profileDir = "$currentForward/profile" + + $CONT = Get-Content $fullProp + # Set portable configuration + $CONT = $CONT -replace '^#\s*(idea.config.path=).*$', "`$1$profileDir/config" + $CONT = $CONT -replace '^#\s*(idea.system.path=).*$', "`$1$profileDir/system" + $CONT = $CONT -replace '^#\s*(idea.plugins.path=).*$', '$1${idea.config.path}/plugins' + $CONT = $CONT -replace '^#\s*(idea.log.path=).*$', '$1${idea.system.path}/log' + + Set-Content $fullProp $CONT -Encoding Ascii -Force +}