WindowsBuild30 » History » Version 20
Chris Cannam, 2017-01-09 02:47 PM
1 | 1 | Chris Cannam | h1. Building SV v3.0 installers on Windows |
---|---|---|---|
2 | 1 | Chris Cannam | |
3 | 1 | Chris Cannam | Version 3.0 of Sonic Visualiser now has a 64-bit version for Windows. The 32-bit version is also still supported. |
4 | 1 | Chris Cannam | |
5 | 7 | Chris Cannam | * 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). |
6 | 1 | Chris Cannam | |
7 | 2 | Chris Cannam | * 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. |
8 | 2 | Chris Cannam | |
9 | 2 | Chris Cannam | * 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. |
10 | 2 | Chris Cannam | |
11 | 13 | Chris Cannam | * The installers are built using "WiX":http://wixtoolset.org/, 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. |
12 | 1 | Chris Cannam | |
13 | 12 | Chris Cannam | 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. |
14 | 12 | Chris Cannam | |
15 | 3 | Chris Cannam | h2. Which SV branch to use |
16 | 3 | Chris Cannam | |
17 | 3 | Chris Cannam | 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. |
18 | 3 | Chris Cannam | |
19 | 2 | Chris Cannam | h2. 32-bit build and installer |
20 | 2 | Chris Cannam | |
21 | 4 | Chris Cannam | h4. Build |
22 | 4 | Chris Cannam | |
23 | 4 | Chris Cannam | This process is similar to that introduced in v2.1 (see [[here|WindowsBuild21]]), except that we now *do* use a shadow build. |
24 | 4 | Chris Cannam | |
25 | 4 | Chris Cannam | * Check out the correct branch (@3.0-integration@ or @default@ as described above) |
26 | 4 | Chris Cannam | * Open the main @sonic-visualiser.pro@ project in Qt Creator |
27 | 5 | Chris Cannam | * Set up a *release build* using *Desktop Qt 5.7.0 MinGW 32-bit* as a *shadow build* |
28 | 8 | Chris Cannam | * "Run qmake" and "Rebuild All" |
29 | 4 | Chris Cannam | |
30 | 10 | Chris Cannam | There is still one unresolved manual step before you can run Sonic Visualiser: |
31 | 10 | Chris Cannam | |
32 | 1 | Chris Cannam | * Go to the build directory (e.g. @build-sonic-visualiser-Desktop_Qt_5_7_0_MinGW_32bit-Release@) and copy the file @checker\release\vamp-plugin-load-checker.exe@ to the top-level @release@ directory |
33 | 10 | Chris Cannam | |
34 | 16 | Chris Cannam | 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.) |
35 | 6 | Chris Cannam | |
36 | 17 | Chris Cannam | You can also run individual unit test suites by selecting them as target executable in Qt Creator. |
37 | 17 | Chris Cannam | |
38 | 17 | Chris Cannam | |
39 | 12 | Chris Cannam | h4. Installer |
40 | 1 | Chris Cannam | |
41 | 12 | Chris Cannam | The principle here is: |
42 | 11 | Chris Cannam | |
43 | 14 | Chris Cannam | # Copy dependent libraries into the @release@ directory within the build dir, so that Sonic Visualiser can be run directly without IDE support |
44 | 1 | Chris Cannam | # Package up the installer using the @build.cmd@ script that runs WiX |
45 | 13 | Chris Cannam | |
46 | 13 | Chris Cannam | For the Qt 5.7 installation I'm currently using, this means: |
47 | 13 | Chris Cannam | |
48 | 13 | Chris Cannam | * From @C:\Qt57\5.7\mingw53_32\bin@, copy the following files into the @release@ directory: @Qt5Core.dll@ @Qt5Gui.dll@ @Qt5Network.dll@ @Qt5Svg.dll@ @Qt5Widgets.dll@ @Qt5Xml.dll@ @libgcc_s_dw2-1.dll@ @libstdc++-6.dll@ @libwinpthread-1.dll@ |
49 | 13 | Chris Cannam | * From @C:\Qt57\5.7\mingw53_32\plugins\platforms@, copy the following files: @qminimal.dll@ @qwindows.dll@ |
50 | 13 | Chris Cannam | * Check that the Sonic Visualiser executable in that directory starts up properly when double-clicked |
51 | 13 | Chris Cannam | * In a command prompt window, cd to the @deploy\win32@ directory in the Sonic Visualiser source tree and run @.\build.cmd@ |
52 | 13 | Chris Cannam | |
53 | 13 | Chris Cannam | Note that the @build.cmd@ script has the path to the shadow build folder hardcoded, so you may need to tweak that. |
54 | 4 | Chris Cannam | |
55 | 4 | Chris Cannam | h2. 64-bit build and installer |
56 | 4 | Chris Cannam | |
57 | 4 | Chris Cannam | h4. Build |
58 | 4 | Chris Cannam | |
59 | 1 | Chris Cannam | * Check out the correct branch (@3.0-integration@ or @default@ as described above) |
60 | 4 | Chris Cannam | * Open the main @sonic-visualiser.pro@ project in Qt Creator |
61 | 5 | Chris Cannam | * Set up a *release build* using *Desktop Qt 5.7.0 MSVC 64-bit* as a *shadow build* |
62 | 9 | Chris Cannam | * "Run qmake" and "Rebuild All" |
63 | 6 | Chris Cannam | |
64 | 19 | Chris Cannam | 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. |
65 | 19 | Chris Cannam | |
66 | 20 | Chris Cannam | And we have the same unresolved manual step as for the 32-bit build: |
67 | 20 | Chris Cannam | |
68 | 20 | Chris Cannam | * Go to the build directory (e.g. @build-sonic-visualiser-Desktop_Qt_5_7_0_MSVC2015_64bit-Release@) and copy the file @checker\release\vamp-plugin-load-checker.exe@ to the top-level @release@ directory |
69 | 20 | Chris Cannam | |
70 | 4 | Chris Cannam | 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.) |
71 | 18 | Chris Cannam | |
72 | 18 | Chris Cannam | You can also run individual unit test suites by selecting them as target executable in Qt Creator. |
73 | 18 | Chris Cannam | |
74 | 4 | Chris Cannam | h4. Installer |
75 | 4 | Chris Cannam | |
76 | 4 | Chris Cannam | The 64-bit installer needs files from both the 64- and 32-bit builds. |