File: windows-7-build-routine.txt

package info (click to toggle)
python-pyo 1.0.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 53,696 kB
  • sloc: python: 135,133; ansic: 128,013; javascript: 16,116; sh: 395; makefile: 389; cpp: 242
file content (229 lines) | stat: -rw-r--r-- 5,806 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
=== STEP 1 ===
--- Install Python 2.6 and 2.7.10 and WxPython 3.0.2.0 for each version

=== STEP 2 (should be git soon) ===
--- Install Slick SVN 1.8.10
http://www.sliksvn.com

=== STEP 3 ===
--- Install scons 2.3.5 in the Python site-packages:
http://www.scons.org/download.php

=== STEP 4 ===
--- Install MinGW (minimalist GNU for Windows) from sourceforge
--- Add ";C:\MinGW\bin;C:\MinGW\mingw32\bin" to the PATH variable

=== STEP 5 ===
--- Install pthreads (just copy files from ftp):
ftp://sourceware.org/pub/pthreads-win32/dll-latest/
C:\pthreads\bin, C:\pthreads\include, C:\pthreads\lib

=== STEP 6 === 
--- Update libsndfile from http://www.mega-nerd.com/libsndfile  to the most recent version that works, 
which may be pre-release or release; currently it is the latest stable release (1.0.25). 
Do not build from sources.

=== STEP 7 ===
--- Update liblo tag 0.28 from the tarball at http://liblo.sourceforge.net (not SVN!), 

Compile with MinGW's pthreads installed and ./configure && make

If there is a conflict about struct timespec, remove the definition in pthread.h.

=== STEP 8 ===
--- Install Directx 9.0 SDK (april 2007)

=== STEP 9 ===
--- Download Asio SDK

===  STEP 10 ===
--- Update the PortAudio library http://portmedia.sourceforge.net from SVN and build it. 
Try the trunk version first, if that doesn't work use the most recent tag. 

--- Copy ASIOSDK to portaudio/src/hostapi/asio

--- Check the pa_win_hostapis.c file and make sure that it is configured to build 
the DirectSound, WMME, WDMKS and ASIO drivers. (nothing to do here)

--- Need to removed "volatile" from function definitions in MinGW/include/winbase.h

--- Build with this SConstruct:

'''
MinGW SConstruct for PortAudio
Michael Gogins
Modified by Olivier Belanger on september 2010
'''
print(__doc__)
print()

import os
import string
import sys
import traceback

commonEnvironment = Environment(ENV = os.environ, tools = ['mingw', 'swig', 'javac', 'jar'])
commonEnvironment.Append(CFLAGS = Split('-O2 -g'))
commonEnvironment.Append(CPPFLAGS = Split('''
-DWIN32
-D_WIN32
-DWINDOWS
-DKSAUDIO_SPEAKER_DIRECTOUT=0
-DMETHOD_NEITHER=3
-DFILE_ANY_ACCESS=0
-DPA_USE_WMME
-DPA_USE_DS
-DPA_USE_ASIO
-DPA_USE_WASAPI
-DPA_USE_WDMKS
'''))

commonEnvironment.Append(CPPPATH = [".", "src/common", "src/hostapi", "src/os", "src/os/win", "include",
"C:/portaudio/src/hostapi/wasapi/mingw-include",
"C:/portaudio/src/hostapi/asio/ASIOSDK/host",
"C:/portaudio/src/hostapi/asio/ASIOSDK/host/pc",
"C:/portaudio/src/hostapi/asio/ASIOSDK/common",
"C:/Program Files (x86)/Microsoft DirectX SDK (April 2007)/Include"])

commonEnvironment.Append(LIBS=Split('''
setupapi
kernel32
user32
gdi32
winspool
comdlg32
advapi32
shell32
ole32
oleaut32
uuid
odbc32
odbccp32
winmm
strmiids
'''))

portAudioSources = Split('''
src/common/pa_allocation.c
src/common/pa_converters.c
src/common/pa_cpuload.c
src/common/pa_debugprint.c
src/common/pa_dither.c
src/common/pa_front.c
src/common/pa_process.c
src/common/pa_ringbuffer.c
src/common/pa_stream.c
src/common/pa_trace.c
src/hostapi/dsound/pa_win_ds.c
src/hostapi/dsound/pa_win_ds_dynlink.c
src/hostapi/wmme/pa_win_wmme.c
src/hostapi/skeleton/pa_hostapi_skeleton.c
src/hostapi/wdmks/pa_win_wdmks.c
src/os/win/pa_win_hostapis.c
src/os/win/pa_win_util.c
src/os/win/pa_win_waveformat.c
src/os/win/pa_win_coinitialize.c
src/hostapi/asio/ASIOSDK/common/asio.cpp
src/hostapi/asio/ASIOSDK/common/combase.cpp
src/hostapi/asio/ASIOSDK/common/debugmessage.cpp
src/hostapi/asio/ASIOSDK/common/register.cpp
src/hostapi/asio/ASIOSDK/host/ASIOConvertSamples.cpp
src/hostapi/asio/ASIOSDK/host/asiodrivers.cpp
src/hostapi/asio/ASIOSDK/host/pc/asiolist.cpp
src/hostapi/asio/iasiothiscallresolver.cpp
src/hostapi/asio/pa_asio.cpp
src/hostapi/wasapi/pa_win_wasapi.c
''')

portAudio = commonEnvironment.SharedLibrary('portaudio', portAudioSources)
##########################################################################

=== STEP 11 ===
--- Update the PortMidi library http://portmedia.sourceforge.net from SVN and build it with this SConstruct:

'''
MinGW SConstruct for PortMidi
Michael Gogins
'''
print(__doc__)
print()

import os
import string
import sys
import traceback

commonEnvironment = Environment(ENV = os.environ, tools = ['mingw', 'swig', 'javac', 'jar'])
commonEnvironment.Append(CFLAGS = Split('-O2 -g '))
commonEnvironment.Append(CPPFLAGS = Split('''
-DWIN32
-D_WIN32
-DWINDOWS
'''))
commonEnvironment.Append(CPPPATH = Split('''
.
pm_win
pm_common
porttime
'''))
commonEnvironment.Append(LIBS=Split('''
setupapi
kernel32
user32
gdi32
winspool
comdlg32
advapi32
shell32
ole32
oleaut32
uuid
odbc32
odbccp32
winmm
strmiids
'''))
commonEnvironment.Append(LIBPATH='.')
commonEnvironment.Append(SHLINKFLAGS = Split('-mwindows -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc'))

portMidiSources = Split('''
pm_common/pmutil.c
pm_common/portmidi.c
pm_win/pmwin.c
pm_win/pmwinmm.c
''')

portTimeSources = Split('''
porttime/porttime.c
porttime/ptwinmm.c
''')

portMidiTestSources = Split('''
pm_test/test.c
''')

porttime = commonEnvironment.SharedLibrary('porttime', portTimeSources)

portMidiEnvironment = commonEnvironment.Copy()
portMidiEnvironment.Append(LIBS='porttime')
portmidi = portMidiEnvironment.SharedLibrary('portmidi', portMidiSources)

portMidiTestEnvironment = commonEnvironment.Copy()
portMidiTestEnvironment.Append(LIBS=Split('portmidi porttime'))
test = portMidiTestEnvironment.Program('test', portMidiTestSources)

Depends(portmidi, porttime)
Depends(test, portmidi)
###########################

--- Run the test program to ensure that the build works.

=== STEP 12 ===
--- create a file PythonXX/Lib/distutils/distutils.cfg with these lines in it:
[build]
compiler = mingw32

=== STEP 13 ===
--- Download pyo sources from git and build it with:

python setup.py install