git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #787 from sheremetyev/wix-allusers
1921112John MacFarlane
.gitignore+6−1
@@ -10,4 +10,9 @@ man/man?/*.html
10pandoc.cabal.orig
10pandoc.cabal.orig
11*.o
11*.o
12*.hi
12*.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%" == "" (
24echo Detected version %VERSION%
24echo Detected version %VERSION%
25cd windows
25cd windows
26echo Creating msi...
26echo 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
28if %errorlevel% neq 0 exit /b %errorlevel%
28if %errorlevel% neq 0 exit /b %errorlevel%
29"C:\Program Files\WiX Toolset v3.7\bin\light.exe" -sw1076 -ext WixUIExtension -out pandoc-%VERSION%.msi pandoc.wixobj
29"C:\Program Files\WiX Toolset v3.7\bin\light.exe" -sw1076 -ext WixUIExtension -out pandoc-%VERSION%.msi pandoc.wixobj
30if %errorlevel% neq 0 exit /b %errorlevel%
30if %errorlevel% neq 0 exit /b %errorlevel%
windows/pandoc.wxs+63−26
@@ -5,6 +5,7 @@
5 UpgradeCode="$(var.UpgradeCode)" Name="Pandoc $(var.VERSION)"
5 UpgradeCode="$(var.UpgradeCode)" Name="Pandoc $(var.VERSION)"
6 Version="$(var.VERSION)" Manufacturer="John MacFarlane"
6 Version="$(var.VERSION)" Manufacturer="John MacFarlane"
7 Language="1033">
7 Language="1033">
8+
8 <Package InstallerVersion="200" Compressed="yes" InstallScope="perUser"
9 <Package InstallerVersion="200" Compressed="yes" InstallScope="perUser"
9 Comments="Windows Installer Package" />
10 Comments="Windows Installer Package" />
10 <Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
11 <Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
@@ -15,62 +16,98 @@
15 Maximum="99.0.0.0" IncludeMaximum="no" />
16 Maximum="99.0.0.0" IncludeMaximum="no" />
16 </Upgrade>
17 </Upgrade>
17 <Property Id="ARPURLINFOABOUT" Value="http://johnmacfarlane.net/pandoc/" />
18 <Property Id="ARPURLINFOABOUT" Value="http://johnmacfarlane.net/pandoc/" />
19+
18 <InstallExecuteSequence>
20 <InstallExecuteSequence>
19 <RemoveExistingProducts After="InstallFinalize"/>
21 <RemoveExistingProducts After="InstallFinalize"/>
20 </InstallExecuteSequence>
22 </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+
21 <Directory Id="TARGETDIR" Name="SourceDir">
37 <Directory Id="TARGETDIR" Name="SourceDir">
22− <Directory Id="ProgramMenuFolder">
38+
23− <Directory Id="ApplicationProgramsFolder" Name="Pandoc"/>
39+ <Directory Id="ProgramFilesFolder">
24− </Directory>
25− <Directory Id="LocalAppDataFolder">
26− <Directory Id="INSTALLDIR" Name="Pandoc">
40+ <Directory Id="APPLICATIONFOLDER" Name="Pandoc">
27 <Component Id="MainExecutable"
41 <Component Id="MainExecutable"
28 Guid="ECD35082-4C28-49E1-977E-B90FC7C400C7">
42 Guid="ECD35082-4C28-49E1-977E-B90FC7C400C7">
29− <RegistryValue Root="HKCU" Key="Software\John MacFarlane\Pandoc"
43+ <RegistryValue Root="HKMU" Key="Software\John MacFarlane\Pandoc"
30 Name="Version" Type="string" Value="[ProductVersion]" KeyPath="yes"/>
44 Name="Version" Type="string" Value="[ProductVersion]" KeyPath="yes"/>
31− <RemoveFolder Id="INSTALLDIR" On="uninstall"/>
45+ <RemoveFolder Id="APPLICATIONFOLDER" On="uninstall"/>
32 <File Id="pandocEXE" Name="pandoc.exe"
46 <File Id="pandocEXE" Name="pandoc.exe"
33 Source="..\cabal-dev\bin\pandoc.exe" />
47 Source="..\cabal-dev\bin\pandoc.exe" />
34 <File Id="pandocCOPYRIGHT" Name="COPYRIGHT.txt"
48 <File Id="pandocCOPYRIGHT" Name="COPYRIGHT.txt"
35 Source="..\COPYRIGHT.txt" />
49 Source="..\COPYRIGHT.txt" />
36 <File Id="pandocCOPYING" Name="COPYING.rtf"
50 <File Id="pandocCOPYING" Name="COPYING.rtf"
37 Source="..\COPYING.rtf" />
51 Source="..\COPYING.rtf" />
38− <Environment Id="UpdatePath" Name="PATH" Action="set"
39− Part="last" Value="[INSTALLDIR]" />
40 </Component>
52 </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+
41 <Component Id="Documentation"
72 <Component Id="Documentation"
42 Guid="A8D54A76-1A3D-4647-8327-81B69D39D8A3">
73 Guid="A8D54A76-1A3D-4647-8327-81B69D39D8A3">
43− <RegistryValue Root="HKCU" Key="Software\John MacFarlane\Pandoc"
44− Name="DocumentationInstalled" Type="integer" Value="1" KeyPath="yes"/>
45 <File Id="pandocREADME" Name="Pandoc User's Guide.html"
74 <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"/>
47 </Component>
89 </Component>
48 </Directory>
90 </Directory>
49 </Directory>
91 </Directory>
92+
50 </Directory>
93 </Directory>
51− <DirectoryRef Id="ApplicationProgramsFolder">
94+
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">
95+ <Feature Id="Complete" Level="1" Title="Pandoc $(var.VERSION)" Description="Complete package" Display="expand" ConfigurableDirectory="APPLICATIONFOLDER">
64 <Feature Id="MainProgram" Title="Program" Description="The main executable." Level="1">
96 <Feature Id="MainProgram" Title="Program" Description="The main executable." Level="1">
65 <ComponentRef Id="MainExecutable" />
97 <ComponentRef Id="MainExecutable" />
98+ <ComponentRef Id="UpdatePathUser" />
99+ <ComponentRef Id="UpdatePathMachine" />
66 </Feature>
100 </Feature>
67− <Feature Id="Manual">
101+ <Feature Id="Manual" Title="Manual">
68 <ComponentRef Id="Documentation" />
102 <ComponentRef Id="Documentation" />
69 <ComponentRef Id="ApplicationShortcut" />
103 <ComponentRef Id="ApplicationShortcut" />
70 </Feature>
104 </Feature>
71 </Feature>
105 </Feature>
106+
107+ <Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONFOLDER" />
72 <UIRef Id="WixUI_Minimal" />
108 <UIRef Id="WixUI_Minimal" />
73 <UIRef Id="WixUI_ErrorProgressText" />
109 <UIRef Id="WixUI_ErrorProgressText" />
74 <WixVariable Id="WixUILicenseRtf" Value="..\COPYING.rtf" />
110 <WixVariable Id="WixUILicenseRtf" Value="..\COPYING.rtf" />
111+
75 </Product>
112 </Product>
76</Wix>
113</Wix>