-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgenerous.project
243 lines (230 loc) · 9.7 KB
/
generous.project
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
BaconBox:
type: library-static
#Local array used as a reference for excluding all platforms.
platforms: &platforms
- Android
- Qt
- iOS
- ios
- IOS
- SDL
- MusicIOS
- OpenAL
- Windows
- Flash
- Lua
- libc
- SDLMixer
- Special
- StandardRenderer
- OpenGL
defaultConfiguration: SDL_Lua_debug
configurations:
O3:
artifacts:
CFLAGS:
- "-O3"
CXXFLAGS:
- "-O3"
O4:
artifacts:
CFLAGS:
- "-O4"
CXXFLAGS:
- "-O4"
core: &core
artifacts:
CFLAGS:
- "-Wno-write-strings"
- "-Wno-trigraphs"
CXXFLAGS:
- "$(CFLAGS)"
Cpp:
- ["BaconBox/**/*.cpp", *platforms]
Header:
- ["BaconBox/**/*.h", *platforms]
IncludesPath:
- "."
Define:
- ["SIGLY_DEFAULT_MT_POLICY", "sigly::SingleThreaded"]
# - SIGLY_USE_POSIX_THREADS
- ["VMATH_NAMESPACE", "vmath"]
OpenGL: &OpenGL
artifacts:
Cpp:
- "BaconBox/**/OpenGL/*.cpp"
- "BaconBox/**/StandardRenderer/**/*.cpp"
Header:
- "BaconBox/**/OpenGL/*.h"
- "BaconBox/**/StandardRenderer/**/*.h"
OSX: &OSX
artifacts:
Cpp:
- "BaconBox/**/libc/*.cpp"
Header:
- "BaconBox/**/libc/*.h"
IncludesPath:
- "libraries/Darwin/x86_64/include"
Linux: &Linux # TODO 32/64 bits detection
artifacts:
Cpp:
- "BaconBox/**/libc/*.cpp"
Header:
- "BaconBox/**/libc/*.h"
IncludesPath:
- "libraries/Linux/x86_64/include"
WINDOWS: &WINDOWS
artifacts:
Cpp:
- "BaconBox/**/Windows/*.cpp"
Header:
- "BaconBox/**/Windows/*.h"
IncludesPath:
- "libraries/w64/i686/include"
- "libraries/MINGW32_NT-6.1/i686/include"
- "libraries/MINGW32_NT-6.1-WOW/i686/include"
# Default native block that auto-discovers the OS.
native: &native
include: [core, OpenGL, [OSX, "OS.osx?"], [WINDOWS, "OS.windows?"], [Linux, "OS.linux?"]]
# Use this when Cross Compiling to windows instead of the previous block.
# This is a temporary fix while waiting for the generous refactor.
#native: &native
# include: [core, OpenGL, WINDOWS]
Lua: &Lua
preGenerousScripts:
- |
puts_banner 'Generating Lua swig bindings'
FileUtils.mkpath "#{$project.buildDir}/swig"
# -no-old-metatable-bindings should become the default at release
puts %x{ #{$project.options['swig']} -lua -c++ -module BaconBox -outdir #{$project.buildDir}/swig #{$project.definesString} #{$project.includesString} -o #{$project.buildDir}/swig/BaconBoxLua.cpp BaconBox/Special/Swig/BaconBox.i};
puts %x{ #{$project.options['swig']} -lua -external-runtime #{$project.buildDir}/swig/swigluarun.h}
options:
- ['swig', "Path to your swig executable", 'swig']
artifacts:
IncludesPath:
- "<%= $project.buildDir %>/swig"
Cpp:
- "BaconBox/**/Lua/*.cpp"
- "<%= $project.buildDir %>/swig/BaconBoxLua.cpp"
Header:
- "BaconBox/**/Lua/*.h"
- "<%= $project.buildDir %>/swig/swigluarun.h"
Define:
- BB_LUA
debug: &debug
artifacts:
CXXFLAGS:
- "-O0"
Define:
- BB_DEBUG
debugger: &debugger
include: [debug]
artifacts:
CXXFLAGS:
- "-g"
SDL: &SDL
include: [native]
artifacts:
Cpp:
- "BaconBox/**/SDL/*.cpp"
- "BaconBox/**/SDLMixer/*.cpp"
Header:
- "BaconBox/**/SDL/*.h"
- "BaconBox/**/SDLMixer/*.h"
Define:
- SDL
SDL_Lua: &SDL_Lua
include: [Lua, SDL]
SDL_Lua_debug:
export: true
include: [SDL_Lua, debug, debugger]
Android: &Android
include: [core, OpenGL, O3]
artifacts:
C:
- "BaconBox/**/Android/*.c"
Cpp:
- "BaconBox/**/libc/*.cpp"
- "BaconBox/**/Android/*.cpp"
Header:
- "BaconBox/**/libc/*.h"
- "BaconBox/**/Android/*.h"
IncludesPath:
- "libraries/Android/**/include"
Define:
- BB_ANDROID
Android_Lua: &Android_Lua
include: [Lua, Android]
Android_Lua_debug_arm:
export: true
include: [Android_Lua]
Android_Lua_debug_x86:
export: true
include: [Android_Lua]
Flash_Base:
include: [core, Lua]
options:
- - crossbridge
- "Path to your crossbridge sdk folder"
- <%= path = %x{which gcc}; path = path.slice(0..(path.index("/usr/bin/gcc"))) if path.include? '/usr/bin/gcc'; path = path.slice(0..(path.index("/usr/bin//gcc"))) if path.include? '/usr/bin//gcc'; path %>
preGenerousScripts:
- |
FileUtils.mkpath "#{$project.buildDir}/share"
AS3COMPILERARGS = "java -jar #{$project.options['crossbridge']}/usr/lib/asc2.jar -merge -md "
FileUtils.mkpath "#{$project.buildDir}/as3"
%x{ chmod 766 "#{$project.options['crossbridge']}/usr/share/LSOBackingStore.as"}
%x{ cp "#{$project.options['crossbridge']}/usr/share/LSOBackingStore.as" "#{$project.buildDir}/as3"}
%x{ cp "BaconBox/Special/Flash/BBKernel.as" "#{$project.buildDir}/as3"}
%x{ cp "BaconBox/Special/Flash/URLLoaderVFS.as" "#{$project.buildDir}/as3"}
puts_banner 'Compiling BBKernel.abc'
puts %x{#{AS3COMPILERARGS} -import #{$project.options['crossbridge']}/usr/lib/builtin.abc \
-import #{$project.options['crossbridge']}/usr/lib/PlayerKernel.abc \
-import #{$project.options['crossbridge']}/usr/lib/IVFS.abc \
#{$project.buildDir}/as3/BBKernel.as -outdir #{$project.buildDir}/as3 -out BBKernel}
FileUtils.cp "#{$project.buildDir}/as3/BBKernel.abc", "#{$project.buildDir}/share"
puts_banner 'Compiling VFS.abc'
puts %x{#{AS3COMPILERARGS} -import #{$project.options['crossbridge']}/usr/lib/builtin.abc \
-import #{$project.options['crossbridge']}/usr/lib/playerglobal.abc \
-import #{$project.options['crossbridge']}/usr/lib/BinaryData.abc \
-import #{$project.options['crossbridge']}/usr/lib/ISpecialFile.abc \
-import #{$project.options['crossbridge']}/usr/lib/IBackingStore.abc \
-import #{$project.options['crossbridge']}/usr/lib/IVFS.abc \
-import #{$project.options['crossbridge']}/usr/lib/InMemoryBackingStore.abc \
-import #{$project.options['crossbridge']}/usr/lib/PlayerKernel.abc \
#{$project.buildDir}/as3/URLLoaderVFS.as #{$project.buildDir}/as3/LSOBackingStore.as -outdir #{$project.buildDir}/as3 -out VFS}
FileUtils.cp "#{$project.buildDir}/as3/VFS.abc", "#{$project.buildDir}/share"
puts_banner 'Compiling BaconBoxAS3.abc'
puts %x{#{$project.options['crossbridge']}/usr/bin/swig -as3 -c++ -module BaconBoxAS3 -outdir #{$project.buildDir}/as3 -ignoremissing #{$project.definesString} #{$project.includesString} -package BaconBox -o #{$project.buildDir}/as3/BaconBoxAS3.cpp BaconBox/Special/Flash/BaconBoxAS3.i}
puts %x{#{AS3COMPILERARGS} -abcfuture -AS3 -import #{$project.options['crossbridge']}/usr/lib/builtin.abc -import #{$project.options['crossbridge']}/usr/lib/playerglobal.abc #{$project.buildDir}/as3/BaconBoxAS3.as}
puts %x{mv #{$project.buildDir}/as3/BaconBoxAS3.as #{$project.buildDir}/as3/BaconBoxAS3.as3}
FileUtils.cp "#{$project.buildDir}/as3/BaconBoxAS3.abc", "#{$project.buildDir}/share"
puts_banner 'Compiling EntityWrapper.swc'
%x{ cp -r "BaconBox/Special/Flash/BaconBox" "#{$project.buildDir}/as3/BaconBox"}
puts %x{ #{AS3COMPILERARGS} -abcfuture -AS3 -import #{$project.options['crossbridge']}/usr/lib/builtin.abc -import #{$project.options['crossbridge']}/usr/lib/playerglobal.abc -outdir #{$project.buildDir}/as3 #{$project.buildDir}/as3/BaconBox/EntityWrapper/EntityHolderTextField.as #{$project.buildDir}/as3/BaconBox/EntityWrapper/EntityHolderMovieClip.as }
FileUtils.cp "#{$project.buildDir}/as3/EntityHolderMovieClip.abc", "#{$project.buildDir}/share"
artifacts:
CFLAGS:
- "-emit-swf"
# - "-emit-llvm"
Define:
- BB_FLASH_PLATFORM
Cpp:
- "-flto-api=/Users/twistedjoe/Documents/Anhero/Jeux/JumpingJimmy/JumpingJimmy/exports.txt"
- "BaconBox/**/Flash/*.cpp"
- "<%= $project.buildDir %>/as3/*.cpp"
- "BaconBox/**/libc/*.cpp"
# - "-emit-llvm"
Header:
- "BaconBox/**/Flash/*.h"
- "BaconBox/**/libc/*.h"
IncludesPath:
- "libraries/Flash/include"
Flash:
include: [Flash_Base, O4]
export: true
Flash_debug:
export: true
include: [Flash_Base, debug]
Flash_debugger:
export: true
include: [Flash_debug, debugger]