|
1 | | -# Building plugin |
| 1 | +# Development |
2 | 2 |
|
3 | | -## step 1: build python-3.10.1 |
4 | 3 |
|
| 4 | +## Building plugin (step by step) |
| 5 | + |
| 6 | +Install requirements |
| 7 | + |
| 8 | +Ubuntu/Debian: |
| 9 | +```bash |
| 10 | +$ sudo apt install qt5-default cmake gcc git-core |
5 | 11 | ``` |
| 12 | + |
| 13 | +### step 1: create a empty project |
| 14 | + |
| 15 | +Use a UNIGINE SDK Browser and create some empty project, for example `my_project` |
| 16 | + |
| 17 | +*`my_project` folder - where you can see `data` and with `bin` and with `include` and launchers* |
| 18 | + |
| 19 | +### step 2: clone the sources |
| 20 | + |
| 21 | +Ubuntu/Debian: |
| 22 | +```bash |
| 23 | +$ cd my_project |
| 24 | +$ git clone https://github.com/unigine-plugins/unigine-editor-python3scripting |
| 25 | +$ cd unigine-editor-python3scripting |
| 26 | +$ cp -rf * ../ |
| 27 | +``` |
| 28 | + |
| 29 | +### step 3: build python-3.10.1 |
| 30 | + |
| 31 | +Ubuntu/Debian: |
| 32 | +```bash |
| 33 | +$ cd my_project |
6 | 34 | $ cd UnigineEditorPlugin_Python3Scripting |
7 | 35 | $ ./build_python.sh |
8 | 36 | ``` |
| 37 | + |
| 38 | +### step 4: build plugin |
| 39 | + |
| 40 | +Ubuntu/Debian: |
| 41 | +```bash |
| 42 | +$ cd my_project |
| 43 | +$ cd UnigineEditorPlugin_Python3Scripting |
| 44 | +$ ./build_plugin.sh |
| 45 | +``` |
| 46 | + |
| 47 | +### step 5: run editor |
| 48 | + |
| 49 | +After this call `./launch_editor.sh` or launch editor from `UNIGINE SDK Browser` |
| 50 | + |
| 51 | +## Helpful links |
| 52 | + |
| 53 | +- https://www.codeproject.com/Articles/820116/Embedding-Python-program-in-a-C-Cplusplus-code |
| 54 | +- https://docs.python.org/3.7/c-api/bytes.html |
| 55 | +- https://habr.com/ru/post/469043/ |
| 56 | +- https://intermediate-and-advanced-software-carpentry.readthedocs.io/en/latest/c++-wrapping.html |
| 57 | + |
| 58 | +Here can find wrappers: |
| 59 | +- https://github.com/Berenco/texworks |
| 60 | + |
| 61 | +New type (class) |
| 62 | +- https://docs.python.org/3/c-api/typeobj.html |
| 63 | +- https://docs.python.org/3/c-api/typeobj.html#typedef-examples |
| 64 | +- https://docs.python.org/3.5/extending/newtypes.html |
| 65 | + |
| 66 | + |
| 67 | +Mp4 to gif |
| 68 | +- https://cloudconvert.com/mp4-to-gif |
| 69 | + |
| 70 | + |
| 71 | +## Generate Python Wrappers Classes |
| 72 | + |
| 73 | +``` |
| 74 | +$ python3 -m pip install CppHeaderParser |
| 75 | +$ ./generate_pytypeobjects.sh |
| 76 | +``` |
0 commit comments