How can you determine that you are using 3.14 Patch 8

Find and share HowTos to various installations / configurations!
6 posts • Page 1 of 1
fmulder
Posts:330
Joined: Wed Feb 03, 2010 9:46 am

How can you determine that you are using 3.14 Patch 8

Post by fmulder »

3.14 Patch8 fixed an bug and it is important that all our engineers use this version. That is why I wanted to implemented a check that runs when the Gedi is started. I want to show a popup when an engineer is NOT using the 3.14P8 version.

I tried several constants but they will only say 3.14 (and not the patch number)

Code: Select all

  DebugN( VERSION );
  DebugN( VERSION_DISP );
  DebugN( VERSION_NUMERIC );
The output is:

Code: Select all

  WCCOAui7:["3.14"]
  WCCOAui7:["3.14"]
  WCCOAui7:[314000]
Has anyone got a better idea ?

agruber
Posts:147
Joined: Tue Sep 07, 2010 2:52 pm

Re: How can you determine that you are using 3.14 Patch 8

Post by agruber »

Unfortunately there is no variable or function which returns the patch level in 3.14. One way is to check the readme files, an example can be found in our about.pnl.

Starting with 3.15 there is a new CTRL function, yet undocumented:
anytype getVersionInfo(string key)

key (alternative name) / result value ():
version / string / example "3.15"
display / string / example "3.15"
numeric / unsigned int / example 315000
platform / string / example "Linux x86_64"
major / unsigned int / example 3
minor / unsigned int / example 15
patch / unsigned int / example 17

Usage example:
DebugTN(getVersionInfo("patch"));

fmulder
Posts:330
Joined: Wed Feb 03, 2010 9:46 am

Re: How can you determine that you are using 3.14 Patch 8

Post by fmulder »

Thanks for your quick answer. I'll check the About box.

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: How can you determine that you are using 3.14 Patch 8

Post by Gertjan van Schijndel »

The 'webclient_http.ctl' script uses another solution, it checks the webclient installation files (see function 'getFileVersion').

If the patch increases the value in the datapoint element '_DatabaseVersion.Sub', than it would be the easiest solution to check this value. But this value is not incremented with every patch.

fmulder
Posts:330
Joined: Wed Feb 03, 2010 9:46 am

Re: How can you determine that you are using 3.14 Patch 8

Post by fmulder »

In my database the _DatabaseVersion shows the following dp elements:

major = 3
minor = 14
Sub = 4 ( :( )

This might be caused by the fact that we do not use the WebClient (sofar). The database probably contains an older value.

I'll stick to the method by Andreas. For those of you that are interested. This is how the about box does it:

Code: Select all

  dyn_string dsReadmes = getFileNames(WINCCOA_PATH,"ReadmeP*.txt");
  string sReadmeFile = "ReadmeP";
  string sText = ".txt";
  string sZero = "0";
  
  if ( dynlen(dsReadmes) )  
  {
    this.visible = true;
    dynSort(dsReadmes, true);
    
    for ( int i = 1; i

agruber
Posts:147
Joined: Tue Sep 07, 2010 2:52 pm

Re: How can you determine that you are using 3.14 Patch 8

Post by agruber »

To avoid confusion about the _DatabaseVersion. This cannot be used to verify the patch level.

It defines the version of the internal database structure. It would be increased with a patch, if there needs to be some internal datapoint type updated. In the past this was a manual task. As a patch does not necessarily update the database, the version likely differs from the installed patch. That is perfectly normal.

6 posts • Page 1 of 1