Skip to content

Commit

Permalink
Adds a script that generate the dependencies as a html file.
Browse files Browse the repository at this point in the history
Fixes #6
  • Loading branch information
Ohjurot committed Dec 7, 2024
1 parent 3608657 commit 591d2aa
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@
**.vcxproj
**.vcxproj.user
**.vcxproj.filters

# Dependencies graph output
/dependencies.html
1 change: 1 addition & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/...]`.
32 changes: 32 additions & 0 deletions scripts/graph.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 591d2aa

Please sign in to comment.