[SCM] single/multiplayer lobby for the Spring RTS engine branch, master, updated. debian/0.139-1-13-g845ab2b
Jan Dittberner
jandd at debian.org
Tue May 22 18:56:07 UTC 2012
The following commit has been merged in the master branch:
commit b67038d0961bdfb6cd3a1dcf33c24eb43bd5054c
Author: Jan Dittberner <jandd at debian.org>
Date: Mon May 21 22:33:49 2012 +0200
Imported Upstream version 0.147
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 479667f..bd330f9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -165,7 +165,7 @@ ENDIF(WIN32)
IF( OPTION_TORRENT_SYSTEM )
IF( NOT WIN32)
- SET ( LIBTORRENT_MIN_VERSION 0.13 )
+ SET ( LIBTORRENT_MIN_VERSION 0.14 )
pkg_check_modules( LIBTORRENT libtorrent-rasterbar>=${LIBTORRENT_MIN_VERSION} )
IF( LIBTORRENT_FOUND )
INCLUDE_DIRECTORIES( ${LIBTORRENT_INCLUDE_DIRS} )
@@ -178,7 +178,7 @@ IF( OPTION_TORRENT_SYSTEM )
IF( Boost_FOUND )
link_directories( ${Boost_LIB_DIR} )
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
- SET( SL_BOOST_LIBS boost_system-mt )
+ SET( SL_BOOST_LIBS boost_system )
ELSE()
MESSAGE( FATAL_ERROR "boost library not found! Please install the package or toggle OPTION_TORRENT_SYSTEM to OFF")
ENDIF()
@@ -230,7 +230,10 @@ IF(WIN32)
SET(StandAloneSettings ${StandAloneSettings} src/settings++/settings.rc)
ELSE(WIN32)
# If we don't build for windows, include some source code checks as pre-build step.
- ADD_CUSTOM_TARGET(test_susynclib ALL COMMAND tools/test-susynclib.awk src/springunitsynclib.cpp WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
+ FIND_PROGRAM(AWKBIN awk)
+ IF(AWKBIN)
+ ADD_CUSTOM_TARGET(test_susynclib ALL COMMAND ${AWKBIN} -f tools/test-susynclib.awk src/springunitsynclib.cpp WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
+ ENDIF(AWKBIN)
ENDIF(WIN32)
#----------------------------------------------------------------------------------------------------
diff --git a/springlobby_config.h b/springlobby_config.h
index f4e612b..b9a0637 100644
--- a/springlobby_config.h
+++ b/springlobby_config.h
@@ -4,6 +4,6 @@
#undef VERSION
/* the git tag / commit we build from */
-#define VERSION "0.144"
+#define VERSION "0.147"
#endif /* SPRINGLOBBY_HEADERGUARD_CONFIG_H */
diff --git a/src/battlelistctrl.cpp b/src/battlelistctrl.cpp
index f77ea0f..5721e2d 100644
--- a/src/battlelistctrl.cpp
+++ b/src/battlelistctrl.cpp
@@ -103,7 +103,8 @@ wxString BattleListCtrl::GetItemText(long item, long column) const
case 7: return wxFormat(_T("%d") ) % int(battle.GetSpectators());
case 8: return wxFormat(_T("%d") ) % (int(battle.GetNumUsers()) - int(battle.GetSpectators()));
case 9: return wxFormat(_T("%d") ) % int(battle.GetMaxPlayers());
- case 10: return ( wxDateTime(battle.GetBattleRunningTime()).FormatISOTime() );
+ case 10: return ( wxTimeSpan(0/*h*/,0/*m*/,
+ battle.GetBattleRunningTime()).Format(_T("%H:%M")) );
}
}
diff --git a/src/chatlog.cpp b/src/chatlog.cpp
index c6fd2d5..ea4666c 100644
--- a/src/chatlog.cpp
+++ b/src/chatlog.cpp
@@ -252,7 +252,7 @@ find_tail_sequences(int fd, const char* bytes, size_t bytes_length, size_t count
if ( strncmp(source, "##", 2) != 0 ) {
out.Insert(wxString(L'\0', 0), 0);
wxLogMessage(_T("ChatLog::find_tail_sequences: fetching write buffer for %lu bytes"), sizeof(wxChar) * (line_length + 1));
- #if !defined(HAVE_WX28) || defined(SL_QT_MODE)
+ #if !defined(HAVE_WX28) || defined(SL_QT_MODE) || wxUSE_STL
wxStringBufferLength outzero_buf(out[0], sizeof(wxChar) * (line_length + 1));
wxConvUTF8.ToWChar(outzero_buf, line_length, source);
outzero_buf.SetLength(line_length);
diff --git a/src/playback/replaylist.cpp b/src/playback/replaylist.cpp
index 9002a3c..88001d9 100644
--- a/src/playback/replaylist.cpp
+++ b/src/playback/replaylist.cpp
@@ -59,7 +59,7 @@ bool ReplayList::GetReplayInfos (const wxString& ReplayPath, Replay& ret ) const
wxString FileName = ReplayPath.AfterLast( wxFileName::GetPathSeparator() ); // strips file path
FileName = FileName.BeforeLast( _T('.') ); //strips the file extension;
- ret.date_string = FileName.BeforeFirst(_T('_'));
+ wxString date_string = FileName.BeforeFirst(_T('_'));
FileName = FileName.AfterFirst(_T('_'));
FileName = FileName.AfterFirst(_T('_')); // strips hours minutes seconds informatiom
@@ -79,6 +79,10 @@ bool ReplayList::GetReplayInfos (const wxString& ReplayPath, Replay& ret ) const
ret.ModName = ret.battle.GetHostModName();
ret.battle.SetBattleType( BT_Replay );
+ //getting this from filename seems more reliable than from demoheader
+ wxFormat date_format(_T("%s-%s-%s"));
+ ret.date_string = date_format % date_string.SubString(0,3)
+ % date_string.SubString(4,5) % date_string.SubString(6,7);
return true;
}
diff --git a/src/reconnectdialog.cpp b/src/reconnectdialog.cpp
index 2827d75..e1b1aa1 100644
--- a/src/reconnectdialog.cpp
+++ b/src/reconnectdialog.cpp
@@ -67,7 +67,7 @@ void ReconnectDialog::OnTryNext ( wxCommandEvent& /*event*/ )
EndModal( wxID_NO );
}
-void ReconnectDialog::OnQuit(GlobalEvents::GlobalEventData data)
+void ReconnectDialog::OnQuit(GlobalEvents::GlobalEventData /*data*/)
{
EndModal( wxID_CANCEL );
}
diff --git a/src/serverevents.cpp b/src/serverevents.cpp
index 1c81b28..fac5694 100644
--- a/src/serverevents.cpp
+++ b/src/serverevents.cpp
@@ -41,7 +41,8 @@ END_EVENT_TABLE()
void ServerEvents::OnConnected( const wxString& server_name, const wxString& server_ver, bool supported, const wxString& server_spring_ver, bool /*unused*/ )
{
wxLogDebugFunc( server_ver + _T(" ") + server_spring_ver );
- m_serv.SetRequiredSpring( server_spring_ver );
+ //Server version will include patchlevel from release 89 onwards
+ m_serv.SetRequiredSpring( server_spring_ver.BeforeFirst('.') );
ui().OnConnected( m_serv, server_name, server_ver, supported );
m_serv.Login();
}
diff --git a/src/settings++/hotkeys/CommandOrderDlg.h b/src/settings++/hotkeys/CommandOrderDlg.h
index 93b8a0d..2ebe78e 100644
--- a/src/settings++/hotkeys/CommandOrderDlg.h
+++ b/src/settings++/hotkeys/CommandOrderDlg.h
@@ -5,8 +5,6 @@
#include "HotkeyTypes.h"
#include <wx/string.h>
-class CmdSet;
-
class CommandOrderDlg : public CommandOrderDlgBase
{
public:
diff --git a/src/settings++/hotkeys/HotkeyTypes.h b/src/settings++/hotkeys/HotkeyTypes.h
index cf774d7..9eb8bc7 100644
--- a/src/settings++/hotkeys/HotkeyTypes.h
+++ b/src/settings++/hotkeys/HotkeyTypes.h
@@ -6,8 +6,14 @@
#include <vector>
#include <wx/string.h>
+#include <wx/hashmap.h>
+#include <wx/hashset.h>
#include "KeynameConverter.h"
+class wxCmd;
+//added by vbs
+WX_DECLARE_HASH_SET(int, wxIntegerHash, wxIntegerEqual, IdSet);
+WX_DECLARE_HASH_SET(wxCmd*, wxPointerHash, wxPointerEqual, CmdSet);
typedef std::pair<wxString, wxString> key_command;
typedef std::set<key_command> key_command_set;
diff --git a/src/tasserver.cpp b/src/tasserver.cpp
index 0eaf5a0..4a73893 100644
--- a/src/tasserver.cpp
+++ b/src/tasserver.cpp
@@ -454,7 +454,7 @@ void TASServer::Login()
{
wxLogDebugFunc( _T("") );
wxString pass = GetPasswordHash( m_pass );
- wxString protocol = _T("\t") + TowxString( m_crc.GetCRC() );
+ wxString protocol = TowxString( m_crc.GetCRC() );
wxString localaddr;
localaddr = m_sock->GetLocalAddress();
if ( localaddr.IsEmpty() ) localaddr = _T("*");
@@ -2609,4 +2609,3 @@ IBattle::GameType IntToGameType( int gt )
};
return IBattle::GT_ComContinue;
}
-
diff --git a/src/torrentwrapper.cpp b/src/torrentwrapper.cpp
index 36a1f65..72e7aeb 100644
--- a/src/torrentwrapper.cpp
+++ b/src/torrentwrapper.cpp
@@ -379,9 +379,13 @@ TorrentWrapper::DownloadRequestStatus TorrentWrapper::AddTorrent( const PlasmaRe
try {
// the torrent_info is stored in an intrusive_ptr
boost::filesystem::path torfile_b_path( info.m_local_torrent_filepath.mb_str() );
- p.ti = new libtorrent::torrent_info( torfile_b_path );
+#if LIBTORRENT_VERSION_NUM < 1600
+ p.ti = new libtorrent::torrent_info( torfile_b_path );
+#else
+ p.ti = new libtorrent::torrent_info( torfile_b_path.string() );
+#endif
wxString dl_dir_path = sett().GetTorrentDataDir().GetFullPath() + wxFileName::GetPathSeparator();
- p.save_path = boost::filesystem::path( dl_dir_path.mb_str() );
+ p.save_path = boost::filesystem::path( dl_dir_path.mb_str() ).string();
}
catch ( std::exception& exc ) {
wxLogMessage( _T("torrent has invalid encoding") );
@@ -493,12 +497,12 @@ void TorrentWrapper::HandleCompleted()
wxString dest_filename = sett().GetCurrentUsedDataDir() + wxFileName::GetPathSeparator() +
getDataSubdirForType( convertMediaType( info.m_type ) ) +
wxFileName::GetPathSeparator() +
- TowxString( handle.get_torrent_info().file_at( 0 ).path.string() );
+ TowxString( handle.get_torrent_info().file_at( 0 ).path );
if ( !wxFileExists( dest_filename ) )
{
- wxString source_path = TowxString( handle.save_path().string() ) +
+ wxString source_path = TowxString( handle.save_path() ) +
wxFileName::GetPathSeparator() +
- TowxString( handle.get_torrent_info().file_at( 0 ).path.string() );
+ TowxString( handle.get_torrent_info().file_at( 0 ).path );
wxString dest_path = wxPathOnly( dest_filename );
if ( !wxDirExists( dest_path ) )
wxMkdir( dest_path );
diff --git a/src/torrentwrapper.h b/src/torrentwrapper.h
index dc6a247..56aaf93 100644
--- a/src/torrentwrapper.h
+++ b/src/torrentwrapper.h
@@ -3,8 +3,6 @@
#ifndef NO_TORRENT_SYSTEM
-#define BOOST_FILESYSTEM_VERSION 2
-
#include <wx/arrstr.h>
#include <wx/event.h>
diff --git a/src/wxkeybinder/keybinder.h b/src/wxkeybinder/keybinder.h
index 8508bf4..39d45b0 100644
--- a/src/wxkeybinder/keybinder.h
+++ b/src/wxkeybinder/keybinder.h
@@ -27,7 +27,7 @@
#include "wx/hashset.h"
#include "wx/checkbox.h"
-
+#include "../settings++/hotkeys/HotkeyTypes.h"
#include "../settings++/hotkeys/CommandOrderDlg.h"
@@ -686,11 +686,9 @@ private:
#define wxADD_KEYBINDER_SUPPORT() /* expand to nothing */
#endif
-
//added by vbs
-WX_DECLARE_HASH_SET(int, wxIntegerHash, wxIntegerEqual, IdSet);
-WX_DECLARE_HASH_SET(wxCmd*, wxPointerHash, wxPointerEqual, CmdSet);
-
+//WX_DECLARE_HASH_SET(int, wxIntegerHash, wxIntegerEqual, IdSet);
+//WX_DECLARE_HASH_SET(wxCmd*, wxPointerHash, wxPointerEqual, CmdSet);
//! This is the real keybinder. This object is an event handler which
//! can be #Attach()ed to any wxWindow to intercept the keypresses
--
single/multiplayer lobby for the Spring RTS engine
More information about the Pkg-games-commits
mailing list