diff options
author | Android Chromium Automerger <chromium-automerger@android> | 2013-11-07 14:34:10 +0000 |
---|---|---|
committer | Android Chromium Automerger <chromium-automerger@android> | 2013-11-07 14:34:10 +0000 |
commit | b2dd2ec2c78097c59416a398523b41b7fc97550f (patch) | |
tree | 111017ad992d52b0e5195ae79ef8f504c3b5318c | |
parent | 5a2e24edac58a434498ef074c59b5e89efe21895 (diff) | |
parent | 7614842ca70d1cca6192166b10c0565f9aee358a (diff) | |
download | gyp-b2dd2ec2c78097c59416a398523b41b7fc97550f.tar.gz |
Merge tools/gyp from https://chromium.googlesource.com/external/gyp.git at 7614842ca70d1cca6192166b10c0565f9aee358a
This commit was generated by merge_from_chromium.py.
Change-Id: Id0090d2a9365f3facc8200442ad55332c1ca7757
24 files changed, 493 insertions, 27 deletions
diff --git a/pylib/gyp/MSVSVersion.py b/pylib/gyp/MSVSVersion.py index c36b7743..0ef427ef 100644 --- a/pylib/gyp/MSVSVersion.py +++ b/pylib/gyp/MSVSVersion.py @@ -376,7 +376,7 @@ def SelectVisualStudioVersion(version='auto'): if version == 'auto': version = os.environ.get('GYP_MSVS_VERSION', 'auto') version_map = { - 'auto': ('10.0', '9.0', '8.0', '11.0'), + 'auto': ('10.0', '12.0', '9.0', '8.0', '11.0'), '2005': ('8.0',), '2005e': ('8.0',), '2008': ('9.0',), diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py index 37208d48..23fb9b8a 100644 --- a/pylib/gyp/generator/ninja.py +++ b/pylib/gyp/generator/ninja.py @@ -847,10 +847,12 @@ class NinjaWriter: self.GypPathToNinja)]) include_dirs = config.get('include_dirs', []) + env = self.GetSortedXcodeEnv() if self.flavor == 'win': + env = self.msvs_settings.GetVSMacroEnv('$!PRODUCT_DIR', + config=config_name) include_dirs = self.msvs_settings.AdjustIncludeDirs(include_dirs, config_name) - env = self.GetSortedXcodeEnv() self.WriteVariableList(ninja_file, 'includes', [QuoteShellArgument('-I' + self.GypPathToNinja(i, env), self.flavor) for i in include_dirs]) @@ -876,6 +878,7 @@ class NinjaWriter: map(self.ExpandSpecial, cflags_objcc)) ninja_file.newline() outputs = [] + has_rc_source = False for source in sources: filename, ext = os.path.splitext(source) ext = ext[1:] @@ -903,6 +906,7 @@ class NinjaWriter: elif self.flavor == 'win' and ext == 'rc': command = 'rc' obj_ext = '.res' + has_rc_source = True else: # Ignore unhandled extensions. continue @@ -921,6 +925,12 @@ class NinjaWriter: order_only=predepends, variables=variables) outputs.append(output) + if has_rc_source: + resource_include_dirs = config.get('resource_include_dirs', include_dirs) + self.WriteVariableList(ninja_file, 'resource_includes', + [QuoteShellArgument('-I' + self.GypPathToNinja(i, env), self.flavor) + for i in resource_include_dirs]) + self.WritePchTargets(ninja_file, pch_commands) ninja_file.newline() @@ -1821,7 +1831,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, description='RC $in', # Note: $in must be last otherwise rc.exe complains. command=('%s gyp-win-tool rc-wrapper ' - '$arch $rc $defines $includes $rcflags /fo$out $in' % + '$arch $rc $defines $resource_includes $rcflags /fo$out $in' % sys.executable)) master_ninja.rule( 'asm', diff --git a/pylib/gyp/generator/xcode.py b/pylib/gyp/generator/xcode.py index 7e5f79f1..331e78ba 100644 --- a/pylib/gyp/generator/xcode.py +++ b/pylib/gyp/generator/xcode.py @@ -72,6 +72,7 @@ generator_additional_non_configuration_keys = [ 'mac_bundle_resources', 'mac_framework_headers', 'mac_framework_private_headers', + 'mac_xctest_bundle', 'xcode_create_dependents_test_runner', ] @@ -642,6 +643,7 @@ def GenerateOutput(target_list, target_dicts, data, params): 'static_library': 'com.apple.product-type.library.static', 'executable+bundle': 'com.apple.product-type.application', 'loadable_module+bundle': 'com.apple.product-type.bundle', + 'loadable_module+xctest': 'com.apple.product-type.bundle.unit-test', 'shared_library+bundle': 'com.apple.product-type.framework', } @@ -651,11 +653,18 @@ def GenerateOutput(target_list, target_dicts, data, params): } type = spec['type'] - is_bundle = int(spec.get('mac_bundle', 0)) + is_xctest = int(spec.get('mac_xctest_bundle', 0)) + is_bundle = int(spec.get('mac_bundle', 0)) or is_xctest if type != 'none': type_bundle_key = type - if is_bundle: + if is_xctest: + type_bundle_key += '+xctest' + assert type == 'loadable_module', ( + 'mac_xctest_bundle targets must have type loadable_module ' + '(target %s)' % target_name) + elif is_bundle: type_bundle_key += '+bundle' + xctarget_type = gyp.xcodeproj_file.PBXNativeTarget try: target_properties['productType'] = _types[type_bundle_key] @@ -668,6 +677,9 @@ def GenerateOutput(target_list, target_dicts, data, params): assert not is_bundle, ( 'mac_bundle targets cannot have type none (target "%s")' % target_name) + assert not is_xctest, ( + 'mac_xctest_bundle targets cannot have type none (target "%s")' % + target_name) target_product_name = spec.get('product_name') if target_product_name is not None: @@ -1020,7 +1032,7 @@ def GenerateOutput(target_list, target_dicts, data, params): if [ "${JOB_COUNT}" -gt 4 ]; then JOB_COUNT=4 fi -exec "${DEVELOPER_BIN_DIR}/make" -f "${PROJECT_FILE_PATH}/%s" -j "${JOB_COUNT}" +exec xcrun make -f "${PROJECT_FILE_PATH}/%s" -j "${JOB_COUNT}" exit 1 """ % makefile_name ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase({ diff --git a/pylib/gyp/mac_tool.py b/pylib/gyp/mac_tool.py index 239e7f63..20b3a486 100755 --- a/pylib/gyp/mac_tool.py +++ b/pylib/gyp/mac_tool.py @@ -48,22 +48,33 @@ class MacTool(object): extension = os.path.splitext(source)[1].lower() if os.path.isdir(source): # Copy tree. + # TODO(thakis): This copies file attributes like mtime, while the + # single-file branch below doesn't. This should probably be changed to + # be consistent with the single-file branch. if os.path.exists(dest): shutil.rmtree(dest) shutil.copytree(source, dest) elif extension == '.xib': return self._CopyXIBFile(source, dest) + elif extension == '.storyboard': + return self._CopyXIBFile(source, dest) elif extension == '.strings': self._CopyStringsFile(source, dest) else: - shutil.copyfile(source, dest) + shutil.copy(source, dest) def _CopyXIBFile(self, source, dest): """Compiles a XIB file with ibtool into a binary plist in the bundle.""" - tools_dir = os.environ.get('DEVELOPER_BIN_DIR', '/usr/bin') - args = [os.path.join(tools_dir, 'ibtool'), '--errors', '--warnings', - '--notices', '--output-format', 'human-readable-text', '--compile', - dest, source] + + # ibtool sometimes crashes with relative paths. See crbug.com/314728. + base = os.path.dirname(os.path.realpath(__file__)) + if os.path.relpath(source): + source = os.path.join(base, source) + if os.path.relpath(dest): + dest = os.path.join(base, dest) + + args = ['xcrun', 'ibtool', '--errors', '--warnings', '--notices', + '--output-format', 'human-readable-text', '--compile', dest, source] ibtool_section_re = re.compile(r'/\*.*\*/') ibtool_re = re.compile(r'.*note:.*is clipping its content') ibtoolout = subprocess.Popen(args, stdout=subprocess.PIPE) diff --git a/pylib/gyp/xcode_emulation.py b/pylib/gyp/xcode_emulation.py index ade82aa0..f9cec336 100644 --- a/pylib/gyp/xcode_emulation.py +++ b/pylib/gyp/xcode_emulation.py @@ -1065,7 +1065,10 @@ def GetMacBundleResources(product_dir, xcode_settings, resources): output = os.path.join(output, res_parts[1]) # Compiled XIB files are referred to by .nib. if output.endswith('.xib'): - output = output[0:-3] + 'nib' + output = os.path.splitext(output)[0] + '.nib' + # Compiled storyboard files are referred to by .storyboardc. + if output.endswith('.storyboard'): + output = os.path.splitext(output)[0] + '.storyboardc' yield output, res diff --git a/pylib/gyp/xcodeproj_file.py b/pylib/gyp/xcodeproj_file.py index fd740863..6e4a1dc6 100644 --- a/pylib/gyp/xcodeproj_file.py +++ b/pylib/gyp/xcodeproj_file.py @@ -2238,20 +2238,22 @@ class PBXNativeTarget(XCTarget): # prefix : the prefix for the file name # suffix : the suffix for the filen ame _product_filetypes = { - 'com.apple.product-type.application': ['wrapper.application', - '', '.app'], - 'com.apple.product-type.bundle': ['wrapper.cfbundle', - '', '.bundle'], - 'com.apple.product-type.framework': ['wrapper.framework', - '', '.framework'], - 'com.apple.product-type.library.dynamic': ['compiled.mach-o.dylib', - 'lib', '.dylib'], - 'com.apple.product-type.library.static': ['archive.ar', - 'lib', '.a'], - 'com.apple.product-type.tool': ['compiled.mach-o.executable', - '', ''], - 'com.googlecode.gyp.xcode.bundle': ['compiled.mach-o.dylib', - '', '.so'], + 'com.apple.product-type.application': ['wrapper.application', + '', '.app'], + 'com.apple.product-type.bundle': ['wrapper.cfbundle', + '', '.bundle'], + 'com.apple.product-type.framework': ['wrapper.framework', + '', '.framework'], + 'com.apple.product-type.library.dynamic': ['compiled.mach-o.dylib', + 'lib', '.dylib'], + 'com.apple.product-type.library.static': ['archive.ar', + 'lib', '.a'], + 'com.apple.product-type.tool': ['compiled.mach-o.executable', + '', ''], + 'com.apple.product-type.bundle.unit-test': ['wrapper.cfbundle', + '', '.xctest'], + 'com.googlecode.gyp.xcode.bundle': ['compiled.mach-o.dylib', + '', '.so'], } def __init__(self, properties=None, id=None, parent=None, @@ -2303,6 +2305,11 @@ class PBXNativeTarget(XCTarget): if force_extension is None: force_extension = suffix[1:] + if self._properties['productType'] == \ + 'com.apple.product-type-bundle.unit.test': + if force_extension is None: + force_extension = suffix[1:] + if force_extension is not None: # If it's a wrapper (bundle), set WRAPPER_EXTENSION. if filetype.startswith('wrapper.'): diff --git a/test/copies/gyptest-attribs.py b/test/copies/gyptest-attribs.py new file mode 100644 index 00000000..70d717a4 --- /dev/null +++ b/test/copies/gyptest-attribs.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python + +# Copyright (c) 2013 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Verifies that copying files preserves file attributes. +""" + +import TestGyp + +import os +import stat +import sys + + +def check_attribs(path, expected_exec_bit): + out_path = test.built_file_path(path, chdir='src') + + in_stat = os.stat(os.path.join('src', path)) + out_stat = os.stat(out_path) + if out_stat.st_mode & stat.S_IXUSR != expected_exec_bit: + test.fail_test() + + +test = TestGyp.TestGyp() + +test.run_gyp('copies-attribs.gyp', chdir='src') + +test.build('copies-attribs.gyp', chdir='src') + +if sys.platform != 'win32': + out_path = test.built_file_path('executable-file.sh', chdir='src') + test.must_contain(out_path, + '#!/bin/bash\n' + '\n' + 'echo echo echo echo cho ho o o\n') + check_attribs('executable-file.sh', expected_exec_bit=stat.S_IXUSR) + +test.pass_test() diff --git a/test/copies/src/copies-attribs.gyp b/test/copies/src/copies-attribs.gyp new file mode 100644 index 00000000..073e0d0c --- /dev/null +++ b/test/copies/src/copies-attribs.gyp @@ -0,0 +1,20 @@ +# Copyright (c) 2013 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'targets': [ + { + 'target_name': 'copies1', + 'type': 'none', + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)', + 'files': [ + 'executable-file.sh', + ], + }, + ], + }, + ], +} diff --git a/test/copies/src/executable-file.sh b/test/copies/src/executable-file.sh new file mode 100755 index 00000000..796953a1 --- /dev/null +++ b/test/copies/src/executable-file.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +echo echo echo echo cho ho o o diff --git a/test/ios/app-bundle/TestApp/English.lproj/Main_iPhone.storyboard b/test/ios/app-bundle/TestApp/English.lproj/Main_iPhone.storyboard new file mode 100644 index 00000000..723bc851 --- /dev/null +++ b/test/ios/app-bundle/TestApp/English.lproj/Main_iPhone.storyboard @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.0" toolsVersion="1906" systemVersion="11A511" targetRuntime="iOS.CocoaTouch" nextObjectID="6" propertyAccessControl="none" initialViewController="2"> + <dependencies> + <development defaultVersion="4200" identifier="xcode"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="902"/> + </dependencies> + <scenes> + <scene sceneID="5"> + <objects> + <placeholder placeholderIdentifier="IBFirstResponder" id="4" sceneMemberID="firstResponder"/> + <viewController id="2" customClass="ViewController" sceneMemberID="viewController"> + <view key="view" contentMode="scaleToFill" id="3"> + <rect key="frame" x="0.0" y="20" width="320" height="460"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> + <subviews/> + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> + </view> + </viewController> + </objects> + </scene> + </scenes> + <simulatedMetricsContainer key="defaultSimulatedMetrics"> + <simulatedStatusBarMetrics key="statusBar"/> + <simulatedOrientationMetrics key="orientation"/> + <simulatedScreenMetrics key="destination"/> + </simulatedMetricsContainer> +</document> diff --git a/test/ios/app-bundle/test.gyp b/test/ios/app-bundle/test.gyp index 41de4221..619976dd 100644 --- a/test/ios/app-bundle/test.gyp +++ b/test/ios/app-bundle/test.gyp @@ -23,6 +23,7 @@ 'mac_bundle_resources': [ 'TestApp/English.lproj/InfoPlist.strings', 'TestApp/English.lproj/MainMenu.xib', + 'TestApp/English.lproj/Main_iPhone.storyboard', ], 'link_settings': { 'libraries': [ @@ -36,7 +37,7 @@ ], 'INFOPLIST_FILE': 'TestApp/TestApp-Info.plist', 'SDKROOT': 'iphonesimulator', # -isysroot - 'IPHONEOS_DEPLOYMENT_TARGET': '4.2', + 'IPHONEOS_DEPLOYMENT_TARGET': '5.0', 'CONFIGURATION_BUILD_DIR':'build/Default', }, }, diff --git a/test/ios/gyptest-app-ios.py b/test/ios/gyptest-app-ios.py index 548b1187..48da70da 100755 --- a/test/ios/gyptest-app-ios.py +++ b/test/ios/gyptest-app-ios.py @@ -33,6 +33,9 @@ if sys.platform == 'darwin': test.built_file_must_exist( 'Test App Gyp.bundle/English.lproj/MainMenu.nib', chdir='app-bundle') + test.built_file_must_exist( + 'Test App Gyp.bundle/English.lproj/Main_iPhone.storyboardc', + chdir='app-bundle') # Packaging test.built_file_must_exist('Test App Gyp.bundle/PkgInfo', diff --git a/test/mac/bundle-resources/executable-file.sh b/test/mac/bundle-resources/executable-file.sh new file mode 100755 index 00000000..796953a1 --- /dev/null +++ b/test/mac/bundle-resources/executable-file.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +echo echo echo echo cho ho o o diff --git a/test/mac/bundle-resources/test.gyp b/test/mac/bundle-resources/test.gyp index 86cd26b9..af034ce3 100644 --- a/test/mac/bundle-resources/test.gyp +++ b/test/mac/bundle-resources/test.gyp @@ -9,6 +9,7 @@ 'mac_bundle': 1, 'mac_bundle_resources': [ 'secret.txt', + 'executable-file.sh', ], }, # A rule with process_outputs_as_mac_bundle_resources should copy files diff --git a/test/mac/gyptest-bundle-resources.py b/test/mac/gyptest-bundle-resources.py index 7d2f9d06..824b17f6 100644 --- a/test/mac/gyptest-bundle-resources.py +++ b/test/mac/gyptest-bundle-resources.py @@ -10,8 +10,23 @@ Verifies things related to bundle resources. import TestGyp +import os +import stat import sys + +def check_attribs(path, expected_exec_bit): + out_path = test.built_file_path( + os.path.join('resource.app/Contents/Resources', path), chdir=CHDIR) + + in_stat = os.stat(os.path.join(CHDIR, path)) + out_stat = os.stat(out_path) + if in_stat.st_mtime == out_stat.st_mtime: + test.fail_test() + if out_stat.st_mode & stat.S_IXUSR != expected_exec_bit: + test.fail_test() + + if sys.platform == 'darwin': # set |match| to ignore build stderr output. test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) @@ -26,6 +41,15 @@ if sys.platform == 'darwin': test.built_file_must_match('source_rule.app/Contents/Resources/secret.txt', 'ABC\n', chdir=CHDIR) + test.built_file_must_match( + 'resource.app/Contents/Resources/executable-file.sh', + '#!/bin/bash\n' + '\n' + 'echo echo echo echo cho ho o o\n', chdir=CHDIR) + + check_attribs('executable-file.sh', expected_exec_bit=stat.S_IXUSR) + check_attribs('secret.txt', expected_exec_bit=0) + # TODO(thakis): This currently fails with make. if test.format != 'make': test.built_file_must_match( diff --git a/test/mac/gyptest-xctest.py b/test/mac/gyptest-xctest.py new file mode 100644 index 00000000..a46a5fb3 --- /dev/null +++ b/test/mac/gyptest-xctest.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python + +# Copyright (c) 2013 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Verifies that xctest targets are correctly configured. +""" + +import TestGyp + +import sys + +if sys.platform == 'darwin': + test = TestGyp.TestGyp(formats=['xcode']) + + # Ignore this test if Xcode 5 is not installed + import subprocess + job = subprocess.Popen(['xcodebuild', '-version'], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) + out, err = job.communicate() + if job.returncode != 0: + raise Exception('Error %d running xcodebuild' % job.returncode) + xcode_version, build_number = out.splitlines() + # Convert the version string from 'Xcode 5.0' to ['5','0']. + xcode_version = xcode_version.split()[-1].split('.') + if xcode_version < ['5']: + test.pass_test() + + CHDIR = 'xctest' + test.run_gyp('test.gyp', chdir=CHDIR) + test.build('test.gyp', chdir=CHDIR, arguments=['-scheme', 'classes', 'test']) + + test.built_file_must_match('tests.xctest/Contents/Resources/resource.txt', + 'foo\n', chdir=CHDIR) + test.pass_test() diff --git a/test/mac/xctest/MyClass.h b/test/mac/xctest/MyClass.h new file mode 100644 index 00000000..dde13aa3 --- /dev/null +++ b/test/mac/xctest/MyClass.h @@ -0,0 +1,8 @@ +// Copyright (c) 2013 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import <Foundation/Foundation.h> + +@interface MyClass : NSObject +@end diff --git a/test/mac/xctest/MyClass.m b/test/mac/xctest/MyClass.m new file mode 100644 index 00000000..df11471b --- /dev/null +++ b/test/mac/xctest/MyClass.m @@ -0,0 +1,8 @@ +// Copyright (c) 2013 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "MyClass.h" + +@implementation MyClass +@end diff --git a/test/mac/xctest/TestCase.m b/test/mac/xctest/TestCase.m new file mode 100644 index 00000000..36846a1f --- /dev/null +++ b/test/mac/xctest/TestCase.m @@ -0,0 +1,16 @@ +// Copyright (c) 2013 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import <XCTest/XCTest.h> +#import "MyClass.h" + +@interface TestCase : XCTestCase +@end + +@implementation TestCase +- (void)testFoo { + MyClass *foo = [[MyClass alloc] init]; + XCTAssertNotNil(foo, @"expected non-nil object"); +} +@end diff --git a/test/mac/xctest/resource.txt b/test/mac/xctest/resource.txt new file mode 100644 index 00000000..257cc564 --- /dev/null +++ b/test/mac/xctest/resource.txt @@ -0,0 +1 @@ +foo diff --git a/test/mac/xctest/test.gyp b/test/mac/xctest/test.gyp new file mode 100644 index 00000000..ac25656b --- /dev/null +++ b/test/mac/xctest/test.gyp @@ -0,0 +1,47 @@ +# Copyright (c) 2013 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'targets': [ + { + 'target_name': 'classes', + 'type': 'static_library', + 'sources': [ + 'MyClass.h', + 'MyClass.m', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', + ], + }, + }, + { + 'target_name': 'tests', + 'type': 'loadable_module', + 'mac_xctest_bundle': 1, + 'sources': [ + 'TestCase.m', + ], + 'dependencies': [ + 'classes', + ], + 'mac_bundle_resources': [ + 'resource.txt', + ], + 'xcode_settings': { + 'WRAPPER_EXTENSION': 'xctest', + 'FRAMEWORK_SEARCH_PATHS': [ + '$(inherited)', + '$(DEVELOPER_FRAMEWORKS_DIR)', + ], + 'OTHER_LDFLAGS': [ + '$(inherited)', + '-ObjC', + ], + }, + }, + ], +} + diff --git a/test/mac/xctest/test.xcodeproj/xcshareddata/xcschemes/classes.xcscheme b/test/mac/xctest/test.xcodeproj/xcshareddata/xcschemes/classes.xcscheme new file mode 100644 index 00000000..6bd1bb96 --- /dev/null +++ b/test/mac/xctest/test.xcodeproj/xcshareddata/xcschemes/classes.xcscheme @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Scheme + LastUpgradeVersion = "0500" + version = "1.3"> + <BuildAction + parallelizeBuildables = "YES" + buildImplicitDependencies = "YES"> + <BuildActionEntries> + <BuildActionEntry + buildForTesting = "YES" + buildForRunning = "YES" + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "D3B79173B4570A3C70A902FF" + BuildableName = "libclasses.a" + BlueprintName = "classes" + ReferencedContainer = "container:test.xcodeproj"> + </BuildableReference> + </BuildActionEntry> + </BuildActionEntries> + </BuildAction> + <TestAction + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + shouldUseLaunchSchemeArgsEnv = "YES" + buildConfiguration = "Default"> + <Testables> + <TestableReference + skipped = "NO"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "2ACDAB234B9E5D65CACBCF9C" + BuildableName = "tests.xctest" + BlueprintName = "tests" + ReferencedContainer = "container:test.xcodeproj"> + </BuildableReference> + </TestableReference> + </Testables> + </TestAction> + <LaunchAction + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + buildConfiguration = "Default" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + allowLocationSimulation = "YES"> + <AdditionalOptions> + </AdditionalOptions> + </LaunchAction> + <ProfileAction + shouldUseLaunchSchemeArgsEnv = "YES" + savedToolIdentifier = "" + useCustomWorkingDirectory = "NO" + buildConfiguration = "Default" + debugDocumentVersioning = "YES"> + </ProfileAction> + <AnalyzeAction + buildConfiguration = "Default"> + </AnalyzeAction> + <ArchiveAction + buildConfiguration = "Default" + revealArchiveInOrganizer = "YES"> + </ArchiveAction> +</Scheme> diff --git a/test/win/rc-build/hello.gyp b/test/win/rc-build/hello.gyp index 2bd055c2..3a66357d 100644 --- a/test/win/rc-build/hello.gyp +++ b/test/win/rc-build/hello.gyp @@ -51,6 +51,32 @@ ], }, { + 'target_name': 'with_include_subdir', + 'type': 'executable', + 'msvs_settings': { + 'VCCLCompilerTool': { + 'DebugInformationFormat': '3', + }, + 'VCLinkerTool': { + 'GenerateDebugInformation': 'true', + }, + 'VCResourceCompilerTool': { + 'Culture' : '1033', + }, + }, + 'resource_include_dirs': [ + '$(ProjectDir)\\subdir', + ], + 'sources': [ + 'hello.cpp', + 'hello3.rc', + ], + 'libraries': [ + 'kernel32.lib', + 'user32.lib', + ], + }, + { 'target_name': 'resource_only_dll', 'type': 'shared_library', 'msvs_settings': { diff --git a/test/win/rc-build/hello3.rc b/test/win/rc-build/hello3.rc new file mode 100644 index 00000000..c74dede5 --- /dev/null +++ b/test/win/rc-build/hello3.rc @@ -0,0 +1,87 @@ +//Microsoft Visual C++ generated resource script.
+//
+#include "include.h"
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#ifndef APSTUDIO_INVOKED
+#include "targetver.h"
+#endif
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+#undef APSTUDIO_HIDDEN_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE 9, 1
+#pragma code_page(932)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+
+IDI_HELLO ICON "hello.ico"
+IDI_SMALL ICON "small.ico"
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#ifndef APSTUDIO_INVOKED\r\n"
+ "#include ""targetver.h""\r\n"
+ "#endif\r\n"
+ "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "#include ""windows.h""\r\n"
+ "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE
+BEGIN
+ IDC_HELLO "HELLO"
+ IDS_APP_TITLE "hello"
+END
+
+#endif
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
|