new/extended windows packaging scripts and associated resources
[ardour.git] / tools / windows_packaging / README
1 Building Ardour for Windows
2
3 The windows build is compiled and tested with the MinGW compiler that is
4 packaged in Fedora, Currently using Fedora 16. There are many cross compiled
5 "mingw" libraries that Ardour requires that are also available on Fedora but
6 not all are yet.
7
8
9 Prerequisites
10
11 Follow instructions in Fedora-16.txt to build and/or install the required
12 packages.
13
14
15 Configuring
16
17 After all the necessary packages are installed the next step is to call
18 one of the configure scripts configure-debug.sh or configure-release.sh.
19
20 The configure-debug.sh script will enable debugging support and install
21 the tests to the package directory. It will also mean the GDB debugger
22 is packaged.
23
24 The configure-release.sh is intended for releases only, none of the tests
25 will be built and all the binaries will be optimized and stripped.
26
27 These scripts both source the mingw-env.sh script to setup the appropriate 
28 environment variables and then call waf with a specific set of parameters
29 that are appropriate to configure for the windows build.
30
31
32 Building
33
34 After the build is configured the waf.sh script is used to build the Ardour
35 application and all necessary libraries. The waf.sh script is not strictly
36 needed, it just saves having to change working directories.
37
38
39 Packaging
40
41 When the build is successful the package.sh script will call waf install
42 and then move some of the installed files to appropriate locations for a
43 windows executable. This could probably be done in the waf scripts specifically
44 for the windows build but I felt it simpler to do it in the packaging script
45 for now.
46
47 --------- NOTE --------------------
48
49 package_win32.sh is an updated/extended version of package.sh from Valeriy. It
50 should probably be merged with package.sh at some point. It uses a number of
51 additional resources located under mingw64/
52
53 -----------------------------------
54
55 The packaging script then copies the JACK deamon and all the required mingw
56 shared libraries from the host system into the packaging directory. The 
57 shared libraries or dll's are placed in the same directory as the Ardour
58 executable so they are found at runtime.
59
60 Once the package.sh script has been run then the package directory located 
61 in the Ardour source root directory will contain everything necessary to run
62 the Ardour executable.
63
64 The make-installer.sh script is only really relevant when configure-release.sh
65 has been used to configure the build. The script creates a basic and little
66 tested windows installer for Ardour using the Nullsoft Scriptable Installer
67 System(NSIS). 
68
69
70 Running
71
72 The Ardour windows binary is intended to be run and tested on windows. Testing
73 is mainly performed using Windows XP, but should work on Vista/7. It is only
74 a 32bit binary at the moment but that may change with mingw64.
75
76 The binary does not run successfully under WINE but that may change with updates
77 and or bug fixes.
78
79 When running Ardour for debugging purposes it is best to start the jack server
80 in a separate terminal(Command Prompt) before starting Ardour so that they are
81 not both writing to the same terminal. This will probably be fixed at some point
82 so when jackd is started by Ardour the output is redirected etc.
83
84 The cptovm.sh and startvm.sh scripts are intended for testing Ardour in a 
85 Windows XP virt image and may need to be altered to be used successfully.
86
87
88 Testing
89
90 When configured for debugging there are a number of test programs(prefixed with
91 test_) included in the package.
92
93
94 Debugging
95
96 Ardour has some verbose logging/debugging output that can be useful that is used
97 with the -D option. 
98
99 When configured for debugging the package contains gdb along with a .gdbinit 
100 file to automatically set the source directory so that the "list" gdb command
101 will show the source code corresponding to the current stack frame.
102
103 Use break `Somenamespace::somepartialsymbolname + tab to list symbols, then remove 
104 ` to set break. If you press tab with when there are thousands of possible
105 matching symbols be prepared to wait a long time(this can also cause gdb to use a
106 lot of memory).
107
108 For reasons I've yet to determine many symbols are not accessible so the best way
109 to set a breakpoint is by using filename and line number.
110
111 e.g (gdb) break audiosource.cc:976
112
113 but this seems to only work after running Ardour at least once.
114
115 They are a number of glib debugging options see
116
117 http://developer.gnome.org/glib/2.30/glib-running.html
118
119 use $ set G_DEBUG=fatal_warnings to get backtrace
120