git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #787 from sheremetyev/wix-allusers

Improve installation for all users on Windows

commit1921112bc96f2c72a195b05ca5f454dc705124e6 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 15 Mar 2013, 15:26 (14 years ago) parenta1c0210b4277c1
3 files changed+70−28
.gitignore+6−1 windows/make-windows-installer.bat+1−1 windows/pandoc.wxs+63−26
.gitignore+6−1
@@ -10,4 +10,9 @@ man/man?/*.html
1010pandoc.cabal.orig
1111*.o
1212*.hi
13−
13+/COPYING.rtf
14+/COPYRIGHT.txt
15+/cabal-dev/
16+/windows/*.msi
17+/windows/*.wixpdb
18+windows/*.wixobj
windows/make-windows-installer.bat+1−1
@@ -24,7 +24,7 @@ if "%VERSION%" == "" (
2424echo Detected version %VERSION%
2525cd windows
2626echo Creating msi...
27−"C:\Program Files\WiX Toolset v3.7\bin\candle.exe" -dVERSION=%VERSION% -ext WixUIExtension pandoc.wxs
27+"C:\Program Files\WiX Toolset v3.7\bin\candle.exe" -dVERSION=%VERSION% pandoc.wxs
2828if %errorlevel% neq 0 exit /b %errorlevel%
2929"C:\Program Files\WiX Toolset v3.7\bin\light.exe" -sw1076 -ext WixUIExtension -out pandoc-%VERSION%.msi pandoc.wixobj
3030if %errorlevel% neq 0 exit /b %errorlevel%
windows/pandoc.wxs+63−26
@@ -5,6 +5,7 @@
55 UpgradeCode="$(var.UpgradeCode)" Name="Pandoc $(var.VERSION)"
66 Version="$(var.VERSION)" Manufacturer="John MacFarlane"
77 Language="1033">
8+
89 <Package InstallerVersion="200" Compressed="yes" InstallScope="perUser"
910 Comments="Windows Installer Package" />
1011 <Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
@@ -15,62 +16,98 @@
1516 Maximum="99.0.0.0" IncludeMaximum="no" />
1617 </Upgrade>
1718 <Property Id="ARPURLINFOABOUT" Value="http://johnmacfarlane.net/pandoc/" />
19+
1820 <InstallExecuteSequence>
1921 <RemoveExistingProducts After="InstallFinalize"/>
2022 </InstallExecuteSequence>
23+
24+ <Property Id="DISABLEADVTSHORTCUTS" Value="1" />
25+
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+
2137 <Directory Id="TARGETDIR" Name="SourceDir">
22− <Directory Id="ProgramMenuFolder">
23− <Directory Id="ApplicationProgramsFolder" Name="Pandoc"/>
24− </Directory>
25− <Directory Id="LocalAppDataFolder">
26− <Directory Id="INSTALLDIR" Name="Pandoc">
38+
39+ <Directory Id="ProgramFilesFolder">
40+ <Directory Id="APPLICATIONFOLDER" Name="Pandoc">
2741 <Component Id="MainExecutable"
2842 Guid="ECD35082-4C28-49E1-977E-B90FC7C400C7">
29− <RegistryValue Root="HKCU" Key="Software\John MacFarlane\Pandoc"
43+ <RegistryValue Root="HKMU" Key="Software\John MacFarlane\Pandoc"
3044 Name="Version" Type="string" Value="[ProductVersion]" KeyPath="yes"/>
31− <RemoveFolder Id="INSTALLDIR" On="uninstall"/>
45+ <RemoveFolder Id="APPLICATIONFOLDER" On="uninstall"/>
3246 <File Id="pandocEXE" Name="pandoc.exe"
3347 Source="..\cabal-dev\bin\pandoc.exe" />
3448 <File Id="pandocCOPYRIGHT" Name="COPYRIGHT.txt"
3549 Source="..\COPYRIGHT.txt" />
3650 <File Id="pandocCOPYING" Name="COPYING.rtf"
3751 Source="..\COPYING.rtf" />
38− <Environment Id="UpdatePath" Name="PATH" Action="set"
39− Part="last" Value="[INSTALLDIR]" />
4052 </Component>
53+
54+ <Component Id="UpdatePathUser"
55+ Guid="C7B71304-09FC-421D-9EA2-AEFB7D61759D">
56+ <Condition><![CDATA[ ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged)) ]]></Condition>
57+ <Environment Id="UpdatePathUser" Name="PATH" Action="set"
58+ Part="last" Value="[APPLICATIONFOLDER]" System="no" />
59+ <RegistryValue Root="HKCU" Key="Software\John MacFarlane\Pandoc"
60+ Name="UserPathUpdated" Type="integer" Value="1" KeyPath="yes"/>
61+ </Component>
62+
63+ <Component Id="UpdatePathMachine"
64+ Guid="0C642D0A-7175-4CD7-B11F-0A69F73FD757">
65+ <Condition><![CDATA[ ALLUSERS=1 OR (ALLUSERS=2 AND Privileged) ]]></Condition>
66+ <Environment Id="UpdatePathMachine" Name="PATH" Action="set"
67+ Part="last" Value="[APPLICATIONFOLDER]" System="yes" />
68+ <RegistryValue Root="HKLM" Key="Software\John MacFarlane\Pandoc"
69+ Name="SystemPathUpdated" Type="integer" Value="1" KeyPath="yes"/>
70+ </Component>
71+
4172 <Component Id="Documentation"
4273 Guid="A8D54A76-1A3D-4647-8327-81B69D39D8A3">
43− <RegistryValue Root="HKCU" Key="Software\John MacFarlane\Pandoc"
44− Name="DocumentationInstalled" Type="integer" Value="1" KeyPath="yes"/>
4574 <File Id="pandocREADME" Name="Pandoc User's Guide.html"
46− Source="..\README.html" />
75+ Source="..\README.html" KeyPath="yes">
76+ <Shortcut Id="ApplicationStartMenuShortcut" Directory="ApplicationProgramsFolder"
77+ Name="Pandoc User’s Guide" Advertise="yes" />
78+ </File>
79+ </Component>
80+ </Directory>
81+ </Directory>
82+
83+ <Directory Id="ProgramMenuFolder">
84+ <Directory Id="ApplicationProgramsFolder" Name="Pandoc">
85+ <Component Id="ApplicationShortcut" Guid="7F807DD5-CC54-474A-B571-89630893F563">
86+ <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
87+ <RegistryValue Root="HKMU" Key="Software\John MacFarlane\Pandoc"
88+ Name="ShortcutInstalled" Type="integer" Value="1" KeyPath="yes"/>
4789 </Component>
4890 </Directory>
4991 </Directory>
92+
5093 </Directory>
51− <DirectoryRef Id="ApplicationProgramsFolder">
52− <Component Id="ApplicationShortcut" Guid="7F807DD5-CC54-474A-B571-89630893F563">
53− <Shortcut Id="ApplicationStartMenuShortcut"
54− Name="Pandoc User's Guide"
55− Description="Pandoc User's Guide"
56− Target="[INSTALLDIR]Pandoc User's Guide.html"
57− WorkingDirectory="INSTALLDIR" />
58− <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
59− <RegistryValue Root="HKCU" Key="Software\John MacFarlane\Pandoc"
60− Name="ShortcutInstalled" Type="integer" Value="1" KeyPath="yes"/>
61− </Component>
62− </DirectoryRef>
63− <Feature Id="Complete" Level="1" Title="Pandoc $(var.VERSION)" Description="Complete package" Display="expand" ConfigurableDirectory="INSTALLDIR">
94+
95+ <Feature Id="Complete" Level="1" Title="Pandoc $(var.VERSION)" Description="Complete package" Display="expand" ConfigurableDirectory="APPLICATIONFOLDER">
6496 <Feature Id="MainProgram" Title="Program" Description="The main executable." Level="1">
6597 <ComponentRef Id="MainExecutable" />
98+ <ComponentRef Id="UpdatePathUser" />
99+ <ComponentRef Id="UpdatePathMachine" />
66100 </Feature>
67− <Feature Id="Manual">
101+ <Feature Id="Manual" Title="Manual">
68102 <ComponentRef Id="Documentation" />
69103 <ComponentRef Id="ApplicationShortcut" />
70104 </Feature>
71105 </Feature>
106+
107+ <Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONFOLDER" />
72108 <UIRef Id="WixUI_Minimal" />
73109 <UIRef Id="WixUI_ErrorProgressText" />
74110 <WixVariable Id="WixUILicenseRtf" Value="..\COPYING.rtf" />
111+
75112 </Product>
76113</Wix>