Don't use <0.56 and 0.60
Moderators: helmut, XnTriq, xnview
Don't use <0.56 and 0.60
If you try to use 0.56 or older, AND 0.60 with same database, your database will be strange!
Pierre.
Re: Don't use <0.56 and 0.60
From now on, look in each version of the program look at the expected version number of the DB. And if the expected version is smaller than the version of the DB then throw an error ("Database has a more recent version number than the expected one") and go out.xnview wrote:If you try to use 0.56 or older, AND 0.60 with same database, your database will be strange!
m. Th.
- Dark Themed XnViewMP 1.7.1 64bit on Win11 x64 -
- Dark Themed XnViewMP 1.7.1 64bit on Win11 x64 -
Re: Don't use <0.56 and 0.60
Hello,
.... In this case, it's safer to rename the DBs files (for each versions in case of DB changes) ?
XnView.db ---> XnView_v0.60.xndb
Thumb.db ---> Thumb_v0.60.xndb
.... In this case, it's safer to rename the DBs files (for each versions in case of DB changes) ?
XnView.db ---> XnView_v0.60.xndb
Thumb.db ---> Thumb_v0.60.xndb
XnViewMP Linux X64 - Debian - X64
Re: Don't use <0.56 and 0.60
It is more complicated because there are references to the current file(s) path etc. Also, the newer version must upgrade any of the older versions, hence a continuous name change per version would be difficult to handle.oops66 wrote:Hello,
.... In this case, it's safer to rename the DBs files (for each versions in case of DB changes) ?
XnView.db ---> XnView_v0.60.xndb
Thumb.db ---> Thumb_v0.60.xndb
m. Th.
- Dark Themed XnViewMP 1.7.1 64bit on Win11 x64 -
- Dark Themed XnViewMP 1.7.1 64bit on Win11 x64 -
Re: Don't use <0.56 and 0.60
... Yes, not so easy to do, but it would be probably better during the MP beta stage - IMHO. But a least, change the name : "XnView.db" ... because it was the unique and previous DB name (at MPv0.56 and before). ?
XnViewMP Linux X64 - Debian - X64
Re: Don't use <0.56 and 0.60
To change the name to xnview.xndb - sure. I explained somewhere else, as you know.oops66 wrote:... Yes, not so easy to do, but it would be probably better during the MP beta stage - IMHO. But a least, change the name : "XnView.db" ... because it was the unique and previous DB name (at MPv0.56 and before). ?
For beta stage... WHAT beta stage???



We are in beta isn't it?

...but I think that's better to have the possibility to have different configurations for different installations of XnViewMP. This will serve not only for internal beta stage

For example one can have in c:\program files\xnview\ the 'official', stable version which will point to c:\foo\xnview.db while in c:\downloaded\test\xnview\ the latest cutting-edge build which will point to xnview.xndb located in the very same directory.
However we must think how/where to persist the settings for each XnViewMP installation.
A draft idea would be something like this:
Code: Select all
cHome = ExtractFilePath(Application.ExeName);
if (not FileExists(cHome+'xnview.ini'))
{
//...look for xnview.ini in the default user folder
}
Any other ideas?
m. Th.
- Dark Themed XnViewMP 1.7.1 64bit on Win11 x64 -
- Dark Themed XnViewMP 1.7.1 64bit on Win11 x64 -
Re: Don't use <0.56 and 0.60
It's already possible, XnViewMP check first in the same folder for a .inim.Th. wrote: ...but I think that's better to have the possibility to have different configurations for different installations of XnViewMP. This will serve not only for internal beta stagebut also for different other purposes.
Pierre.
Re: Don't use <0.56 and 0.60
It's typical during a software lifecylce that database modifications are needed. Typical handling for this is:
- Introduce a database version.
- Newer XnView versions can update from any old database version to the current version. This is performed by applying all version updates one after another that happened between versions.
E.g.
XnView 0.55 has DB version 0.1 and can create a version 0.1 database from scratch.
XnView 0.56 has DB version 0.1 and can create a version 0.1 database from scratch.
XnView 0.60 has DB version 0.2 and can create a version 0.2 database from scratch. In addition, it can update a database from 0.1 to 0.2 (if needed)
XnView 0.61 has DB version 0.2 and can create a version 0.2 database from scratch. In addition, it can update a database from 0.1 to 0.2 (if needed)
XnView 0.80 has DB version 0.3 and can create a version 0.3 database from scratch. In addition, it can update from 0.1 to 0.2 and from 0.2 to 0.3 (if needed).
..
- Older XnView versions will ouput a message if their supported database version is older than the current version.
- Introduce a database version.
- Newer XnView versions can update from any old database version to the current version. This is performed by applying all version updates one after another that happened between versions.
E.g.
XnView 0.55 has DB version 0.1 and can create a version 0.1 database from scratch.
XnView 0.56 has DB version 0.1 and can create a version 0.1 database from scratch.
XnView 0.60 has DB version 0.2 and can create a version 0.2 database from scratch. In addition, it can update a database from 0.1 to 0.2 (if needed)
XnView 0.61 has DB version 0.2 and can create a version 0.2 database from scratch. In addition, it can update a database from 0.1 to 0.2 (if needed)
XnView 0.80 has DB version 0.3 and can create a version 0.3 database from scratch. In addition, it can update from 0.1 to 0.2 and from 0.2 to 0.3 (if needed).
..
- Older XnView versions will ouput a message if their supported database version is older than the current version.
Re: Don't use <0.56 and 0.60
+1 , I agree (... *update, or better: duplicate) to keep the ability to use the previous XnViewMP versions, it's that why IMHO than a new name for the DB file is better, for a new BD_Version...helmut wrote:...XnView 0.80 has DB version 0.3 and can create a version 0.3 database from scratch. In addition, it can update* from 0.1 to 0.2 and from 0.2 to 0.3 (if needed)...
- Older XnView versions will ouput a message if their supported database version is older than the current version.
(Ex: XnView_v0.3.xndb and Thumb_v0.3.xndb)
XnView 0.80 has DB version 0.3 and can create a version 0.3 database from scratch. In addition, it can update or duplicate from 0.1 to 0.2 and from 0.2 to 0.3 (if needed)...
XnViewMP Linux X64 - Debian - X64
Re: Don't use <0.56 and 0.60
There is already (AFAIS) in DBInfo table.helmut wrote:It's typical during a software lifecylce that database modifications are needed. Typical handling for this is:
- Introduce a database version.
Yes. Usually the create & update things are in fact scripts which are outside of the code base. Sometimes is possible by using CREATE IF NOT EXISTS SQL structures to have a big part of create & update phases together.
- Newer XnView versions can update from any old database version to the current version. This is performed by applying all version updates one after another that happened between versions.
E.g.
XnView 0.55 has DB version 0.1 and can create a version 0.1 database from scratch.
XnView 0.56 has DB version 0.1 and can create a version 0.1 database from scratch.
XnView 0.60 has DB version 0.2 and can create a version 0.2 database from scratch. In addition, it can update a database from 0.1 to 0.2 (if needed)
XnView 0.61 has DB version 0.2 and can create a version 0.2 database from scratch. In addition, it can update a database from 0.1 to 0.2 (if needed)
XnView 0.80 has DB version 0.3 and can create a version 0.3 database from scratch. In addition, it can update from 0.1 to 0.2 and from 0.2 to 0.3 (if needed).
..
But Pierre chose to have these things directly in code. Well, it is his choice. If he can manage them, so far so good (perhaps in a separate class/unit/logical package etc.).
Well, this is the bit which is missing. A check.
- Older XnView versions will ouput a message if their supported database version is older than the current version.

m. Th.
- Dark Themed XnViewMP 1.7.1 64bit on Win11 x64 -
- Dark Themed XnViewMP 1.7.1 64bit on Win11 x64 -