Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use WiX 5 #66

Merged
merged 16 commits into from
Oct 14, 2024
Merged

Use WiX 5 #66

merged 16 commits into from
Oct 14, 2024

Conversation

chrullrich
Copy link
Contributor

@chrullrich chrullrich commented Oct 11, 2024

This branches from my other MSI branch. x64 and x86 build and work.

See the README for how to install what bits of WiX are needed.

WiX 5 does not use the file name in the key of the File table by default; I have changed modify_msi.vbs to identify its target files by the component ID instead ... and most recently by the file name itself.

Instead of externally generating it and using it explicitly.
This prevents upgrades from leaving files from the previous version
behind that are not in the new version.
Use the ODBCDriver element only, without additional Registry settings.
This works, although it does not solve the file name issue and therefore
still requires removing the short file names from the File table.

It also works for installing the x86 driver on an x64 system. Whether it
works on an x86 system remains unknown.
Tested on Windows 10 x86; the driver installs correctly and works
at first glance (in Access, to be precise). Registry and file system
look good.

The comment saying it "probably would be safe" is probably correct.
According to docs, using Package/@platform "is discouraged". The -arch
option also provides the default bitness for components, making the
Component/@win64 attribute unnecessary in single-architecture packages.
This element compiles into approximately the same entries in the
Upgrade, CustomAction, and InstallExecuteSequence tables.
I think this was the product code, a long time ago.
By about 20 percent.
@chrullrich chrullrich force-pushed the msi-wix-5 branch 2 times, most recently from 55f8095 to 949b668 Compare October 12, 2024 13:08
Use the FileName column itself instead of the file ID. This is less
susceptible to changes in file IDs (and component IDs) that may happen
when relying more on default behaviors in future WiX versions.
This is a preview. It appears to build a working x64 installer; I have
tested nothing else yet.
Also, put blame where it belongs, which is Windows Installer. If this
was a bug in WiX, then the fix would be to enforce 8.3 file names for
ODBC drivers, and we wouldn't like that very much either, would we?
- Remove most Component elements in favor of naked files
- Replace PGFOLDER variable with ProgramFiles6432Folder

The Condition element on Component has become an attribute in WiX 5, and
the combination of preprocessor and component condition (i.e. include
a non-x64 condition only in a non-x64 package) to install PGXA only from
a package native to the underlying OS does not work anymore. Replace it
with a pure component condition that includes the package architecture.

The Template summary property has this information already, but it is
not available from within the installation, and I'm not about to start
writing custom actions.
@chrullrich
Copy link
Contributor Author

I don't think there is more that needs to be done here this side of adding the arm64 package.

@chrullrich chrullrich marked this pull request as ready for review October 12, 2024 13:16
@davecramer
Copy link
Contributor

I just have to now figure out why it fails

@davecramer
Copy link
Contributor

Thanks so much for this!

@chrullrich
Copy link
Contributor Author

I just have to now figure out why it fails

I saw that. Have another commit.

@davecramer davecramer merged commit 7da4711 into postgresql-interfaces:main Oct 14, 2024
1 check passed
@davecramer
Copy link
Contributor

cool, thanks so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants