git.iko.soy/typeable/pandoc
on master help sign in
New pandoc.wxs.

This should allow the user to select a per-user or systemwide install. It also shows install location in the list of installed programs. Thanks to @nkalvi. See #2205.

commit2768d1c2d203f91b03a5246f6ce1fbaa26e2571f authorJohn MacFarlane <jgm@berkeley.edu> dateSat 27 Jun 2015, 20:47 (11 years ago) parent2b1fd52
1 file changed+78−31
windows/pandoc.wxs+78−31
windows/pandoc.wxs+78−31
@@ -6,7 +6,7 @@
66 Version="$(var.VERSION)" Manufacturer="John MacFarlane"
77 Language="1033">
88
9− <Package InstallerVersion="200" Compressed="yes" InstallScope="perUser"
9+ <Package InstallerVersion="200" Compressed="yes"
1010 Comments="Windows Installer Package" />
1111 <Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
1212 <Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
@@ -23,17 +23,6 @@
2323
2424 <Property Id="DISABLEADVTSHORTCUTS" Value="1" />
2525
26− <CustomAction Id="SetPerUserFolder" Property="APPLICATIONFOLDER" Value="[LocalAppDataFolder]Pandoc" Execute="immediate" />
27− <CustomAction Id="SetPerMachineFolder" Property="APPLICATIONFOLDER" Value="[ProgramFilesFolder]Pandoc" Execute="immediate" />
28− <InstallExecuteSequence>
29− <Custom Action="SetPerUserFolder" Before="CostFinalize">ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged)))</Custom>
30− <Custom Action="SetPerMachineFolder" After="SetPerUserFolder">ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS=1 OR (ALLUSERS=2 AND Privileged))</Custom>
31− </InstallExecuteSequence>
32− <InstallUISequence>
33− <Custom Action="SetPerUserFolder" Before="CostFinalize">ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged)))</Custom>
34− <Custom Action="SetPerMachineFolder" After="SetPerUserFolder">ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS=1 OR (ALLUSERS=2 AND Privileged))</Custom>
35− </InstallUISequence>
36−
3726
3827 <Directory Id="TARGETDIR" Name="SourceDir">
3928
@@ -41,8 +30,10 @@
4130 <Directory Id="APPLICATIONFOLDER" Name="Pandoc">
4231 <Component Id="MainExecutable"
4332 Guid="ECD35082-4C28-49E1-977E-B90FC7C400C7">
44− <RegistryValue Root="HKMU" Key="Software\John MacFarlane\Pandoc"
45− Name="Version" Type="string" Value="[ProductVersion]" KeyPath="yes"/>
33+ <RegistryValue Root="HKMU" Key="Software\John
34+ MacFarlane\Pandoc"
35+ Name="Version" Type="string" Value="[ProductVersion]"
36+ KeyPath="yes"/>
4637 <RemoveFolder Id="APPLICATIONFOLDER" On="uninstall"/>
4738 <File Id="pandocEXE" Name="pandoc.exe"
4839 Source="..\.cabal-sandbox\bin\pandoc.exe" />
@@ -50,23 +41,27 @@
5041 Source="..\COPYRIGHT.txt" />
5142 <File Id="pandocCOPYING" Name="COPYING.rtf"
5243 Source="..\COPYING.rtf" />
53− <Environment Id='UpdatePath' Name='PATH' Action='set' Permanent='no' System='no' Part='last' Value='[APPLICATIONFOLDER]' />
54− </Component>
44+ <Environment Id='UpdatePath' Name='PATH' Action='set'
45+ Permanent='no' System='no' Part='last'
46+ Value='[APPLICATIONFOLDER]' />
47+ </Component>
5548
5649 <Component Id="CitationSupport"
5750 Guid="0A214839-2E69-4026-8DBB-0F0A9DB75C12">
5851 <RegistryValue Root="HKMU" Key="Software\John MacFarlane\Pandoc"
59− Name="Version" Type="string" Value="[ProductVersion]" KeyPath="yes"/>
52+ Name="Version" Type="string" Value="[ProductVersion]"
53+ KeyPath="yes"/>
6054 <File Id="pandoc_citeprocEXE" Name="pandoc-citeproc.exe"
6155 Source="..\.cabal-sandbox\bin\pandoc-citeproc.exe" />
62− </Component>
56+ </Component>
6357
6458
6559 <Component Id="Documentation"
6660 Guid="A8D54A76-1A3D-4647-8327-81B69D39D8A3">
6761 <File Id="pandocREADME" Name="Pandoc User's Guide.html"
6862 Source="..\README.html" KeyPath="yes">
69− <Shortcut Id="ApplicationStartMenuShortcut" Directory="ApplicationProgramsFolder"
63+ <Shortcut Id="ApplicationStartMenuShortcut"
64+ Directory="ApplicationProgramsFolder"
7065 Name="Pandoc User’s Guide" Advertise="yes" />
7166 </File>
7267 </Component>
@@ -75,36 +70,88 @@
7570
7671 <Directory Id="ProgramMenuFolder">
7772 <Directory Id="ApplicationProgramsFolder" Name="Pandoc">
78− <Component Id="ApplicationShortcut" Guid="7F807DD5-CC54-474A-B571-89630893F563">
79− <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
80− <RegistryValue Root="HKMU" Key="Software\John MacFarlane\Pandoc"
81− Name="ShortcutInstalled" Type="integer" Value="1" KeyPath="yes"/>
73+ <Component Id="ApplicationShortcut"
74+ Guid="7F807DD5-CC54-474A-B571-89630893F563">
75+ <RemoveFolder Id="ApplicationProgramsFolder"
76+ On="uninstall"/>
77+ <RegistryValue Root="HKMU" Key="Software\John
78+ MacFarlane\Pandoc"
79+ Name="ShortcutInstalled" Type="integer" Value="1"
80+ KeyPath="yes"/>
8281 </Component>
8382 </Directory>
8483 </Directory>
8584
8685 </Directory>
8786
88− <Feature Id="Complete" Level="1" Title="Pandoc $(var.VERSION)" Description="Complete package" Display="expand" ConfigurableDirectory="APPLICATIONFOLDER">
89− <Feature Id="MainProgram" Title="Program" Description="The main executable." Level="1">
87+ <Feature Id="Complete" Level="1" Title="Pandoc $(var.VERSION)"
88+ Description="Complete package" Display="expand"
89+ ConfigurableDirectory="APPLICATIONFOLDER">
90+ <Feature Id="MainProgram" Title="Program" Description="The main
91+ executable."
92+ Level="1">
9093 <ComponentRef Id="MainExecutable" />
9194 </Feature>
9295 <Feature Id="Manual" Title="Manual">
9396 <ComponentRef Id="Documentation" />
9497 <ComponentRef Id="ApplicationShortcut" />
9598 </Feature>
96− <Feature Id="Citation" Title="Citation Support" Description="Citation support.">
99+ <Feature Id="Citation" Title="Citation Support"
100+ Description="Citation support.">
97101 <ComponentRef Id="CitationSupport" />
98102 </Feature>
99103 </Feature>
100104
101− <CustomActionRef Id="WixBroadcastSettingChange" />
102− <CustomActionRef Id="WixBroadcastEnvironmentChange" />
103105
104− <Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONFOLDER" />
105− <UIRef Id="WixUI_InstallDir" />
106− <UIRef Id="WixUI_ErrorProgressText" />
106+ <SetProperty Id="ARPINSTALLLOCATION" Value="[APPLICATIONFOLDER]"
107+ After="CostFinalize" />
108+
109+ <CustomAction Id="SetExitDialogOptText"
110+ Property="WIXUI_EXITDIALOGOPTIONALTEXT"
111+ Value="[ProductName] was installed in [APPLICATIONFOLDER]. You
112+ may need to restart Cmd/Powershell windows before using it."
113+ />
114+
115+ <InstallUISequence>
116+ <Custom Action="SetExitDialogOptText" Before="ExecuteAction">
117+ NOT Installed
118+ </Custom>
119+ </InstallUISequence>
120+
121+ <CustomActionRef Id="WixBroadcastSettingChange" />
122+ <CustomActionRef Id="WixBroadcastEnvironmentChange" />
123+
124+
125+
126+ <Property Id="ApplicationFolderName" Value="Pandoc" />
127+ <Property Id="WixAppFolder" Value="WixPerUserFolder" />
128+
107129 <WixVariable Id="WixUILicenseRtf" Value="..\COPYING.rtf" />
108130
131+ <UI Id="MyWixUI_Advanced">
132+ <UIRef Id="WixUI_Advanced" />
133+ <UIRef Id="WixUI_ErrorProgressText" />
134+
135+ <Publish Dialog="InstallScopeDlg" Control="Next"
136+ Event="NewDialog" Value="VerifyReadyDlg"
137+ Order="6">WixAppFolder =
138+ "WixPerUserFolder"</Publish>
139+ <Publish Dialog="InstallDirDlg" Control="Next"
140+ Event="NewDialog" Value="VerifyReadyDlg"
141+ Order="4">WIXUI_DONTVALIDATEPATH OR
142+ WIXUI_INSTALLDIR_VALID="1"</Publish>
143+
144+ <Publish Dialog="VerifyReadyDlg" Control="Back"
145+ Event="NewDialog" Value="InstallScopeDlg"
146+ Order="11">WixAppFolder =
147+ "WixPerUserFolder"</Publish>
148+ <Publish Dialog="VerifyReadyDlg" Control="Back"
149+ Event="NewDialog" Value="InstallDirDlg"
150+ Order="12">WixAppFolder =
151+ "WixPerMachineFolder"</Publish>
152+ </UI>
153+
154+
109155 </Product>
156+
110157</Wix>