WindowsBuild30 » History » Version 22
« Previous -
Version 22/32
(diff) -
Next » -
Current version
Chris Cannam, 2017-01-10 04:36 PM
Building SV v3.0 installers on Windows¶
Version 3.0 of Sonic Visualiser now has a 64-bit version for Windows. The 32-bit version is also still supported.
- The 64-bit version is built using Qt Creator with the Microsoft Visual C++ compiler. Install 64-bit Microsoft Visual Studio 2015 Community Edition and then Qt 5.7 (or latest 5.x).
- The 32-bit version is built using Qt Creator with the MinGW compiler. Install Qt 5.7 (or latest 5.x) with Qt Creator and ensure that the 32-bit MinGW option is available.
- The official 64-bit installer also includes some helper binaries from the 32-bit build, enabling it to use 32-bit Vamp plugins as well as 64-bit ones. So to make a 64-bit installer, we actually have to complete both builds.
- The installers are built using WiX, so you must have that installed. The path to WiX is hardcoded in our
build.cmd
script and at the time of writing it assumes WiX v3.9.
In both cases (32 and 64 bit) the dependent libraries we use are found in the sv-dependency-builds
subrepo which is now checked out as a matter of course with the SV repo. There should be no other external dependencies besides Qt and the runtime libraries it needs.
Which SV branch to use¶
Currently 3.0 release preparation is happening in the 3.0-integration
branch, but when 3.0 is actually released, it will be merged to the default
branch.
32-bit build and installer¶
Build¶
This process is similar to that introduced in v2.1 (see WindowsBuild21), except that we now do use a shadow build.
- Check out the correct branch (
3.0-integration
ordefault
as described above) - Open the main
sonic-visualiser.pro
project in Qt Creator - Set up a release build using Desktop Qt 5.7.0 MinGW 32-bit as a shadow build
- "Run qmake" and "Rebuild All"
There is still one unresolved manual step before you can run Sonic Visualiser:
- Go to the build directory (e.g.
build-sonic-visualiser-Desktop_Qt_5_7_0_MinGW_32bit-Release
) and copy the filechecker\release\vamp-plugin-load-checker.exe
to the top-levelrelease
directory
If the build was successful, you should now be able to run Sonic Visualiser from within the IDE. (You can't yet run the binary from the Windows Explorer, as Qt and other dependencies won't be found.)
You can also run individual unit test suites by selecting them as target executable in Qt Creator.
Installer¶
The principle here is:
- Copy dependent libraries into the
release
directory within the build dir, so that Sonic Visualiser can be run directly without IDE support - Package up the installer using the
build.cmd
script that runs WiX
For the Qt 5.7 installation I'm currently using, this means:
- From
C:\Qt57\5.7\mingw53_32\bin
, copy the following files into therelease
directory:Qt5Core.dll
Qt5Gui.dll
Qt5Network.dll
Qt5Svg.dll
Qt5Widgets.dll
Qt5Xml.dll
libgcc_s_dw2-1.dll
libstdc++-6.dll
libwinpthread-1.dll
- From
C:\Qt57\5.7\mingw53_32\plugins\platforms
, copy the following files:qminimal.dll
qwindows.dll
- Check that the Sonic Visualiser executable in that directory starts up properly when double-clicked
- In a command prompt window, cd to the
deploy\win32
directory in the Sonic Visualiser source tree and run.\build.cmd
Note that the build.cmd
script has the path to the shadow build folder hardcoded, so you may need to tweak that.
64-bit build and installer¶
Build¶
- Check out the correct branch (
3.0-integration
ordefault
as described above) - Open the main
sonic-visualiser.pro
project in Qt Creator - Set up a release build using Desktop Qt 5.7.0 MSVC 64-bit as a shadow build
- "Run qmake" and "Rebuild All"
If the code is already checked out for a 32-bit build, then it should be possible to add or select the 64-bit MSVC "kit" as a target in Qt Creator and then build that from the same directory as a separate shadow build, rather than having to check out the code again.
And we have the same unresolved manual step as for the 32-bit build:
- Go to the build directory (e.g.
build-sonic-visualiser-Desktop_Qt_5_7_0_MSVC2015_64bit-Release
) and copy the filechecker\release\vamp-plugin-load-checker.exe
to the top-levelrelease
directory
If the build was successful, you should now be able to run Sonic Visualiser from within the IDE. (You can't yet run the binary from the Windows Explorer, as Qt and other dependencies won't be found.)
You can also run individual unit test suites by selecting them as target executable in Qt Creator.
Installer¶
The 64-bit installer needs files from both the 64- and 32-bit builds.
The principle is:
- Copy dependent 64-bit libraries into the
release
directory within the build dir, so that Sonic Visualiser can be run directly without IDE support - Copy helper programs from the 32-bit build into the
release
directory, renaming them to have-32
at the ends of their names - Copy (the smaller number of) dependent 32-bit libraries that the 32-bit helper programs need into the
release
directory - Package up the installer using the
build.cmd
script that runs WiX
For the Qt 5.7 installation I'm currently using, this means:
- From
C:\Qt57\5.7\msvc2015_64\bin
, copy the following files into therelease
directory:Qt5Core.dll
Qt5Gui.dll
Qt5Network.dll
Qt5Svg.dll
Qt5Widgets.dll
Qt5Xml.dll
- From
C:\Qt57\5.7\msvc2015_64\plugins\platforms
, copy the following files:qminimal.dll
qwindows.dll
- From the 32-bit build's
release
directory, copy the filesvamp-plugin-load-checker.exe
andpiper-vamp-simple-server.exe
, renaming them tovamp-plugin-load-checker-32.exe
andpiper-vamp-simple-server-32.exe
respectively (so as not to overwrite the existing 64-bit versions of these files) - From
C:\Qt57\5.7\mingw53_32\bin
, copy:libgcc_s_dw2-1.dll
libstdc++-6.dll
libwinpthread-1.dll
- (From the SV build directory's
sv-dependency-builds/win64/lib
directory: copylibsndfile-1.dll
-- this is technically optional as the installer script will include it regardless, but it's necessary if you want to test SV by double-clicking) - Check that the Sonic Visualiser executable in that directory starts up properly when double-clicked
- In a command prompt window, cd to the
deploy\win64
directory in the Sonic Visualiser source tree and run.\build.cmd
Note that the build.cmd
script has the path to the shadow build folder hardcoded, so you may need to tweak that. The WiX installer config file (sonic-visualiser.wxs
) also has some hardcoded paths, for the Microsoft Visual Studio runtime libraries in C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x64\Microsoft.VC140.CRT
, which may need to be updated.