diff --git a/.gitignore b/.gitignore index 736c3bc..88d8372 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,6 @@ **.vcxproj **.vcxproj.user **.vcxproj.filters + +# Dependencies graph output +/dependencies.html diff --git a/BUILDING.md b/BUILDING.md index 72122a6..1218900 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -56,4 +56,5 @@ The project provides the following actions. You can run them with the mox tool ( - **clean**: This command will remove all regenerateable files of a certain category. Usage `./mox.bat/sh clean [type]` Where type can be (`output`, `project`, `dependencies`, or `all`. Defaults to `output`). - **run**: This will automatically run a specific executable in the correct working dir. Usage `./mox.bat/sh run [-c=Debug/Release/...] EXE [args...]`. - **autogen**: Will automatically run `init`, `build` and `deploy`. +- **graph**: Will generate a conan dependency-graph to a HTML file - **test**: Will run `init`, `build` (Release by default) and automatically invoke the `unittest` executable. The script will return the return code of the test application. Usage `./mox.bat/sh test [Debug/Release/...]`. diff --git a/scripts/graph.py b/scripts/graph.py new file mode 100644 index 0000000..042148f --- /dev/null +++ b/scripts/graph.py @@ -0,0 +1,32 @@ +""" +Project execution script +This script will run the compiled application in the proper way. + +Copyright (c) 2024 Moxibyte GmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +""" +import sys +import subprocess + +if __name__ == '__main__': + with open('./dependencies.html', "w") as outfile: + subprocess.run(( + "conan", "graph", "info", "./conanfile.py", "--format=html" + ), stdout=outfile)