From 63ec070d15724b5543a64f44c7e0716fd77ace50 Mon Sep 17 00:00:00 2001 From: ValKmjolnir Date: Thu, 11 May 2023 20:12:59 +0800 Subject: [PATCH] :memo: update doc for vs build --- .gitignore | 2 ++ doc/vs.md | 22 +++++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index cd32b92..0cfb1fc 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,7 @@ *.vcxproj.user .vs x64 +CMakePresents.json # nasal executable nasal @@ -49,6 +50,7 @@ dump # build dir build +out # macOS special cache directory .DS_Store diff --git a/doc/vs.md b/doc/vs.md index ead05fe..afcf8b3 100644 --- a/doc/vs.md +++ b/doc/vs.md @@ -2,12 +2,22 @@ ## First | 首先 -Make sure you are using VS 2022. +We give a __CMakeLists.txt__ for you to create new VS project from it. -确保你使用的是 VS 2022。 +我们为你提供了 __CMakeLists.txt__ 用于创建新的 VS 工程。 + +If you are using this way, you will __not need__ to continue reading. + +如果你使用的是这种方式,下面的内容你就 __不需要__ 再读了。 + +Creating VS project from a CMake file is the __simplest__ way. + +从 CMake 文件创建 VS 工程是 __最简单__ 的方式。 ## How to Create VS project +Make sure you are using VS 2022. You may not get the dynamic libraries by using this way to compile. + 1. Get code from this repo using `git`. 2. In Visual Studio, click `File`->`New`->`Project From Existing Code...`. @@ -20,12 +30,14 @@ Make sure you are using VS 2022. ## 如何创建VS工程 -1. 用`git`从这个仓库获取代码。 +确保你使用的是 VS 2022。这个方式可能无法生成一些动态库。 + +1. 用 `git` 从这个仓库获取代码。 2. 在VS的界面,点击文件(F)->新建(N)->从现有代码创建项目(E)。 -3. 选择创建`Visual C++`项目->下一步->项目文件位置选择你下载的代码存放的文件夹->填项目名称,随便写->完成。 +3. 选择创建 `Visual C++` 项目->下一步->项目文件位置选择你下载的代码存放的文件夹->填项目名称,随便写->完成。 4. 从项目中去掉 `module` 里的cpp文件,以防止编译错误。(那些本应该编译到动态库) -5. 点开左侧解决方案资源管理器中的`Source Files`,右键点击`main.cpp`,编译。 +5. 点开左侧解决方案资源管理器中的 `Source Files`,右键点击 `main.cpp`,编译。