Skip to content

Commit e1982cf

Browse files
committed
vcxsrv: Add .xlaunch file associations script
1 parent 1a153d9 commit e1982cf

3 files changed

Lines changed: 96 additions & 0 deletions

File tree

bucket/vcxsrv.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"description": "Windows X-server based on the xorg git sources (like xming or cygwin's xwin)",
44
"homepage": "https://vcxsrv.sourceforge.io/",
55
"license": "GPL-3.0-only",
6+
"notes": [
7+
"To add file associations (.xlaunch), run 'reg import \"$dir\\install-associations.reg\"'"
8+
],
69
"architecture": {
710
"64bit": {
811
"url": "https://downloads.sourceforge.net/project/vcxsrv/vcxsrv/1.20.14.0/vcxsrv-64.1.20.14.0.installer.exe#/dl.7z",
@@ -34,6 +37,20 @@
3437
"XLauncher"
3538
]
3639
],
40+
"post_install": [
41+
"$dirpath = \"$dir\".Replace('\\', '\\\\')",
42+
"$xlaunchexepath = \"$dir\\xlaunch.exe\".Replace('\\', '\\\\')",
43+
"'install-associations', 'uninstall-associations' | ForEach-Object {",
44+
" if (Test-Path \"$bucketsdir\\extras\\scripts\\vcxsrv\\$_.reg\") {",
45+
" $content = Get-Content \"$bucketsdir\\extras\\scripts\\vcxsrv\\$_.reg\"",
46+
" $content = $content.Replace('$xlaunch_exe_path', $xlaunchexepath)",
47+
" if ($global) {",
48+
" $content = $content.Replace('HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE')",
49+
" }",
50+
" $content | Set-Content -Path \"$dir\\$_.reg\"",
51+
" }",
52+
"}"
53+
],
3754
"checkver": {
3855
"url": "https://sourceforge.net/projects/vcxsrv/rss?path=/vcxsrv/",
3956
"regex": "/vcxsrv/([\\d.]+)/vcxsrv"
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
Windows Registry Editor Version 5.00
2+
3+
[HKEY_CURRENT_USER\Software\Classes\.xlaunch]
4+
@="XLaunchFile"
5+
6+
7+
[HKEY_CURRENT_USER\Software\Classes\XLaunchFile]
8+
@="XLaunch Configuration"
9+
10+
[HKEY_CURRENT_USER\Software\Classes\XLaunchFile\DefaultIcon]
11+
@="$xlaunch_exe_path,0"
12+
13+
[HKEY_CURRENT_USER\Software\Classes\XLaunchFile\shell]
14+
@="open"
15+
16+
[HKEY_CURRENT_USER\Software\Classes\XLaunchFile\shell\open\command]
17+
@="\"$xlaunch_exe_path\" -run \"%1\""
18+
19+
[HKEY_CURRENT_USER\Software\Classes\XLaunchFile\shell\open\ddeexec\Application]
20+
@="XLaunch"
21+
22+
[HKEY_CURRENT_USER\Software\Classes\XLaunchFile\shell\open\ddeexec\Topic]
23+
@="System"
24+
25+
[HKEY_CURRENT_USER\Software\Classes\XLaunchFile\shell\edit\command]
26+
@="\"$xlaunch_exe_path\" -load \"%1\""
27+
28+
[HKEY_CURRENT_USER\Software\Classes\XLaunchFile\shell\edit\ddeexec\Application]
29+
@="XLaunch"
30+
31+
[HKEY_CURRENT_USER\Software\Classes\XLaunchFile\shell\edit\ddeexec\Topic]
32+
@="System"
33+
34+
[HKEY_CURRENT_USER\Software\Classes\XLaunchFile\shell\Validate\command]
35+
@="\"$xlaunch_exe_path\" -validate \"%1\""
36+
37+
[HKEY_CURRENT_USER\Software\Classes\XLaunchFile\shell\Validate\ddeexec\Application]
38+
@="XLaunch"
39+
40+
[HKEY_CURRENT_USER\Software\Classes\XLaunchFile\shell\Validate\ddeexec\Topic]
41+
@="System"
42+
43+
44+
[HKEY_CURRENT_USER\Software\Classes\Applications\xlaunch.exe\shell]
45+
@="open"
46+
47+
[HKEY_CURRENT_USER\Software\Classes\Applications\xlaunch.exe\shell\open\command]
48+
@="\"$xlaunch_exe_path\" -run \"%1\""
49+
50+
[HKEY_CURRENT_USER\Software\Classes\Applications\xlaunch.exe\shell\open\ddeexec\Application]
51+
@="XLaunch"
52+
53+
[HKEY_CURRENT_USER\Software\Classes\Applications\xlaunch.exe\shell\open\ddeexec\Topic]
54+
@="System"
55+
56+
[HKEY_CURRENT_USER\Software\Classes\Applications\xlaunch.exe\shell\edit\command]
57+
@="\"$xlaunch_exe_path\" -load \"%1\""
58+
59+
[HKEY_CURRENT_USER\Software\Classes\Applications\xlaunch.exe\shell\edit\ddeexec\Application]
60+
@="XLaunch"
61+
62+
[HKEY_CURRENT_USER\Software\Classes\Applications\xlaunch.exe\shell\edit\ddeexec\Topic]
63+
@="System"
64+
65+
[HKEY_CURRENT_USER\Software\Classes\Applications\xlaunch.exe\shell\Validate\command]
66+
@="\"$xlaunch_exe_path\" -validate \"%1\""
67+
68+
[HKEY_CURRENT_USER\Software\Classes\Applications\xlaunch.exe\shell\Validate\ddeexec\Application]
69+
@="XLaunch"
70+
71+
[HKEY_CURRENT_USER\Software\Classes\Applications\xlaunch.exe\shell\Validate\ddeexec\Topic]
72+
@="System"
73+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Windows Registry Editor Version 5.00
2+
3+
[-HKEY_CURRENT_USER\Software\Classes\.xlaunch]
4+
[-HKEY_CURRENT_USER\Software\Classes\XLaunchFile]
5+
[-HKEY_CURRENT_USER\Software\Classes\Applications\xlaunch.exe]
6+

0 commit comments

Comments
 (0)