diff options
author | maf@google.com <maf@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 02:15:27 +0000 |
---|---|---|
committer | maf@google.com <maf@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 02:15:27 +0000 |
commit | e662e8d9e42d9250ef5ebed4067ecdd146552581 (patch) | |
tree | 4edc77232f4c681348153a82ef427a6eab26b1e4 /o3d | |
parent | 23763611ff03226f8d5457906def87dfe644a924 (diff) | |
download | chromium_src-e662e8d9e42d9250ef5ebed4067ecdd146552581.zip chromium_src-e662e8d9e42d9250ef5ebed4067ecdd146552581.tar.gz chromium_src-e662e8d9e42d9250ef5ebed4067ecdd146552581.tar.bz2 |
Get Mac GYP build compiling.
Review URL: http://codereview.chromium.org/172119
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25292 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r-- | o3d/build/common.gypi | 20 | ||||
-rw-r--r-- | o3d/core/cross/message_queue.cc | 2 | ||||
-rwxr-xr-x | o3d/plugin/mac/plugin_copy_frameworks.sh | 9 | ||||
-rwxr-xr-x | o3d/plugin/mac/plugin_fix_install_names.sh | 5 | ||||
-rw-r--r-- | o3d/plugin/mac/plugin_mac.mm | 2 | ||||
-rw-r--r-- | o3d/plugin/plugin.gyp | 9 | ||||
-rw-r--r-- | o3d/utils/cross/dataurl_test.cc | 250 |
7 files changed, 154 insertions, 143 deletions
diff --git a/o3d/build/common.gypi b/o3d/build/common.gypi index a164f7c..a011c8e 100644 --- a/o3d/build/common.gypi +++ b/o3d/build/common.gypi @@ -25,6 +25,16 @@ 'defines': [ 'GYP_BUILD', # Needed to make a change in base/types.h conditional. ], + # This needs to be in a target_conditions block in order to successfully + # override the xcode_settings in ../../build/common.gypi. + # Something to do with evaluation order. + 'target_conditions': [ + ['OS=="mac"', { + 'xcode_settings': { + 'MACOSX_DEPLOYMENT_TARGET': '10.4', + }, + }], + ], }, 'conditions' : [ ['OS == "win"', @@ -70,14 +80,16 @@ 'configurations': { 'Debug': { 'xcode_settings': { - 'CFLAGS': ['-g',], +# 'OTHER_CFLAGS': ['-ggdb', '-g',], + 'GCC_DEBUGGING_SYMBOLS': 'full', + 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', }, }, }, 'xcode_settings': { - 'CFLAGS': ['-gstabs+', - '-fno-eliminate-unused-debug-symbols', - '-mmacosx-version-min=10.4'], + 'OTHER_CFLAGS': [ + '-fno-eliminate-unused-debug-symbols', + '-mmacosx-version-min=10.4'], 'WARNING_CFLAGS': ['-Wno-deprecated-declarations'], 'WARNING_CXXFLAGS': ['-Wstrict-aliasing', '-Wno-deprecated',], diff --git a/o3d/core/cross/message_queue.cc b/o3d/core/cross/message_queue.cc index 3537930..d8962b2 100644 --- a/o3d/core/cross/message_queue.cc +++ b/o3d/core/cross/message_queue.cc @@ -846,7 +846,7 @@ bool MessageQueue::ProcessMessageGetVersion( response_header.iov_length = 1; response_header.handles = NULL; response_header.handle_count = 0; - int result = nacl::SendDatagram(client->client_handle(), &response_header, 0); + nacl::SendDatagram(client->client_handle(), &response_header, 0); return true; } diff --git a/o3d/plugin/mac/plugin_copy_frameworks.sh b/o3d/plugin/mac/plugin_copy_frameworks.sh index 9edb962..1df95dc 100755 --- a/o3d/plugin/mac/plugin_copy_frameworks.sh +++ b/o3d/plugin/mac/plugin_copy_frameworks.sh @@ -3,10 +3,11 @@ # Copy stripped frameworks inside the plugin. ditto --arch i386 \ - "${PROJECT_DIR}/../../breakpad/src/client/mac/build/Release/Breakpad.framework" \ - "${BUILT_PRODUCTS_DIR}/O3D.plugin/Contents/Frameworks/Breakpad.framework" - -ditto --arch i386 \ "${PROJECT_DIR}/../../third_party/cg/files/mac/Cg.framework" \ "${BUILT_PRODUCTS_DIR}/O3D.plugin/Contents/Frameworks/Cg.framework" +ditto --arch i386 \ + "${BUILT_PRODUCTS_DIR}/crash_report_sender.app" \ + "${BUILT_PRODUCTS_DIR}/O3D.plugin/Contents/Resources/crash_report_sender.app" + + diff --git a/o3d/plugin/mac/plugin_fix_install_names.sh b/o3d/plugin/mac/plugin_fix_install_names.sh index 36ec595..a2cdbf0 100755 --- a/o3d/plugin/mac/plugin_fix_install_names.sh +++ b/o3d/plugin/mac/plugin_fix_install_names.sh @@ -2,11 +2,6 @@ # Make plugin look in its private Frameworks directory for these frameworks. -# First take care of Breakpad.framework -/usr/bin/install_name_tool -change \ - @executable_path/../Frameworks/Breakpad.framework/Versions/A/Breakpad \ - @loader_path/../Frameworks/Breakpad.framework/Versions/A/Breakpad \ - "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}" # Cg.framework /usr/bin/install_name_tool -change \ diff --git a/o3d/plugin/mac/plugin_mac.mm b/o3d/plugin/mac/plugin_mac.mm index f04955d..a0d3396 100644 --- a/o3d/plugin/mac/plugin_mac.mm +++ b/o3d/plugin/mac/plugin_mac.mm @@ -32,7 +32,7 @@ #include "plugin_mac.h" -#include <Breakpad/Breakpad.h> +#include "Breakpad.h" #include <Cocoa/Cocoa.h> #include <QuickTime/QuickTime.h> #include "plugin/cross/o3d_glue.h" diff --git a/o3d/plugin/plugin.gyp b/o3d/plugin/plugin.gyp index f0ea4c6..9331ce3 100644 --- a/o3d/plugin/plugin.gyp +++ b/o3d/plugin/plugin.gyp @@ -97,8 +97,10 @@ 'mac/graphics_utils_mac.mm', ], 'mac_framework_dirs': [ - '../../breakpad/src/client/mac/build/Release', - '<(cgdir)', + '../../<(cgdir)', + ], + 'include_dirs': [ + '../../breakpad/src/client/mac/Framework', ], 'defines': [ 'XP_MACOSX=1', @@ -112,7 +114,8 @@ '$(SDKROOT)/System/Library/Frameworks/IOKit.framework', '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', '$(SDKROOT)/System/Library/Frameworks/QuickTime.framework', - '../../breakpad/src/client/mac/build/Release/Breakpad.framework', + 'libbreakpad.a', + 'libbreakpad_utilities.a', '../../third_party/cg/files/mac/Cg.framework', '../../third_party/glew/files/lib/libMacStaticGLEW.a', ], diff --git a/o3d/utils/cross/dataurl_test.cc b/o3d/utils/cross/dataurl_test.cc index 4095859..f189011 100644 --- a/o3d/utils/cross/dataurl_test.cc +++ b/o3d/utils/cross/dataurl_test.cc @@ -1,125 +1,125 @@ -/*
- * Copyright 2009, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-// This file contains the tests of dataurl functions
-
-#include "tests/common/win/testing_common.h"
-#include "utils/cross/dataurl.h"
-
-namespace o3d {
-
-class DataURLTest : public testing::Test {
-};
-
-TEST_F(DataURLTest, kEmptyDataURL) {
- EXPECT_STREQ("data:,", dataurl::kEmptyDataURL);
-}
-
-TEST_F(DataURLTest, ToDataURL) {
- EXPECT_STREQ("data:a/b;base64,YWJj",
- dataurl::ToDataURL("a/b", "abc", 3).c_str());
- EXPECT_STREQ("data:de/ej;base64,YWIAYw==",
- dataurl::ToDataURL("de/ej", "ab\0c", 4).c_str());
-}
-
-TEST_F(DataURLTest, FromDataURL) {
- String data_url("data:a/b;base64,YWJj");
- scoped_array<uint8> output;
- size_t output_length;
- String error_string;
-
- EXPECT_TRUE(dataurl::FromDataURL(data_url,
- &output,
- &output_length,
- &error_string));
- EXPECT_EQ(3, output_length);
- EXPECT_EQ(0, memcmp("abc", output.get(), 3));
-}
-
-TEST_F(DataURLTest, FromDataURLFormatErrors) {
- scoped_array<uint8> output;
- size_t output_length;
- String error_string("");
- // Not long enough
- EXPECT_FALSE(dataurl::FromDataURL("",
- &output,
- &output_length,
- &error_string));
- EXPECT_LT(0u, error_string.size());
- // Does not start with "data:"
- error_string = "";
- EXPECT_FALSE(dataurl::FromDataURL("aaaaaaaaaaaaaaaa",
- &output,
- &output_length,
- &error_string));
- EXPECT_LT(0u, error_string.size());
- // Must contain base64
- error_string = "";
- EXPECT_FALSE(dataurl::FromDataURL("data:aaaaaaaaaaa",
- &output,
- &output_length,
- &error_string));
- EXPECT_LT(0u, error_string.size());
- // Must contain data.
- error_string = "";
- EXPECT_FALSE(dataurl::FromDataURL("data:aa;base64,",
- &output,
- &output_length,
- &error_string));
- EXPECT_LT(0u, error_string.size());
-
- // Bad character in data.
- error_string = "";
- EXPECT_FALSE(dataurl::FromDataURL("data:;base64,@",
- &output,
- &output_length,
- &error_string));
- EXPECT_LT(0u, error_string.size());
- // Padding error in data.
- error_string = "";
- EXPECT_FALSE(dataurl::FromDataURL("data:;base64,Y",
- &output,
- &output_length,
- &error_string));
- EXPECT_LT(0u, error_string.size());
- // Correct.
- error_string = "";
- EXPECT_TRUE(dataurl::FromDataURL("data:;base64,YWJj",
- &output,
- &output_length,
- &error_string));
- EXPECT_EQ(0u, error_string.size());
-}
-
-} // namespace o3d
-
-
+/* + * Copyright 2009, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +// This file contains the tests of dataurl functions + +#include "tests/common/win/testing_common.h" +#include "utils/cross/dataurl.h" + +namespace o3d { + +class DataURLTest : public testing::Test { +}; + +TEST_F(DataURLTest, kEmptyDataURL) { + EXPECT_STREQ("data:,", dataurl::kEmptyDataURL); +} + +TEST_F(DataURLTest, ToDataURL) { + EXPECT_STREQ("data:a/b;base64,YWJj", + dataurl::ToDataURL("a/b", "abc", 3).c_str()); + EXPECT_STREQ("data:de/ej;base64,YWIAYw==", + dataurl::ToDataURL("de/ej", "ab\0c", 4).c_str()); +} + +TEST_F(DataURLTest, FromDataURL) { + String data_url("data:a/b;base64,YWJj"); + scoped_array<uint8> output; + size_t output_length; + String error_string; + + EXPECT_TRUE(dataurl::FromDataURL(data_url, + &output, + &output_length, + &error_string)); + EXPECT_EQ(3u, output_length); + EXPECT_EQ(0, memcmp("abc", output.get(), 3)); +} + +TEST_F(DataURLTest, FromDataURLFormatErrors) { + scoped_array<uint8> output; + size_t output_length; + String error_string(""); + // Not long enough + EXPECT_FALSE(dataurl::FromDataURL("", + &output, + &output_length, + &error_string)); + EXPECT_LT(0u, error_string.size()); + // Does not start with "data:" + error_string = ""; + EXPECT_FALSE(dataurl::FromDataURL("aaaaaaaaaaaaaaaa", + &output, + &output_length, + &error_string)); + EXPECT_LT(0u, error_string.size()); + // Must contain base64 + error_string = ""; + EXPECT_FALSE(dataurl::FromDataURL("data:aaaaaaaaaaa", + &output, + &output_length, + &error_string)); + EXPECT_LT(0u, error_string.size()); + // Must contain data. + error_string = ""; + EXPECT_FALSE(dataurl::FromDataURL("data:aa;base64,", + &output, + &output_length, + &error_string)); + EXPECT_LT(0u, error_string.size()); + + // Bad character in data. + error_string = ""; + EXPECT_FALSE(dataurl::FromDataURL("data:;base64,@", + &output, + &output_length, + &error_string)); + EXPECT_LT(0u, error_string.size()); + // Padding error in data. + error_string = ""; + EXPECT_FALSE(dataurl::FromDataURL("data:;base64,Y", + &output, + &output_length, + &error_string)); + EXPECT_LT(0u, error_string.size()); + // Correct. + error_string = ""; + EXPECT_TRUE(dataurl::FromDataURL("data:;base64,YWJj", + &output, + &output_length, + &error_string)); + EXPECT_EQ(0u, error_string.size()); +} + +} // namespace o3d + + |