This commit is contained in:
romkazvo
2023-08-07 19:29:24 +08:00
commit 34d6c5d489
4832 changed files with 1389451 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsadmin.h
*
* DESCRIPTION.: This file is used to define the version of libgsadmin
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 23:2
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1450
#ifdef DEFVER_LIBGSADMIN
#define VERSION_LIBGSADMIN 1450
#endif //DEFVER_LIBGSADMIN

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgscdkey.h
*
* DESCRIPTION.: This file is used to define the version of libgscdkey
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 21:11
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1395
#ifdef DEFVER_LIBGSCDKEY
#define VERSION_LIBGSCDKEY 1395
#endif //DEFVER_LIBGSCDKEY

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgschat.h
*
* DESCRIPTION.: This file is used to define the version of libgschat
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 21:15
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1463
#ifdef DEFVER_LIBGSCHAT
#define VERSION_LIBGSCHAT 1463
#endif //DEFVER_LIBGSCHAT

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsclient.h
*
* DESCRIPTION.: This file is used to define the version of libgsclient
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 22:26
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1454
#ifdef DEFVER_LIBGSCLIENT
#define VERSION_LIBGSCLIENT 1454
#endif //DEFVER_LIBGSCLIENT

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsclinkc.h
*
* DESCRIPTION.: This file is used to define the version of libgsclinkc
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2002/4/16 @ 13:47
* AUTHOR......: gplante
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1040
#ifdef DEFVER_LIBGSCLINKC
#define VERSION_LIBGSCLINKC 1040
#endif //DEFVER_LIBGSCLINKC

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsclinkg.h
*
* DESCRIPTION.: This file is used to define the version of libgsclinkg
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2002/4/16 @ 13:49
* AUTHOR......: gplante
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1040
#ifdef DEFVER_LIBGSCLINKG
#define VERSION_LIBGSCLINKG 1040
#endif //DEFVER_LIBGSCLINKG

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsconnect.h
*
* DESCRIPTION.: This file is used to define the version of libgsconnect
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 23:20
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1451
#ifdef DEFVER_LIBGSCONNECT
#define VERSION_LIBGSCONNECT 1451
#endif //DEFVER_LIBGSCONNECT

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgscrypto.h
*
* DESCRIPTION.: This file is used to define the version of libgscrypto
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 23:25
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1421
#ifdef DEFVER_LIBGSCRYPTO
#define VERSION_LIBGSCRYPTO 1421
#endif //DEFVER_LIBGSCRYPTO

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgscsp.h
*
* DESCRIPTION.: This file is used to define the version of libgscsp
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 22:27
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1456
#ifdef DEFVER_LIBGSCSP
#define VERSION_LIBGSCSP 1456
#endif //DEFVER_LIBGSCSP

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsdatacontainer.h
*
* DESCRIPTION.: This file is used to define the version of libgsdatacontainer
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 22:31
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1462
#ifdef DEFVER_LIBGSDATACONTAINER
#define VERSION_LIBGSDATACONTAINER 1462
#endif //DEFVER_LIBGSDATACONTAINER

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsgame.h
*
* DESCRIPTION.: This file is used to define the version of libgsgame
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2003/3/29 @ 22:16
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1279
#ifdef DEFVER_LIBGSGAME
#define VERSION_LIBGSGAME 1279
#endif //DEFVER_LIBGSGAME

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsgameserver.h
*
* DESCRIPTION.: This file is used to define the version of libgsgameserver
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2003/3/30 @ 22:58
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1276
#ifdef DEFVER_LIBGSGAMESERVER
#define VERSION_LIBGSGAMESERVER 1276
#endif //DEFVER_LIBGSGAMESERVER

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsgamestarter.h
*
* DESCRIPTION.: This file is used to define the version of libgsgamestarter
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2003/3/29 @ 22:18
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1278
#ifdef DEFVER_LIBGSGAMESTARTER
#define VERSION_LIBGSGAMESTARTER 1278
#endif //DEFVER_LIBGSGAMESTARTER

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgshttp.h
*
* DESCRIPTION.: This file is used to define the version of libgshttp
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 22:37
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1387
#ifdef DEFVER_LIBGSHTTP
#define VERSION_LIBGSHTTP 1387
#endif //DEFVER_LIBGSHTTP

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgslauncher.h
*
* DESCRIPTION.: This file is used to define the version of libgslauncher
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2003/3/30 @ 23:5
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1276
#ifdef DEFVER_LIBGSLAUNCHER
#define VERSION_LIBGSLAUNCHER 1276
#endif //DEFVER_LIBGSLAUNCHER

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgslobbylan.h
*
* DESCRIPTION.: This file is used to define the version of libgslobbylan
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2003/3/29 @ 22:27
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1276
#ifdef DEFVER_LIBGSLOBBYLAN
#define VERSION_LIBGSLOBBYLAN 1276
#endif //DEFVER_LIBGSLOBBYLAN

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsmodule.h
*
* DESCRIPTION.: This file is used to define the version of libgsmodule
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 23:25
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1450
#ifdef DEFVER_LIBGSMODULE
#define VERSION_LIBGSMODULE 1450
#endif //DEFVER_LIBGSMODULE

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsmsclient.h
*
* DESCRIPTION.: This file is used to define the version of libgsmsclient
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 22:42
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1429
#ifdef DEFVER_LIBGSMSCLIENT
#define VERSION_LIBGSMSCLIENT 1429
#endif //DEFVER_LIBGSMSCLIENT

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsnat.h
*
* DESCRIPTION.: This file is used to define the version of libgsnat
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 22:50
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1409
#ifdef DEFVER_LIBGSNAT
#define VERSION_LIBGSNAT 1409
#endif //DEFVER_LIBGSNAT

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgspeergame.h
*
* DESCRIPTION.: This file is used to define the version of libgspeergame
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2003/3/29 @ 22:41
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1276
#ifdef DEFVER_LIBGSPEERGAME
#define VERSION_LIBGSPEERGAME 1276
#endif //DEFVER_LIBGSPEERGAME

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsproxyclient.h
*
* DESCRIPTION.: This file is used to define the version of libgsproxyclient
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 23:27
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1451
#ifdef DEFVER_LIBGSPROXYCLIENT
#define VERSION_LIBGSPROXYCLIENT 1451
#endif //DEFVER_LIBGSPROXYCLIENT

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsregserver.h
*
* DESCRIPTION.: This file is used to define the version of libgsregserver
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 22:59
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1413
#ifdef DEFVER_LIBGSREGSERVER
#define VERSION_LIBGSREGSERVER 1413
#endif //DEFVER_LIBGSREGSERVER

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsresult.h
*
* DESCRIPTION.: This file is used to define the version of libgsresult
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 23:32
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1450
#ifdef DEFVER_LIBGSRESULT
#define VERSION_LIBGSRESULT 1450
#endif //DEFVER_LIBGSRESULT

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsscore.h
*
* DESCRIPTION.: This file is used to define the version of libgsscore
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2003/3/29 @ 22:50
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1245
#ifdef DEFVER_LIBGSSCORE
#define VERSION_LIBGSSCORE 1245
#endif //DEFVER_LIBGSSCORE

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgssocket.h
*
* DESCRIPTION.: This file is used to define the version of libgssocket
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/20 @ 11:41
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1454
#ifdef DEFVER_LIBGSSOCKET
#define VERSION_LIBGSSOCKET 1454
#endif //DEFVER_LIBGSSOCKET

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsthreads.h
*
* DESCRIPTION.: This file is used to define the version of libgsthreads
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 23:41
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1447
#ifdef DEFVER_LIBGSTHREADS
#define VERSION_LIBGSTHREADS 1447
#endif //DEFVER_LIBGSTHREADS

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsutility.h
*
* DESCRIPTION.: This file is used to define the version of libgsutility
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 23:50
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1381
#ifdef DEFVER_LIBGSUTILITY
#define VERSION_LIBGSUTILITY 1381
#endif //DEFVER_LIBGSUTILITY

View File

@@ -0,0 +1,26 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_libgsz.h
*
* DESCRIPTION.: This file is used to define the version of libgsz
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2004/0/19 @ 23:52
* AUTHOR......: gscompile
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
//_LAST_VERSION=1338
#ifdef DEFVER_LIBGSZ
#define VERSION_LIBGSZ 1338
#endif //DEFVER_LIBGSZ

View File

@@ -0,0 +1,306 @@
/***SDOF***********************************************************************
*
* UbiSoft Development Network
* ---------------------------
*
* FILE........: version_manager.h
*
* DESCRIPTION.: This file is used to manage version of linked library module
* in executable.
* The class CModuleInfo manage module information and the
* class CGSVersion manages the version for linked modules.
* This file was generated by a script for version management.
* If you have problems with this file, you should contact
* Guillaume Plante at gplante@ubisoft.com.
*
******************************************************************************
* FILE HISTORY
******************************************************************************
*
* DATE........: 2002/3/25 @ 16:44
* AUTHOR......: gplante
* DESCRIPTION.: Automatic generation
*
***********************************************************************EDOF***/
// length defines
#define LIBSTRINGSIZE 70
#define INTROSTRINGSIZE 150
// generic headers
#include "GSTypes.h"
#include <cstdio>
#include <cstring>
// different library version definition
#include "version_libgschat.h"
#include "version_libgsclient.h"
#include "version_libgsclinkc.h"
#include "version_libgsclinkg.h"
#include "version_libgsgame.h"
#include "version_libgsgamestarter.h"
#include "version_libgslobbylan.h"
#include "version_libgsmsclient.h"
#include "version_libgsregserver.h"
#include "version_libgspeergame.h"
#include "version_libgsscore.h"
#include "version_libgsadmin.h"
#include "version_libgsconnect.h"
#include "version_libgsgameserver.h"
#include "version_libgslauncher.h"
#include "version_libgsmodule.h"
#include "version_libgsproxyclient.h"
#include "version_libgsresult.h"
#include "version_libgssocket.h"
#include "version_libgsthreads.h"
#include "version_libgsutility.h"
#include "version_libgscsp.h"
#include "version_libgsdatacontainer.h"
#include "version_libgsz.h"
#include "version_libgscdkey.h"
#include "version_libgscrypto.h"
#include "version_libgshttp.h"
#include "version_libgsnat.h"
//=============================================================================
// CLASS: CModuleInfo
//
// DESCRIPTION: Manage the module information
//=============================================================================
class CModuleInfo
{
public:
// pointer to the next module class
CModuleInfo *m_Next;
CModuleInfo(GSchar *szModuleName,GSuint uiModuleVersion)
{
m_Next = NULL;
strncpy(m_szModuleName,szModuleName,31);
m_uiModuleVersion = uiModuleVersion;
};
~CModuleInfo()
{
if(m_Next) delete m_Next;
m_Next = NULL;
};
GSchar *GetModuleName(){return m_szModuleName;};
GSuint GetModuleVersion(){return m_uiModuleVersion;};
private:
GSchar m_szModuleName[32];
GSuint m_uiModuleVersion;
};
//=============================================================================
// CLASS: CGSVersion
//
// DESCRIPTION: Manage the module version
//=============================================================================
class CGSVersion
{
public:
CGSVersion()
{
m_ModuleHead = m_ModuleEnd = NULL;
m_ubNbrModule = 0;
#ifdef VERSION_LIBGSCHAT
AddModule("libgschat",VERSION_LIBGSCHAT);
#endif
#ifdef VERSION_LIBGSCLIENT
AddModule("libgsclient",VERSION_LIBGSCLIENT);
#endif
#ifdef VERSION_LIBGSCLINKC
AddModule("libgsclinkc",VERSION_LIBGSCLINKC);
#endif
#ifdef VERSION_LIBGSCLINKG
AddModule("libgsclinkg",VERSION_LIBGSCLINKG);
#endif
#ifdef VERSION_LIBGSGAME
AddModule("libgsgame",VERSION_LIBGSGAME);
#endif
#ifdef VERSION_LIBGSGAMESTARTER
AddModule("libgsgamestarter",VERSION_LIBGSGAMESTARTER);
#endif
#ifdef VERSION_LIBGSLOBBYLAN
AddModule("libgslobbylan",VERSION_LIBGSLOBBYLAN);
#endif
#ifdef VERSION_LIBGSMSCLIENT
AddModule("libgsmsclient",VERSION_LIBGSMSCLIENT);
#endif
#ifdef VERSION_LIBGSREGSERVER
AddModule("libgsregserver",VERSION_LIBGSREGSERVER);
#endif
#ifdef VERSION_LIBGSPEERGAME
AddModule("libgspeergame",VERSION_LIBGSPEERGAME);
#endif
#ifdef VERSION_LIBGSSCORE
AddModule("libgsscore",VERSION_LIBGSSCORE);
#endif
#ifdef VERSION_LIBGSADMIN
AddModule("libgsadmin",VERSION_LIBGSADMIN);
#endif
#ifdef VERSION_LIBGSCONNECT
AddModule("libgsconnect",VERSION_LIBGSCONNECT);
#endif
#ifdef VERSION_LIBGSGAMESERVER
AddModule("libgsgameserver",VERSION_LIBGSGAMESERVER);
#endif
#ifdef VERSION_LIBGSLAUNCHER
AddModule("libgslauncher",VERSION_LIBGSLAUNCHER);
#endif
#ifdef VERSION_LIBGSMODULE
AddModule("libgsmodule",VERSION_LIBGSMODULE);
#endif
#ifdef VERSION_LIBGSPROXYCLIENT
AddModule("libgsproxyclient",VERSION_LIBGSPROXYCLIENT);
#endif
#ifdef VERSION_LIBGSRESULT
AddModule("libgsresult",VERSION_LIBGSRESULT);
#endif
#ifdef VERSION_LIBGSSOCKET
AddModule("libgssocket",VERSION_LIBGSSOCKET);
#endif
#ifdef VERSION_LIBGSTHREADS
AddModule("libgsthreads",VERSION_LIBGSTHREADS);
#endif
#ifdef VERSION_LIBGSUTILITY
AddModule("libgsutility",VERSION_LIBGSUTILITY);
#endif
#ifdef VERSION_LIBGSCSP
AddModule("libgscsp",VERSION_LIBGSCSP);
#endif
#ifdef VERSION_LIBGSDATACONTAINER
AddModule("libgsdatacontainer",VERSION_LIBGSDATACONTAINER);
#endif
#ifdef VERSION_LIBGSCRYPTO
AddModule("libgscrypto",VERSION_LIBGSCRYPTO);
#endif
#ifdef VERSION_LIBGSCDKEY
AddModule("libgscdkey",VERSION_LIBGSCDKEY);
#endif
#ifdef VERSION_LIBGSHTTP
AddModule("libgshttp",VERSION_LIBGSHTTP);
#endif
#ifdef VERSION_LIBGSNAT
AddModule("libgsnat",VERSION_LIBGSNAT);
#endif
}
~CGSVersion()
{
// delete previously stored object
if(m_ModuleHead) delete m_ModuleHead;
m_ModuleHead = m_ModuleEnd = NULL;
}
// print all registered module name and version
GSbool PrintModulesVersion(GSchar *szBuffer = NULL,GSuint *puiBufSize = NULL);
private:
// add a module to the module list
GSvoid AddModule(GSchar *szModuleName,GSuint uiModuleVersion);
CModuleInfo *m_ModuleHead;
CModuleInfo *m_ModuleEnd;
GSubyte m_ubNbrModule;
};
GSvoid CGSVersion::AddModule(GSchar *szModuleName,GSuint uiModuleVersion)
{
CModuleInfo *_modinfo = new CModuleInfo(szModuleName,uiModuleVersion);
++m_ubNbrModule;
if(!m_ModuleHead)
m_ModuleHead = m_ModuleEnd = _modinfo;
else
m_ModuleEnd = m_ModuleEnd->m_Next = _modinfo;
}
GSbool CGSVersion::PrintModulesVersion(GSchar *szBuffer,GSuint *puiBufSize)
{
CModuleInfo *m_ModuleIt = m_ModuleHead;
// in that case, print to stdout
if((!szBuffer)&&(!puiBufSize))
{
printf("\n--- Begin Module Version Output ---\r\n\r\n");
if(!m_ubNbrModule)
{
printf(" - no linked gs library. \r\n");
}
else
{
while(m_ModuleIt != NULL)
{
printf(" - library: %s -> version: %d\r\n",m_ModuleIt->GetModuleName(),
m_ModuleIt->GetModuleVersion());
m_ModuleIt = m_ModuleIt->m_Next;
}
}
printf("\r\n--- End Module Version Output ---\r\n\r\n");
return GS_TRUE;
}
if(puiBufSize)
{
if(szBuffer)
{
sprintf(szBuffer,"--- Begin Module Version Output ---\r\n\r\n");
if(!m_ubNbrModule)
{
strcat(szBuffer," - no linked gs library. \r\n");
}
else
{
while(m_ModuleIt != NULL)
{
GSchar szTemp[LIBSTRINGSIZE];
#ifdef GS_WIN32
_snprintf(szTemp,LIBSTRINGSIZE," - library: %s -> version: %d\r\n",
m_ModuleIt->GetModuleName(),m_ModuleIt->GetModuleVersion());
#else
snprintf(szTemp,LIBSTRINGSIZE," - library: %s -> version: %d\r\n",
m_ModuleIt->GetModuleName(),m_ModuleIt->GetModuleVersion());
#endif
szTemp[LIBSTRINGSIZE-1] = 0;
strcat(szBuffer,szTemp);
m_ModuleIt = m_ModuleIt->m_Next;
}
}
strcat(szBuffer,"\r\n--- End Module Version Output ---\r\n");
return GS_TRUE;
}
else // return the size of the needed buffer
{
*puiBufSize = (INTROSTRINGSIZE+(LIBSTRINGSIZE*m_ubNbrModule));
return GS_TRUE;
}
}
return GS_TRUE;
}