From 1e99c9d56258990246164a532ad2bf0910615af5 Mon Sep 17 00:00:00 2001 From: SiriosDev <26876994+SiriosDev@users.noreply.github.com> Date: Sun, 9 Aug 2026 15:53:47 +0200 Subject: [PATCH 1/4] persisting automations json placed in the root of the application --- bucket/aegisub.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bucket/aegisub.json b/bucket/aegisub.json index 99110f8c4fc07d..50455e50b1e0cc 100644 --- a/bucket/aegisub.json +++ b/bucket/aegisub.json @@ -18,9 +18,9 @@ "extract_dir": "aegisub-portable", "pre_install": [ "# Hardlinks won't work properly here to persist files, because this app creates a new file instead of writing to the existing one.", - "'config.json' | ForEach-Object {", - " if (Test-Path -LiteralPath \"$persist_dir\\$_\" -PathType Leaf) {", - " Copy-Item -Path \"$persist_dir\\$_\" -Destination \"$dir\\$_\" -Force", + "Get-ChildItem -LiteralPath \"$persist_dir\" -File | Where-Object { $_.Name -notin @('manifest.json', 'install.json') } | ForEach-Object {", + " if (Test-Path -LiteralPath \"$persist_dir\\$($_.Name)\" -PathType Leaf) {", + " Copy-Item -Path \"$persist_dir\\$($_.Name)\" -Destination \"$dir\\$($_.Name)\" -Force", " }", "}" ], @@ -47,10 +47,10 @@ ], "pre_uninstall": [ "# Hardlinks won't work properly here to persist files, because this app creates a new file instead of writing to the existing one.", - "'config.json' | ForEach-Object {", - " if (Test-Path -LiteralPath \"$dir\\$_\" -PathType Leaf) {", + "Get-ChildItem -LiteralPath \"$dir\" -File | Where-Object { $_.Name -notin @('manifest.json', 'install.json') } | ForEach-Object {", + " if (Test-Path -LiteralPath \"$dir\\$($_.Name)\" -PathType Leaf) {", " ensure $persist_dir | Out-Null", - " Copy-Item -Path \"$dir\\$_\" -Destination \"$persist_dir\\$_\" -Force", + " Copy-Item -Path \"$dir\\$($_.Name)\" -Destination \"$persist_dir\\$($_.Name)\" -Force", " }", "}" ], From 6d9e960263232ee5108d36b4f2b8c9f06c1e47b8 Mon Sep 17 00:00:00 2001 From: SiriosDev <26876994+SiriosDev@users.noreply.github.com> Date: Sun, 9 Aug 2026 16:08:39 +0200 Subject: [PATCH 2/4] filtered jsons --- bucket/aegisub.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bucket/aegisub.json b/bucket/aegisub.json index 50455e50b1e0cc..d2002c1730ded9 100644 --- a/bucket/aegisub.json +++ b/bucket/aegisub.json @@ -18,7 +18,7 @@ "extract_dir": "aegisub-portable", "pre_install": [ "# Hardlinks won't work properly here to persist files, because this app creates a new file instead of writing to the existing one.", - "Get-ChildItem -LiteralPath \"$persist_dir\" -File | Where-Object { $_.Name -notin @('manifest.json', 'install.json') } | ForEach-Object {", + "Get-ChildItem -LiteralPath \"$persist_dir\" -File -Filter '*.json' | Where-Object { $_.Name -notin @('manifest.json', 'install.json') } | ForEach-Object {", " if (Test-Path -LiteralPath \"$persist_dir\\$($_.Name)\" -PathType Leaf) {", " Copy-Item -Path \"$persist_dir\\$($_.Name)\" -Destination \"$dir\\$($_.Name)\" -Force", " }", @@ -47,7 +47,7 @@ ], "pre_uninstall": [ "# Hardlinks won't work properly here to persist files, because this app creates a new file instead of writing to the existing one.", - "Get-ChildItem -LiteralPath \"$dir\" -File | Where-Object { $_.Name -notin @('manifest.json', 'install.json') } | ForEach-Object {", + "Get-ChildItem -LiteralPath \"$dir\" -File -Filter '*.json' | Where-Object { $_.Name -notin @('manifest.json', 'install.json') } | ForEach-Object {", " if (Test-Path -LiteralPath \"$dir\\$($_.Name)\" -PathType Leaf) {", " ensure $persist_dir | Out-Null", " Copy-Item -Path \"$dir\\$($_.Name)\" -Destination \"$persist_dir\\$($_.Name)\" -Force", From 9b71b6520a2781125295fc3a831134d763e9a0f0 Mon Sep 17 00:00:00 2001 From: SiriosDev <26876994+SiriosDev@users.noreply.github.com> Date: Sun, 9 Aug 2026 16:31:20 +0200 Subject: [PATCH 3/4] Prevent persist copy on freash installation, and removed useless expection for manifest install --- bucket/aegisub.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bucket/aegisub.json b/bucket/aegisub.json index d2002c1730ded9..8192114b0d284c 100644 --- a/bucket/aegisub.json +++ b/bucket/aegisub.json @@ -18,9 +18,11 @@ "extract_dir": "aegisub-portable", "pre_install": [ "# Hardlinks won't work properly here to persist files, because this app creates a new file instead of writing to the existing one.", - "Get-ChildItem -LiteralPath \"$persist_dir\" -File -Filter '*.json' | Where-Object { $_.Name -notin @('manifest.json', 'install.json') } | ForEach-Object {", - " if (Test-Path -LiteralPath \"$persist_dir\\$($_.Name)\" -PathType Leaf) {", - " Copy-Item -Path \"$persist_dir\\$($_.Name)\" -Destination \"$dir\\$($_.Name)\" -Force", + "Test-Path -LiteralPath \"$persist_dir\" {", + " Get-ChildItem -LiteralPath \"$persist_dir\" -File -Filter '*.json' | ForEach-Object {", + " if (Test-Path -LiteralPath \"$persist_dir\\$($_.Name)\" -PathType Leaf) {", + " Copy-Item -Path \"$persist_dir\\$($_.Name)\" -Destination \"$dir\\$($_.Name)\" -Force", + " }", " }", "}" ], From b1624c7f9977112c3ab7e60a613765fe57002a62 Mon Sep 17 00:00:00 2001 From: SiriosDev <26876994+SiriosDev@users.noreply.github.com> Date: Mon, 10 Aug 2026 11:38:40 +0200 Subject: [PATCH 4/4] fix pre_install --- bucket/aegisub.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bucket/aegisub.json b/bucket/aegisub.json index 8192114b0d284c..fe1baa5995f047 100644 --- a/bucket/aegisub.json +++ b/bucket/aegisub.json @@ -18,7 +18,7 @@ "extract_dir": "aegisub-portable", "pre_install": [ "# Hardlinks won't work properly here to persist files, because this app creates a new file instead of writing to the existing one.", - "Test-Path -LiteralPath \"$persist_dir\" {", + "if (Test-Path -LiteralPath \"$persist_dir\") {", " Get-ChildItem -LiteralPath \"$persist_dir\" -File -Filter '*.json' | ForEach-Object {", " if (Test-Path -LiteralPath \"$persist_dir\\$($_.Name)\" -PathType Leaf) {", " Copy-Item -Path \"$persist_dir\\$($_.Name)\" -Destination \"$dir\\$($_.Name)\" -Force",