Version.ini: Difference between revisions

From OuroDev
No edit summary
No edit summary
Line 1: Line 1:
version.ini is used to check that the client and server versions match. The game client and dbserver will both load it, and the client sends its version to dbserver as part of the login process. If the client does not have the expected version, dbserver will close the connection.
version.ini is used to check that the client and server versions match. The game client and dbserver will both load it, and the client sends its version to dbserver as part of the login process. If the client does not have the expected version, dbserver will close the connection.


If a version.ini file is not found, the registry will be checked instead.
If a version.ini file is not found, the registry will be checked instead, in key HKCU\SOFTWARE\Cryptic\CoH.
The last part of the registry key can be changed:
* dbserver uses the ClientProject entry in servers.cfg.
* game client uses the -project command-line argument
* mapserver uses the string "CoH Server"
* testclient uses "CoH" if the -server command-line argument is "Training Room" and "CohTest" otherwise.
 
The client and servers select which version to use as follows:
* If the executable is not in the location identified by the "Installation Directory" value in the registry key, or that registry key does not exist, or piggs/text.pigg does not exist, then a dev version string is generated
* Otherwise, if version.ini exists, then the Version= line is used from it
* Otherwise, the CurrentVersion value is used from the registry key


Example client content:
Example client content:

Revision as of 12:26, 12 May 2019

version.ini is used to check that the client and server versions match. The game client and dbserver will both load it, and the client sends its version to dbserver as part of the login process. If the client does not have the expected version, dbserver will close the connection.

If a version.ini file is not found, the registry will be checked instead, in key HKCU\SOFTWARE\Cryptic\CoH. The last part of the registry key can be changed:

  • dbserver uses the ClientProject entry in servers.cfg.
  • game client uses the -project command-line argument
  • mapserver uses the string "CoH Server"
  • testclient uses "CoH" if the -server command-line argument is "Training Room" and "CohTest" otherwise.

The client and servers select which version to use as follows:

  • If the executable is not in the location identified by the "Installation Directory" value in the registry key, or that registry key does not exist, or piggs/text.pigg does not exist, then a dev version string is generated
  • Otherwise, if version.ini exists, then the Version= line is used from it
  • Otherwise, the CurrentVersion value is used from the registry key

Example client content:

[Settings]
Version=2400.201208211101.1