forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSources.pp
More file actions
370 lines (308 loc) · 11.5 KB
/
Sources.pp
File metadata and controls
370 lines (308 loc) · 11.5 KB
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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
// This directory contains the code for the "Core API" part of the
// Panda3D browser plugin system, which is not built unless you have
// defined HAVE_P3D_PLUGIN in your Config.pp. Most Panda3D developers
// will have no need to build this, unless you are developing the
// plugin system itself.
// This directory also contains the code for p3dpython.exe, which is
// part of the Panda3D rtdist build. It's not strictly part of the
// "Core API"; it is packaged as part of each downloadable version of
// Panda3D. It is only built if you have defined either
// PANDA_PACKAGE_HOST_URL or HAVE_P3D_RTDIST in your Config.pp, which
// indicates an intention to build a downloadable version of Panda3D.
// Developers who are preparing a custom Panda3D package for download
// by the plugin will need to build this.
// If P3D_PLUGIN_MT is defined, then (on Windows) /MT is used to
// compile the core API and the NPAPI and ActiveX plugins, instead of
// /MD. This links the plugin with the static C runtime library,
// instead of the dynamic runtime library, which is much better for
// distributing the plugin with the XPI and CAB interfaces. This
// requires that special /MT versions of OpenSSL, libjpeg, libpng,
// and zlib are available.
#define _MT $[if $[P3D_PLUGIN_MT],_mt]
#define COREAPI_SOURCES \
fileSpec.cxx fileSpec.h fileSpec.I \
find_root_dir.cxx find_root_dir.h \
$[if $[IS_OSX],find_root_dir_assist.mm] \
get_tinyxml.h \
binaryXml.cxx binaryXml.h \
fhandle.h \
handleStream.cxx handleStream.h handleStream.I \
handleStreamBuf.cxx handleStreamBuf.h handleStreamBuf.I \
mkdir_complete.cxx mkdir_complete.h \
parse_color.cxx parse_color.h \
wstring_encode.cxx wstring_encode.h \
p3d_lock.h p3d_plugin.h \
p3d_plugin_config.h \
p3d_plugin_common.h \
p3dAuthSession.h p3dAuthSession.I \
p3dBoolObject.h \
p3dConcreteSequence.h \
p3dConcreteStruct.h \
p3dConditionVar.h p3dConditionVar.I \
p3dDownload.h p3dDownload.I \
p3dFileDownload.h p3dFileDownload.I \
p3dFileParams.h p3dFileParams.I \
p3dFloatObject.h \
p3dHost.h p3dHost.I \
p3dInstance.h p3dInstance.I \
p3dInstanceManager.h p3dInstanceManager.I \
p3dIntObject.h \
p3dMainObject.h \
p3dMultifileReader.h p3dMultifileReader.I \
p3dNoneObject.h \
p3dObject.h p3dObject.I \
p3dOsxSplashWindow.h p3dOsxSplashWindow.I \
p3dPackage.h p3dPackage.I \
p3dPatchfileReader.h p3dPatchfileReader.I \
p3dPatchFinder.h p3dPatchFinder.I \
p3dPythonObject.h \
p3dReferenceCount.h p3dReferenceCount.I \
p3dSession.h p3dSession.I \
p3dSplashWindow.h p3dSplashWindow.I \
p3dStringObject.h \
p3dTemporaryFile.h p3dTemporaryFile.I \
p3dUndefinedObject.h \
p3dWinSplashWindow.h p3dWinSplashWindow.I \
p3dX11SplashWindow.h p3dX11SplashWindow.I \
p3dWindowParams.h p3dWindowParams.I \
plugin_get_x11.h \
xml_helpers.h \
run_p3dpython.h
#define COREAPI_INCLUDED_SOURCES \
p3d_plugin.cxx \
p3dAuthSession.cxx \
p3dBoolObject.cxx \
p3dConcreteSequence.cxx \
p3dConcreteStruct.cxx \
p3dConditionVar.cxx \
p3dDownload.cxx \
p3dFileDownload.cxx \
p3dFileParams.cxx \
p3dFloatObject.cxx \
p3dHost.cxx \
p3dInstance.cxx \
p3dInstanceManager.cxx \
p3dIntObject.cxx \
p3dMainObject.cxx \
p3dMultifileReader.cxx \
p3dNoneObject.cxx \
p3dObject.cxx \
p3dOsxSplashWindow.cxx \
p3dPackage.cxx \
p3dPatchfileReader.cxx \
p3dPatchFinder.cxx \
p3dPythonObject.cxx \
p3dReferenceCount.cxx \
p3dSession.cxx \
p3dSplashWindow.cxx \
p3dStringObject.cxx \
p3dTemporaryFile.cxx \
p3dUndefinedObject.cxx \
p3dWinSplashWindow.cxx \
p3dX11SplashWindow.cxx \
p3dWindowParams.cxx \
xml_helpers.cxx
#begin lib_target
//
// p3d_plugin.dll, the main entry point to the Core API.
//
#define BUILD_TARGET $[and $[HAVE_P3D_PLUGIN],$[HAVE_OPENSSL],$[HAVE_ZLIB],$[HAVE_JPEG],$[HAVE_PNG]]
#define USE_PACKAGES openssl$[_MT] zlib$[_MT] jpeg$[_MT] png$[_MT] x11
#define TARGET p3d_plugin
#define LIB_PREFIX
#define BUILDING_DLL BUILDING_P3D_PLUGIN
#define LINK_FORCE_STATIC_RELEASE_C_RUNTIME $[P3D_PLUGIN_MT]
#define OTHER_LIBS \
p3tinyxml$[_MT] $[if $[OSX_PLATFORM],p3subprocbuffer]
#define COMBINED_SOURCES p3d_plugin_composite1.cxx
#define SOURCES $[COREAPI_SOURCES]
#define INCLUDED_SOURCES $[COREAPI_INCLUDED_SOURCES]
#define INSTALL_HEADERS \
p3d_plugin.h
#define WIN_SYS_LIBS user32 gdi32 shell32 comctl32 msimg32 ole32
#end lib_target
#begin static_lib_target
//
// libp3d_plugin_static.lib, the Core API as a static library (for p3dembed).
//
#define BUILD_TARGET $[and $[HAVE_P3D_PLUGIN],$[HAVE_OPENSSL],$[HAVE_ZLIB],$[HAVE_JPEG],$[HAVE_PNG]]
#define USE_PACKAGES openssl zlib jpeg png x11
#define TARGET p3d_plugin_static
#define BUILDING_DLL BUILDING_P3D_PLUGIN
#define OTHER_LIBS \
p3tinyxml $[if $[OSX_PLATFORM],p3subprocbuffer]
#define COMBINED_SOURCES p3d_plugin_composite1.cxx
#define SOURCES $[COREAPI_SOURCES]
#define INCLUDED_SOURCES $[COREAPI_INCLUDED_SOURCES]
#define WIN_SYS_LIBS user32 gdi32 shell32 comctl32 msimg32 ole32
#end static_lib_target
#begin bin_target
//
// p3dcert.exe, the authorization GUI invoked when the user clicks the
// red "play" button to approve an unknown certificate. Considered
// part of the Core API, though it is a separate download.
//
#if $[HAVE_FLTK]
#define BUILD_TARGET $[and $[HAVE_P3D_PLUGIN],$[HAVE_FLTK],$[HAVE_OPENSSL]]
#define USE_PACKAGES fltk openssl
#define SOURCES p3dCert.cxx p3dCert.h
#else
#define BUILD_TARGET $[and $[HAVE_P3D_PLUGIN],$[HAVE_WX],$[HAVE_OPENSSL]]
#define USE_PACKAGES wx openssl
#define SOURCES p3dCert_wx.cxx p3dCert_wx.h
#endif
#define TARGET p3dcert
#define SOURCES $[SOURCES] \
is_pathsep.h is_pathsep.I \
wstring_encode.cxx wstring_encode.h \
mkdir_complete.cxx mkdir_complete.h
#define OSX_SYS_FRAMEWORKS Carbon
#end bin_target
#define PLUGIN_COMMON_SOURCES \
load_plugin.cxx load_plugin.h \
fileSpec.cxx fileSpec.h fileSpec.I \
find_root_dir.cxx find_root_dir.h \
$[if $[IS_OSX],find_root_dir_assist.mm] \
is_pathsep.h is_pathsep.I \
mkdir_complete.cxx mkdir_complete.h \
get_twirl_data.cxx get_twirl_data.h \
parse_color.cxx parse_color.h \
wstring_encode.cxx wstring_encode.h
#begin static_lib_target
//
// libplugin_common.lib, a repository of code shared between the core
// API and the various plugin implementations.
//
#define BUILD_TARGET $[and $[HAVE_P3D_PLUGIN],$[HAVE_OPENSSL]]
#define TARGET plugin_common
#define USE_PACKAGES openssl
#define SOURCES $[PLUGIN_COMMON_SOURCES]
#end static_lib_target
#if $[P3D_PLUGIN_MT]
#begin static_lib_target
//
// libplugin_common_mt.lib, the same as above, with /MT compilation.
//
#define BUILD_TARGET $[and $[HAVE_P3D_PLUGIN],$[HAVE_OPENSSL]]
#define TARGET plugin_common_mt
#define USE_PACKAGES openssl_mt
#define LINK_FORCE_STATIC_RELEASE_C_RUNTIME 1
#define SOURCES $[PLUGIN_COMMON_SOURCES]
#end static_lib_target
#endif // $[P3D_PLUGIN_MT]
// The remaining targets build p3dpython.exe and variants.
#begin bin_target
//
// p3dpython.exe, the primary entry point to the downloaded Panda3D
// runtime. This executable is run in a child process by the Core API
// to invoke a particular instance of Panda.
//
#define BUILD_TARGET $[and $[HAVE_P3D_RTDIST],$[HAVE_PYTHON],$[HAVE_OPENSSL]]
#define USE_PACKAGES python openssl cg
#define TARGET p3dpython
#define OTHER_LIBS \
p3dtoolutil:c p3dtoolbase:c p3dtool:m \
p3interrogatedb:c p3dconfig:c p3dtoolconfig:m \
p3express:c pandaexpress:m p3dxml:c \
p3pgraph:c p3pgraphnodes:c p3cull:c p3gsgbase:c p3gobj:c \
p3mathutil:c p3downloader:c p3pnmimage:c \
p3prc:c p3pstatclient:c p3pandabase:c p3linmath:c p3putil:c \
p3pipeline:c p3event:c p3display:c panda:m \
$[if $[WANT_NATIVE_NET],p3nativenet:c] \
$[if $[HAVE_NET],p3net:c] \
p3tinyxml
#define SOURCES \
binaryXml.cxx binaryXml.h \
fhandle.h \
handleStream.cxx handleStream.h handleStream.I \
handleStreamBuf.cxx handleStreamBuf.h handleStreamBuf.I \
p3d_lock.h p3d_plugin.h \
p3d_plugin_config.h \
p3dCInstance.cxx \
p3dCInstance.h p3dCInstance.I \
p3dPythonRun.cxx p3dPythonRun.h p3dPythonRun.I \
run_p3dpython.h run_p3dpython.cxx
#define SOURCES $[SOURCES] \
p3dPythonMain.cxx
// If you have to link with a static Python library, define it here.
#define EXTRA_LIBS $[EXTRA_P3DPYTHON_LIBS]
#define OSX_SYS_FRAMEWORKS Carbon
#define WIN_SYS_LIBS user32
#end bin_target
#begin bin_target
//
// p3dpythonw.exe, a special variant on p3dpython.exe required by
// Windows (and built only on a Windows platform). This variant is
// compiled as a desktop application, as opposed to p3dpython.exe,
// which is a console application. (Both variants are required,
// because the plugin might be invoked either from a console or from
// the desktop.)
//
#define BUILD_TARGET $[and $[HAVE_P3D_RTDIST],$[HAVE_PYTHON],$[HAVE_OPENSSL],$[WINDOWS_PLATFORM]]
#define USE_PACKAGES python openssl
#define TARGET p3dpythonw
#define EXTRA_CDEFS NON_CONSOLE
#define OTHER_LIBS \
p3dtoolutil:c p3dtoolbase:c p3dtool:m \
p3interrogatedb:c p3dconfig:c p3dtoolconfig:m \
p3express:c pandaexpress:m p3dxml:c \
p3pgraph:c p3pgraphnodes:c p3cull:c p3gsgbase:c p3gobj:c \
p3mathutil:c p3downloader:c p3pnmimage:c \
p3prc:c p3pstatclient:c p3pandabase:c p3linmath:c p3putil:c \
p3pipeline:c p3event:c p3display:c panda:m \
$[if $[WANT_NATIVE_NET],p3nativenet:c] \
$[if $[HAVE_NET],p3net:c] \
p3tinyxml
#define SOURCES \
binaryXml.cxx binaryXml.h \
fhandle.h \
handleStream.cxx handleStream.h handleStream.I \
handleStreamBuf.cxx handleStreamBuf.h handleStreamBuf.I \
p3d_lock.h p3d_plugin.h \
p3d_plugin_config.h \
p3dCInstance.cxx \
p3dCInstance.h p3dCInstance.I \
p3dPythonRun.cxx p3dPythonRun.h p3dPythonRun.I \
run_p3dpython.h run_p3dpython.cxx
#define SOURCES $[SOURCES] \
p3dPythonMain.cxx
// If you have to link with a static Python library, define it here.
#define EXTRA_LIBS $[EXTRA_P3DPYTHON_LIBS]
#define OSX_SYS_FRAMEWORKS Carbon
#define WIN_SYS_LIBS user32
#end bin_target
#begin lib_target
//
// libp3dpython.dll, a special library used to run P3DPythonRun within
// the parent (browser) process, instead of forking a child, as a
// desparation fallback in case forking fails for some reason.
//
#define BUILD_TARGET $[and $[HAVE_P3D_RTDIST],$[HAVE_PYTHON],$[HAVE_OPENSSL]]
#define USE_PACKAGES python openssl cg
#define TARGET libp3dpython
#define LIB_PREFIX
#define OTHER_LIBS \
p3dtoolutil:c p3dtoolbase:c p3dtool:m \
p3interrogatedb:c p3dconfig:c p3dtoolconfig:m \
p3express:c pandaexpress:m p3dxml:c \
p3pgraph:c p3pgraphnodes:c p3cull:c p3gsgbase:c p3gobj:c \
p3mathutil:c p3downloader:c p3pnmimage:c \
p3prc:c p3pstatclient:c p3pandabase:c p3linmath:c p3putil:c \
p3pipeline:c p3event:c p3display:c panda:m \
$[if $[WANT_NATIVE_NET],p3nativenet:c] \
$[if $[HAVE_NET],p3net:c] \
p3tinyxml
#define SOURCES \
binaryXml.cxx binaryXml.h \
fhandle.h \
handleStream.cxx handleStream.h handleStream.I \
handleStreamBuf.cxx handleStreamBuf.h handleStreamBuf.I \
p3d_lock.h p3d_plugin.h \
p3d_plugin_config.h \
p3dCInstance.cxx \
p3dCInstance.h p3dCInstance.I \
p3dPythonRun.cxx p3dPythonRun.h p3dPythonRun.I \
run_p3dpython.h run_p3dpython.cxx
#define WIN_SYS_LIBS user32
#end lib_target
#include $[THISDIRPREFIX]p3d_plugin_config.h.pp