From 318a794fa3c5eeb90cea3f24ea056d04823138c2 Mon Sep 17 00:00:00 2001 From: taynpg Date: Tue, 1 Apr 2025 16:51:30 +0800 Subject: [PATCH] =?UTF-8?q?config=EF=BC=9A=E4=B8=80=E4=B8=AAgui=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 3 ++- gui/CMakeLists.txt | 17 +++++++++++++++++ gui/main.cxx | 4 ++++ gui/mainframe.cxx | 6 ++++++ gui/mainframe.h | 12 ++++++++++++ 5 files changed, 41 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 75fa448..3c8ddef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,4 +17,5 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE} add_subdirectory(util) add_subdirectory(server-core) -add_subdirectory(server) \ No newline at end of file +add_subdirectory(server) +add_subdirectory(gui) \ No newline at end of file diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index e69de29..0f84405 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.16) + +project(gtransm LANGUAGES CXX) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +find_package(wxWidgets CONFIG REQUIRED) + +set(PSOURCES +main.cxx +mainframe.cxx +mainframe.h +) + +add_executable(gtransm ${PSOURCES}) +target_link_libraries(gtransm PRIVATE wx::base wx::core) +set_target_properties(gtransm PROPERTIES WIN32_EXECUTABLE TRUE) \ No newline at end of file diff --git a/gui/main.cxx b/gui/main.cxx index e69de29..9f405b5 100644 --- a/gui/main.cxx +++ b/gui/main.cxx @@ -0,0 +1,4 @@ +#include "mainframe.h" + +IMPLEMENT_APP(CMainFrame); +DECLARE_APP(CMainFrame); \ No newline at end of file diff --git a/gui/mainframe.cxx b/gui/mainframe.cxx index e69de29..d3a5970 100644 --- a/gui/mainframe.cxx +++ b/gui/mainframe.cxx @@ -0,0 +1,6 @@ +#include "mainframe.h" + +bool CMainFrame::OnInit() +{ + return false; +} \ No newline at end of file diff --git a/gui/mainframe.h b/gui/mainframe.h index e69de29..a07ec11 100644 --- a/gui/mainframe.h +++ b/gui/mainframe.h @@ -0,0 +1,12 @@ +#ifndef MAINFRAME_H +#define MAINFRAME_H + +#include + +class CMainFrame : public wxApp +{ +public: + bool OnInit() override; +}; + +#endif \ No newline at end of file