Skip to content

Commit 4885545

Browse files
committed
xrGameSpy, GameSpy: added to linux build
1 parent 42496ef commit 4885545

File tree

11 files changed

+30
-24
lines changed

11 files changed

+30
-24
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
url = https://github.com/OpenXRay/luabind-deboostified.git
77
[submodule "Externals/GameSpy"]
88
path = Externals/GameSpy
9-
url = https://github.com/nitrocaster/GameSpy.git
9+
url = https://github.com/OpenXRay/GameSpy.git
1010
[submodule "Externals/AGS_SDK"]
1111
path = Externals/AGS_SDK
1212
url = https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK.git

Externals/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ include(luajit.cmake)
22
add_subdirectory(luabind)
33
xr_install_file(luabind)
44
add_subdirectory(cximage)
5+
add_subdirectory(GameSpy)
56
#add_subdirectory(lzo)
67
#add_subdirectory(NVTT)
78
add_subdirectory(OPCODE)

Externals/GameSpy

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ add_subdirectory(xrCDB)
77
add_subdirectory(xrCore)
88
add_subdirectory(xrEngine)
99
add_subdirectory(xrGame)
10+
add_subdirectory(xrGameSpy)
1011
add_subdirectory(xrNetServer)
1112
add_subdirectory(xrParticles)
1213
add_subdirectory(xrPhysics)

src/xrGame/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./stalker
6868
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./static_cast_checked_test.cpp")
6969
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./xr_Client_BattlEye.cpp")
7070
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./xr_Server_BattlEye.cpp")
71-
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./best_scores_store.cpp")
7271
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/./stats_submitter.cpp")
7372
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ai/monsters/rats/ai_rat_fsm.cpp")
7473
list(REMOVE_ITEM ${PROJECT_NAME}__SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ui/CExtraContentFilter.cpp")
@@ -117,5 +116,5 @@ set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "
117116
cotire(${PROJECT_NAME})
118117

119118
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
120-
target_link_libraries(${PROJECT_NAME} xrCore xrEngine xrMiscMath luabind xrAPI xrAICore xrUICore xrSound xrScriptEngine cximage ${LUA_LIBRARIES} pugixml xrCDB xrPhysics xrNetServer ${SDL_LIBRARIES})
119+
target_link_libraries(${PROJECT_NAME} xrCore xrEngine xrMiscMath luabind xrAPI xrAICore xrUICore xrSound xrScriptEngine cximage xrGameSpy ${LUA_LIBRARIES} pugixml xrCDB xrPhysics xrNetServer ${SDL_LIBRARIES})
121120
xr_install(${PROJECT_NAME})

src/xrGame/MainMenu.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ CMainMenu::CMainMenu()
116116
{
117117
g_btnHint = new CUIButtonHint();
118118
g_statHint = new CUIButtonHint();
119-
#ifdef WINDOWS
120119
m_pGameSpyFull = new CGameSpy_Full();
120+
#ifdef WINDOWS
121121

122122
for (u32 i = 0; i < u32(ErrMax); i++)
123123
{
@@ -136,9 +136,12 @@ CMainMenu::CMainMenu()
136136
m_pMB_ErrDlgs[DownloadMPMap]->AddCallbackStr(
137137
"button_yes", MESSAGE_BOX_YES_CLICKED, CUIWndCallback::void_function(this, &CMainMenu::OnDownloadMPMap));
138138

139+
#endif
140+
139141
m_account_mngr = new gamespy_gp::account_manager(m_pGameSpyFull->GetGameSpyGP());
140142
m_login_mngr = new gamespy_gp::login_manager(m_pGameSpyFull);
141143
m_profile_store = new gamespy_profile::profile_store(m_pGameSpyFull);
144+
#ifdef WINDOWS
142145
m_stats_submitter = new gamespy_profile::stats_submitter(m_pGameSpyFull);
143146
m_atlas_submit_queue = new atlas_submit_queue(m_stats_submitter);
144147
#endif

src/xrGame/MainMenu.h

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ struct Patch_Dawnload_Progress
3838
shared_str Status;
3939
shared_str FileName;
4040

41-
bool GetInProgress() { return IsInProgress; };
42-
float GetProgress() { return Progress; };
43-
LPCSTR GetStatus() { return Status.c_str(); };
44-
LPCSTR GetFlieName() { return FileName.c_str(); };
41+
bool GetInProgress() { return IsInProgress; }
42+
float GetProgress() { return Progress; }
43+
LPCSTR GetStatus() { return Status.c_str(); }
44+
LPCSTR GetFlieName() { return FileName.c_str(); }
4545
};
4646

4747
class CMainMenu : public IMainMenu,
@@ -71,11 +71,14 @@ class CMainMenu : public IMainMenu,
7171
void ReadTextureInfo();
7272

7373
xr_vector<CUIWindow*> m_pp_draw_wnds;
74-
#ifdef WINDOWS
74+
7575
CGameSpy_Full* m_pGameSpyFull;
7676
gamespy_gp::account_manager* m_account_mngr;
7777
gamespy_gp::login_manager* m_login_mngr;
7878
gamespy_profile::profile_store* m_profile_store;
79+
80+
#ifdef WINDOWS
81+
7982
gamespy_profile::stats_submitter* m_stats_submitter;
8083
atlas_submit_queue* m_atlas_submit_queue;
8184
#endif
@@ -109,11 +112,12 @@ class CMainMenu : public IMainMenu,
109112
Patch_Dawnload_Progress m_sPDProgress;
110113
Patch_Dawnload_Progress* GetPatchProgress() { return &m_sPDProgress; }
111114
void CancelDownload();
115+
gamespy_gp::account_manager* GetAccountMngr() { return m_account_mngr; }
116+
gamespy_gp::login_manager* GetLoginMngr() { return m_login_mngr; }
117+
gamespy_profile::profile_store* GetProfileStore() { return m_profile_store; }
118+
112119
#ifdef WINDOWS
113120
CGameSpy_Full* GetGS() { return m_pGameSpyFull; };
114-
gamespy_gp::account_manager* GetAccountMngr() { return m_account_mngr; };
115-
gamespy_gp::login_manager* GetLoginMngr() { return m_login_mngr; };
116-
gamespy_profile::profile_store* GetProfileStore() { return m_profile_store; };
117121
gamespy_profile::stats_submitter* GetStatsSubmitter() { return m_stats_submitter; };
118122
atlas_submit_queue* GetSubmitQueue() { return m_atlas_submit_queue; };
119123
#endif

src/xrGame/UI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class CUI : public CDialogHolder
3939

4040
CUIGameCustom* UIGame() { return pUIGame; }
4141
void ShowGameIndicators(bool b);
42-
bool GameIndicatorsShown() { return m_bShowGameIndicators; };
42+
bool GameIndicatorsShown() { return m_bShowGameIndicators; }
4343
void ShowCrosshair(bool b);
4444
bool CrosshairShown();
4545

src/xrGame/ui_export_script.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@ ICF static void UIRegistratorScriptExport(lua_State* luaState)
3939
.def("GetCDKey", &CMainMenu::GetCDKeyFromRegistry)
4040
.def("GetPlayerName", &CMainMenu::GetPlayerName)
4141
.def("GetDemoInfo", &CMainMenu::GetDemoInfo)
42-
#ifdef WINDOWS
4342
.def("GetLoginMngr", &CMainMenu::GetLoginMngr)
4443
.def("GetAccountMngr", &CMainMenu::GetAccountMngr)
4544
.def("GetProfileStore", &CMainMenu::GetProfileStore)
46-
#endif
4745
];
4846
module(luaState, "main_menu")
4947
[

src/xrGameSpy/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "
2929
cotire(${PROJECT_NAME})
3030

3131
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
32-
target_link_libraries(${PROJECT_NAME} xrCore xrMiscMath ${SDL_LIBRARIES})
32+
target_link_libraries(${PROJECT_NAME} xrCore xrMiscMath GameSpy ${SDL_LIBRARIES})
3333
xr_install(${PROJECT_NAME})

0 commit comments

Comments
 (0)