Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 94da13b

Browse files
committed
[[ SysLibrary ]] Update libbrowser to use engine library loading
This patch updates libbrowser to use the engine's new library loading system. WIP - still to finish.
1 parent 8d0e05a commit 94da13b

22 files changed

+560
-1008
lines changed

config/linux.gypi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
'objcopy': '<!(echo ${OBJCOPY:-objcopy})',
88
'objdump': '<!(echo ${OBJDUMP:-objdump})',
99
'strip': '<!(echo ${STRIP:-strip})',
10+
11+
'target_platform': 'linux',
1012
},
1113

1214
'target_defaults':

config/win32.gypi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
'unix_configure%': '0',
1313

1414
'output_dir': '../win-<(target_arch)-bin',
15+
16+
'target_platform': 'win32',
1517
},
1618

1719
'target_defaults':

ide-support/revsaveasstandalone.livecodescript

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2271,6 +2271,7 @@ private command revCopyCEFResources pPlatform, pStandalonePath, pCopyRevBrowserR
22712271
if the result is not empty then
22722272
revStandaloneAddWarning "Windows, external failed to copy:" && quote & tCefResources & slash & "locales" & quote
22732273
end if
2274+
revAddMapping pPlatform, "CEF/libcef", "Externals/CEF/libcef"
22742275
break
22752276
case pPlatform contains "Linux"
22762277
put tCurrentLocation & slash & "Externals/CEF" into tCEFDest
@@ -2319,7 +2320,7 @@ private command revCopyCEFResources pPlatform, pStandalonePath, pCopyRevBrowserR
23192320
revStandaloneAddWarning "Linux, external failed to copy:" && quote & tCefResources & slash & tCEFFile & quote
23202321
end if
23212322
end repeat
2322-
2323+
revAddMapping pPlatform, "CEF/libcef", "Externals/CEF/libcef"
23232324
break
23242325
default
23252326
break

libbrowser/libbrowser.gyp

Lines changed: 138 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
'src/libbrowser_cef.h',
3535
'src/libbrowser_cef_lnx.cpp',
3636
'src/libbrowser_cef_win.cpp',
37-
'src/libbrowser_cefshared_lnx.cpp',
3837

3938
'src/libbrowser_win.rc.h',
4039
'src/libbrowser_win.rc',
@@ -103,7 +102,6 @@
103102
'sources!':
104103
[
105104
'src/libbrowser_cef_lnx.cpp',
106-
'src/libbrowser_cefshared_lnx.cpp',
107105
'src/signal_restore_posix.cpp',
108106

109107
'src/libbrowser_lnx_factories.cpp',
@@ -146,62 +144,32 @@
146144
},
147145
],
148146

149-
[
150-
# Only the CEF platforms need libbrowser-cefprocess
151-
'OS == "win" or OS == "linux"',
152-
{
153-
'dependencies':
154-
[
155-
'libbrowser-cefprocess',
156-
'../thirdparty/libcef/libcef.gyp:libcef_library_wrapper',
157-
'../thirdparty/libcef/libcef.gyp:libcef_stubs',
158-
],
159-
},
160-
],
161-
162-
# Copy files needed to run from build folder
163147
[
164148
'OS == "linux"',
165149
{
166150
'copies':
167151
[
168-
{
169-
'destination': '<(PRODUCT_DIR)',
170-
'files': [
171-
'../prebuilt/lib/linux/<(target_arch)/CEF/icudtl.dat',
172-
'../prebuilt/lib/linux/<(target_arch)/CEF/natives_blob.bin',
173-
'../prebuilt/lib/linux/<(target_arch)/CEF/snapshot_blob.bin',
174-
],
175-
},
176-
{
177-
'destination': '<(PRODUCT_DIR)/Externals/',
178-
'files': [
179-
'../prebuilt/lib/linux/<(target_arch)/CEF',
180-
],
181-
}
152+
{
153+
'destination':'<(PRODUCT_DIR)/CEF/',
154+
'files':
155+
[
156+
'<(PRODUCT_DIR)/libbrowser-cefprocess',
157+
],
158+
},
182159
],
183160
},
184161
],
185-
162+
186163
[
187-
'OS == "win"',
164+
# Only the CEF platforms need libbrowser-cefprocess
165+
'OS == "win" or OS == "linux"',
188166
{
189-
'copies':
167+
'dependencies':
190168
[
191-
{
192-
'destination':'<(PRODUCT_DIR)/Externals/',
193-
'files':
194-
[
195-
'../prebuilt/lib/win32/<(target_arch)/CEF/',
196-
],
197-
},
198-
{
199-
'destination':'<(PRODUCT_DIR)/Externals/CEF/',
200-
'files':
201-
[
202-
'<(PRODUCT_DIR)/libbrowser-cefprocess.exe',
203-
],
204-
},
169+
'libbrowser-cefprocess',
170+
'../prebuilt/libcef.gyp:libcef',
171+
'../thirdparty/libcef/libcef.gyp:libcef_library_wrapper',
172+
'../thirdparty/libcef/libcef.gyp:libcef_stubs',
205173
],
206174
},
207175
],
@@ -236,73 +204,129 @@
236204
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
237205
},
238206
},
239-
240-
{
241-
'target_name': 'libbrowser-cefprocess',
242-
'type': 'executable',
243-
'mac_bundle': 1,
244-
'product_name': 'libbrowser-cefprocess',
245-
246-
'dependencies':
247-
[
248-
'../libcore/libcore.gyp:libCore',
249-
'../libfoundation/libfoundation.gyp:libFoundation',
250-
'../thirdparty/libcef/libcef.gyp:libcef_library_wrapper',
251-
'../thirdparty/libcef/libcef.gyp:libcef_stubs',
252-
],
207+
],
208+
209+
'conditions':
210+
[
211+
[
212+
'OS == "win" or OS == "linux"',
213+
{
214+
'targets':
215+
[
216+
{
217+
'target_name': 'libbrowser-cefprocess',
218+
'type': 'executable',
219+
'mac_bundle': 1,
220+
'product_name': 'libbrowser-cefprocess',
221+
222+
'dependencies':
223+
[
224+
'../libcore/libcore.gyp:libCore',
225+
'../libfoundation/libfoundation.gyp:libFoundation',
226+
'../thirdparty/libcef/libcef.gyp:libcef_library_wrapper',
227+
'../prebuilt/libcef.gyp:libcef',
228+
],
253229

254-
'include_dirs':
255-
[
256-
'include',
257-
],
258-
259-
'sources':
260-
[
261-
'src/libbrowser_memory.cpp',
262-
'src/libbrowser_cefprocess.cpp',
263-
'src/libbrowser_cefprocess_lnx.cpp',
264-
'src/libbrowser_cefprocess_win.cpp',
265-
'src/libbrowser_cefshared_lnx.cpp',
266-
],
267-
268-
'conditions':
269-
[
270-
## Exclusions
271-
[
272-
'OS != "win"',
273-
{
274-
'sources!':
275-
[
276-
'src/libbrowser_cefprocess_win.cpp',
277-
],
278-
},
279-
],
280-
281-
[
282-
'OS != "linux"',
283-
{
284-
'sources!':
285-
[
286-
'src/libbrowser_cefprocess_lnx.cpp',
287-
'src/libbrowser_cefshared_lnx.cpp',
288-
],
289-
},
290-
],
291-
292-
[
293-
'OS == "win" or OS == "linux"',
294-
{
295-
# Distributing the OSX version is done separately
296-
'all_dependent_settings':
297-
{
298-
'variables':
299-
{
300-
'dist_files': [ '<(PRODUCT_DIR)/<(_product_name)>(exe_suffix)' ],
301-
},
302-
},
303-
},
304-
],
305-
],
306-
},
230+
'include_dirs':
231+
[
232+
'include',
233+
],
234+
235+
'sources':
236+
[
237+
'src/libbrowser_memory.cpp',
238+
'src/libbrowser_cefprocess.cpp',
239+
'src/libbrowser_cefprocess_lnx.cpp',
240+
'src/libbrowser_cefprocess_win.cpp',
241+
],
242+
243+
'conditions':
244+
[
245+
## Exclusions
246+
[
247+
'OS != "win"',
248+
{
249+
'sources!':
250+
[
251+
'src/libbrowser_cefprocess_win.cpp',
252+
],
253+
},
254+
],
255+
256+
[
257+
'OS != "linux"',
258+
{
259+
'sources!':
260+
[
261+
'src/libbrowser_cefprocess_lnx.cpp',
262+
],
263+
},
264+
],
265+
266+
[
267+
'OS == "win"',
268+
{
269+
'copies':
270+
[
271+
{
272+
'destination':'<(PRODUCT_DIR)/CEF/',
273+
'files':
274+
[
275+
'<(PRODUCT_DIR)/libbrowser-cefprocess.exe',
276+
],
277+
},
278+
],
279+
280+
'library_dirs':
281+
[
282+
'../prebuilt/lib/win32/<(target_arch)/CEF/',
283+
],
284+
285+
'libraries':
286+
[
287+
'-llibcef.lib',
288+
],
289+
},
290+
],
291+
292+
[
293+
'OS == "linux"',
294+
{
295+
'library_dirs':
296+
[
297+
'../prebuilt/lib/linux/<(target_arch)/CEF/',
298+
],
299+
300+
'libraries':
301+
[
302+
'-lcef',
303+
],
304+
305+
'ldflags':
306+
[
307+
'-Wl,--allow-shlib-undefined',
308+
'-Wl,-rpath=\\$$ORIGIN',
309+
],
310+
},
311+
],
312+
313+
[
314+
'OS == "win" or OS == "linux"',
315+
{
316+
# Distributing the OSX version is done separately
317+
'all_dependent_settings':
318+
{
319+
'variables':
320+
{
321+
'dist_files': [ '<(PRODUCT_DIR)/<(_product_name)>(exe_suffix)' ],
322+
},
323+
},
324+
},
325+
],
326+
],
327+
},
328+
],
329+
},
330+
],
307331
],
308332
}

0 commit comments

Comments
 (0)