From b2b56ba81c8a357202fe744462233c5e7523d128 Mon Sep 17 00:00:00 2001 From: GyEongYuN Date: Thu, 13 Jun 2024 17:43:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4publish?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 ++- CMakeLists.txt | 2 +- src/readme.md | 84 -------------------------------------------------- 3 files changed, 4 insertions(+), 86 deletions(-) delete mode 100644 src/readme.md diff --git a/.gitignore b/.gitignore index 7e0e36f..7c43b84 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,6 @@ build/ # Visual Studio .vs/ -VSbuild/ \ No newline at end of file +VSbuild/ +# CMake install dir +publish/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 814c7c0..e8808cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,4 +108,4 @@ target_include_directories( set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/publish" CACHE PATH "Install path prefix" FORCE) install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) install(DIRECTORY ${CMAKE_SOURCE_DIR}/data/ DESTINATION data) -install(FILES readme.md parameters.txt DESTINATION ./) \ No newline at end of file +install(FILES readme.md parameters.txt DESTINATION ./) diff --git a/src/readme.md b/src/readme.md deleted file mode 100644 index 1e72126..0000000 --- a/src/readme.md +++ /dev/null @@ -1,84 +0,0 @@ -## 项目结构 - -``` -. -│ CMakeLists.txt \\CMake构建配置文件 -│ config.h.in -│ readme.md -├─data -│ ├─demo -│ │ └─ ... -│ └─Tinyroute_test -│ │ connector.csv \\连接器数据 -│ │ result_ALL.txt \\当前数据与参数下应运行出的结果数据 -│ ├─clip2 -│ │ clips_with_dir.xml \\空间中卡箍点集数据 -│ ├─OBJ -│ │ cangti_correct.obj \\输入模型 -│ └─wirexml \\ 连接器间连接关系 -│ 1START_END.xml -│ 2NEAR_END.xml -│ 3NEAR_START.xml -├─include -│ read_xml.h -│ -├─lib \\所用运行库 -│ │ tinyxml.lib -│ │ WireRouting_DLL.dll -│ │ WireRouting_DLL.lib -│ │ -│ └─include \\库相关头文件 -│ Astar.h -│ BasicChannel.h -│ BasicEdge.h -| ... -│ -├─pre_build \\预编译可执行文件 -│ ├─Debug -│ │ WireRouting.exe -| | WireRouting_DLL.dll -| -└─src \\编译目标源文件 - xmlsql.cpp -``` - - - -## 运行环境配置 - -- CMake配置 - - 确认Cmake已安装: [Download CMake](https://cmake.org/download/#latest) - - 添加**cmake.exe**至环境变量 -- 确认编译器已安装,如VS2022、VS2019等环境 - -## 使用CMake构建项目 - -``` -# 进入项目目录 -cd - -# Standard CMake build -# 注意项目所用链接库均为 Debug x64 编译,构建务必使用同规格 -cmake -S . -B build -T host=x64 -A x64 -cmake --build build --config Debug --target ALL_BUILD -j 14 - -``` - -## 运行 - -``` -# 进入可执行文件所在目录 -cd \build\Debug -# OPTION:执行预编译程序 -# cd \pre_build\Debug - -# 运行 -.\WireRouting.exe createTinyroute "..\\..\\data\\Tinyroute_test\\clip2" "..\\..\\data\\Tinyroute_test\\wirexml" "..\\..\\data\\Tinyroute_test\\connector.csv" "..\\..\\data\\Tinyroute_test\\OBJ" output - -``` - -## 查看结果 - -> 在 **\build\Debug\output_ALL.txt** 目录下查看输出文件 -> -> 可与 **\data\Tinyroute_test\result_ALL.txt** 比较结果 \ No newline at end of file