pg.ddx.io pgsql-odbc@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Installer WiX project files 2+ messages / 2 participants [nested] [flat]
* Installer WiX project files @ 2014-06-03 13:55 Heikki Linnakangas <hlinnakangas@vmware.com> 2014-06-04 03:46 ` Re: Installer WiX project files Inoue, Hiroshi <inoue@tpf.co.jp> 0 siblings, 1 reply; 2+ messages in thread From: Heikki Linnakangas @ 2014-06-03 13:55 UTC (permalink / raw) To: pgsql-odbc Continuing my quest to make the Windows build process simpler, I'm looking at the differences between the 32-bit and 64-bit installer builds. psqlodbc_cpu.wxs is currently used for 64-bit builds, while psqlodbc.wxs is used for 32-bit builds. psqlodbc_cpu.wxs file is parameterized so that it is in theory capable of producing both versions, otherwise they are more or less identical. The 64-bit psqlodbc_cpu.wxs file sets ALLUSERS to 2, while the 32-bit psqlodbc.wxs file sets it to 1. Another difference is that psqlodbc_cpu.wxs doesn't include docs/config-opt.html, but psqlodbc.wxs does. That looks like an oversight to me; surely we want the file to be included in both 32-bit and 64-bit versions? psqlodbc_cpu.wxs contains a separate table of GUIDs for building with Platform=x86, and for compiling with no Platform specified at all. The "no platform at all"uses the same GUIDs we have in our official 32-bit installers. AFAICS, setting Platform=x86 produces an otherwise identical result, but uses a different set of GUIDs. I'm guessing that that was part of some grand plan to revamp the installers and change the product codes etc. while doing it, but we never got around to do it. So I think we should remove that 3rd set of GUIDs. With the attached patch, I get an identical (as far as I can tell) 32-bit .MSI file with psqlodbc_cpu.wxs that psqlodbc.wxs produces. It modifies Make.bat to use psqlodbc_cpu.wxs, like MakeX64.bat does, and removes psqlodbc.wxs. (There seems to be more differences between the merge module build files, psqlodbcm_cpu.wxs and psqlodbcm.wxs. More on that later.) buildX86-installer.ps1 needs a similar modification that I did to Make.bat. I was about to do that, but noticed that buildX86-installer.ps1 doesn't seem to work with a current checkout anyway: PS C:\psqlodbc\installer> .\buildX86-installer.ps1 VERSION : 09.03.0300 USE LIBPQ : yes (C:\Program Files (x86)\PostgreSQL\9.3\bin) USE GSS : no () USE SSPI : no . Specify the ProductCode for the VERSION 09.03.0300 So, the ProductCode table in buildX86-installer.ps1 file was neglected when we made the 9.3.0300 release. The fact that nobody noticed suggests that no-one uses that file. How do you make the official installers? - Heikki -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc Attachments:^ permalink raw reply [nested|flat] 2+ messages in threadunify-psqlodbc-installer-builds.patch (text/x-diff, 12.7K) download
diff --git a/installer/Make.bat b/installer/Make.bat index fc9dbea..d185142 100755 --- a/installer/Make.bat +++ b/installer/Make.bat @@ -68,7 +68,7 @@ IF ERRORLEVEL 1 GOTO ERR_HANDLER echo. echo Building psqlODBC installer database... -candle -nologo -dVERSION=%VERSION% -dSUBLOC=%SUBLOC% -dPRODUCTCODE="%PRODUCTCODE%" psqlodbc.wxs +candle -nologo -dPlatform="x86" -dVERSION=%VERSION% -dSUBLOC=%SUBLOC% -dPRODUCTCODE="%PRODUCTCODE%" -o psqlodbc.wixobj psqlodbc_cpu.wxs IF ERRORLEVEL 1 GOTO ERR_HANDLER light -nologo -ext WixUIExtension -cultures:en-us psqlodbc.wixobj diff --git a/installer/psqlodbc.wxs b/installer/psqlodbc.wxs deleted file mode 100644 index 6f54bbe..0000000 --- a/installer/psqlodbc.wxs +++ /dev/null @@ -1,129 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> - - <!-- Don't change the UpgradeCode and ProductName --> - <?define UpgradeCode = "24BCA538-75A2-4a7f-B236-C99EFC2145DE" ?> - <?define ProductName = "psqlODBC" ?> - -<!-- Product details --> - - <Product - Manufacturer="PostgreSQL Global Development Group" - Id="$(var.PRODUCTCODE)" - UpgradeCode="$(var.UpgradeCode)" - Name="$(var.ProductName)" - Version="$(var.VERSION)" - Language="1033"> - -<!-- Package details --> - - <Package - Keywords="PostgreSQL, ODBC" - Comments="PostgreSQL ODBC Driver" - Manufacturer="PostgreSQL Global Development Group" - InstallerVersion="300" - Languages="1033" - Compressed="yes" - SummaryCodepage="1252" /> - -<!-- Directories --> - - <Directory Id="TARGETDIR" Name="SourceDir"> - - <Directory Id="ProgramFilesFolder" Name="PFiles"> - <Directory Id="BASEDIR" Name="psqlODBC"> - <Directory Id="SUBLOC" Name="$(var.SUBLOC)"> - <Directory Id="BINDIR" Name="bin"> - <Component Id="registration" Guid="4F0C04EB-ADCB-4fa8-B6A3-E9F74EA693F8"> - <RegistryValue KeyPath="yes" Type="string" Root="HKLM" Key="Software\psqlODBC" Name="Version" Value="$(var.VERSION)" /> - </Component> - <Merge Id="psqlodbcm" DiskId="1" Language="1033" SourceFile="psqlodbc.msm" /> - </Directory> - <Directory Id="DOCSDIR" Name="docs"> - <Component Id="docs" Guid="89DDBC52-9F0D-4846-91DC-09EECC87E42E"> - <File Id="docs.README.txt" Name="README.txt" DiskId="1" Source="../docs/README.txt" KeyPath="yes" /> - <File Id="docs.config.html" Name="config.html" DiskId="1" Source="../docs/config.html" /> - <File Id="docs.config_opt.html" Name="config-opt.html" DiskId="1" Source="../docs/config-opt.html" /> - <File Id="docs.release.html" Name="release.html" DiskId="1" Source="../docs/release.html" /> - <File Id="docs.release_7.3.html" Name="release-7.3.html" DiskId="1" Source="../docs/release-7.3.html" /> - <File Id="docs.unix_compilation.html" Name="unix-compilation.html" DiskId="1" Source="../docs/unix-compilation.html" /> - <File Id="docs.win32_compilation.html" Name="win32-compilation.html" DiskId="1" Source="../docs/win32-compilation.html" /> - - <!-- <Shortcut Id="docs.index.html" Directory="SMDir" Name="Documentation index" Description="psqlODBC documentation, HOWTOs and FAQs" Advertise="yes" Show="normal" /> --> - </Component> - </Directory> - </Directory> - </Directory> - </Directory> - <Directory Id="ProgramMenuFolder" Name="." SourceName="Programs"> - <Directory Id="SMDir" Name="psqlODBC"> - <Component Id="smdir" Guid="{22288E09-B3B6-4181-907F-676099C20125}"> - <RegistryValue KeyPath="yes" Type="string" Root="HKCU" Key="Software\psqlODBC\SMDir Created" Value="y" /> - <RemoveFolder Id="SMDir" On="uninstall" /> - </Component> - </Directory> - </Directory> - </Directory> - -<!-- Features --> - - <Feature Id="psqlodbc" Title="psqlODBC" Level="1" Description="psqlODBC - The PostgreSQL ODBC Driver" ConfigurableDirectory="BASEDIR" Display="expand"> - <Feature Id="binaries" Title="ODBC Driver" Level="1" Description="The ODBC driver and supporting libraries."> - <ComponentRef Id="registration" /> - <MergeRef Id="psqlodbcm" /> - </Feature> - - <Feature Id="docs" Title="Documentation" Level="4" Description="Documentation and release notes."> - <ComponentRef Id="smdir" /> - <ComponentRef Id="docs" /> - </Feature> - - </Feature> - <Media Id="1" EmbedCab="yes" Cabinet="psqlodbc.cab"/> - -<!-- Properties --> - - <Property Id="ALLUSERS">1</Property> - <Property Id="WIXUI_INSTALLDIR" Value="BASEDIR" /> - -<!-- UI --> - - <UIRef Id="WixUI_FeatureTree" /> - <WixVariable Id="WixUILicenseRtf" Value="lgpl.rtf" /> - <WixVariable Id="WixUIDialogBmp" Value="background.bmp" /> - <WixVariable Id="WixUIBannerBmp" Value="banner.bmp" /> - -<!-- Upgrade --> - <Upgrade Id="$(var.UpgradeCode)"> - <UpgradeVersion OnlyDetect='yes' Property='SELFFOUND' - Minimum="$(var.VERSION)" IncludeMinimum='yes' - Maximum="$(var.VERSION)" IncludeMaximum='yes' /> - <UpgradeVersion OnlyDetect='yes' Property='NEWERFOUND' - Minimum="$(var.VERSION)" IncludeMinimum='no' /> - <UpgradeVersion OnlyDetect='yes' Property='PREVIOUSFOUND' - Minimum='9.3.1' IncludeMinimum='yes' - Maximum="$(var.VERSION)" IncludeMaximum='no' /> - <UpgradeVersion OnlyDetect='no' Property='UPGRADEFOUND' - Minimum='8.3.0' IncludeMinimum='yes' - Maximum='9.3.0' IncludeMaximum='no' /> - </Upgrade> - - <CustomAction Id='AlreadyUpdated' - Error="the same version of [$(var.ProductName)] is already installed" /> - <CustomAction Id='NoDowngrade' - Error="a new version of [$(var.ProductName)] is already installed" /> - <CustomAction Id='NoMinorUpgrade' - Error="REINSTALL unavailable. Major upgrade is needed." /> - <CustomAction Id='NoReinstall' - Error="REINSTALL unavailable. Install the package first." /> - - <InstallExecuteSequence> - <Custom Action='AlreadyUpdated' After='FindRelatedProducts'>SELFFOUND AND NOT Installed</Custom> - <Custom Action='NoDowngrade' After='FindRelatedProducts'>NEWERFOUND AND NOT Installed</Custom> - <Custom Action='NoReinstall' Before='ValidateProductID'>REINSTALLMODE AND NOT Installed</Custom> - <Custom Action='NoMinorUpgrade' After='FindRelatedProducts'>UPGRADEFOUND AND REINSTALLMODE</Custom> - <RemoveExistingProducts After='InstallFinalize'>UPGRADEFOUND AND NOT Installed</RemoveExistingProducts> - </InstallExecuteSequence> - - </Product> -</Wix> diff --git a/installer/psqlodbc_cpu.wxs b/installer/psqlodbc_cpu.wxs index 40ecc72..4df4f17 100644 --- a/installer/psqlodbc_cpu.wxs +++ b/installer/psqlodbc_cpu.wxs @@ -1,36 +1,37 @@ <?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> -<?ifdef var.Platform ?> -<?define PKGNAME = "psqlODBC_$(var.Platform)" ?> -<?define MERGEM = "$(var.Platform)\psqlodbc_$(var.Platform).msm" ?> -<?if $(var.Platform) = x64 ?> -<?define BIT64 = "yes" ?> -<?define PGFOLDER = "ProgramFiles64Folder" ?> -<?define PRODID = "3E42F836-9204-4c42-B3C3-8680A0434875" ?> -<?define CIDREG = "4D361F28-8F75-4c86-9A37-6C279967413D" ?> -<?define CIDDOC = "0C745A85-4E55-4bab-BBF1-DCF51D92FCC5" ?> -<?define CIDSMD = "{E6410EE8-96DC-4d84-8D07-94F8093BF3EF}" ?> -<?define UPGCOD = "BBD29DF5-89F6-4b8b-BDC9-C3EA3A4AFDBB" ?> + +<!-- Default to x86 platform --> +<?ifndef var.Platform ?> + <?define Platform = "x86" ?> <?else?> -<?define BIT64 = "no" ?> -<?define PGFOLDER = "ProgramFilesFolder" ?> -<?define PRODID = "838E187D-8B7A-473d-B93C-C8E970B15D2D" ?> -<?define CIDREG = "4F0C04EB-ADCB-4fa8-B6A3-E9F74EA693FA" ?> -<?define CIDDOC = "89DDBC52-9F0D-4846-91DC-09EECC87E430" ?> -<?define CIDSMD = "{22288E09-B3B6-4181-907F-676099C20127}" ?> -<?define UPGCOD = "24BCA538-75A2-4a7f-B236-C99EFC2145E0" ?> + <?if $(var.Platform) != x64 and $(var.Platform) != x86 ?> + <?error Invalid Platform variable ?> + <?endif?> <?endif?> + +<?if $(var.Platform) = x64 ?> + <?define PKGNAME = "psqlODBC_x64" ?> + <?define MERGEM = "$(var.Platform)\psqlodbc_$(var.Platform).msm" ?> + <?define BIT64 = "yes" ?> + <?define PGFOLDER = "ProgramFiles64Folder" ?> + <?define PRODID = "3E42F836-9204-4c42-B3C3-8680A0434875" ?> + <?define CIDREG = "4D361F28-8F75-4c86-9A37-6C279967413D" ?> + <?define CIDDOC = "0C745A85-4E55-4bab-BBF1-DCF51D92FCC5" ?> + <?define CIDSMD = "{E6410EE8-96DC-4d84-8D07-94F8093BF3EF}" ?> + <?define UPGCOD = "BBD29DF5-89F6-4b8b-BDC9-C3EA3A4AFDBB" ?> + <?define ALLUSERS = "2" ?> <?else?> -<?define Platform = "x86" ?> -<?define PKGNAME = "psqlODBC" ?> -<?define MERGEM = "psqlodbc.msm" ?> -<?define BIT64 = "no" ?> -<?define PGFOLDER = "ProgramFilesFolder" ?> -<?define PRODID = "838E187D-8B7A-473d-B93C-C8E970B15D2B" ?> -<?define CIDREG = "4F0C04EB-ADCB-4fa8-B6A3-E9F74EA693F8" ?> -<?define CIDDOC = "89DDBC52-9F0D-4846-91DC-09EECC87E42E" ?> -<?define CIDSMD = "{22288E09-B3B6-4181-907F-676099C20125}" ?> -<?define UPGCOD = "24BCA538-75A2-4a7f-B236-C99EFC2145DE" ?> + <?define PKGNAME = "psqlODBC" ?> + <?define MERGEM = "psqlodbc.msm" ?> + <?define BIT64 = "no" ?> + <?define PGFOLDER = "ProgramFilesFolder" ?> + <?define PRODID = "838E187D-8B7A-473d-B93C-C8E970B15D2B" ?> + <?define CIDREG = "4F0C04EB-ADCB-4fa8-B6A3-E9F74EA693F8" ?> + <?define CIDDOC = "89DDBC52-9F0D-4846-91DC-09EECC87E42E" ?> + <?define CIDSMD = "{22288E09-B3B6-4181-907F-676099C20125}" ?> + <?define UPGCOD = "24BCA538-75A2-4a7f-B236-C99EFC2145DE" ?> + <?define ALLUSERS = "1" ?> <?endif?> <!-- Product details --> @@ -71,6 +72,7 @@ <Component Id="docs" Guid="$(var.CIDDOC)" Win64="$(var.BIT64)"> <File Id="docs.README.txt" Name="README.txt" DiskId="1" Source="../docs/README.txt" KeyPath="yes" /> <File Id="docs.config.html" Name="config.html" DiskId="1" Source="../docs/config.html" /> + <File Id="docs.config_opt.html" Name="config-opt.html" DiskId="1" Source="../docs/config-opt.html" /> <File Id="docs.release.html" Name="release.html" DiskId="1" Source="../docs/release.html" /> <File Id="docs.release_7.3.html" Name="release-7.3.html" DiskId="1" Source="../docs/release-7.3.html" /> <File Id="docs.unix_compilation.html" Name="unix-compilation.html" DiskId="1" Source="../docs/unix-compilation.html" /> @@ -110,7 +112,7 @@ <!-- Properties --> - <Property Id="ALLUSERS">2</Property> + <Property Id="ALLUSERS">$(var.ALLUSERS)</Property> <Property Id="WIXUI_INSTALLDIR" Value="BASEDIR" /> <!-- UI --> diff --git a/installer/psqlodbcm_cpu.wxs b/installer/psqlodbcm_cpu.wxs index 7dd1478..6a61962 100644 --- a/installer/psqlodbcm_cpu.wxs +++ b/installer/psqlodbcm_cpu.wxs @@ -1,28 +1,29 @@ <?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> -<?ifdef var.Platform ?> -<?define ModuleName = "psqlODBC_$(var.Platform)" ?> -<?if $(var.Platform) = x64 ?> -<?define BIT64 = "yes" ?> -<?define ANSIFOLDER = "x64_ANSI_Release" ?> -<?define UNICODEFOLDER = "x64_Unicode_Release" ?> -<?define Module_PackageId = "970B6E07-7105-4d66-80FA-9E208952FB96" ?> -<?define CIDPFILES = "5C9A19B5-D7C6-4bb4-BBBC-88C2A67A59B0" ?> + +<!-- Default to x86 platform --> +<?ifndef var.Platform ?> + <?define Platform = "x86" ?> <?else?> -<?define BIT64 = "no" ?> -<?define ANSIFOLDER = "x86_ANSI_Release" ?> -<?define UNICODEFOLDER = "x86_Unicode_Release" ?> -<?define Module_PackageId = "ACF10866-5C01-46f0-90F0-D5618638CA4A" ?> -<?define CIDPFILES = "00A1ACE3-B7C2-41b8-A1F1-DB565990DA50" ?> + <?if $(var.Platform) != x64 and $(var.Platform) != x86 ?> + <?error Invalid Platform variable ?> + <?endif?> <?endif?> + +<?if $(var.Platform) = x64 ?> + <?define ModuleName = "psqlODBC_$(var.Platform)" ?> + <?define BIT64 = "yes" ?> + <?define ANSIFOLDER = "x64_ANSI_Release" ?> + <?define UNICODEFOLDER = "x64_Unicode_Release" ?> + <?define Module_PackageId = "970B6E07-7105-4d66-80FA-9E208952FB96" ?> + <?define CIDPFILES = "5C9A19B5-D7C6-4bb4-BBBC-88C2A67A59B0" ?> <?else?> -<?define BIT64 = "no" ?> -<?define Platform = "x86" ?> -<?define ModuleName = "psqlODBC" ?> -<?define ANSIFOLDER = "x86_ANSI_Release" ?> -<?define UNICODEFOLDER = "x86_Unicode_Release" ?> -<?define Module_PackageId = "ACF10866-5C01-46f0-90F0-D5618638CA48" ?> -<?define CIDPFILES = "00A1ACE3-B7C2-41b8-A1F1-DB565990DA4E" ?> + <?define ModuleName = "psqlODBC" ?> + <?define BIT64 = "no" ?> + <?define ANSIFOLDER = "x86_ANSI_Release" ?> + <?define UNICODEFOLDER = "x86_Unicode_Release" ?> + <?define Module_PackageId = "ACF10866-5C01-46f0-90F0-D5618638CA48" ?> + <?define CIDPFILES = "00A1ACE3-B7C2-41b8-A1F1-DB565990DA4E" ?> <?endif?> <Module
* Re: Installer WiX project files 2014-06-03 13:55 Installer WiX project files Heikki Linnakangas <hlinnakangas@vmware.com> @ 2014-06-04 03:46 ` Inoue, Hiroshi <inoue@tpf.co.jp> 0 siblings, 0 replies; 2+ messages in thread From: Inoue, Hiroshi @ 2014-06-04 03:46 UTC (permalink / raw) To: Heikki Linnakangas <hlinnakangas@vmware.com>; Hiroshi Saito <hiroshi@winpg.jp>; +Cc: pgsql-odbc (2014/06/03 22:55), Heikki Linnakangas wrote: > Continuing my quest to make the Windows build process simpler, I'm > looking at the differences between the 32-bit and 64-bit installer builds. > > psqlodbc_cpu.wxs is currently used for 64-bit builds, while psqlodbc.wxs > is used for 32-bit builds. psqlodbc_cpu.wxs file is parameterized so > that it is in theory capable of producing both versions, otherwise they > are more or less identical. > > The 64-bit psqlodbc_cpu.wxs file sets ALLUSERS to 2, while the 32-bit > psqlodbc.wxs file sets it to 1. > > Another difference is that psqlodbc_cpu.wxs doesn't include > docs/config-opt.html, but psqlodbc.wxs does. That looks like an > oversight to me; surely we want the file to be included in both 32-bit > and 64-bit versions? > > psqlodbc_cpu.wxs contains a separate table of GUIDs for building with > Platform=x86, and for compiling with no Platform specified at all. The > "no platform at all"uses the same GUIDs we have in our official 32-bit > installers. AFAICS, setting Platform=x86 produces an otherwise identical > result, but uses a different set of GUIDs. I'm guessing that that was > part of some grand plan to revamp the installers and change the product > codes etc. while doing it, but we never got around to do it. So I think > we should remove that 3rd set of GUIDs. > > With the attached patch, I get an identical (as far as I can tell) > 32-bit .MSI file with psqlodbc_cpu.wxs that psqlodbc.wxs produces. It > modifies Make.bat to use psqlodbc_cpu.wxs, like MakeX64.bat does, and > removes psqlodbc.wxs. > > (There seems to be more differences between the merge module build > files, psqlodbcm_cpu.wxs and psqlodbcm.wxs. More on that later.) There's a difference as to registation. pslqlodbcm.wxs directly registers using RegistryValue element whereas psqlodbcm_cpu.wxs registers via ODBCDriver element. Maybe it's OK to use ODBCriver element for 32bit drivers because I don't remember to hear the trouble about it for 64bit drivers. However please note ODBCDriver element causes an error on installation unless modify_msi.vbs was applied. > buildX86-installer.ps1 needs a similar modification that I did to > Make.bat. I was about to do that, but noticed that > buildX86-installer.ps1 doesn't seem to work with a current checkout anyway: > > PS C:\psqlodbc\installer> .\buildX86-installer.ps1 > VERSION : 09.03.0300 > USE LIBPQ : yes (C:\Program Files (x86)\PostgreSQL\9.3\bin) > USE GSS : no () > USE SSPI : no > . > Specify the ProductCode for the VERSION 09.03.0300 > > So, the ProductCode table in buildX86-installer.ps1 file was neglected > when we made the 9.3.0300 release. The fact that nobody noticed suggests > that no-one uses that file. How do you make the official installers? Unfortunately I little envolved with 9.03.0300 release. Saito-san used BuildAll script to build dlls but maybe he still uses Make(X64).bat to build installers. I would let Saito-san use those Powershell scripts because they share infos like version, use_libpq and use_gss with BuildAll script. regards, Hiroshi Inoue -- I am using the free version of SPAMfighter. SPAMfighter has removed 10516 of my spam emails to date. Get the free SPAMfighter here: http://www.spamfighter.com/len Do you have a slow PC? Try a Free scan http://www.spamfighter.com/SLOW-PCfighter?cid=sigen -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2014-06-04 03:46 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2014-06-03 13:55 Installer WiX project files Heikki Linnakangas <hlinnakangas@vmware.com> 2014-06-04 03:46 ` Inoue, Hiroshi <inoue@tpf.co.jp>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox