doc: update doc for BMap bindings
This commit is contained in:
@@ -1,9 +1,19 @@
|
||||
# PyBMap
|
||||
# pybmap
|
||||
|
||||
The real scripts are placed in sub PyBMap folder. This folder is served for testbench scripts placing. You can run `testbench.py` to do a basic test for PyBMap but you may need some essential files to run this testbench which were written in `testbench.py`.
|
||||
## Layout
|
||||
|
||||
The native BMap library should be placed in sub PyBMap folder, and I have used gitignore file to filter them. The native BMap library must be named as `BMap.dll` (in Windows), `BMap.so` (in Linux or BSD), or `BMap.dylib` (in macOS). If you still can not load BMap or your system is not listed above, you should name it as `BMap.bin`.
|
||||
This project follow `src` and `test` layout and is managed by Astral UV.
|
||||
The source code of pybmap is located inside `src`.
|
||||
And the files located in `test` is used for testing.
|
||||
|
||||
Please note the most content of `virtools_types.py` are generated by EnumsMigration sub-project. Additionally the most content of `bmap.py` is generated by BMapBindings. So if some structs are updated, do not forget checking these files.
|
||||
> [!NOTE]
|
||||
> The files located in `test` are not prepared for `pytest` framework.
|
||||
> The test should be executed manually by `uv run test/main.py`.
|
||||
|
||||
Since BMap 0.3.0, testbench use command line arguments, instead of hardcode variables in code, as the arguments of BMap. It is convenient that debug BMapSharp without any modification of source code. For a brief instruction, you may need to launch BMapSharpTestbench in following command (just an example. you can modify it as you wished): `py testbench.py --file-path "LightCameraTest.nmo" --temp-dir "Temp" --texture-dir "F:/Ballance/Ballance/Textures" --encodings cp1252 gb2312`.
|
||||
## Native BMap Library Location
|
||||
|
||||
The native BMap library file should be placed with `bmap.py` file.
|
||||
|
||||
The native BMap library must be named as `BMap.dll` (in Windows), `BMap.so` (in Linux or BSD), `BMap.dylib` (in macOS), or `BMap.bin` (in any other platforms).
|
||||
|
||||
If you are building final distributed package file, such as `.whl` file, you may need manually put native BMap library file into package file because I have not write this behavior in any script.
|
||||
|
||||
Reference in New Issue
Block a user