Building zcx from source¶
If you would like to contribute to zcx-core, you will need to use the build script to consolidate all necessary files into a folder in your Live Remote Scripts directory.
Warning
This lesson is only intended for developers. To use zcx, see getting started.
Instructions¶
Clone the repo¶
Clone the repo from GitHub to a convenient location on your computer.
Create a virtual environment¶
It is highly recommended that you create a Python virtual environment before proceeding.
Install vendored dependencies¶
zcx bundles several packages with each install.
These dependencies must be installed in the folder zcx-core/app/vendor.
A simple script is provided at zcx-core/tools/install_vendored_dependencies.py to install the packages (via pip) to the correct location.
Warning
These packages must be located in the vendor/ directory.
Install development dependencies¶
From the project root, run pip install -r requirements.txt to install all development dependencies.
Run the script¶
From the project root, run:
python tools/build.py <hardware name> <destination folder name>
Where <hardware name> is the name of a folder in zcx-core/hardware, e.g. push_1 and <desintation folder name> is a name of your choice, e.g. my_zcx_script.
Omit <destination folder name> to use _zcx_<hardware name>.
You must manually create the destination folder.
The script will copy the relevant files to the destination folder, then watch the repo and copy any updates.
Extra arguments¶
--custom-config¶
Provide the path to a folder that will be copied into the destination instead of the demo_config folder.
--blank-config¶
Use the blank config folder instead of the demo_config folder.
--user-library¶
By default, the script will determine the default path to your Live User Library depending on your operating system. If you use a non-default location for your User Library, you will need to provide the path as an argument.
Building with your own config¶
While working on zcx, you'll likely prefer to use your own config, rather than the demo config.
One option is to use the --custom-config argument and pass the path to your own config.
Another is to use symbolic links in the destination directory to other files or directories on your computer. The build script will ignore symbolic links in the destination directory.
Building the documentation¶
Only relevant if you want to edit the documentation locally.
This documentation is powered by mkdocs, the Material for MkDocs theme, and several plugins for mkdocs.
From the project root, run pip install -r docs/requirements.txt to install all documentation dependencies.
To start the dev server, run:
For more information, refer to the documentation for the projects above.
Suggestions welcome
If you have feedback about the existing docs, or think something should be added, feel free to post in the Discord.