Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
fix this all hopefully...
Browse files Browse the repository at this point in the history
  • Loading branch information
JourneyOver committed Jan 31, 2024
1 parent eb37a1d commit 2f561ec
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 18 deletions.
5 changes: 2 additions & 3 deletions automatic/tinymediamanager/tinymediamanager.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@
#### Package
* Automatically built and uploaded by [JourneyOver](https://chocolatey.org/profiles/JourneyOver)
* If you have any requests or issues with this package please make an issue [here](https://github.com/JourneyOver/chocolatey-packages) instead of "Contact Maintainers"</releaseNotes>
<dependencies>
<dependency id="jre8" version="8.0.171" />
</dependencies>
<!-- <dependencies>
</dependencies> -->
</metadata>
<files>
<file src="tools\**" target="tools" />
Expand Down
1 change: 1 addition & 0 deletions automatic/tinymediamanager/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ $Destination = "C:\Tools\tmm"
$packageArgs = @{
packageName = $packageName
FileFullPath = $embedded_path
SpecificFolder = 'tinyMediaManager'
Destination = $Destination
}

Expand Down
28 changes: 15 additions & 13 deletions automatic/tinymediamanager/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ function global:au_BeforeUpdate($Package) {
Get-RemoteFiles -Purge -NoSuffix

if ($Latest.URL32 -like '*tmm_3*' -or $Latest.URL32 -like '*tmm_4*') {
Copy-Item "$PSScriptRoot\version_switch\old_versions.ps1" "$PSScriptRoot\tools\chocolateyInstall.ps1" -Force
Copy-Item "$PSScriptRoot\version_switch\install_v4.ps1" "$PSScriptRoot\tools\chocolateyInstall.ps1" -Force
Copy-Item "$PSScriptRoot\version_switch\uninstall_v4.ps1" "$PSScriptRoot\tools\chocolateyUninstall.ps1" -Force
} else {
Copy-Item "$PSScriptRoot\version_switch\version5.ps1" "$PSScriptRoot\tools\chocolateyInstall.ps1" -Force
Copy-Item "$PSScriptRoot\version_switch\install_v5.ps1" "$PSScriptRoot\tools\chocolateyInstall.ps1" -Force
Copy-Item "$PSScriptRoot\version_switch\uninstall_v5.ps1" "$PSScriptRoot\tools\chocolateyUninstall.ps1" -Force
}
}

Expand Down Expand Up @@ -91,17 +93,17 @@ function GetV4Version() {
#}

function global:au_GetLatest {
# $v3Stream = GetV3Version
$v4Stream = GetV4Version
$v5Stream = GetV5Version

$streams = [ordered] @{
# v3 = $v3Stream
v4 = $v4Stream
v5 = $v5Stream
}
# $v3Stream = GetV3Version
$v4Stream = GetV4Version
$v5Stream = GetV5Version

$streams = [ordered] @{
# v3 = $v3Stream
v4 = $v4Stream
v5 = $v5Stream
}

return @{ Streams = $streams }
}
return @{ Streams = $streams }
}

update -ChecksumFor none
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $ErrorActionPreference = 'Stop'
$packageName = 'tinymediamanager'
$toolsDir = Split-Path $MyInvocation.MyCommand.Definition
$embedded_path = Get-Item "$toolsDir\*.zip"
$Destination = "C:\Tools\tmm"
$Destination = "C:\Tools"

$packageArgs = @{
packageName = $packageName
Expand All @@ -14,7 +14,7 @@ $packageArgs = @{

Get-ChocolateyUnzip @packageArgs

$fileLocation = Get-Item "$Destination\*Manager.exe"
$fileLocation = Get-Item "$Destination\tinyMediaManager\*Manager.exe"
$shortcutName = 'tinyMediaManager.lnk'

Install-ChocolateyShortcut -shortcutFilePath "$env:Public\Desktop\$shortcutName" -targetPath "$fileLocation" -WorkingDirectory "$Destination"
Expand Down
6 changes: 6 additions & 0 deletions automatic/tinymediamanager/version_switch/uninstall_v4.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$packageName = 'tinymediamanager'
$shortcutName = 'tinyMediaManager.lnk'

Remove-Item "$env:Public\Desktop\$shortcutName" -Force -ErrorAction 'SilentlyContinue'
Remove-Item "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\$shortcutName" -Force -ErrorAction 'SilentlyContinue'
Remove-Item -r "C:\Tools\tmm*" -ea 0 -Force
6 changes: 6 additions & 0 deletions automatic/tinymediamanager/version_switch/uninstall_v5.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$packageName = 'tinymediamanager'
$shortcutName = 'tinyMediaManager.lnk'

Remove-Item "$env:Public\Desktop\$shortcutName" -Force -ErrorAction 'SilentlyContinue'
Remove-Item "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\$shortcutName" -Force -ErrorAction 'SilentlyContinue'
Remove-Item -r "C:\Tools\tinyMediaManager*" -ea 0 -Force

0 comments on commit 2f561ec

Please sign in to comment.