Skip to content

AudYoFlo: Building on MS Windows Visual Studio

jvxgit edited this page Jun 17, 2024 · 17 revisions

On MS Windows to build AudYoFlo with Visual Studio pre-installations are required which is in detail described here.

Optionally, Matlab and/or Octave as well as Python integrations can be involved:

  1. Matlab Version 2017 or higher
  2. Python Version 3.11 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.

Step I: Preparing the Build

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

grafik

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:

grafik

We identify the compiled.bat script in the file browser:

grafik

Step II: Adapting the build script and running the cmake command

In the next step, we need to configure the build script. Let us review compiled-bat at first:

grafik

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-integration pybind, e.g., %PYTHON64_PATH%\Lib\site-packages\pybind11\share\cmake\pybind11

Then, a section follows to define most of the system options,

grafik

With this configuration file, we start a Visual Studio command shell and change to the build folder,

grafik

grafik

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:

Phase I: Configuration and Build of AudYoFlo Build-Tools

In the first phase, we start the build of the AudYoFlo code generation tools using the command

compiled.bat rt-bt

grafik

This build phase takes only a short moment,

grafik

Phase II: Configuration of the AudYoFlo (Main) RT Build

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

grafik

During this build phase, other processes are spawned, e.g., to download and build libraries such as ffmpeg in MSYS2.

Phase III: Build of the AudYoFlo RT System

Once the configuration has been finished, we can double-click the solution ayf_rt.sln that has been created during the configuration process,

grafik

The double-click triggers to open Visual Studio. In there, we can start the build process by building the install target,

grafik

After a longer time, the build is completed with success,

grafik

Step III: Configuration and Build of the AudYoFlo SDK

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

grafik

To build the SDK typically involves the Ninja build system rather than Visual Studio,

grafik

grafik

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,

grafik

Back

Clone this wiki locally