mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Win32 installer: always remove previously installed versions.
This avoids problems when libraries or reports have been moved around in newer versions. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21894 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
6ad0ab7426
commit
1d8e85e8e7
@ -183,14 +183,14 @@ var
|
|||||||
PrevVersionMajor, PrevVersionMinor, PrevVersionMicro : Cardinal;
|
PrevVersionMajor, PrevVersionMinor, PrevVersionMicro : Cardinal;
|
||||||
Uninstallrequired : Boolean;
|
Uninstallrequired : Boolean;
|
||||||
|
|
||||||
// -----------------------------------------------------------
|
// ----------------------------------------------------------------
|
||||||
// Sometimes it's not possible to install a newer version of
|
// Sometimes it's not possible to install a newer version of
|
||||||
// GnuCash over an older one on Windows. This is mostly the
|
// GnuCash over an older one on Windows. This happens for example
|
||||||
// case when libraries are moved around in the newer version.
|
// when libraries or reports are moved around in the newer version.
|
||||||
// The code below will detect an existing GnuCash installation
|
// The code below will detect an existing GnuCash installation
|
||||||
// and will remove it (if the user accepts) before installing
|
// and will remove it (if the user accepts) before installing
|
||||||
// the version the user has selected.
|
// the version the user has selected.
|
||||||
// -----------------------------------------------------------
|
// ----------------------------------------------------------------
|
||||||
|
|
||||||
{ Lookup the registry information on a previous installation }
|
{ Lookup the registry information on a previous installation }
|
||||||
procedure GetPrevInstallInfo();
|
procedure GetPrevInstallInfo();
|
||||||
@ -220,9 +220,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ Check if there is another GnuCash currently installed }
|
{ Check if there is another GnuCash currently installed }
|
||||||
{ and whether we can simply install over it or have to remove it first }
|
{ If so, the user will be prompted if it can be uninstalled first. }
|
||||||
{ Versions are considered 'incompatible' if the major or minor }
|
{ If the user doesn't allow uninstall, the installation will be aborted. }
|
||||||
{ version components are different }
|
|
||||||
procedure CheckUninstallRequired();
|
procedure CheckUninstallRequired();
|
||||||
begin
|
begin
|
||||||
UninstallRequired := True;
|
UninstallRequired := True;
|
||||||
@ -230,8 +229,11 @@ begin
|
|||||||
|
|
||||||
if (PrevUninstallString = '') then
|
if (PrevUninstallString = '') then
|
||||||
UninstallRequired := False
|
UninstallRequired := False
|
||||||
else if (PrevVersionMajor = @GNUCASH_MAJOR_VERSION@) and (PrevVersionMinor = @GNUCASH_MINOR_VERSION@) then
|
// We used to check on major-minor versions to determine the uninstall requirement,
|
||||||
UninstallRequired := False;
|
// but this is not always sufficient. So the following code won't be used until
|
||||||
|
// refined.
|
||||||
|
// else if (PrevVersionMajor = @GNUCASH_MAJOR_VERSION@) and (PrevVersionMinor = @GNUCASH_MINOR_VERSION@) then
|
||||||
|
// UninstallRequired := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Uninstall the current installation }
|
{ Uninstall the current installation }
|
||||||
|
Loading…
Reference in New Issue
Block a user