From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Upgrading by double-clicking the .msi
Date: Tue, 24 Jun 2014 11:49:31 +0300
Message-ID: <53A93B9B.8090905@vmware.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
Upgrading the driver by double-clicking the new .msi file doesn't work:
"Another version of this product is already installed."
That's why we include the upgrade.bat file, which uses the right flags
to msiexec to force reinstallation over the old version. But that's not
very user-friendly.
To fix that, we need to use the Windows Installer "major upgrade"
feature. Browsing the web on this subject, most people seem to recommend
treating every upgrade as a major upgrade, because that's the simplest
method. Dealing with Minor or Small upgrades properly would require much
more work, while a major upgrade just removes the old installation and
installs the new one. For a small product like psqlODBC, that works fine.
I'm following the WiX tutorial at
http://wixtoolset.org/documentation/manual/v3/howtos/updates/major_upgrade.html
on how to do that. Fortunately we already include an UpgradeCode and
ProductId.
So all we need to do is to add a MajorUpgrade tag to the .wxs file:
<MajorUpgrade
Schedule="afterInstallInitialize"
DowngradeErrorMessage="A later version of the driver is already
installed. Setup will now exit.">
And whenever we ship a new version, we must update the product code.
Any objections? We'll need to somehow automate the generation of product
codes. I'll try to figure out how to do that with MSBuild.
Once we do that, we should stop shipping upgrade.bat. At the downloads
website, I think we should just provide the plain .msi file, and not zip
it anymore. (the MM and DLL binaries would be unchanged)
- Heikki
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: hlinnakangas@vmware.com
Subject: Re: Upgrading by double-clicking the .msi
In-Reply-To: <53A93B9B.8090905@vmware.com>
References: <53A93B9B.8090905@vmware.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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