ver: version print.
This commit is contained in:
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -137,7 +137,8 @@
|
|||||||
"stack": "cpp",
|
"stack": "cpp",
|
||||||
"valarray": "cpp",
|
"valarray": "cpp",
|
||||||
"filesystem": "cpp",
|
"filesystem": "cpp",
|
||||||
"qmainwindow": "cpp"
|
"qmainwindow": "cpp",
|
||||||
|
"qlabel": "cpp"
|
||||||
},
|
},
|
||||||
"editor.tokenColorCustomizations": {
|
"editor.tokenColorCustomizations": {
|
||||||
"textMateRules": [
|
"textMateRules": [
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Network)
|
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Network)
|
||||||
find_package(Qt${QT_VERSION_MAJOR} 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)
|
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 Protocol Util ClientCore)
|
||||||
target_link_libraries(frelayConsole PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Network)
|
target_link_libraries(frelayConsole PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Network)
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <Util.h>
|
#include <Util.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <fversion.h>
|
||||||
|
|
||||||
#include "Console.h"
|
#include "Console.h"
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
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) {
|
if (argc < 3) {
|
||||||
std::cerr << "Usage arg is ip port." << std::endl;
|
std::cerr << "Usage arg is ip port." << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <Util.h>
|
#include <Util.h>
|
||||||
|
#include <fversion.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
#include "Server.h"
|
#include "Server.h"
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
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;
|
int port = 9009;
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
qDebug() << "Usage: frelayServer port.";
|
qDebug() << "Usage: frelayServer port.";
|
||||||
|
|||||||
Reference in New Issue
Block a user