Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
<https://webkit.org/b/135909> Move helper applications out of the roo…
…t of the framework.

As described in <https://developer.apple.com/library/mac/technotes/tn2206/>, for bundles containing
a Versions directory there may be no other content at the top level of the bundle other than symlinks.
Upcoming changes to code signing will prevent bundles that violate this rule from being signed.

Reviewed by Sam Weinig.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj: Add the symlink to WebKitPluginHost.app in the Versions/A
directory of the framework rather than at the top level.

Source/WebKit2:

* Configurations/Base.xcconfig: Define a configuration setting that points to the content directory
of the framework. On OS X this is Versions/A. On iOS, where frameworks are shallow, this is the top level.
* Configurations/BaseLegacyProcess.xcconfig: Install the legacy processes in the content directory
of the framework.
* WebKit2.xcodeproj/project.pbxproj: Copy the legacy processes into the content directory of the
framework during engineering builds. Generate symlinks for the legacy processes to their locations
in Versions/Current. This is necessary because -[NSBundle pathForAuxiliaryExecutable:] only looks
at the top level of the framework wrapper.

Canonical link: https://commits.webkit.org/153800@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
bdash committed Aug 14, 2014
1 parent 7c6bcc5 commit c85da9c
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 8 deletions.
13 changes: 13 additions & 0 deletions Source/WebKit/ChangeLog
@@ -1,3 +1,16 @@
2014-08-13 Mark Rowe <mrowe@apple.com>

<https://webkit.org/b/135909> Move helper applications out of the root of the framework.

As described in <https://developer.apple.com/library/mac/technotes/tn2206/>, for bundles containing
a Versions directory there may be no other content at the top level of the bundle other than symlinks.
Upcoming changes to code signing will prevent bundles that violate this rule from being signed.

Reviewed by Sam Weinig.

* WebKit.xcodeproj/project.pbxproj: Add the symlink to WebKitPluginHost.app in the Versions/A
directory of the framework rather than at the top level.

2014-08-14 Alex Christensen <achristensen@webkit.org>

Unreviewed. Removing empty directories.
Expand Down
4 changes: 2 additions & 2 deletions Source/WebKit/WebKit.xcodeproj/project.pbxproj
Expand Up @@ -2007,11 +2007,11 @@
);
name = "Symlink WebKitPluginHost";
outputPaths = (
"$(CONFIGURATION_BUILD_DIR)/WebKitLegacy.framework/WebKitPluginHost.app",
"$(CONFIGURATION_BUILD_DIR)/WebKitLegacy.framework/Versions/A/WebKitPluginHost.app",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [[ ${PLATFORM_NAME} == \"iphoneos\" || ${PLATFORM_NAME} == \"iphonesimulator\" ]]; then\n exit 0\nfi\n\nif [[ \"${CONFIGURATION}\" != \"Production\" && \"${ACTION}\" == \"build\" ]]; then\n # FIXME: This should be removed once faulty links have been removed on the bots.\n if [[ -L \"${CONFIGURATION_BUILD_DIR}/WebKitLegacy.framework/WebKitPluginHost.app\" ]]; then\n rm \"${CONFIGURATION_BUILD_DIR}/WebKitLegacy.framework/WebKitPluginHost.app\"\n fi\n\n if [[ -e \"/System/Library/Frameworks/WebKit.framework/WebKitPluginHost.app\" ]]; then\n ln -s /System/Library/Frameworks/WebKit.framework/WebKitPluginHost.app \"${CONFIGURATION_BUILD_DIR}/WebKitLegacy.framework/WebKitPluginHost.app\"\n else\n ln -s /System/Library/Frameworks/WebKit.framework/Frameworks/WebKitLegacy.framework/WebKitPluginHost.app \"${CONFIGURATION_BUILD_DIR}/WebKitLegacy.framework/WebKitPluginHost.app\"\n fi\nfi\n";
shellScript = "if [[ ${PLATFORM_NAME} == \"iphoneos\" || ${PLATFORM_NAME} == \"iphonesimulator\" ]]; then\n exit 0\nfi\n\nif [[ \"${CONFIGURATION}\" != \"Production\" && \"${ACTION}\" == \"build\" ]]; then\n # FIXME: This should be removed once faulty links have been removed on the bots.\n if [[ -L \"${CONFIGURATION_BUILD_DIR}/WebKitLegacy.framework/Versions/A/WebKitPluginHost.app\" ]]; then\n rm \"${CONFIGURATION_BUILD_DIR}/WebKitLegacy.framework/Versions/A/WebKitPluginHost.app\"\n fi\n\n if [[ -e \"/System/Library/Frameworks/WebKit.framework/WebKitPluginHost.app\" ]]; then\n ln -s /System/Library/Frameworks/WebKit.framework/WebKitPluginHost.app \"${CONFIGURATION_BUILD_DIR}/WebKitLegacy.framework/Versions/A/WebKitPluginHost.app\"\n else\n ln -s /System/Library/Frameworks/WebKit.framework/Frameworks/WebKitLegacy.framework/Versions/A/WebKitPluginHost.app \"${CONFIGURATION_BUILD_DIR}/WebKitLegacy.framework/Versions/A/WebKitPluginHost.app\"\n fi\nfi\n";
};
1C395DE20C6BE8E0000D1E52 /* Generate Export Files */ = {
isa = PBXShellScriptBuildPhase;
Expand Down
19 changes: 19 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,22 @@
2014-08-13 Mark Rowe <mrowe@apple.com>

<https://webkit.org/b/135909> Move helper applications out of the root of the framework.

As described in <https://developer.apple.com/library/mac/technotes/tn2206/>, for bundles containing
a Versions directory there may be no other content at the top level of the bundle other than symlinks.
Upcoming changes to code signing will prevent bundles that violate this rule from being signed.

Reviewed by Sam Weinig.

* Configurations/Base.xcconfig: Define a configuration setting that points to the content directory
of the framework. On OS X this is Versions/A. On iOS, where frameworks are shallow, this is the top level.
* Configurations/BaseLegacyProcess.xcconfig: Install the legacy processes in the content directory
of the framework.
* WebKit2.xcodeproj/project.pbxproj: Copy the legacy processes into the content directory of the
framework during engineering builds. Generate symlinks for the legacy processes to their locations
in Versions/Current. This is necessary because -[NSBundle pathForAuxiliaryExecutable:] only looks
at the top level of the framework wrapper.

2014-08-14 Michael Catanzaro <mcatanzaro@igalia.com>

WebKit2GTK - WebKitWebProcess assertion fails when dragging and dropping a file into the view
Expand Down
5 changes: 5 additions & 0 deletions Source/WebKit2/Configurations/Base.xcconfig
Expand Up @@ -114,3 +114,8 @@ TOOLCHAINS_macosx_1090 = $(TOOLCHAINS);
TOOLCHAINS_macosx_101000 = $(TOOLCHAINS_macosx_1090);

SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator;

FRAMEWORK_CONTENT_DIRECTORY = $(FRAMEWORK_CONTENT_DIRECTORY_$(PLATFORM_NAME));
FRAMEWORK_CONTENT_DIRECTORY_macosx = Versions/A;
FRAMEWORK_CONTENT_DIRECTORY_iphoneos = ;
FRAMEWORK_CONTENT_DIRECTORY_iphonesimulator = $(FRAMEWORK_CONTENT_DIRECTORY_iphoneos);
2 changes: 1 addition & 1 deletion Source/WebKit2/Configurations/BaseLegacyProcess.xcconfig
Expand Up @@ -24,7 +24,7 @@
#include "BaseTarget.xcconfig"

GCC_ENABLE_OBJC_GC = NO;
INSTALL_PATH_ACTUAL = $(WEBKIT_FRAMEWORKS_DIR)/WebKit.framework;
INSTALL_PATH_ACTUAL = $(WEBKIT_FRAMEWORKS_DIR)/WebKit.framework/$(FRAMEWORK_CONTENT_DIRECTORY);

APP_ICON = $(APP_ICON_$(CONFIGURATION));
APP_ICON_Debug = WebKit.icns;
Expand Down
10 changes: 5 additions & 5 deletions Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Expand Up @@ -12,7 +12,7 @@
buildConfigurationList = 1A50DB48110A3C27000D3FE5 /* Build configuration list for PBXAggregateTarget "All" */;
buildPhases = (
1A50DB70110A3D67000D3FE5 /* Copy Files */,
BCFFCA8A160D6DEA003DF315 /* Add XPCServices symlink */,
BCFFCA8A160D6DEA003DF315 /* Add current version symlinks */,
BCFFCA8B160D6E7B003DF315 /* Copy XPC services for engineering builds */,
);
dependencies = (
Expand Down Expand Up @@ -1920,7 +1920,7 @@
1A50DB70110A3D67000D3FE5 /* Copy Files */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = WebKit.framework;
dstPath = "WebKit.framework/$(FRAMEWORK_CONTENT_DIRECTORY)";
dstSubfolderSpec = 1;
files = (
510CC8491613C85C00D03ED3 /* NetworkProcess.app in Copy Files */,
Expand Down Expand Up @@ -8587,20 +8587,20 @@
shellPath = /bin/sh;
shellScript = "if [ \"${ACTION}\" = \"installhdrs\" ]; then\n exit 0;\nfi\n\nif [ -f ../../Tools/Scripts/check-for-inappropriate-macros-in-external-headers ]; then\n ../../Tools/Scripts/check-for-inappropriate-macros-in-external-headers Headers || exit $?\nfi";
};
BCFFCA8A160D6DEA003DF315 /* Add XPCServices symlink */ = {
BCFFCA8A160D6DEA003DF315 /* Add current version symlinks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Add XPCServices symlink";
name = "Add current version symlinks";
outputPaths = (
"$(BUILT_PRODUCTS_DIR)/$(WRAPPER_NAME)/WebKit.framework/XPCServices",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [[ ${PLATFORM_NAME} == macosx ]]; then\n ln -sf Versions/Current/XPCServices \"${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/WebKit.framework/XPCServices\"\nfi\n";
shellScript = "if [[ ${PLATFORM_NAME} == macosx ]]; then\n for name in XPCServices NetworkProcess.app PluginProcess.app DatabaseProcess.app WebProcess.app; do\n ln -sf \"Versions/Current/${name}\" \"${BUILT_PRODUCTS_DIR}/WebKit.framework/${name}\";\n done\nfi\n";
};
BCFFCA8B160D6E7B003DF315 /* Copy XPC services for engineering builds */ = {
isa = PBXShellScriptBuildPhase;
Expand Down

0 comments on commit c85da9c

Please sign in to comment.