mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add initial Linux support (issue #40).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@338 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "ERROR: Please specify a build target: Debug or Release"
|
||||
@@ -8,6 +8,11 @@ else
|
||||
else
|
||||
PROJECT_NAME=$2
|
||||
fi
|
||||
|
||||
xcodebuild -project ../cef.xcodeproj -configuration $1 -target $PROJECT_NAME
|
||||
if [ `uname` = "Linux" ]; then
|
||||
pushd ../../
|
||||
make BUILDTYPE=$1 -j 16
|
||||
popd
|
||||
else
|
||||
xcodebuild -project ../cef.xcodeproj -configuration $1 -target $PROJECT_NAME
|
||||
fi
|
||||
fi
|
||||
|
@@ -122,7 +122,7 @@ typedef struct _cef_base_t
|
||||
// Check that the structure |s|, which is defined with a cef_base_t member named
|
||||
// |base|, is large enough to contain the specified member |f|.
|
||||
#define CEF_MEMBER_EXISTS(s, f) \\
|
||||
((int)&((s)->f) - (int)(s) + sizeof((s)->f) <= (s)->base.size)
|
||||
((intptr_t)&((s)->f) - (intptr_t)(s) + sizeof((s)->f) <= (s)->base.size)
|
||||
|
||||
#define CEF_MEMBER_MISSING(s, f) (!CEF_MEMBER_EXISTS(s, f) || !((s)->f))
|
||||
|
||||
|
@@ -140,7 +140,7 @@ if sys.platform == 'win32':
|
||||
platform = 'windows'
|
||||
elif sys.platform == 'darwin':
|
||||
platform = 'macosx'
|
||||
elif sys.platform == 'linux2':
|
||||
elif sys.platform.startswith('linux'):
|
||||
platform = 'linux'
|
||||
|
||||
# output directory
|
||||
@@ -149,8 +149,8 @@ output_dir = os.path.abspath(os.path.join(options.outputdir, \
|
||||
remove_dir(output_dir, options.quiet)
|
||||
make_dir(output_dir, options.quiet)
|
||||
|
||||
# transfer the LICENSE.TXT file
|
||||
copy_file(os.path.join(cef_dir, 'LICENSE.TXT'), output_dir, options.quiet)
|
||||
# transfer the LICENSE.txt file
|
||||
copy_file(os.path.join(cef_dir, 'LICENSE.txt'), output_dir, options.quiet)
|
||||
|
||||
# read the variables list from cef_paths.gypi
|
||||
cef_paths = eval_file(os.path.join(cef_dir, 'cef_paths.gypi'))
|
||||
@@ -314,6 +314,31 @@ elif platform == 'macosx':
|
||||
write_file(src_file, data)
|
||||
|
||||
elif platform == 'linux':
|
||||
linux_build_dir = os.path.join(cef_dir, os.pardir, 'out')
|
||||
# transfer build/Debug files
|
||||
if not options.allowpartial or path_exists(os.path.join(linux_build_dir, 'Debug')):
|
||||
dst_dir = os.path.join(output_dir, 'Debug')
|
||||
make_dir(dst_dir, options.quiet)
|
||||
copy_files(os.path.join(linux_build_dir, 'Debug/lib.target/*'), dst_dir, options.quiet)
|
||||
copy_file(os.path.join(linux_build_dir, 'Debug/cefclient'), dst_dir, options.quiet)
|
||||
copy_file(os.path.join(linux_build_dir, 'Debug/chrome.pak'), dst_dir, options.quiet)
|
||||
copy_dir(os.path.join(linux_build_dir, 'Debug/locales'), os.path.join(dst_dir, 'locales'), options.quiet)
|
||||
|
||||
else:
|
||||
sys.stderr.write("No Debug build files.\n")
|
||||
|
||||
# transfer build/Release files
|
||||
if not options.allowpartial or path_exists(os.path.join(linux_build_dir, 'Release')):
|
||||
dst_dir = os.path.join(output_dir, 'Release')
|
||||
make_dir(dst_dir, options.quiet)
|
||||
copy_files(os.path.join(linux_build_dir, 'Release/lib.target/*'), dst_dir, options.quiet)
|
||||
copy_file(os.path.join(linux_build_dir, 'Release/cefclient'), dst_dir, options.quiet)
|
||||
copy_file(os.path.join(linux_build_dir, 'Release/chrome.pak'), dst_dir, options.quiet)
|
||||
copy_dir(os.path.join(linux_build_dir, 'Release/locales'), os.path.join(dst_dir, 'locales'), options.quiet)
|
||||
|
||||
else:
|
||||
sys.stderr.write("No Release build files.\n")
|
||||
|
||||
# transfer include files
|
||||
transfer_gypi_files(cef_dir, cef_paths['includes_linux'], \
|
||||
'include/', include_dir, options.quiet)
|
||||
|
Reference in New Issue
Block a user