Skip to content

Commit 426a4b9

Browse files
committed
1 parent 9655286 commit 426a4b9

4 files changed

Lines changed: 98 additions & 9 deletions

File tree

bucket/beyondcompare.json

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"identifier": "Shareware",
77
"url": "https://www.scootersoftware.com/kb/licensev5"
88
},
9+
"depends": "innounp",
910
"notes": [
1011
"The manifest already updated to v5, if you want to stay on v4 proceed as follows:",
1112
"",
@@ -20,24 +21,32 @@
2021
"architecture": {
2122
"64bit": {
2223
"installer": {
23-
"args": [
24-
"/DIR=\"$dir\"",
25-
"/VERYSILENT",
26-
"/PORTABLE"
24+
"script": [
25+
"Expand-InnoArchive \"$dir\\$fname\" -Removal",
26+
"Rename-Item \"$dir\\BCompare,2.exe\" \"$dir\\BCompare.exe\"",
27+
"Rename-Item \"$dir\\7z,2.dll\" \"$dir\\7z.dll\"",
28+
"Rename-Item \"$dir\\mscoree,2.dll\" \"$dir\\mscoree.dll\"",
29+
"Rename-Item \"$dir\\PdfToText,2.exe\" \"$dir\\PdfToText.exe\"",
30+
"Rename-Item \"$dir\\BCUnRAR,2.dll\" \"$dir\\BCUnRAR.dll\"",
31+
"Remove-Item \"$dir\\*,*\" -Force"
2732
]
2833
}
2934
},
3035
"32bit": {
3136
"installer": {
32-
"args": [
33-
"/32",
34-
"/DIR=\"$dir\"",
35-
"/VERYSILENT",
36-
"/PORTABLE"
37+
"script": [
38+
"Expand-InnoArchive \"$dir\\$fname\" -Removal",
39+
"Rename-Item \"$dir\\BCompare,1.exe\" \"$dir\\BCompare.exe\"",
40+
"Rename-Item \"$dir\\7z,1.dll\" \"$dir\\7z.dll\"",
41+
"Rename-Item \"$dir\\mscoree,1.dll\" \"$dir\\mscoree.dll\"",
42+
"Rename-Item \"$dir\\PdfToText,1.exe\" \"$dir\\PdfToText.exe\"",
43+
"Rename-Item \"$dir\\BCUnRAR,1.dll\" \"$dir\\BCUnRAR.dll\"",
44+
"Remove-Item \"$dir\\*,*\" -Force"
3745
]
3846
}
3947
}
4048
},
49+
"extract_dir": "Beyond Compare 5",
4150
"bin": [
4251
"Bcomp.exe",
4352
"BCompare.exe"
@@ -46,6 +55,10 @@
4655
[
4756
"BCompare.exe",
4857
"Beyond Compare 5"
58+
],
59+
[
60+
"BCClipboard.exe",
61+
"Clipboard Compare"
4962
]
5063
],
5164
"pre_install": [
@@ -67,13 +80,31 @@
6780
"Helpers",
6881
"Packers"
6982
],
83+
"post_install": [
84+
"$dir_escaped = \"$dir\".Replace('\\', '\\\\')",
85+
"\"install-context-$architecture\", \"uninstall-context\" | ForEach-Object {",
86+
" if (Test-Path \"$bucketsdir\\$bucket\\scripts\\beyondcompare\\$_.reg\") {",
87+
" $content = Get-Content \"$bucketsdir\\$bucket\\scripts\\beyondcompare\\$_.reg\"",
88+
" $content = $content.Replace('$install_dir', $dir_escaped)",
89+
" $content = $content.Replace('$version', $version)",
90+
" $outfile_no_arch = $_.Replace(\"-$architecture\", \"\")",
91+
" $content | Set-Content -Path \"$dir\\$outfile_no_arch.reg\"",
92+
" }",
93+
"}",
94+
"if (Test-Path \"$dir\\install-context.reg\") {",
95+
" regedit /s \"$dir\\install-context.reg\"",
96+
"}"
97+
],
7098
"pre_uninstall": [
7199
"# Hardlinks won't work properly here to persist files, because this app creates a new file instead of writing to the existing one.",
72100
"# Please keep the file list the same in both pre_install and post_install scripts.",
73101
"'BC5Key.txt', 'BCColors.xml', 'BCCommands.xml', 'BCFileFormats.xml', 'BCPreferences.xml', 'BCState.xml', 'BCSessions.xml' | ForEach-Object {",
74102
" if (Test-Path \"$dir\\$_\") {",
75103
" Copy-Item \"$dir\\$_\" \"$persist_dir\\$_\" -Force",
76104
" }",
105+
"}",
106+
"if (Test-Path \"$dir\\uninstall-context.reg\") {",
107+
" regedit /s \"$dir\\uninstall-context.reg\"",
77108
"}"
78109
],
79110
"checkver": {
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Windows Registry Editor Version 5.00
2+
3+
[HKEY_CURRENT_USER\Software\Scooter Software\Beyond Compare 5]
4+
"ExePath"="$install_dir\\BCompare.exe"
5+
"Version"="$version"
6+
7+
; --- COM Class Registration ---
8+
[HKEY_CURRENT_USER\Software\Classes\CLSID\{812BC6B5-83CF-4AD9-97C1-6C60C8D025C5}]
9+
@="Beyond Compare 5 Shell Extension"
10+
11+
[HKEY_CURRENT_USER\Software\Classes\CLSID\{812BC6B5-83CF-4AD9-97C1-6C60C8D025C5}\InprocServer32]
12+
@="$install_dir\\BCShellEx.dll"
13+
"ThreadingModel"="Apartment"
14+
15+
; --- Context menu handlers ---
16+
[HKEY_CURRENT_USER\Software\Classes\*\shellex\ContextMenuHandlers\BeyondCompare5]
17+
@="{812BC6B5-83CF-4AD9-97C1-6C60C8D025C5}"
18+
19+
[HKEY_CURRENT_USER\Software\Classes\Directory\shellex\ContextMenuHandlers\BeyondCompare5]
20+
@="{812BC6B5-83CF-4AD9-97C1-6C60C8D025C5}"
21+
22+
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shellex\ContextMenuHandlers\BeyondCompare5]
23+
@="{812BC6B5-83CF-4AD9-97C1-6C60C8D025C5}"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Windows Registry Editor Version 5.00
2+
3+
[HKEY_CURRENT_USER\Software\Scooter Software\Beyond Compare 5]
4+
"ExePath"="$install_dir\\BCompare.exe"
5+
"Version"="$version"
6+
7+
; --- COM Class Registration ---
8+
[HKEY_CURRENT_USER\Software\Classes\CLSID\{812BC6B5-83CF-4AD9-97C1-6C60C8D025C5}]
9+
@="Beyond Compare 5 Shell Extension"
10+
11+
[HKEY_CURRENT_USER\Software\Classes\CLSID\{812BC6B5-83CF-4AD9-97C1-6C60C8D025C5}\InprocServer32]
12+
@="$install_dir\\BCShellEx64.dll"
13+
"ThreadingModel"="Apartment"
14+
15+
; --- Context menu handlers ---
16+
[HKEY_CURRENT_USER\Software\Classes\*\shellex\ContextMenuHandlers\BeyondCompare5]
17+
@="{812BC6B5-83CF-4AD9-97C1-6C60C8D025C5}"
18+
19+
[HKEY_CURRENT_USER\Software\Classes\Directory\shellex\ContextMenuHandlers\BeyondCompare5]
20+
@="{812BC6B5-83CF-4AD9-97C1-6C60C8D025C5}"
21+
22+
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shellex\ContextMenuHandlers\BeyondCompare5]
23+
@="{812BC6B5-83CF-4AD9-97C1-6C60C8D025C5}"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Windows Registry Editor Version 5.00
2+
3+
; Remove Beyond Compare 5 Application Registration
4+
[-HKEY_CURRENT_USER\Software\Scooter Software\Beyond Compare 5]
5+
6+
; Remove COM Class Registration
7+
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{812BC6B5-83CF-4AD9-97C1-6C60C8D025C5}]
8+
9+
; Remove Context menu handlers
10+
[-HKEY_CURRENT_USER\Software\Classes\*\shellex\ContextMenuHandlers\BeyondCompare5]
11+
[-HKEY_CURRENT_USER\Software\Classes\Directory\shellex\ContextMenuHandlers\BeyondCompare5]
12+
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shellex\ContextMenuHandlers\BeyondCompare5]

0 commit comments

Comments
 (0)