-
Notifications
You must be signed in to change notification settings - Fork 2
/
vim.wxs
225 lines (198 loc) · 11.8 KB
/
vim.wxs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<?xml version='1.0' encoding='utf-8'?>
<!--
TODO:
- gvimext.dll: Don't use HKLM for per-user install.
- Restore install configuration for upgrade.
- Customize UI? Use checkbox instead of feature tree.
- Select per-user or per-machine install. Use WixUI_Advanced?
With command line:
per-user: $ msiexec /i vim.msi (default)
per-machine: $ msiexec /i vim.msi ALLUSERS=1
- Solve all error and warning. It seems that ICE57 validation is
not seems to be respected.
- Because of if_ole, gvimext.dll and etc, we can not install
multiple version of Vim.
MEMO:
Place of shortcut (vista):
Per-User:
\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu
\Users\<user>\Desktop
Per-Machine:
\ProgramData\Microsoft\Windows\Start Menu
\Users\Public\Desktop
-->
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<!-- require $(env.VER_FULL) $(env.VER_SHORT) -->
<?if $(var.arch) = x64 ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?else ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?endif ?>
<?define ProductVersion = "$(env.VER_FULL)"?>
<!-- FIXME: Add version number? -->
<?define ProductName = "Vim"?>
<?define StartMenuName = "Vim $(env.VER_SHORT)"?>
<Product
Id='*'
UpgradeCode='1BE1251B-E89C-D54B-A192-7617BE4014E1'
Language='$(var.lang)'
Codepage='$(var.codepage)'
Version='$(var.ProductVersion)'
Name='$(var.ProductName)'
Manufacturer='Vim Developers'
>
<Package Id="*" Compressed='yes' />
<!-- All product having same UpgradeCode will be overwritten. -->
<MajorUpgrade AllowDowngrades="yes" />
<!-- Information for /Control Panel/Programs/Programs and Features/ -->
<Property Id="ARPCOMMENTS">Vi Improved - A Text Editor</Property>
<Property Id="ARPURLINFOABOUT">http://www.vim.org/</Property>
<Property Id="ARPPRODUCTICON">vim.ico</Property>
<Icon Id="vim.ico" SourceFile="bitmaps\vim.ico" />
<Media Id='1' Cabinet='product.cab' EmbedCab='yes' CompressionLevel="high" />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='$(var.PlatformProgramFilesFolder)'>
<Directory Id='INSTALLDIR' Name='$(var.ProductName)'>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="$(var.StartMenuName)">
</Directory>
</Directory>
<Directory Id="DesktopFolder" />
</Directory>
<DirectoryRef Id="INSTALLDIR">
<Component Id="gvim.exe" Guid="*">
<File KeyPath="yes" Source="$(var.dist)\gvim.exe">
<!-- FIXME: How to separate Component to make TypeLib register optional? -->
<!-- OLE interface -->
<!-- Same as gvim.exe -register. -->
<!-- HKCR\TypeLib\{Id} -->
<TypeLib Id="{0F0BFAE0-4C90-11D1-82D7-0004AC368519}" Description="Vim OLE Interface 1.1 Type Library" Language="0" MajorVersion="1" MinorVersion="1" HelpDirectory="INSTALLDIR">
<!-- HKCR\Interface\{Id} -->
<Interface Id="{0F0BFAE2-4C90-11D1-82D7-0004AC368519}" Name="IVim" ProxyStubClassId="{00020424-0000-0000-C000-000000000046}" ProxyStubClassId32="{00020424-0000-0000-C000-000000000046}" />
<!-- HKCR\CLSID\{Id} -->
<Class Id="{0F0BFAE1-4C90-11d1-82D7-0004AC368519}" Description="Vim" Context="LocalServer32">
<!-- HKCR\{id} -->
<ProgId Id="Vim.Application.1" Description="Vim">
<ProgId Id="Vim.Application" Description="Vim" />
</ProgId>
</Class>
</TypeLib>
</File>
</Component>
</DirectoryRef>
<DirectoryRef Id="INSTALLDIR">
<Component Id="gvimext.dll" Guid="*">
<File KeyPath="yes" Source="$(var.dist)\gvimext.dll">
<Class Id="{51EEE242-AD87-11d3-9C1E-0090278BBD99}" Description="Vim Shell Extension" Context="InprocServer32" ThreadingModel="apartment">
</Class>
</File>
<RegistryValue Root='HKMU' Key='Software\Classes\*\shellex\ContextMenuHandlers\gvim' Type="string" Value="{51EEE242-AD87-11d3-9C1E-0090278BBD99}" />
<RegistryValue Root='HKMU' Key='Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved' Name="{51EEE242-AD87-11d3-9C1E-0090278BBD99}" Type="string" Value="Vim Shell Extension" />
<!-- used by gvimext.dll -->
<RegistryValue Root='HKLM' Key='Software\Vim\Gvim' Name="path" Type="string" Value="[INSTALLDIR]gvim.exe" />
</Component>
<Component Id="DisableEditWithExisting" Guid="A34DC79F-6E2C-4df5-AA57-1BD6EA974F9E">
<RegistryValue Root="HKLM" Key="Software\Vim\Gvim" Name="DisableEditWithExisting" Type="string" Value="1" />
</Component>
</DirectoryRef>
<DirectoryRef Id="INSTALLDIR">
<!-- FIXME: NOT TESTED -->
<Component Id="VisVim.dll" Guid="*">
<File KeyPath="yes" Source="$(var.dist)\VisVim.dll">
<!-- Same as regsvr32.exe VisVim.dll -->
<Class Id="{4F9E01C0-406B-11D2-8006-00001C405077}" Description="Vim Developer Studio Add-In" Context="InprocServer32" ThreadingModel="both">
<!-- FIXME: With regsvr32.exe,
HKCR\VisVim Description Studio Add-in\CurVer
is not created. -->
<ProgId Id="VisVim.DSAddIn.1" Description="Vim Developer Studio Add-In">
<ProgId Id="VisVim Developer Studio Add-in" Description="Vim Developer Studio Add-In" />
</ProgId>
</Class>
</File>
<RegistryValue Root='HKMU' Key='Software\Classes\CLSID\{4F9E01C0-406B-11D2-8006-00001C405077}\Description' Type="string" Value="Allows integration of Vim as the text editor in Developer Studio." />
</Component>
<Component Id="README_VisVim.txt" Guid="*">
<File KeyPath="yes" Source="$(var.dist)\README_VisVim.txt" />
</Component>
</DirectoryRef>
<DirectoryRef Id="INSTALLDIR">
<Component Id="OpenWith" Guid="*">
<RegistryValue Root='HKMU' Key='Software\Classes\Applications\gvim.exe\shell\edit\command' Type="string" Value='"[INSTALLDIR]gvim.exe" "%1"' KeyPath="yes" />
<RegistryValue Root='HKMU' Key='Software\Classes\*\OpenWithList\gvim.exe' Type="string" Value="" />
<RegistryValue Root='HKMU' Key='Software\Classes\.vim\OpenWithList\gvim.exe' Type="string" Value="" />
<RegistryValue Root='HKMU' Key='Software\Classes\.htm\OpenWithList\gvim.exe' Type="string" Value="" />
</Component>
</DirectoryRef>
<DirectoryRef Id="INSTALLDIR">
<!-- FIXME: How to unify these two Component?
Difference is Environment/@System. -->
<Component Id="PathEnvironmentSys" Guid="147EA001-A6FF-6146-BACB-86277994D96B">
<Condition>ALLUSERS</Condition>
<Environment Id='UpdatePathSys' Name='PATH' Action='set' Permanent='no' System='yes' Part='last' Value='[INSTALLDIR]' />
<RegistryValue Root='HKMU' Key='Software\Vim\install' Name="install_path_environment_sys" Type="string" Value="1" KeyPath="yes" />
</Component>
<Component Id="PathEnvironmentUser" Guid="D0286C9A-D752-BF47-A716-A9FF15BB6313">
<Condition>NOT ALLUSERS</Condition>
<Environment Id='UpdatePathUser' Name='PATH' Action='set' Permanent='no' System='no' Part='last' Value='[INSTALLDIR]' />
<RegistryValue Root='HKMU' Key='Software\Vim\install' Name="install_path_environment_user" Type="string" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="StartMenu" Guid="538BB2EB-05F2-E042-879A-7992638CB319">
<Shortcut Id="StartMenu1" Name="Vim" Target="[INSTALLDIR]vim.exe" WorkingDirectory="INSTALLDIR" />
<Shortcut Id="StartMenu2" Name="Vim Read-only" Target="[INSTALLDIR]vim.exe" Arguments="-R" WorkingDirectory="INSTALLDIR" />
<Shortcut Id="StartMenu3" Name="Vim Diff" Target="[INSTALLDIR]vim.exe" Arguments="-d" WorkingDirectory="INSTALLDIR" />
<Shortcut Id="StartMenu4" Name="gVim" Target="[INSTALLDIR]gvim.exe" WorkingDirectory="INSTALLDIR" />
<Shortcut Id="StartMenu5" Name="gVim Easy" Target="[INSTALLDIR]gvim.exe" Arguments="-y" WorkingDirectory="INSTALLDIR" />
<Shortcut Id="StartMenu6" Name="gVim Read-only" Target="[INSTALLDIR]gvim.exe" Arguments="-R" WorkingDirectory="INSTALLDIR" />
<Shortcut Id="StartMenu7" Name="gVim Diff" Target="[INSTALLDIR]gvim.exe" Arguments="-d" WorkingDirectory="INSTALLDIR" />
<Shortcut Id="StartMenu8" Name="Uninstall" Target="[SystemFolder]msiexec.exe" Arguments="/x [ProductCode]" />
<Shortcut Id="StartMenu9" Name="Vim tutor" Target="[INSTALLDIR]vimtutor.bat" WorkingDirectory="INSTALLDIR" />
<Shortcut Id="StartMenu10" Name="Help" Target="[INSTALLDIR]gvim.exe" Arguments="-c h" WorkingDirectory="INSTALLDIR" />
<File Source="Vim Online.url" />
<RemoveFolder Id='ApplicationProgramsFolder' On='uninstall' />
<RegistryValue Root='HKMU' Key='Software\Vim\install' Name="install_startmenu" Type="string" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>
<DirectoryRef Id="DesktopFolder">
<Component Id="DesktopShortcut" Guid="F07119B3-1959-A44D-BEC7-94B4EAA2B57B">
<Shortcut Id="DesktopShortcut1" Name="gVim" Target="[INSTALLDIR]gvim.exe" WorkingDirectory="INSTALLDIR" />
<Shortcut Id="DesktopShortcut2" Name="gVim Easy" Target="[INSTALLDIR]gvim.exe" Arguments="-y" WorkingDirectory="INSTALLDIR" />
<Shortcut Id="DesktopShortcut3" Name="gVim Read only" Target="[INSTALLDIR]gvim.exe" Arguments="-R" WorkingDirectory="INSTALLDIR" />
<RegistryValue Root='HKMU' Key='Software\Vim\install' Name="install_desktop_shortcut" Type="string" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>
<Feature Id='Complete' Title='!(loc.Feature_Complete_Title)' Description='!(loc.Feature_Complete_Description)' Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR'>
<ComponentGroupRef Id='MainFiles' />
<ComponentRef Id="gvim.exe" />
<Feature Id="StartMenu" Title="!(loc.Feature_StartMenu_Title)" Description="!(loc.Feature_StartMenu_Description)" Level="1">
<ComponentRef Id="StartMenu" />
</Feature>
<Feature Id="DesktopShortcut" Title="!(loc.Feature_DesktopShortcut_Title)" Description="!(loc.Feature_DesktopShortcut_Description)" Level="1">
<ComponentRef Id="DesktopShortcut" />
</Feature>
<Feature Id="PopupOpenWith" Title="!(loc.Feature_Popup_Title)" Description="!(loc.Feature_Popup_Description)" Level="1">
<ComponentRef Id="gvimext.dll" />
<ComponentRef Id="OpenWith" />
<Feature Id="DisableEditWithExisting" Title="!(loc.Feature_DisableEditWithExisting)" Description="!(loc.Feature_DisableEditWithExisting_Description)" Level="1000">
<ComponentRef Id="DisableEditWithExisting" />
</Feature>
</Feature>
<Feature Id="VisVim" Title="!(loc.Feature_VisVim_Title)" Description="!(loc.Feature_VisVim_Description)" Level="1">
<ComponentRef Id="VisVim.dll" />
<ComponentRef Id="README_VisVim.txt" />
</Feature>
<Feature Id="PathEnvironment" Title="!(loc.Feature_PathEnvironment_Title)" Description="!(loc.Feature_PathEnvironment_Description)" Level="1">
<ComponentRef Id="PathEnvironmentUser" />
<ComponentRef Id="PathEnvironmentSys" />
</Feature>
</Feature>
<WixVariable Id="WixUIBannerBmp" Value="bitmaps\bannrbmp.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="bitmaps\dlgbmp.bmp" />
<WixVariable Id="WixUILicenseRtf" Value="vimlicense.rtf" />
<UIRef Id="WixUI_Mondo" />
<UIRef Id="WixUI_ErrorProgressText" />
</Product>
</Wix>