unix:修正unix下的编译。

This commit is contained in:
taynpg 2025-05-12 08:25:23 +08:00
parent 418d57a295
commit 1476e9ba49
5 changed files with 7 additions and 2 deletions

View File

@ -12,5 +12,5 @@ ClientCore.cxx
)
add_library(ClientCore STATIC ${MSOURCES})
target_link_libraries(ClientCore PRIVATE wx::base wx::core Protocol Util)
target_link_libraries(ClientCore PRIVATE wx::base wx::core wx::net Protocol Util)
target_include_directories(ClientCore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -1,4 +1,5 @@
#include "Communicate.h"
#include <cstring>
constexpr unsigned char gHeader[] = {0xFF, 0xFE};
constexpr unsigned char gTail[] = {0xFF, 0xFF};

View File

@ -2,6 +2,7 @@
#define HEADERCONTROL_H
#include <wx/wx.h>
#include <memory>
class LogControl;
class ClientCore;

View File

@ -6,7 +6,9 @@ class RelayFileApp : public wxApp
public:
bool OnInit() override
{
#ifdef _WIN32
SetProcessDPIAware();
#endif
loadLocale();
f_ = new UserInterface(_("RelayFile"));
f_->Show();

View File

@ -18,7 +18,8 @@ class MLogFormatter : public wxLogFormatter
public:
wxString Format(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info) const override
{
wxDateTime time(info.timestampMS / 1000);
//wxDateTime time(info.timestampMS / 1000);
wxDateTime time;
time.SetMillisecond(info.timestampMS % 1000);
auto timeStr = time.Format(wxT("%H:%M:%S.%l"));
wxString levelStr;