mirror of
https://github.com/MillironX/chocolatey-packages.git
synced 2024-11-22 05:59:56 +00:00
Fix chocolatey review tasks for trelby
This commit is contained in:
parent
e9dfca73d7
commit
59121b9c92
4 changed files with 27 additions and 95 deletions
|
@ -7,7 +7,7 @@ $packageArgs = @{
|
||||||
fileType = 'EXE'
|
fileType = 'EXE'
|
||||||
file = $fileLocation
|
file = $fileLocation
|
||||||
|
|
||||||
softwareName = 'Trelby'
|
softwareName = 'Trelby*'
|
||||||
checksum = '1D8A55160B2814D76672D9FD45A07D00236CEC242550B068B2BB558B48E217B'
|
checksum = '1D8A55160B2814D76672D9FD45A07D00236CEC242550B068B2BB558B48E217B'
|
||||||
checksumType = 'sha256'
|
checksumType = 'sha256'
|
||||||
silentArgs = '/S' # NSIS
|
silentArgs = '/S' # NSIS
|
||||||
|
|
|
@ -1,79 +0,0 @@
|
||||||
# IMPORTANT: Before releasing this package, copy/paste the next 2 lines into PowerShell to remove all comments from this file:
|
|
||||||
# $f='c:\path\to\thisFile.ps1'
|
|
||||||
# gc $f | ? {$_ -notmatch "^\s*#"} | % {$_ -replace '(^.*?)\s*?[^``]#.*','$1'} | Out-File $f+".~" -en utf8; mv -fo $f+".~" $f
|
|
||||||
|
|
||||||
## NOTE: In 80-90% of the cases (95% with licensed versions due to Package Synchronizer and other enhancements),
|
|
||||||
## AutoUninstaller should be able to detect and handle registry uninstalls without a chocolateyUninstall.ps1.
|
|
||||||
## See https://chocolatey.org/docs/commands-uninstall
|
|
||||||
## and https://chocolatey.org/docs/helpers-uninstall-chocolatey-package
|
|
||||||
|
|
||||||
## If this is an MSI, ensure 'softwareName' is appropriate, then clean up comments and you are done.
|
|
||||||
## If this is an exe, change fileType, silentArgs, and validExitCodes
|
|
||||||
|
|
||||||
$ErrorActionPreference = 'Stop'; # stop on all errors
|
|
||||||
$packageArgs = @{
|
|
||||||
packageName = $env:ChocolateyPackageName
|
|
||||||
softwareName = 'Trelby' #part or all of the Display Name as you see it in Programs and Features. It should be enough to be unique
|
|
||||||
fileType = 'EXE' #only one of these: MSI or EXE (ignore MSU for now)
|
|
||||||
silentArgs = '/S' # NSIS
|
|
||||||
#silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' # Inno Setup
|
|
||||||
#silentArgs = '/s' # InstallShield
|
|
||||||
#silentArgs = '/s /v"/qn"' # InstallShield with MSI
|
|
||||||
#silentArgs = '/s' # Wise InstallMaster
|
|
||||||
#silentArgs = '-s' # Squirrel
|
|
||||||
#silentArgs = '-q' # Install4j
|
|
||||||
#silentArgs = '-s -u' # Ghost
|
|
||||||
# Note that some installers, in addition to the silentArgs above, may also need assistance of AHK to achieve silence.
|
|
||||||
#silentArgs = '' # none; make silent with input macro script like AutoHotKey (AHK)
|
|
||||||
# https://chocolatey.org/packages/autohotkey.portable
|
|
||||||
#validExitCodes= @(0) #please insert other valid exit codes here
|
|
||||||
}
|
|
||||||
|
|
||||||
$uninstalled = $false
|
|
||||||
# Get-UninstallRegistryKey is new to 0.9.10, if supporting 0.9.9.x and below,
|
|
||||||
# take a dependency on "chocolatey-core.extension" in your nuspec file.
|
|
||||||
# This is only a fuzzy search if $softwareName includes '*'. Otherwise it is
|
|
||||||
# exact. In the case of versions in key names, we recommend removing the version
|
|
||||||
# and using '*'.
|
|
||||||
[array]$key = Get-UninstallRegistryKey -SoftwareName $packageArgs['softwareName']
|
|
||||||
|
|
||||||
if ($key.Count -eq 1) {
|
|
||||||
$key | % {
|
|
||||||
$packageArgs['file'] = "$($_.UninstallString)" #NOTE: You may need to split this if it contains spaces, see below
|
|
||||||
|
|
||||||
if ($packageArgs['fileType'] -eq 'MSI') {
|
|
||||||
# The Product Code GUID is all that should be passed for MSI, and very
|
|
||||||
# FIRST, because it comes directly after /x, which is already set in the
|
|
||||||
# Uninstall-ChocolateyPackage msiargs (facepalm).
|
|
||||||
$packageArgs['silentArgs'] = "$($_.PSChildName) $($packageArgs['silentArgs'])"
|
|
||||||
|
|
||||||
# Don't pass anything for file, it is ignored for msi (facepalm number 2)
|
|
||||||
# Alternatively if you need to pass a path to an msi, determine that and
|
|
||||||
# use it instead of the above in silentArgs, still very first
|
|
||||||
$packageArgs['file'] = ''
|
|
||||||
} else {
|
|
||||||
# NOTES:
|
|
||||||
# - You probably will need to sanitize $packageArgs['file'] as it comes from the registry and could be in a variety of fun but unusable formats
|
|
||||||
# - Split args from exe in $packageArgs['file'] and pass those args through $packageArgs['silentArgs'] or ignore them
|
|
||||||
# - Ensure you don't pass double quotes in $file (aka $packageArgs['file']) - otherwise you will get "Illegal characters in path when you attempt to run this"
|
|
||||||
# - Review the code for auto-uninstaller for all of the fun things it does in sanitizing - https://github.com/chocolatey/choco/blob/bfe351b7d10c798014efe4bfbb100b171db25099/src/chocolatey/infrastructure.app/services/AutomaticUninstallerService.cs#L142-L192
|
|
||||||
}
|
|
||||||
|
|
||||||
Uninstall-ChocolateyPackage @packageArgs
|
|
||||||
}
|
|
||||||
} elseif ($key.Count -eq 0) {
|
|
||||||
Write-Warning "$packageName has already been uninstalled by other means."
|
|
||||||
} elseif ($key.Count -gt 1) {
|
|
||||||
Write-Warning "$($key.Count) matches found!"
|
|
||||||
Write-Warning "To prevent accidental data loss, no programs will be uninstalled."
|
|
||||||
Write-Warning "Please alert package maintainer the following keys were matched:"
|
|
||||||
$key | % {Write-Warning "- $($_.DisplayName)"}
|
|
||||||
}
|
|
||||||
|
|
||||||
## OTHER POWERSHELL FUNCTIONS
|
|
||||||
## https://chocolatey.org/docs/helpers-reference
|
|
||||||
#Uninstall-ChocolateyZipPackage $packageName # Only necessary if you did not unpack to package directory - see https://chocolatey.org/docs/helpers-uninstall-chocolatey-zip-package
|
|
||||||
#Uninstall-ChocolateyEnvironmentVariable # 0.9.10+ - https://chocolatey.org/docs/helpers-uninstall-chocolatey-environment-variable
|
|
||||||
#Uninstall-BinFile # Only needed if you used Install-BinFile - see https://chocolatey.org/docs/helpers-uninstall-bin-file
|
|
||||||
## Remove any shortcuts you added in the install script.
|
|
||||||
|
|
Binary file not shown.
|
@ -5,32 +5,43 @@
|
||||||
<!-- == PACKAGE SPECIFIC SECTION == -->
|
<!-- == PACKAGE SPECIFIC SECTION == -->
|
||||||
<id>trelby</id>
|
<id>trelby</id>
|
||||||
<version>2.2</version>
|
<version>2.2</version>
|
||||||
|
<packageSourceUrl>https://github.com/millironx/chocolatey-packages</packageSourceUrl>
|
||||||
|
<owners>millironx</owners>
|
||||||
|
|
||||||
|
<!-- ============================== -->
|
||||||
|
|
||||||
<!-- == SOFTWARE SPECIFIC SECTION == -->
|
<!-- == SOFTWARE SPECIFIC SECTION == -->
|
||||||
<title>trelby (Install)</title>
|
<title>trelby (Install)</title>
|
||||||
<authors>Trelby developers</authors>
|
<authors>Trelby developers</authors>
|
||||||
<projectUrl>https://www.trelby.org</projectUrl>
|
<projectUrl>https://www.trelby.org</projectUrl>
|
||||||
|
<iconUrl>https://www.trelby.org/assets/logo.png</iconUrl>
|
||||||
|
<licenseUrl>https://github.com/oskusalerma/trelby/blob/master/LICENSE</licenseUrl>
|
||||||
|
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||||
|
<projectSourceUrl>https://github.com/oskusalerma/trelby</projectSourceUrl>
|
||||||
|
<docsUrl>https://www.trelby.org/assets/manual.html</docsUrl>
|
||||||
|
<mailingListUrl>https://www.trelby.org/assets/manual.html</mailingListUrl>
|
||||||
|
<bugTrackerUrl>https://github.com/oskusalerma/trelby/issues</bugTrackerUrl>
|
||||||
<tags>trelby screenwriting film</tags>
|
<tags>trelby screenwriting film</tags>
|
||||||
<summary>The free, multiplatform, feature-rich screenwriting program!</summary>
|
<summary>The free, multiplatform, feature-rich screenwriting program!</summary>
|
||||||
<description>
|
<description>
|
||||||
## A free, multiplatform, feature-rich screenwriting program!
|
## A free, multiplatform, feature-rich screenwriting program!
|
||||||
|
|
||||||
Trelby is _simple_, _fast_ and _elegantly laid out_ to make screenwriting simple. It is _infinitely_ configurable.
|
Trelby is _simple_, _fast_ and _elegantly laid out_ to make screenwriting simple. It is _infinitely_ configurable.
|
||||||
|
|
||||||
Trelby is _free software_, that you can contribute to.
|
Trelby is _free software_, that you can contribute to.
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
* **Screenplay editor**: Enforces correct script format and pagination, auto-completion, and spell checking.
|
|
||||||
* **Multiplatform** : Behaves identically on all platforms, generating the exact same output.
|
|
||||||
* **Choice of view**: Multiple views, including draft view, WYSIWYG mode, and fullscreen to suit your writing style.
|
|
||||||
* **Name database**: Character name database containing over 200,000 names from various countries.
|
|
||||||
* **Reporting**: Scene/location/character/dialogue reports.
|
|
||||||
* **Compare**: Ability to compare scripts, so you know what changed between versions.
|
|
||||||
* **Import**: Screenplay formatted text, Final Draft XML (.fdx), Celtx (.celtx), Fountain (.fountain), Adobe Story (.astx) and Fade In Pro (.fadein).
|
|
||||||
* **Export**: PDF, formatted text, HTML, RTF, Final Draft XML (.fdx) and Fountain (.fountain).
|
|
||||||
* **PDF**: Built-in, highly configurable PDF generator. Supports embedding your chosen font. Also supports generating PDFs with custom watermarks, to help track shared files.
|
|
||||||
* **Free software**: Licensed under the GPL, Trelby welcomes developers and screenwriters to contribute in making it more useful.
|
|
||||||
|
|
||||||
|
* **Screenplay editor**: Enforces correct script format and pagination, auto-completion, and spell checking.
|
||||||
|
* **Multiplatform** : Behaves identically on all platforms, generating the exact same output.
|
||||||
|
* **Choice of view**: Multiple views, including draft view, WYSIWYG mode, and fullscreen to suit your writing style.
|
||||||
|
* **Name database**: Character name database containing over 200,000 names from various countries.
|
||||||
|
* **Reporting**: Scene/location/character/dialogue reports.
|
||||||
|
* **Compare**: Ability to compare scripts, so you know what changed between versions.
|
||||||
|
* **Import**: Screenplay formatted text, Final Draft XML (.fdx), Celtx (.celtx), Fountain (.fountain), Adobe Story (.astx) and Fade In Pro (.fadein).
|
||||||
|
* **Export**: PDF, formatted text, HTML, RTF, Final Draft XML (.fdx) and Fountain (.fountain).
|
||||||
|
* **PDF**: Built-in, highly configurable PDF generator. Supports embedding your chosen font. Also supports generating PDFs with custom watermarks, to help track shared files.
|
||||||
|
* **Free software**: Licensed under the GPL, Trelby welcomes developers and screenwriters to contribute in making it more useful.
|
||||||
</description>
|
</description>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
|
Loading…
Reference in a new issue