Darling Wiki

macOS translation layer for Linux

User Tools

Site Tools


generating_stubs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
generating_stubs [2019/05/25 23:45]
ahyattdev Add note about constants
generating_stubs [2019/05/26 00:57]
ahyattdev [Using the stub generator]
Line 27: Line 27:
 The above command will create a folder that can be placed in the /src directory of Darling'​s source tree. It is generated from the DVDPlayback framework. Note that the first argument points to the actual binary of the framework, not the root directory of the framework. The above command will create a folder that can be placed in the /src directory of Darling'​s source tree. It is generated from the DVDPlayback framework. Note that the first argument points to the actual binary of the framework, not the root directory of the framework.
  
-Once you have generated a stub source folder for the framework as the above command does for DVDPlayback,​ you can copy that folder into Darling'​s source tree under /src and submit a pull request containing your contribution.+Once you have generated a stub source folder for the framework as the above command does for DVDPlayback,​ you can copy that folder into Darling'​s source tree under /src.
  
 +After this you need to add the new folder to the build. In /​src/​CMakeLists.txt,​ make the following changes:
 +
 +In the ''​include_directories(AFTER''​ call, put ''​${CMAKE_CURRENT_SOURCE_DIR}/​MyNewFolder/​include''​ at the end.
 +
 +Then, before the line starting with
 +<​code>​include_directories(BEFORE
 +        ${CMAKE_CURRENT_SOURCE_DIR}/​external/​libcxxabi/​include
 +)</​code>​
 +
 +make a new line with ''​add_subdirectory(MyNewFolder)''​.
 +
 +The next step is to do a build and make sure your new code compiles.
 +
 +After that completes, you are ready to submit a pull request. See [[contributing|Contributing]] for how to do that. [[https://​github.com/​darlinghq/​darling/​commit/​92233d4e5ca613658345910d1acf4b3b7620a4f6|This commit]] is an example of a stub for a framework that was added to Darling using the process described in this article. Most notable is what it does to /​src/​CMakeLists.txt.
 ===== Known issues ===== ===== Known issues =====
  
   * The stub generator does not currently generate symbols for constants. Those must be manually added if a program needs them.   * The stub generator does not currently generate symbols for constants. Those must be manually added if a program needs them.
  
generating_stubs.txt ยท Last modified: 2019/05/26 00:57 by ahyattdev