feat: DartEditor 22879

- Googles Dart Editor
This commit is contained in:
Iristyle
2013-05-25 23:16:10 -04:00
parent a902415416
commit 6e51db6018
3 changed files with 69 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
$package = 'DartEditor'
try {
$params = @{
PackageName = $package;
FileType = 'zip';
Url = 'https://storage.googleapis.com/dart-editor-archive-integration/latest/darteditor-win32-32.zip';
Url64bit = 'https://storage.googleapis.com/dart-editor-archive-integration/latest/darteditor-win32-64.zip';
UnzipLocation = Join-Path $Env:SystemDrive 'tools';
}
$binRoot = Join-Path $Env:SystemDrive $Env:Chocolatey_Bin_Root
if (Test-Path $binRoot)
{
$params.UnzipLocation = $binRoot
}
if (!(Test-Path($params.UnzipLocation)))
{
New-Item $params.UnzipLocation -Type Directory | Out-Null
}
Install-ChocolateyZipPackage @params
$dartPath = Join-Path $params.UnzipLocation 'dart'
Get-ChildItem $dartPath -Filter *.exe -Recurse |
? { $_.Name -match 'dart' } |
% {
Generate-BinFile ($_.Name -replace '\.exe', '') $_.FullName
}
Write-ChocolateySuccess $package
} catch {
Write-ChocolateyFailure $package "$($_.Exception.Message)"
throw
}