Changes between Initial Version and Version 1 of AddingFiles

Feb 3, 2014 4:21:04 PM (9 years ago)
BJ Burg



  • AddingFiles

    v1 v1  
     1WebKit has several different build systems; which is used depends on the platform and port. When adding files used by more than one port, its tricky to remember all the different build system files that the file must be added. This page documents how to do so, and common gotchas.
     3= How to add a file
     5== Xcode (for Mac, iOS)
     7Xcode-based builds use Xcode projects named after the respective WebKit components. For example, the Xcode project directory for WebCore is at `Source/WebCore/WebCore.xcproj/` and the actual project file in called `project.pbxproj`. To add a file, you'll need to open the appropriate project in Xcode.
     9=== Adding a directory
     11Usually, file system directories are mapped one-to-one to Xcode project groups (which have folder icons). To add a directory, right-click in the navigation sidebar and "Add Group". Name and alphabetize the group, and then open the item details sidebar by selecting the group. If the group corresponds to a filesystem directory, ensure that location is set to "Relative to Group", and just below, select the directory. (By doing this, Xcode knows to look in the filesystem directory when adding new files to the group.)
     13=== Adding a file
     15Find the group that corresponds to the file's directory, then right-click and select "Add Files to ProjectName..." and select the files in the file chooser dialog. Ensure that the file is added to correct target. The correct target is almost always the framework named after the project, not the "All" target. Lastly, alphabetize the file within its group in the navigation sidebar.
     17If adding a header file that should be accessible from other frameworks (say, using a WebCore framework from WebKit2), then you must alter the file's target membership from "Project" to "Private" in the "Target Membership" details sidebar, using the drop-down next to the framework. If using headers from JavaScriptCore inside WebCore, you must also add a forwarding header in `Source/WebCore/ForwardingHeaders` in the appropriate mirrored directory structure.
     19== Visual Studio (Windows)
     23== CMake (GTK, EFL)
     27= Tips