From 388ce099e8520384f9db5a50eab026cb059e97d5 Mon Sep 17 00:00:00 2001 From: Fyodor Sheremetyev Date: Fri, 15 Mar 2013 12:36:10 +0000 Subject: [PATCH 01/13] Add to Git ignores temporary files generate in Windows build. --- .gitignore | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index df51012fa..3e9ae6904 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,9 @@ man/man?/*.html pandoc.cabal.orig *.o *.hi - +/COPYING.rtf +/COPYRIGHT.txt +/cabal-dev/ +/windows/*.msi +/windows/*.wixpdb +windows/*.wixobj From 7ee0dffb84405fc452e6c0e2fbfcc3ce62a8f8c9 Mon Sep 17 00:00:00 2001 From: Fyodor Sheremetyev Date: Fri, 15 Mar 2013 12:47:04 +0000 Subject: [PATCH 02/13] WiX: Replace tabs with spaces. --- windows/pandoc.wxs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/windows/pandoc.wxs b/windows/pandoc.wxs index 71afa8eb0..83f24823e 100644 --- a/windows/pandoc.wxs +++ b/windows/pandoc.wxs @@ -36,7 +36,7 @@ + Part="last" Value="[INSTALLDIR]" /> @@ -53,8 +53,8 @@ + Target="[INSTALLDIR]Pandoc User's Guide.html" + WorkingDirectory="INSTALLDIR" /> From aed8a2c841f7819583bd48ca8b0f186e657fc2e8 Mon Sep 17 00:00:00 2001 From: Fyodor Sheremetyev Date: Fri, 15 Mar 2013 12:50:08 +0000 Subject: [PATCH 03/13] WiX: Add empty lines for readability. --- windows/pandoc.wxs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/windows/pandoc.wxs b/windows/pandoc.wxs index 83f24823e..2c7c4858b 100644 --- a/windows/pandoc.wxs +++ b/windows/pandoc.wxs @@ -5,6 +5,7 @@ UpgradeCode="$(var.UpgradeCode)" Name="Pandoc $(var.VERSION)" Version="$(var.VERSION)" Manufacturer="John MacFarlane" Language="1033"> + @@ -15,9 +16,11 @@ Maximum="99.0.0.0" IncludeMaximum="no" /> + + @@ -48,6 +51,7 @@ + + @@ -69,8 +74,10 @@ + + From cd4ad4bc96f864450b374f34f3ae8b0bf4952d87 Mon Sep 17 00:00:00 2001 From: Fyodor Sheremetyev Date: Fri, 15 Mar 2013 13:46:07 +0000 Subject: [PATCH 04/13] =?UTF-8?q?WiX:=20Use=20=E2=80=9CAdvanced=E2=80=9D?= =?UTF-8?q?=20template=20that=20supports=20selection=20of=20per-user=20or?= =?UTF-8?q?=20per-machine=20mode.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit http://wix.sourceforge.net/manual-wix3/WixUI_advanced.htm To install for all users installer should be started from admin account. --- windows/pandoc.wxs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/windows/pandoc.wxs b/windows/pandoc.wxs index 2c7c4858b..2d6cfada3 100644 --- a/windows/pandoc.wxs +++ b/windows/pandoc.wxs @@ -21,11 +21,14 @@ + + + - + @@ -75,7 +78,7 @@ - + From e6f32806fdbf4efacc316942131143370695e709 Mon Sep 17 00:00:00 2001 From: Fyodor Sheremetyev Date: Fri, 15 Mar 2013 14:25:40 +0000 Subject: [PATCH 05/13] WiX: Refactoring: Place all components inside single directory structure. For the sake of simplicity. --- windows/pandoc.wxs | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/windows/pandoc.wxs b/windows/pandoc.wxs index 2d6cfada3..60a62995a 100644 --- a/windows/pandoc.wxs +++ b/windows/pandoc.wxs @@ -25,9 +25,7 @@ - - - + - - - - - - - - + + + + + + + + + + + From c3bdc422b2d342ad1a8fa38ffc92b94fb2610ac1 Mon Sep 17 00:00:00 2001 From: Fyodor Sheremetyev Date: Fri, 15 Mar 2013 14:28:54 +0000 Subject: [PATCH 06/13] =?UTF-8?q?WiX:=20Use=20file=20as=20key=20path=20for?= =?UTF-8?q?=20User=E2=80=99s=20Guide=20component.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- windows/pandoc.wxs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/windows/pandoc.wxs b/windows/pandoc.wxs index 60a62995a..6233b7baa 100644 --- a/windows/pandoc.wxs +++ b/windows/pandoc.wxs @@ -44,10 +44,8 @@ - + Source="..\README.html" KeyPath="yes" /> From 842661ee1827ecbef90be700696fcfe0d868ebec Mon Sep 17 00:00:00 2001 From: Fyodor Sheremetyev Date: Fri, 15 Mar 2013 15:10:24 +0000 Subject: [PATCH 07/13] WiX: Install shortcut for all users when installing per-machine. Use HKMU to write registry values to either HKCU or HKLM. http://stackoverflow.com/a/3824949 http://wix.sourceforge.net/manual-wix2/wix_xsd_registry.htm --- windows/pandoc.wxs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/windows/pandoc.wxs b/windows/pandoc.wxs index 6233b7baa..4da665a18 100644 --- a/windows/pandoc.wxs +++ b/windows/pandoc.wxs @@ -23,6 +23,7 @@ + @@ -30,7 +31,7 @@ - + Source="..\README.html" KeyPath="yes"> + + @@ -53,13 +57,8 @@ - - From d7b6da66c41fe3e8f642d94de67370873e07d95b Mon Sep 17 00:00:00 2001 From: Fyodor Sheremetyev Date: Fri, 15 Mar 2013 15:40:48 +0000 Subject: [PATCH 08/13] =?UTF-8?q?WiX:=20Use=20APPLICATIONFOLDER=20property?= =?UTF-8?q?=20name=20as=20required=20by=20=E2=80=9CAdvanced=E2=80=9D=20tem?= =?UTF-8?q?plate.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to cd4ad4bc96f864450b374f34f3ae8b0bf4952d87. --- windows/pandoc.wxs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/windows/pandoc.wxs b/windows/pandoc.wxs index 4da665a18..0301611e2 100644 --- a/windows/pandoc.wxs +++ b/windows/pandoc.wxs @@ -28,12 +28,12 @@ - + - + + Part="last" Value="[APPLICATIONFOLDER]" /> @@ -66,7 +66,7 @@ - + From 5b3ad3306687977797ffb789a69a781e5fd2a960 Mon Sep 17 00:00:00 2001 From: Fyodor Sheremetyev Date: Fri, 15 Mar 2013 15:42:34 +0000 Subject: [PATCH 09/13] WiX: Set non-empty feature name. It can be displayed in Advanced mode. --- windows/pandoc.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/pandoc.wxs b/windows/pandoc.wxs index 0301611e2..a784f1d48 100644 --- a/windows/pandoc.wxs +++ b/windows/pandoc.wxs @@ -70,7 +70,7 @@ - + From 6269ba03b056ad933110c1a081daab96db18997b Mon Sep 17 00:00:00 2001 From: Fyodor Sheremetyev Date: Fri, 15 Mar 2013 16:37:08 +0000 Subject: [PATCH 10/13] WiX: Install to %APPLOCALDATA%\Pandoc in per-user setup. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The “Advanced” template installs to %APPLOCALDATA%\Apps\Pandoc by default. --- windows/pandoc.wxs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/windows/pandoc.wxs b/windows/pandoc.wxs index a784f1d48..cee663962 100644 --- a/windows/pandoc.wxs +++ b/windows/pandoc.wxs @@ -25,6 +25,14 @@ + + + ACTION="INSTALL" AND (ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged))) + + + ACTION="INSTALL" AND (ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged))) + + From ef40aa9393729c305b13233be1830a9da1a0de39 Mon Sep 17 00:00:00 2001 From: Fyodor Sheremetyev Date: Fri, 15 Mar 2013 16:52:53 +0000 Subject: [PATCH 11/13] WiX: Update system PATH environment variable when installing per-machine. Had to create two separate components because System property of Environment element cannot be set on condition. --- windows/pandoc.wxs | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/windows/pandoc.wxs b/windows/pandoc.wxs index cee663962..9ca4b463c 100644 --- a/windows/pandoc.wxs +++ b/windows/pandoc.wxs @@ -48,9 +48,26 @@ Source="..\COPYRIGHT.txt" /> - + + + + + + + + + + + + + + + From 7c572acbd659381997f2559d23beb2eb6b588c41 Mon Sep 17 00:00:00 2001 From: Fyodor Sheremetyev Date: Fri, 15 Mar 2013 21:43:47 +0000 Subject: [PATCH 12/13] =?UTF-8?q?WiX:=20Revert=20back=20to=20=E2=80=9CMini?= =?UTF-8?q?mal=E2=80=9D=20template.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The “Advanced” template doesn’t uninstall previous version if it was installed per-machine. FindRelatedProducts action executes before ALLUSERS property is set and search is performed in per-user products only. --- windows/pandoc.wxs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/windows/pandoc.wxs b/windows/pandoc.wxs index 9ca4b463c..85edd29a8 100644 --- a/windows/pandoc.wxs +++ b/windows/pandoc.wxs @@ -21,16 +21,17 @@ - - - + + - ACTION="INSTALL" AND (ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged))) + ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged))) + ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS=1 OR (ALLUSERS=2 AND Privileged)) - ACTION="INSTALL" AND (ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged))) + ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS="" OR (ALLUSERS=2 AND (NOT Privileged))) + ACTION="INSTALL" AND APPLICATIONFOLDER="" AND (ALLUSERS=1 OR (ALLUSERS=2 AND Privileged)) @@ -103,7 +104,8 @@ - + + From b4277c16581b44bb284e60486693b5916c40eb9a Mon Sep 17 00:00:00 2001 From: Fyodor Sheremetyev Date: Fri, 15 Mar 2013 21:45:08 +0000 Subject: [PATCH 13/13] WiX: Remove unnecessary parameter for candle.exe. --- windows/make-windows-installer.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/make-windows-installer.bat b/windows/make-windows-installer.bat index 91a31cfb9..e13d324c7 100644 --- a/windows/make-windows-installer.bat +++ b/windows/make-windows-installer.bat @@ -24,7 +24,7 @@ if "%VERSION%" == "" ( echo Detected version %VERSION% cd windows echo Creating msi... -"C:\Program Files\WiX Toolset v3.7\bin\candle.exe" -dVERSION=%VERSION% -ext WixUIExtension pandoc.wxs +"C:\Program Files\WiX Toolset v3.7\bin\candle.exe" -dVERSION=%VERSION% pandoc.wxs if %errorlevel% neq 0 exit /b %errorlevel% "C:\Program Files\WiX Toolset v3.7\bin\light.exe" -sw1076 -ext WixUIExtension -out pandoc-%VERSION%.msi pandoc.wixobj if %errorlevel% neq 0 exit /b %errorlevel%