Windows msi changes (nkalvi):

* Allow setting of installation path.
* Use cleaner wix syntax for setting the path:
  https://www.firegiant.com/wix/tutorial/com-expression-syntax-miscellanea/environmentally-friendly/
* Show the user what changes, in a new command window.

See #2205.
This commit is contained in:
John MacFarlane 2015-06-03 00:16:38 +02:00
parent d8e37d84ab
commit f47f53d959
2 changed files with 6 additions and 19 deletions

View file

@ -28,7 +28,7 @@ cd windows
echo Creating msi...
candle -dVERSION=%VERSION% pandoc.wxs
if %errorlevel% neq 0 exit /b %errorlevel%
light -sw1076 -ext WixUIExtension -out pandoc-%VERSION%-windows.msi pandoc.wixobj
light -sw1076 -ext WixUIExtension -ext WixUtilExtension -out pandoc-%VERSION%-windows.msi pandoc.wixobj
if %errorlevel% neq 0 exit /b %errorlevel%
echo Starting kSign: sign, then quit kSign to complete the build...
kSign

View file

@ -34,6 +34,9 @@
<Custom Action="SetPerMachineFolder" After="SetPerUserFolder">ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS=1 OR (ALLUSERS=2 AND Privileged))</Custom>
</InstallUISequence>
<CustomActionRef Id="WixBroadcastSettingChange" />
<CustomActionRef Id="WixBroadcastEnvironmentChange" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
@ -59,23 +62,7 @@
Source="..\.cabal-sandbox\bin\pandoc-citeproc.exe" />
</Component>
<Component Id="UpdatePathUser"
Guid="C7B71304-09FC-421D-9EA2-AEFB7D61759D">
<Condition><![CDATA[ ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged)) ]]></Condition>
<Environment Id="UpdatePathUser" Name="PATH" Action="set"
Part="last" Value="[APPLICATIONFOLDER]" System="no" />
<RegistryValue Root="HKCU" Key="Software\John MacFarlane\Pandoc"
Name="UserPathUpdated" Type="integer" Value="1" KeyPath="yes"/>
</Component>
<Component Id="UpdatePathMachine"
Guid="0C642D0A-7175-4CD7-B11F-0A69F73FD757">
<Condition><![CDATA[ ALLUSERS=1 OR (ALLUSERS=2 AND Privileged) ]]></Condition>
<Environment Id="UpdatePathMachine" Name="PATH" Action="set"
Part="last" Value="[APPLICATIONFOLDER]" System="yes" />
<RegistryValue Root="HKLM" Key="Software\John MacFarlane\Pandoc"
Name="SystemPathUpdated" Type="integer" Value="1" KeyPath="yes"/>
</Component>
<Environment Id='UpdatePath' Name='PATH' Action='set' Permanent='no' System='no' Part='last' Value='[INSTALLDIR]' />
<Component Id="Documentation"
Guid="A8D54A76-1A3D-4647-8327-81B69D39D8A3">
@ -116,7 +103,7 @@
</Feature>
<Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONFOLDER" />
<UIRef Id="WixUI_Minimal" />
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />
<WixVariable Id="WixUILicenseRtf" Value="..\COPYING.rtf" />