diff --git a/.vscode/settings.json b/.vscode/settings.json index a27ad62..ed5bb8f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -137,7 +137,8 @@ "stack": "cpp", "valarray": "cpp", "filesystem": "cpp", - "qmainwindow": "cpp" + "qmainwindow": "cpp", + "qlabel": "cpp" }, "editor.tokenColorCustomizations": { "textMateRules": [ diff --git a/Console/CMakeLists.txt b/Console/CMakeLists.txt index 4faa121..b8bf3d0 100644 --- a/Console/CMakeLists.txt +++ b/Console/CMakeLists.txt @@ -12,6 +12,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Network) find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Network) +# include_directories(${PROJECT_BINARY_DIR}/../) add_executable(frelayConsole Console.h Console.cpp main.cpp ../Res/ico.rc) target_link_libraries(frelayConsole PRIVATE Protocol Util ClientCore) target_link_libraries(frelayConsole PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Network) diff --git a/Console/main.cpp b/Console/main.cpp index 4c5fcb3..fedfc05 100644 --- a/Console/main.cpp +++ b/Console/main.cpp @@ -1,11 +1,15 @@ #include #include #include +#include #include "Console.h" int main(int argc, char* argv[]) { + auto ver = QString("%1 %2 on %3").arg(VERSION_NUM, VERSION_GIT_COMMIT, VERSION_GIT_BRANCH); + std::cout << ver.toStdString() << std::endl; + if (argc < 3) { std::cerr << "Usage arg is ip port." << std::endl; return 0; diff --git a/Server/main.cpp b/Server/main.cpp index e05cf29..27fca37 100644 --- a/Server/main.cpp +++ b/Server/main.cpp @@ -1,11 +1,16 @@ #include #include #include +#include +#include #include "Server.h" int main(int argc, char* argv[]) { + auto ver = QString("%1 %2 on %3").arg(VERSION_NUM, VERSION_GIT_COMMIT, VERSION_GIT_BRANCH); + std::cout << ver.toStdString() << std::endl; + int port = 9009; if (argc < 2) { qDebug() << "Usage: frelayServer port.";