-
Notifications
You must be signed in to change notification settings - Fork 2
AudYoFlo: Building for Webbrowser Webassembly
The AudYoFlo system can be built also for Webassembly to run in a webbrowser. This requires the Emspcripten SDk to be installed at first. In this chapter, we will demonstrate the build on a MS Windows PC.
For the installation, you need to obtain the SDk from here:
https://github.com/emscripten-core/emsdk.git
At first, we need to populate an SDK folder,
git clone https://github.com/emscripten-core/emsdk.git
Then, we can check if the emsdk is ready to be used:
Finally, we try to run an update of emsdk and finally end up with a gut pull:
Now, we install and activate the emsdk tools by
emsdk install latest
emsdk activate latest
The emsdk is now ready to be used.
Once the emsdk is ready we can use the Cmake based configuration and build process as described for Windows. Indeed, the Emscripten build is a specific variant of a cross compile process. At first, we start by creating a build output folder and copy the build script and module configuration file from <AudYoFlo>/build-scripts/webassembly/rt
,
At first, we need to build the AudYoFlo build tools. On Windows, we start a Visual Studio command shell and run the command
compiled.bat rt-bt
This step is a native compilation to allow running the AudYoFlo tools on the host PC during the next cross compile steps.
Now, we need to switch the build environment by running the emsdk script,
c:\sdks\emsdk\emsdk_env.bat
Finally, we can run the compile script which now involves the Emscripten build process as usual:
compiled.bat cc && compiled.bat rt
Note that there is only one real project for AudYoFlo in a web browser at the moment in <AudYoFlo>/sources/wp-modules/simpletest
.