@@ -80,12 +80,14 @@ CMainMenu::CMainMenu()
8080 m_deactivated_frame = 0 ;
8181
8282 m_sPatchURL = " " ;
83+ #ifdef WINDOWS
8384 m_pGameSpyFull = NULL ;
8485 m_account_mngr = NULL ;
8586 m_login_mngr = NULL ;
8687 m_profile_store = NULL ;
8788 m_stats_submitter = NULL ;
8889 m_atlas_submit_queue = NULL ;
90+ #endif
8991
9092 m_sPDProgress.IsInProgress = false ;
9193 m_downloaded_mp_map_url._set (" " );
@@ -103,6 +105,7 @@ CMainMenu::CMainMenu()
103105 {
104106 g_btnHint = new CUIButtonHint ();
105107 g_statHint = new CUIButtonHint ();
108+ #ifdef WINDOWS
106109 m_pGameSpyFull = new CGameSpy_Full ();
107110
108111 for (u32 i = 0 ; i < u32 (ErrMax); i++)
@@ -127,6 +130,7 @@ CMainMenu::CMainMenu()
127130 m_profile_store = new gamespy_profile::profile_store (m_pGameSpyFull);
128131 m_stats_submitter = new gamespy_profile::stats_submitter (m_pGameSpyFull);
129132 m_atlas_submit_queue = new atlas_submit_queue (m_stats_submitter);
133+ #endif
130134 }
131135
132136 Device.seqFrame .Add (this , REG_PRIORITY_LOW - 1000 );
@@ -140,13 +144,15 @@ CMainMenu::~CMainMenu()
140144 xr_delete (m_startDialog);
141145 g_pGamePersistent->m_pMainMenu = NULL ;
142146
147+ #ifdef WINDOWS
143148 xr_delete (m_account_mngr);
144149 xr_delete (m_login_mngr);
145150 xr_delete (m_profile_store);
146151 xr_delete (m_stats_submitter);
147152 xr_delete (m_atlas_submit_queue);
148153
149154 xr_delete (m_pGameSpyFull);
155+ #endif
150156
151157 xr_delete (m_demo_info_loader);
152158 delete_data (m_pMB_ErrDlgs);
@@ -521,6 +527,7 @@ void CMainMenu::OnFrame()
521527 Console->Show ();
522528 }
523529
530+ #ifdef WINDOWS
524531 if (IsActive () || m_sPDProgress.IsInProgress )
525532 {
526533 GSUpdateStatus status = m_pGameSpyFull->Update ();
@@ -534,6 +541,7 @@ void CMainMenu::OnFrame()
534541 }
535542 m_atlas_submit_queue->update ();
536543 }
544+ #endif
537545
538546 if (IsActive ())
539547 {
@@ -629,6 +637,7 @@ void CMainMenu::OnPatchCheck(bool success, LPCSTR VersionName, LPCSTR URL)
629637
630638void CMainMenu::OnDownloadPatch (CUIWindow*, void *)
631639{
640+ #ifdef WINDOWS
632641 CGameSpy_Available GSA;
633642 shared_str result_string;
634643 if (!GSA.CheckAvailableServices (result_string))
@@ -643,9 +652,7 @@ void CMainMenu::OnDownloadPatch(CUIWindow*, void*)
643652
644653 string4096 FilePath = " " ;
645654 char * FileName = NULL ;
646- #ifndef LINUX // FIXME!!!
647655 GetFullPathName (fileName, 4096 , FilePath, &FileName);
648- #endif
649656 string_path fname;
650657 if (FS.path_exist (" $downloads$" ))
651658 {
@@ -665,6 +672,7 @@ void CMainMenu::OnDownloadPatch(CUIWindow*, void*)
665672 progressCallback.bind (this , &CMainMenu::OnDownloadPatchProgress);
666673 m_pGameSpyFull->GetGameSpyHTTP ()->DownloadFile (
667674 *m_sPatchURL, *m_sPatchFileName, completionCallback, progressCallback);
675+ #endif
668676}
669677
670678void CMainMenu::OnDownloadPatchResult (bool success)
@@ -724,8 +732,10 @@ void CMainMenu::OnRunDownloadedPatch(CUIWindow*, void*)
724732
725733void CMainMenu::CancelDownload ()
726734{
735+ #ifdef WINDOWS
727736 m_pGameSpyFull->GetGameSpyHTTP ()->StopDownload ();
728737 m_sPDProgress.IsInProgress = false ;
738+ #endif
729739}
730740
731741void CMainMenu::SetNeedVidRestart () { m_Flags.set (flNeedVidRestart, TRUE ); }
@@ -781,6 +791,7 @@ LPCSTR DelHyphens(LPCSTR c)
781791
782792bool CMainMenu::IsCDKeyIsValid ()
783793{
794+ #ifdef WINDOWS
784795 if (!m_pGameSpyFull || !m_pGameSpyFull->GetGameSpyHTTP ())
785796 return false ;
786797 string64 CDKey = " " ;
@@ -799,6 +810,9 @@ bool CMainMenu::IsCDKeyIsValid()
799810 return true ;
800811 };
801812 return false ;
813+ #else
814+ return true ;
815+ #endif
802816}
803817
804818bool CMainMenu::ValidateCDKey ()
@@ -831,12 +845,15 @@ void CMainMenu::OnConnectToMasterServerOkClicked(CUIWindow*, void*) { Hide_CTMS_
831845LPCSTR CMainMenu::GetGSVer ()
832846{
833847 static string256 buff;
848+ #ifdef WINDOWS
834849 xr_strcpy (buff, GetGameVersion ());
850+ #endif
835851 return buff;
836852}
837853
838854LPCSTR CMainMenu::GetPlayerName ()
839855{
856+ #ifdef WINDOWS
840857 gamespy_gp::login_manager* l_mngr = GetLoginMngr ();
841858 gamespy_gp::profile const * tmp_prof = l_mngr ? l_mngr->get_current_profile () : NULL ;
842859
@@ -845,6 +862,7 @@ LPCSTR CMainMenu::GetPlayerName()
845862 m_player_name = tmp_prof->unique_nick ();
846863 }
847864 else
865+ #endif
848866 {
849867 string512 name;
850868 GetPlayerName_FromRegistry (name, sizeof (name));
0 commit comments