Bug 146158 - Add a JSC symlink in /System/Library/PrivateFrameworks
Summary: Add a JSC symlink in /System/Library/PrivateFrameworks
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-19 13:24 PDT by Anders Carlsson
Modified: 2015-06-19 13:41 PDT (History)
1 user (show)

See Also:


Attachments
Patch (3.31 KB, patch)
2015-06-19 13:24 PDT, Anders Carlsson
no flags Details | Formatted Diff | Diff
Patch (2.96 KB, patch)
2015-06-19 13:34 PDT, Anders Carlsson
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2015-06-19 13:24:21 PDT
Add a JSC symlink in /System/Library/PrivateFrameworks
Comment 1 Anders Carlsson 2015-06-19 13:24:38 PDT
Created attachment 255219 [details]
Patch
Comment 2 mitz 2015-06-19 13:32:03 PDT
Comment on attachment 255219 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=255219&action=review

> Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:6782
> +			runOnlyForDeploymentPostprocessing = 0;

I think you want to run this only when installing.

> Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:6784
> +			shellScript = "if [[ ${PLATFORM_NAME} == \"iphoneos\" || ${PLATFORM_NAME} == \"iphonesimulator\" ]]; then\nif [[ ! -d \"${INSTALL_DIR}/../PrivateFrameworks\" ]]; then\nmkdir -p \"${INSTALL_DIR}/../PrivateFrameworks\"\nfi\nif [[ -d \"${INSTALL_DIR}/../PrivateFrameworks/JavaScriptCore.framework\" && ! -L \"${INSTALL_DIR}/../PrivateFrameworks/JavaScriptCore.framework\" ]]; then\necho \"ERROR: Cannot create symlink. ${INSTALL_DIR}/../PrivateFrameworks/JavaScriptCore.framework already exists and is a directory.\"\nexit 1\nfi\n# If the symlink already exists, remove it and create the new one in its place.\nln -s -h -f ../Frameworks/JavaScriptCore.framework ${INSTALL_DIR}/../PrivateFrameworks/JavaScriptCore.framework\nfi";

There’s no need to do this for iphonesimulator, only iphoneos. Instead of using ${INSTALL_DIR}, I’d use paths relative to  ${INSTALL_ROOT}/${SYSTEM_LIBRARY_DIR}, like in WebKit2. I think the “If the symlink already exists” comment isn’t helpful. Not sure checking for the “exists and is a directory” case is necessary, especially for something that’s only done when installing.
Comment 3 Anders Carlsson 2015-06-19 13:34:43 PDT
Created attachment 255222 [details]
Patch
Comment 4 Anders Carlsson 2015-06-19 13:41:09 PDT
Committed r185765: <http://trac.webkit.org/changeset/185765>