commit 1443f14fb3ec26ebc85fddbbbafe96d9fe9ca0ad Author: taynpg Date: Thu Apr 17 20:10:00 2025 +0800 init version. diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..36e4997 --- /dev/null +++ b/.clang-format @@ -0,0 +1,17 @@ +BasedOnStyle: LLVM +IndentWidth: 4 +PointerAlignment: Left +AccessModifierOffset: -4 +BreakBeforeBraces: Custom +BraceWrapping: + AfterFunction: true + AfterClass: true +Cpp11BracedListStyle: true +ReflowComments: true +SpacesBeforeTrailingComments: 3 +TabWidth: 4 +ConstructorInitializerAllOnOneLineOrOnePerLine: true +ColumnLimit: 130 +AllowShortBlocksOnASingleLine: Never +AllowShortFunctionsOnASingleLine: None +AllowShortEnumsOnASingleLine: false diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..03b6eee --- /dev/null +++ b/.gitignore @@ -0,0 +1,45 @@ +# Prerequisites +*.d +.idea +cmake-build-* + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +!lebo_motor.lib +!lebo_motor.dll +!liblebo_motor.so + +# Executables +*.exe +*.out +*.app +build +*.user +compile_commands.json +.vs +out +.cache +CMakeLists.txt.* \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..ed230d8 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,38 @@ +{ + "files.autoSave": "onFocusChange", + "editor.fontSize": 14, + "editor.fontFamily": "'Source Code Pro', 'Source Code Pro', 'Source Code Pro'", + "terminal.integrated.fontFamily": "Source Code Pro", + "cmake.configureOnOpen": true, + "cmake.debugConfig": { + "console": "integratedTerminal", + "setupCommands": [ + { + "description": "-gdb-set charset utf-8", + "text": "-gdb-set charset UTF-8" + }, + { + "description": "Enable gdb pretty-printing", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ], + //"visualizerFile": "${workspaceRoot}/.vscode/qt6.natvis", + "args": [ + ] + }, + // "cmake.configureSettings": { + // "CMAKE_TOOLCHAIN_FILE": "${env:VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" + // }, + "cmake.options.statusBarVisibility": "visible", + "cmake.generator": "Ninja", + "C_Cpp.default.compileCommands": "${workspaceRoot}/build/compile_commands.json", + "C_Cpp.default.cppStandard": "c++17", + "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools", + "editor.inlayHints.enabled": "off", + "editor.unicodeHighlight.allowedLocales": { + "ja": true, + "zh-hant": true, + "zh-hans": true + } +} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..15905a3 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.16) + +project(MiniToolSets LANGUAGES CXX) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(WXWIDGETS_DIR "D:/Program/Dev/wxWidgets") +set(CMAKE_DEBUG_POSTFIX "d") +message(STATUS "System: ${CMAKE_SYSTEM_NAME}") +message(STATUS "Compiler CXX ID: ${CMAKE_CXX_COMPILER_ID}") + +set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE}) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/) + +add_subdirectory(ParamMatchCnt) \ No newline at end of file diff --git a/ParamMatchCnt/CMakeLists.txt b/ParamMatchCnt/CMakeLists.txt new file mode 100644 index 0000000..300d97f --- /dev/null +++ b/ParamMatchCnt/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.16) + +project(ParamMatchCnt LANGUAGES CXX) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(CMAKE_PREFIX_PATH +${CMAKE_PREFIX_PATH} +${WXWIDGETS_DIR} +) + +if (MSVC) +add_compile_options(/utf-8) +endif() + +set(PSOURCES +mainframe.h +mainframe.cxx +main.cxx +) + +find_package(wxWidgets CONFIG REQUIRED) +add_executable(ParamMatchCnt ${PSOURCES}) +target_link_libraries(ParamMatchCnt PRIVATE wx::core wx::base) +set_target_properties(ParamMatchCnt PROPERTIES WIN32_EXECUTABLE TRUE) \ No newline at end of file diff --git a/ParamMatchCnt/main.cxx b/ParamMatchCnt/main.cxx new file mode 100644 index 0000000..82d4206 --- /dev/null +++ b/ParamMatchCnt/main.cxx @@ -0,0 +1,15 @@ +#include "mainframe.h" + +class ParamMatchCntApp : public wxApp +{ +public: + virtual bool OnInit() + { + MainFrame* frame = new MainFrame(wxT("ParamMatchCnt")); + frame->Show(true); + return true; + } +}; + +wxIMPLEMENT_APP(ParamMatchCntApp); +DECLARE_APP(ParamMatchCntApp); \ No newline at end of file diff --git a/ParamMatchCnt/mainframe.cxx b/ParamMatchCnt/mainframe.cxx new file mode 100644 index 0000000..825982f --- /dev/null +++ b/ParamMatchCnt/mainframe.cxx @@ -0,0 +1,14 @@ +#include "mainframe.h" + +MainFrame::MainFrame(const wxString& title) : wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(800, 600)) +{ +} + +MainFrame::~MainFrame() +{ +} + +bool MainFrame::Init() +{ + return false; +} \ No newline at end of file diff --git a/ParamMatchCnt/mainframe.h b/ParamMatchCnt/mainframe.h new file mode 100644 index 0000000..e111bd2 --- /dev/null +++ b/ParamMatchCnt/mainframe.h @@ -0,0 +1,19 @@ +#ifndef MAINFRAME_H +#define MAINFRAME_H + +#include + +class MainFrame : public wxFrame +{ +public: + MainFrame(const wxString& title); + ~MainFrame(); + +public: + bool Init(); + +private: + +}; + +#endif // MAINFRAME_H \ No newline at end of file diff --git a/version.h.in b/version.h.in new file mode 100644 index 0000000..d06491c --- /dev/null +++ b/version.h.in @@ -0,0 +1,9 @@ +#ifndef VERSION_H +#define VERSION_H + +#define VERSION_GIT_COMMIT "@VERSION_GIT_HASH@" +#define VERSION_GIT_BRANCH "@VERSION_GIT_BRANCH@" +#define VERSION_NUM "@PROJECT_VERSION@" +#define VERSION_URL "@PROJECT_URL@" + +#endif