diff --git a/.github/workflows/sw.yml b/.github/workflows/sw.yml index 907e5502e..9262606de 100644 --- a/.github/workflows/sw.yml +++ b/.github/workflows/sw.yml @@ -9,6 +9,9 @@ on: paths: - 'source/**' - '.github/workflows/sw.yml' # for test purposes + schedule: + # every day + - cron: 0 0 * * * jobs: windows: @@ -38,7 +41,8 @@ jobs: sudo dnf -y install flex bison cmake which gcc clang clang-tools-extra lld git \ lttng-tools-devel lttng-ust-devel libproxy-devel mesa-libGL-devel mesa-libEGL-devel \ libXfixes-devel libXtst-devel libXext-devel libXrender-devel libX11-devel pulseaudio-libs-devel \ - cups-devel wayland-devel libxkbcommon-devel libXdamage-devel libXrandr-devel + cups-devel wayland-devel libxkbcommon-devel libXdamage-devel libXrandr-devel libXcursor-devel \ + xcb-util-keysyms-devel xcb-util-cursor-devel libxkbcommon-x11-devel xcb-util-wm-devel - uses: egorpugin/sw-action@master - run: ./sw -static build source -compiler gcc - name: Upload Binaries diff --git a/source/base/logging.h b/source/base/logging.h index 197f41e44..1e1ae554c 100644 --- a/source/base/logging.h +++ b/source/base/logging.h @@ -24,6 +24,7 @@ #include #include +#include #include #include diff --git a/source/client/translations/aspia_client_pt.ts b/source/client/translations/aspia_client_pt.ts index 9340d31c0..120fc2fcd 100644 --- a/source/client/translations/aspia_client_pt.ts +++ b/source/client/translations/aspia_client_pt.ts @@ -3202,7 +3202,6 @@ %n seconds - @@ -3210,7 +3209,6 @@ %n minutes - @@ -3218,7 +3216,6 @@ %n hours - @@ -3226,7 +3223,6 @@ %n days - @@ -3384,7 +3380,6 @@ Password can not be empty and should not exceed %n characters. - @@ -3397,7 +3392,6 @@ The password must contain lowercase and uppercase characters, numbers and should not be shorter than %n characters. - @@ -3700,7 +3694,6 @@ %n seconds - @@ -3708,7 +3701,6 @@ %n minutes - @@ -3716,7 +3708,6 @@ %n hours - @@ -3724,7 +3715,6 @@ %n days - diff --git a/source/client/ui/client_settings.cc b/source/client/ui/client_settings.cc index c586ae0b5..8d3559eb9 100644 --- a/source/client/ui/client_settings.cc +++ b/source/client/ui/client_settings.cc @@ -171,7 +171,7 @@ void ClientSettings::setCheckUpdates(bool check) //-------------------------------------------------------------------------------------------------- QString ClientSettings::updateServer() const { - return settings_.value(kUpdateServerParam, DEFAULT_UPDATE_SERVER).toString().toLower(); + return settings_.value(kUpdateServerParam, QString::fromStdU16String(DEFAULT_UPDATE_SERVER)).toString().toLower(); } //-------------------------------------------------------------------------------------------------- diff --git a/source/console/settings.cc b/source/console/settings.cc index f791f4195..17ec3226f 100644 --- a/source/console/settings.cc +++ b/source/console/settings.cc @@ -232,7 +232,7 @@ void Settings::setCheckUpdates(bool check) //-------------------------------------------------------------------------------------------------- QString Settings::updateServer() const { - return settings_.value(kUpdateServerParam, DEFAULT_UPDATE_SERVER).toString().toLower(); + return settings_.value(kUpdateServerParam, QString::fromStdU16String(DEFAULT_UPDATE_SERVER)).toString().toLower(); } //-------------------------------------------------------------------------------------------------- diff --git a/source/sw.cc b/source/sw.cc index aa0b47bdb..a407fae1e 100644 --- a/source/sw.cc +++ b/source/sw.cc @@ -19,7 +19,7 @@ void build(Solution &s) { auto &aspia = s.addProject("aspia", "2.8.0"); aspia += Git("https://github.com/dchapyshev/aspia", "v{v}"); - constexpr auto cppstd = cpp17; + constexpr auto cppstd = cpp20; auto setup_target = [&](auto &t, const String &name, bool add_tests = false, String dir = {}) -> decltype(auto) { if (dir.empty()) @@ -115,14 +115,18 @@ void build(Solution &s) { base -= "peer/stun_server.cc"; base -= "peer/stun_peer.cc"; if (base.getBuildSettings().TargetOS.Type == OSType::Windows) { + base -= "strings/string_util_icu.cc"; base.Public += "UNICODE"_def; base.Public += "WIN32_LEAN_AND_MEAN"_def; base.Public += "NOMINMAX"_def; + } else { + base -= "strings/string_util_win.cc"; } base.Public += protocol; base.Public += "org.sw.demo.qtproject.qt.base.widgets" QT_VERSION ""_dep; base.Public += "org.sw.demo.qtproject.qt.base.network" QT_VERSION ""_dep; base.Public += "org.sw.demo.qtproject.qt.base.xml" QT_VERSION ""_dep; + base.Public += "org.sw.demo.qtproject.qt.labs.vstools.natvis.qt6"_dep; base.Public += "org.sw.demo.boost.align"_dep; base.Public += "org.sw.demo.imneme.pcg_cpp-master"_dep; base.Public += "org.sw.demo.chriskohlhoff.asio"_dep; @@ -135,6 +139,7 @@ void build(Solution &s) { base.Public += "org.sw.demo.xiph.opus"_dep; base.Public += "org.sw.demo.sqlite3"_dep; base.Public += "org.sw.demo.badger.curl.libcurl"_dep; + base.Public += "org.sw.demo.fmt"_dep; if (base.getBuildSettings().TargetOS.Type == OSType::Windows) { base.Public += "com.Microsoft.Windows.SDK.winrt"_dep; base += @@ -272,8 +277,10 @@ void build(Solution &s) { } // - auto &client_core = add_lib("client"); + auto &client = aspia.addExecutable("client"); + auto &client_core = client.addStaticLibrary("core"); { + setup_target(client_core, "client"); client_core += ".*"_rr; client_core.Public += common; client_core.Public += "org.sw.demo.qtproject.qt.base.printsupport" QT_VERSION ""_dep; @@ -281,19 +288,19 @@ void build(Solution &s) { client_core.Public += "org.sw.demo.qtproject.qt.base.plugins.printsupport.windows" QT_VERSION ""_dep; else if (client_core.getBuildSettings().TargetOS.Type == OSType::Linux) client_core.Public += "org.sw.demo.qtproject.qt.base.plugins.printsupport.cups" QT_VERSION ""_dep; - qt_progs_and_tr(client_core); + qt_progs_and_tr(client_core, "client"); } - auto setup_exe = [&](auto &t) -> decltype(auto) { + auto setup_exe = [&](auto &t, bool console = false) -> decltype(auto) { t += cppstd; - if (t.getBuildSettings().TargetOS.Type == OSType::Windows) { + if (t.getBuildSettings().TargetOS.Type == OSType::Windows && !console) { if (auto L = t.getSelectedTool()->template as(); L) L->Subsystem = vs::Subsystem::Windows; t += "org.sw.demo.qtproject.qt.base.winmain" QT_VERSION ""_dep; } if (t.getBuildSettings().TargetOS.Type == OSType::Windows) { t.Public += "org.sw.demo.qtproject.qt.base.plugins.platforms.windows" QT_VERSION ""_dep; - t.Public += "org.sw.demo.qtproject.qt.base.plugins.styles.windowsvista" QT_VERSION ""_dep; + t.Public += "org.sw.demo.qtproject.qt.base.plugins.styles.modernwindows" QT_VERSION ""_dep; } if (t.getBuildSettings().TargetOS.Type == OSType::Linux) { t.Public += "org.sw.demo.qtproject.qt.wayland.plugins.platforms.qwayland.generic" QT_VERSION ""_dep; @@ -307,8 +314,8 @@ void build(Solution &s) { } return t; }; - auto add_exe = [&](auto &base, const String &name) -> decltype(auto) { - return setup_exe(base.addExecutable(name)); + auto add_exe = [&](auto &base, const String &name, bool console = false) -> decltype(auto) { + return setup_exe(base.addExecutable(name), console); }; // @@ -317,7 +324,8 @@ void build(Solution &s) { console.Public += client_core, qt_base; qt_progs_and_tr(console); - auto &client = add_exe(aspia, "client_exe"); + // client + setup_exe(client); client += "client/client_entry_point.cc"; client += "client/client.rc"; client += client_core, qt_base; @@ -333,13 +341,15 @@ void build(Solution &s) { core.Public += common, qt_base; core.Public += "org.sw.demo.boost.property_tree"_dep; if (core.getBuildSettings().TargetOS.Type == OSType::Windows) { + core.Public += "com.Microsoft.VisualStudio.VC.ATLMFC"_dep; + core.Public += "org.sw.demo.wtl"_dep; core += "DXGI.lib"_slib; core += "d3d11.lib"_slib; } qt_progs_and_tr2(core); if (core.getBuildSettings().TargetOS.Type == OSType::Windows) { core.Public += "org.sw.demo.qtproject.qt.base.plugins.platforms.windows" QT_VERSION ""_dep; - core.Public += "org.sw.demo.qtproject.qt.base.plugins.styles.windowsvista" QT_VERSION ""_dep; + core.Public += "org.sw.demo.qtproject.qt.base.plugins.styles.modernwindows" QT_VERSION ""_dep; } setup_exe(host); @@ -347,14 +357,23 @@ void build(Solution &s) { host += "host/ui/host.rc"; host += core; - auto &service = add_exe(host, "service"); + auto &service = add_exe(host, "service", true); service += "host/service_entry_point.cc"; service += "host/service.rc"; service += core; - auto &desktop_agent = add_exe(aspia, "desktop_agent"); + auto &desktop_agent = add_exe(host, "desktop_agent"); desktop_agent += "host/desktop_agent_entry_point.cc"; desktop_agent += "host/desktop_agent.rc"; desktop_agent += core; + + auto &file_transfer_agent = add_exe(host, "file_transfer_agent"); + file_transfer_agent += "host/file_transfer_agent_entry_point.cc"; + file_transfer_agent += "host/file_transfer_agent.rc"; + file_transfer_agent += core; + + // integrity + // find . -name "*.cc" | xargs grep "aspia_.*\?\.exe\"" {} + // core.patch() } }