Skip to content

AudYoFlo: Building on MS Windows Visual Studio

jvxgit edited this page May 17, 2024 · 17 revisions

On MS Windows to build AudYoFlo with Visual Studio the following pre-installations should be available:

  1. Visual Studio 2022
  2. Git bash
  3. MSYS2

The required installations are described here. Optionally, Matlab and/or Octave as well as Python can be involved:

  1. Matlab Version 2017 or higher
  2. Python Version 3.10 or higher

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 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

Download of sub repositories

Note that wunning the build command for the first time will trigger a download of the following repositories:

  • VST - Virtual Studio Technology SDK from Steinberg - folder <AudYoFlo>/sources/sub-projects/vst3sdk
  • Library jsmn - folder <AudYoFlo>/sources/jvxLibraries/third_party/git/jsmn
  • Library civetweb - folder E:\jvxgit\AudYoFlo\sources\jvxLibraries\third_party\git\civetweb
  • Library libmysofa - folder <AudYoFlo>/sources/jvxLibraries/third_party/git/mysofa
  • Library ebur128 - folder <AudYoFlo>/sources/jvxLibraries/third_party/git/ebur128
  • Library hash-lib - folder <AudYoFlo>/sources/jvxLibraries/third_party/git/hash-lib
  • Library qwt - folder <AudYoFlo>/sources/jvxLibraries/third_party/git/qwt
  • Library qcustomplot - folder <AudYoFlo>/sources/jvxLibraries/third_party/web/qcustomplot
  • Library speex-dsp - folder <AudYoFlo>/sources/jvxLibraries/third_party/git/speex-dsp
  • Library eaqual - folder <AudYoFlo>/sources/jvxLibraries/third_party/git/eaqual
  • Library cminpack - folder <AudYoFlo>/sources/jvxLibraries/third_party/git/cminpack
  • Library portaudio - folder <AudYoFlo>/sources/jvxLibraries/third_party/git/portaudio
  • Library fftw - folder <AudYoFlo>/sources/jvxLibraries/third_party/web/fftw

Building the code generation tools

At first we need to build the code generation tools. we do so by running the command

compiled.bat rt-bt

grafik

Building the code generation tools is only necessary if something changed in the fundamentals of the code generation tools. If nothing has changed, the build tools typically will hbe built only once and stay as they are for a longer time.

Preparing the build of the main system

Next, we need to clear the cmake cache and run the main cmake step. We do so by running

compiled.bat cc && compiled.bat rt

During this step, the downloads of the involved third-party repositories will be done. These steps are required only at the very first time and therefore will not be required anytime later than the very first build.

Once finished successfully, the output in the build console looks as follows:

grafik

Building the main system

In the last step, we can open the create Visual studio solution which is located in the build folder:

grafik

Once open in Visual studio, we select the INSTALL target and trigger the build:

grafik

The build takes some time and should be all done with the following output after a while:

grafik

The output from the build are finally located in the folder <build>/release/runtime where <build> is the build folder as mentioned before.

grafik

Building the SDK

Once the runtime has been built we may build the SDK in the next step. For this purpose, we turn back to the Visual Studio build terminal and run the command sequence

compiled.bat cc && compiled.bat sdk-bt && compiled.bat cc && compiled.bat sdk

grafik

This builds the code generation tools for the SDK as well as all required SDK components. Note that the SDK build involves Ninja rather than Visual Studio:

grafik

grafik

Once the build has been completed, we find the content of a functional SDK as the three subfolders

  • sdk
  • runtime
  • tools
  • jvx_install_version.txt

in the release folder:

grafik

Back

Clone this wiki locally