-
Notifications
You must be signed in to change notification settings - Fork 2
AudYoFlo: Building on MS Windows Visual Studio
On MS Windows to build AudYoFlo with Visual Studio the following pre-installations should be available:
- Visual Studio 2022
- Git bash
- MSYS2
The required installations are described here. Optionally, Matlab and/or Octave as well as Python can be involved:
- Matlab Version 2017 or higher
- Python Version 3.10 or higher
In AudYoFlo, two different Build targets exist:
- The runtime (RT) target: This target comprises all executables and outputs the folder
runtime
in which all executables will be available for direct use once the build process has been completed. - The software development kit (SDK) target: This target comprises all libraries and outputs folder
sdk
in which all libraries are available to be used by external applications. For example, the Flutter UIs are typically linked against the AudYoFlo SDK to simplify the process of building.
A helper script exists in the following denoted as compiled.bat
which allows to configure the build environment for RT as well as for SDK builds.
To start working with AudYoFlo, at first, we open the Git Bash as a (simple) Linux command interpreter. There, we create a folder where we locate the repository afterwards (e.g., C:\\develop
aka /c/develop
). In that folder, finally, we obtain the main AudYoFlo repository by running the corresponding git command:
cd /c/develop
git clone https://github.com/jvxgit/AudYoFlo.git
Next, we change to the AudYoFlo
folder and create a build
folder. In the last step, we copy a compiled.bat
script to our new build
folder:
We identify the compiled.bat
script in the file browser:
In the next step, we need to configure the build script. Let us review compiled-bat
at first:
Here, we need to reference the root of the AudYoFlo source folder for the following cmake build process,
set JVX_SRC_PATH=%CD%\..
Then, some cross references need to be set:
-
QT_PATH_64
: Path to the folder containing the QT Ui toolkit. This entry typically is%JVX_SRC_PATH%\sources\jvxLibraries\third_party\web\qt\qt\5.15.2\msvc2019_64
since QT is downloaded on the first build. -
FLUTTER_SDK_PATH
: Path to contain the Flutter code. This entry typically is%JVX_SRC_PATH%\sources\jvxLibraries\third_party\web\flutter\flutter-3.7.4
since flutter is downloaded on the first build. -
MATLAB_PATH_64
: Path to a Matlab installation, e.g.,C:\Program Files\MATLAB\R2020a
-
PYTHON64_PATH
: Path to a local python installation, e.g., `C:\Users\binaurics\AppData\Local\Programs\Python\Python311 -
PYBIND_PATH
: Path to link the python-c-integrationpybind
, e.g.,%PYTHON64_PATH%\Lib\site-packages\pybind11\share\cmake\pybind11
Then, a section follows to define most of the system options,
With this configuration file, we start a Visual Studio command shell and change to the build folder,
Finally, we start the two-step build process. During the build process all involved third-party librar are downloaded and pre-build on the very first run.
!! As a result, the very first build always takes a longer time !!
The two-step build process combines the following phases:
In the first phase, we start the build of the AudYoFlo code generation tools using the command
compiled.bat rt-bt
This build phase takes only a short moment,
In the second phase, the AudYoFlo system build is configured. During this phase, all remaining third-party libraries will be downloaded, compiled and installed for later references in the build process using command
compiled.bat cc
compiled.bat rt
During this build phase, other processes are spawned, e.g., to download and build libraries such as ffmpeg in MSYS2.
Once the configuration has been finished, we can double-click the solution ayf_rt.sln
that has been created during the configuration process,
The double-click triggers to open Visual Studio. In there, we can start the build process by building the install target,
After a longer time, the build is completed with success,
Once the build of the AudYoFlo RT has been successfully completed, the AudYoFlo SDK shall be built in the following. It is sometimes useful to build RT and SDK in different folders since every switch between RT and SDK requires a re-configuration of the solution which can be time consuming.
In the remainder of this section, we will reuse the given build
folder to run the SDK build process. At this point, we turn back to the x64 Visual Studio build terminal and run the command sequence
compiled.bat cc && compiled.bat sdk-bt && compiled.bat cc && compiled.bat sdk
To build the SDK typically involves the Ninja build system rather than Visual Studio,
Once the build is complete, the content of a full software development kit comprises RT as well as SDK and is available in the release
folder,