Add some CoreText stub definitions#40
Conversation
CuriousTommy
left a comment
There was a problem hiding this comment.
There are some changes I need you to fix first before I can merge this.
On a side note, is there a particular reason why you want to keep most of the new changes commented out? I think it would be better if we left them un-commented.
|
@CuriousTommy I think I fixed all requested changes: reverted the formatting changes, uncomment constants and moved from constants.c to the new file. |
CuriousTommy
left a comment
There was a problem hiding this comment.
Sorry for taking so long to review your new changes. Been feeling burned out lately...
|
@jlucfarias Did you get a chance to build and run your changes? I'm getting some errors: |
|
@CuriousTommy sorry for the late response. I couldn't build at the moment I sent my changes, but now I builded and fixed all errors related to Coretext changes. Please, try again |
CuriousTommy
left a comment
There was a problem hiding this comment.
There might be some additional fixes you might need to do, but here is what I found.
There was a problem hiding this comment.
Just a few more fixes needed:
/home/[user]/Downloads/darling2/framework-include/CoreGraphics/CGContext.h:23:32: error: typedef redefinition with different types ('struct CF_BRIDGED_TYPE' vs 'id')
23 | typedef struct CF_BRIDGED_TYPE(id) O2Context *CGContextRef;
| ^
https://github.com/darlinghq/darling-cocotron/blob/master/CoreText/stubs.c#L3-L6
[ 45%] Linking C shared library CoreText
ld: warning: OS dylibs should not add rpaths (linker option: -rpath) (Xcode build setting: LD_RUNPATH_SEARCH_PATHS)
duplicate symbol '_CTFontCreateWithFontDescriptor' in:
CMakeFiles/CoreText.dir/CTFont.m.o
CMakeFiles/CoreText.dir/stubs.c.o
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This comment was marked as resolved.
This comment was marked as resolved.
|
That's to be expected, there are some fixes that jlucfarias needs to do before I can merge this. |
|
yep! That's fine. I was just hoping to give it a spin, see if I notice anything, if it works etc. |
|
If I apply this patch to this branch, the branch compiles successfully, and my test program prints this near the end of it's logs (it crashes because of stubs, instead of missing symbols, so this is desired). diff --git a/CoreGraphics/include/CoreGraphics/CGContext.h b/CoreGraphics/include/CoreGraphics/CGContext.h
index 12a110e5..973670ba 100644
--- a/CoreGraphics/include/CoreGraphics/CGContext.h
+++ b/CoreGraphics/include/CoreGraphics/CGContext.h
@@ -18,6 +18,7 @@ AN ACTION OF CONTRACT,TORT OR OTHERWISE,ARISING FROM,OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#import <CoreGraphics/CoreGraphicsExport.h>
+#import <CoreFoundation/CFBase.h>
typedef struct CF_BRIDGED_TYPE(id) O2Context *CGContextRef;Here's the (successful) stubs in-use, logged from the software: This patch is needed because the dependency was removed from Thanks so much for working on this! |
|
Sorry for the late response. Many thanks, @Lazerbeak12345. I was unable to search the solution for the error that CuriousTommy noticed and your patch worked like a charm. I've posted and made you as co-author of the commit because the change was your, not mine. @CuriousTommy, please review again |
|
I was able to build without any build failures occurring. My only final request is that your combine your commits. After that, I'll merge it in. |
Co-authored-by: Lazerbeak12345 <A02313752@aggies.usu.edu>
66d0865 to
29338b1
Compare
|
@CuriousTommy done |
|
Thank you for your contribution! |
darlinghq/darling-cocotron#40 | Add some CoreText stub definitions
darlinghq/darling-cocotron#40 | Add some CoreText stub definitions darlinghq/darling-cocotron#42 | Fix NSWindowTemplate logic not applying to both keyed and unkeyed decoding
darlinghq/darling-cocotron#40 | Add some CoreText stub definitions darlinghq/darling-cocotron#42 | Fix NSWindowTemplate logic not applying to both keyed and unkeyed decoding darlinghq/darling-cocotron#43 | fix(CoreText): missing kCTFontOpenTypeFeature Key and Value
darlinghq/darling-cocotron#40 | Add some CoreText stub definitions darlinghq/darling-cocotron#42 | Fix NSWindowTemplate logic not applying to both keyed and unkeyed decoding darlinghq/darling-cocotron#43 | fix(CoreText): missing kCTFontOpenTypeFeature Key and Value darlinghq/darling-cocotron#44 | several missing symbols
I've tried to add all constants of CTFont (unfortunatelfy I do not have time to add constants and stubs for other files) but I've keeped constants unused at this time commented to be uncommented later.
One suggestion is to move all frameworks from here (and other darling projects) to darling repo (or a darling specific repo for frameworks) to keep only one place with all frameworks. IMHO this is a more maintainable action to get darling project more active.
A lot of definitions can be get from the abandoned project darling-coregraphics and I used for reference for this changes.
Fixes darling#797
Fixes darling#798
Fixes darling#1527