Xcode "embedded binaries" and file reference support for entitlements

24 views
Skip to first unread message

TJ Grant

unread,
Jan 23, 2019, 6:48:06 PM1/23/19
to gyp-developer
Hi all,

As I was creating tickets for MSVS issues today, I thought I'd also put in two for some defects I see when generating Xcode projects.

* 545 - Add support for "embedded binaires" (aka "embedded frameworks") for xcodeproj files
* 544 - Add files referenced in 'xcode_settings' to xcodeproj's "file references" section

For "embedded binaries", this was a feature added by Apple to Xcode in late 2014 / early 2015 where some frameworks couldn't be linked via the standard way of doing so, and had to instead be copied into the built app directly. I don't 100% understand why this exists, but some third-party vendor SDKs are only distributed this way, so it would be helpful for gyp to support it.

For the "file references" ticket, the idea is that some files (like code signing entitlements) get added as file references to Xcode's project navigator when creating a new project via Xcode's IDE, but these references don't get auto-generated via gyp when setting these key / value pairs, and it would be helpful for debugging purposes to know whether or not these files are found as builds will silently "succeed" in cases when these files can't actually be found by Xcode.

I figured it might be okay to bring these up on the mailing list, and might be useful to know about. I'd fix these myself but I have zero python knowledge. My apologies if this is extra noise.

Best regards,
--Terence J. Grant
tjg...@tatewake.com

Айрат Шаихов

unread,
Feb 18, 2019, 10:37:08 AM2/18/19
to gyp-developer
Hi

Here is example of how I add embedded libraries

'xcode_settings': {
    #linking
    'LD_RUNPATH_SEARCH_PATHS': '@loader_path/../Frameworks',
},
'conditions': [
      [ 'OS=="mac"', {
          'link_settings': {
            'libraries': [
              'tools/common/fbx/libfbxsdk.a',
              'tools/maker/code/libs/soxr/libsoxr.0.dylib',
              'tools/maker/code/libs/vorbis/libvorbis.0.dylib',
              'tools/maker/code/libs/vorbis/libvorbisenc.2.dylib',
              'tools/maker/code/libs/ogg/libogg.0.dylib',
            ]
          },
          'copies': [
            {
              'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Frameworks',
              'files': [
                'tools/maker/code/libs/soxr/libsoxr.0.dylib',
                'tools/maker/code/libs/vorbis/libvorbis.0.dylib',
                'tools/maker/code/libs/vorbis/libvorbisenc.2.dylib',
                'tools/maker/code/libs/ogg/libogg.0.dylib',
              ],
              'xcode_code_sign': 1,
            },
          ],
        },
      ],
]



четверг, 24 января 2019 г., 2:48:06 UTC+3 пользователь TJ Grant написал:

Refael Ackermann

unread,
Feb 18, 2019, 10:40:11 AM2/18/19
to Айрат Шаихов, gyp-developer
Anyone interested is welcome to contribute to the revived GYP3 at https://github.com/refack/GYP
Even such usage tips would be a welcome contribution to the docs - https://github.com/refack/GYP/tree/gh-pages

--

---
You received this message because you are subscribed to the Google Groups "gyp-developer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gyp-develope...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

TJ Grant

unread,
Feb 19, 2019, 5:59:20 PM2/19/19
to Айрат Шаихов, gyp-developer
Thanks Aryat; I didn't realize this was already supported in gyp (though I think gyp's syntax for this is very non-intuitive.)

However this worked out just fine for me. Thanks!

Best regards,
--Terence J. Grant
tjg...@tatewake.com

--

TJ Grant

unread,
Feb 19, 2019, 6:06:18 PM2/19/19
to Refael Ackermann, gyp-developer
Hi Refael,

When I get some time I'll try to help with some documentation (at least that I know about) which isn't necessarily covered.

I will probably open some tickets on your repo to match some that I opened recently on the chromium ticket tracker.
I'd think a few of those tickets could benefit both the original and the fork in terms of bug fixes / quality of life things, so ideally I'd hope we could push solutions to both for now if we can.

Best regards,
--Terence J. Grant
tjg...@tatewake.com

Reply all
Reply to author
Forward
0 new messages