Audacity
Audacity is the world's most popular audio editing and recording app. It is widely used in Windows. Now, support has been added for building on ARM64. Audacity uses Conan build system to link against its dependencies. Various packages like RapidJSON, wxWidgets, opus file had to be updated inorder for Audacity to be built natively on Windows on Arm64. Audacity builds need MSYS2. Currently. MSYS2 is a work in progress and therefore the environment variable needs to be set birder for MSYS2 (emulated) shell to be used instead.
Requirements:
A development machine running Windows ARM64 (Surface, Thinkpad, Project Volterra, Windows VM on Apple M2):
Setup necessary build tools. Follow the steps from wenv
Download Audacity source from https://github.com/audacity/audacity
Steps
Clone
git clone https://github.com/audacity/audacity
cd audacity
# current master is under a major refactoring, so we build stable branch instead.
# https://github.com/audacity/audacity?tab=readme-ov-file#this-repository-is-currently-undergoing-major-structural-change
git checkout Audacity-3.7.1
Patch
Seems like a header change for MSVC broke compilation (at least with latest VS2022).
It’s needed to directly include <chrono>
header in two files. Please do following changes:
diff --git a/libraries/lib-project-file-io/DBConnection.cpp b/libraries/lib-project-file-io/DBConnection.cpp
index 26d6d0e87..6c039a986 100644
--- a/libraries/lib-project-file-io/DBConnection.cpp
+++ b/libraries/lib-project-file-io/DBConnection.cpp
@@ -13,6 +13,7 @@ Paul Licameli -- split from ProjectFileIO.cpp
#include "sqlite3.h"
+#include <chrono>
#include <wx/string.h>
#include "AudacityLogger.h"
diff --git a/modules/import-export/mod-cl/ExportCL.cpp b/modules/import-export/mod-cl/ExportCL.cpp
index 3f0ab7848..d97973389 100644
--- a/modules/import-export/mod-cl/ExportCL.cpp
+++ b/modules/import-export/mod-cl/ExportCL.cpp
@@ -13,6 +13,7 @@
#include "ProjectRate.h"
+#include <chrono>
#include <thread>
#include <wx/app.h>
Build
# Open MSYS2 bash shell
cmd.exe /c C:/wenv/arm64/activate.bat bash
# from this shell
python -m pip install conan
conan profile detect
cat > global.conf << EOF
tools.microsoft.bash:path=c:/wenv/msys2/msys64/usr/bin/bash.exe
tools.microsoft.bash:subsystem=msys2
EOF
conan config install global.conf
rm global.conf
# now perform the build
mkdir build
cd build
cmake -A arm64 -S ../ -B .
cmake --build . --config Release
Continuous Integration
Audacity team uses GitHub action exclusively to build regular binaries for all targets. Lack of Arm64 Github runners has not enabled Windows on Arm64 builds currently.
Binary Availability
Audacity is expected to include Windows on Arm64 support in 3.5 release. However, until Github runners for Arm64 are available, we do not expect a binary published.