Version.ini: Difference between revisions

From OuroDev
Asuffield (talk | contribs)
Created page with "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..."
 
No edit summary
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:version.ini}}
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, 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:
Line 5: Line 18:
[Settings]
[Settings]
Version=2400.201208211101.1</nowiki>
Version=2400.201208211101.1</nowiki>
== dev versions ==
If a dev version is used, it will be something like:
dev: 2019-05-12 12:00:00
using the timestamp of the executable. This used to have a perforce branch name on the end.
When a dev version is used, some behaviour changes:
* dbserver does not validate that client or launcher versions match
* the game client will show fps by default

Latest revision as of 16:13, 21 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

dev versions

If a dev version is used, it will be something like:

dev: 2019-05-12 12:00:00

using the timestamp of the executable. This used to have a perforce branch name on the end.

When a dev version is used, some behaviour changes:

  • dbserver does not validate that client or launcher versions match
  • the game client will show fps by default