diff --git a/.github/workflows/preview-build.yml b/.github/workflows/preview-build.yml index 1268762..f0b9af9 100644 --- a/.github/workflows/preview-build.yml +++ b/.github/workflows/preview-build.yml @@ -12,11 +12,10 @@ jobs: steps: - uses: actions/checkout@v3 - name: build-linux - run: make - working-directory: src/ + run: sh ./make.sh + working-directory: / - name: Build Preview MCT-Linux uses: actions/upload-artifact@v3.1.2 with: name: MCT-Pre - path: bin/MCT - + path: build/MCT diff --git a/.gitignore b/.gitignore index 1d74e21..ab24a97 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.vscode/ +.vscode +build/* \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..c9ccfe8 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.9) + +PROJECT(MCT) +INCLUDE_DIRECTORIES( +./src/include +) +AUX_SOURCE_DIRECTORY(src ./src) +ADD_EXECUTABLE(${PROJECT_NAME} ./src/main.cpp) diff --git a/README.md b/README.md index bb559f6..1d3e8f2 100644 --- a/README.md +++ b/README.md @@ -18,25 +18,26 @@ [![Preview](https://img.shields.io/github/actions/workflow/status/QuantumLS-Studio/MathCentralTool/preview-build.yml?label=Preview&style=for-the-badge "Preview")](https://github.com/QuantumLS-Studio/MathCentralTool/actions/workflows/preview-build.yml) ![EMAIL](https://img.shields.io/badge/EMAIL-fts427%40outlook.com-4169E1?style=for-the-badge&logoColor=white) - + [🀄简体中文](/README_zh.md) | 🔠[English](/README.md) ## 📃 Introduce + A terminal-based math tool that runs on linux. This program is free and open source. We allow everyone to use the source code for enrichment, compilation, etc. But we don't take any responsibility for any problems! ⚠worn: This program is in developing and cannot be used for scientific precision calculations! If anything goes wrong, do so at your own risk! -## ❔ How to use +## ❔ How to use Look in the GitAction and choose you need. Or clone and compile by yourself. -📦 Compilation environment requirements: make, gcc +📦 Compilation environment requirements: cmake, make, gcc ## 🧑‍💻 Contribution and thanks @@ -49,6 +50,7 @@ Or clone and compile by yourself. Thank every developer very much for their help!👍 ## 👀 Other + This project also powered by [ECCPH](https://github.com/QuantumLS-Studio/ECCPH) Old versions[MathCentralTools](https://github.com/FTS427/MathCentralTools)(Archived🗃️) diff --git a/README_zh.md b/README_zh.md index dddeb55..e630e88 100644 --- a/README_zh.md +++ b/README_zh.md @@ -37,7 +37,7 @@ 或自行拉取编译 -📦编译环境需求(Linux):make,gcc +📦编译环境需求:cmake, make,gcc ## 🧑‍💻感谢 diff --git a/bin/MCT b/bin/MCT deleted file mode 100755 index aec7b34..0000000 Binary files a/bin/MCT and /dev/null differ diff --git a/make.sh b/make.sh new file mode 100755 index 0000000..98594e4 --- /dev/null +++ b/make.sh @@ -0,0 +1,5 @@ +cmake -S . -B ./build && +cd ./build && +make && +echo "Done!" && +echo "Exec -> build/MCT" diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index c4c4863..0000000 --- a/src/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -MCT-Build: main.cpp ./cpart/ - g++ main.cpp -o ../bin/MCT diff --git a/src/head/mhead.h b/src/include/mhead.h similarity index 100% rename from src/head/mhead.h rename to src/include/mhead.h diff --git a/src/main.cpp b/src/main.cpp index 379c8b5..49a3739 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,11 +1,11 @@ //Preview, be careful -#include "./head/mhead.h" -#include "./cpart/calc.cpp" -#include "./cpart/maxn.cpp" -#include "./cpart/minn.cpp" -#include "./cpart/chn.cpp" -#include "./cpart/cg.cpp" +#include "./include/mhead.h" +#include "./part/calc.cpp" +#include "./part/maxn.cpp" +#include "./part/minn.cpp" +#include "./part/chn.cpp" +#include "./part/cg.cpp" //主函数 int main(){ diff --git a/src/cpart/calc.cpp b/src/part/calc.cpp similarity index 100% rename from src/cpart/calc.cpp rename to src/part/calc.cpp diff --git a/src/cpart/cg.cpp b/src/part/cg.cpp similarity index 100% rename from src/cpart/cg.cpp rename to src/part/cg.cpp diff --git a/src/cpart/chn.cpp b/src/part/chn.cpp similarity index 100% rename from src/cpart/chn.cpp rename to src/part/chn.cpp diff --git a/src/cpart/maxn.cpp b/src/part/maxn.cpp similarity index 100% rename from src/cpart/maxn.cpp rename to src/part/maxn.cpp diff --git a/src/cpart/minn.cpp b/src/part/minn.cpp similarity index 100% rename from src/cpart/minn.cpp rename to src/part/minn.cpp