From 5c72d6e7b428034043c61d143121c1ae3a9a22e2 Mon Sep 17 00:00:00 2001 From: Maxim Gavrilenko Date: Fri, 5 Nov 2021 15:06:24 +0300 Subject: [PATCH] far: Use portable configuration (#1050) * far: now is portable * far: fixed manifest Co-authored-by: Valinor --- bucket/far.json | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/bucket/far.json b/bucket/far.json index b985319a96..a5defdfe63 100644 --- a/bucket/far.json +++ b/bucket/far.json @@ -16,10 +16,28 @@ "hash": "142f5ccd5eb4714a3e4a14da3dc851ee17def944ac8a9086cc510dc79e29d631" } }, + "pre_install": [ + "$ini = 'Far.exe.ini'", + "if (!(Test-Path \"$persist_dir\\$ini\")) {", + " Copy-Item \"$dir\\Far.exe.example.ini\" \"$dir\\$ini\"", + " (Get-Content \"$dir\\$ini\") -replace ';(UseSystemProfiles=)1', '${1}0' | Set-Content \"$dir\\$ini\" -Encoding Ascii", + " # Migrate from system wide configuration", + " $env:LOCALAPPDATA, $env:APPDATA | ForEach-Object {", + " if (Test-Path \"$_\\Far Manager\") {", + " warn \"Copying system wide profile from $_ into $dir\"", + " Copy-Item \"$_\\Far Manager\\*\" \"$dir\" -Recurse -Force", + " }", + " }", + "}" + ], "bin": "far.exe", + "persist": [ + "Profile", + "Far.exe.ini" + ], "checkver": { "url": "https://farmanager.com/download.php", - "regex": "files/Far([b\\d]+)\\.x64\\.(?\\d+)\\.7z" + "regex": "files/Far(?[b\\d]+).x64.(?\\d+).7z" }, "autoupdate": { "architecture": {