feat: Sublime Text 3 build 3047
- Supports install and uninstall
This commit is contained in:
19
SublimeText3/SublimeText3.nuspec
Normal file
19
SublimeText3/SublimeText3.nuspec
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>SublimeText3</id>
|
||||
<title>Sublime Text 3</title>
|
||||
<version>3.0.0.3047</version>
|
||||
<authors>Jon Skinner</authors>
|
||||
<owners>Ethan J. Brown</owners>
|
||||
<summary>Sublime Text 3 is a sophisticated text editor for code, html and prose. You'll love the slick user interface and extraordinary features.</summary>
|
||||
<description>Sublime Text 3 is a sophisticated text editor for code, html and prose. You'll love the slick user interface and extraordinary features. Sublime Text may be downloaded and evaluated for free, however a license must be purchased for continued use.
|
||||
This brings the Sublime Text portable version to your system</description>
|
||||
<releaseNotes>http://www.sublimetext.com/3</releaseNotes>
|
||||
<projectUrl>http://www.sublimetext.com/3</projectUrl>
|
||||
<tags>sublime text editor st3</tags>
|
||||
<licenseUrl>http://www.sublimetext.com/eula</licenseUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<iconUrl>https://github.com/Iristyle/ChocolateyPackages/raw/master/SublimeText2.app/Sublime_Text.png</iconUrl>
|
||||
</metadata>
|
||||
</package>
|
35
SublimeText3/tools/chocolateyInstall.ps1
Normal file
35
SublimeText3/tools/chocolateyInstall.ps1
Normal file
@@ -0,0 +1,35 @@
|
||||
$package = 'SublimeText3'
|
||||
$build = '3047'
|
||||
$installFolder = 'Sublime Text 3'
|
||||
|
||||
try {
|
||||
|
||||
$installedPath = (Join-Path "${Env:\ProgramFiles(x86)}" $installFolder),
|
||||
(Join-Path $Env:ProgramFiles $installFolder) |
|
||||
? { Test-Path $_ } |
|
||||
Select -First 1
|
||||
|
||||
# only way to test for installation of this version is by path on disk
|
||||
if ($installedPath -and (Test-Path $installedPath))
|
||||
{
|
||||
Write-Host "$package is already installed to $installedPath"
|
||||
}
|
||||
else
|
||||
{
|
||||
$params = @{
|
||||
PackageName = $package;
|
||||
FileType = 'exe';
|
||||
#uses InnoSetup - http://www.jrsoftware.org/ishelp/index.php?topic=setupcmdline
|
||||
SilentArgs = '/VERYSILENT /NORESTART /TASKS="contextentry"';
|
||||
Url = "http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%20Build%20$build%20Setup.exe";
|
||||
Url64Bit = "http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%20Build%20$build%20x64%20Setup.exe";
|
||||
}
|
||||
|
||||
Install-ChocolateyPackage @params
|
||||
}
|
||||
|
||||
Write-ChocolateySuccess $package
|
||||
} catch {
|
||||
Write-ChocolateyFailure $package "$($_.Exception.Message)"
|
||||
throw
|
||||
}
|
26
SublimeText3/tools/chocolateyUninstall.ps1
Normal file
26
SublimeText3/tools/chocolateyUninstall.ps1
Normal file
@@ -0,0 +1,26 @@
|
||||
$package = 'SublimeText3'
|
||||
$installFolder = 'Sublime Text 3'
|
||||
|
||||
try {
|
||||
|
||||
$path = ${Env:ProgramFiles(x86)}, $Env:ProgramFiles |
|
||||
% { Join-Path $_ $installFolder } |
|
||||
? { Test-Path $_ } |
|
||||
Select -First 1
|
||||
|
||||
if ($path)
|
||||
{
|
||||
Push-Location $path
|
||||
$uninstaller = '.\unins000.exe'
|
||||
if (Test-Path $uninstaller)
|
||||
{
|
||||
$unargs = '/silent', '/verysilent', '/suppressmsgboxes', '/norestart'
|
||||
&$uninstaller $unargs
|
||||
}
|
||||
}
|
||||
|
||||
Write-ChocolateySuccess $package
|
||||
} catch {
|
||||
Write-ChocolateyFailure $package "$($_.Exception.Message)"
|
||||
throw
|
||||
}
|
Reference in New Issue
Block a user