r21895 - gnucash/branches/2.4/packaging/win32 - [21894] Win32 installer: always remove previously installed versions.

Geert Janssens gjanssens at code.gnucash.org
Fri Jan 27 15:14:03 EST 2012


Author: gjanssens
Date: 2012-01-27 15:14:03 -0500 (Fri, 27 Jan 2012)
New Revision: 21895
Trac: http://svn.gnucash.org/trac/changeset/21895

Modified:
   gnucash/branches/2.4/packaging/win32/gnucash.iss.in
Log:
[21894] Win32 installer: always remove previously installed versions.
This avoids problems when libraries or reports have been moved around in newer versions.

Modified: gnucash/branches/2.4/packaging/win32/gnucash.iss.in
===================================================================
--- gnucash/branches/2.4/packaging/win32/gnucash.iss.in	2012-01-27 20:09:55 UTC (rev 21894)
+++ gnucash/branches/2.4/packaging/win32/gnucash.iss.in	2012-01-27 20:14:03 UTC (rev 21895)
@@ -182,14 +182,14 @@
   PrevVersionMajor, PrevVersionMinor, PrevVersionMicro : Cardinal;
   Uninstallrequired : Boolean;
 
-// -----------------------------------------------------------
+// ----------------------------------------------------------------
 // Sometimes it's not possible to install a newer version of
-// GnuCash over an older one on Windows. This is mostly the
-// case when libraries are moved around in the newer version.
+// GnuCash over an older one on Windows. This happens for example
+// when libraries or reports are moved around in the newer version.
 // The code below will detect an existing GnuCash installation
 // and will remove it (if the user accepts) before installing
 // the version the user has selected.
-// -----------------------------------------------------------
+// ----------------------------------------------------------------
 
 { Lookup the registry information on a previous installation }
 procedure GetPrevInstallInfo();
@@ -218,10 +218,9 @@
   RegQueryDwordValue(rootKey, sAppVersionPath, 'VersionMicro', PrevVersionMicro);
 end;
 
-{ Check if there is another GnuCash currently installed                }
-{ and whether we can simply install over it or have to remove it first }
-{ Versions are considered 'incompatible' if the major or minor         }
-{ version components are different                                     }
+{ Check if there is another GnuCash currently installed                  }
+{ If so, the user will be prompted if it can be uninstalled first.       }
+{ If the user doesn't allow uninstall, the installation will be aborted. }
 procedure CheckUninstallRequired();
 begin
   UninstallRequired := True;
@@ -229,8 +228,11 @@
 
   if (PrevUninstallString = '') then
     UninstallRequired := False
-  else if (PrevVersionMajor = @GNUCASH_MAJOR_VERSION@) and (PrevVersionMinor = @GNUCASH_MINOR_VERSION@) then
-    UninstallRequired := False;
+// We used to check on major-minor versions to determine the uninstall requirement,
+// 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;
 
 { Uninstall the current installation }



More information about the gnucash-changes mailing list