Thread: Installer WiX project files

Installer WiX project files

From
Heikki Linnakangas
Date:
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

Attachment

Re: Installer WiX project files

From
"Inoue, Hiroshi"
Date:
(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