Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARC Compatibility #38

Open
dimitre opened this issue Apr 30, 2023 · 10 comments
Open

ARC Compatibility #38

dimitre opened this issue Apr 30, 2023 · 10 comments

Comments

@dimitre
Copy link

dimitre commented Apr 30, 2023

Hello @admsys thanks for this great addon.
I'm just writing to notify OF project transitioned to ARC and next release will be out soon.
Thank you

@dimitre
Copy link
Author

dimitre commented Aug 31, 2023

OF 0.12.0 is out finally !

@admsyn
Copy link
Owner

admsyn commented Sep 11, 2023

Hi @dimitre! thanks for the nudge, I don't have a mac development system around these days unfortunately. This will have to sit for a while unless someone can open a PR for it.

@dimitre
Copy link
Author

dimitre commented Sep 12, 2023

Thank you!
I'll copy @2bbb and @artificiel here, in the case they have time to have a look.

@2bbb
Copy link
Contributor

2bbb commented Sep 13, 2023

@dimitre

maybe supporting ARC is not so hard.
we need to fix only ofxAudioUnitCocoaUtilties.mm.

but those codes are not regular method names or implementations of Objective-C style, about initXXX.
basically methods named as initXXX need to returns instancetype (i.e. class itself).
and I can't understand enough what those codes want to do actually and relations.

so, I can support to fix but I can't do by myself. sorry!

@roymacdonald
Copy link

Hi, I've found that the easiest way to support ARC and for this addon to work with OF0.12 is to add the -fno-objc-arc flag to ofxAudioUnitCocoaUtilties.mm.
Check this screenshot on where to click and just paste there the -fno-objc-arc flag. compile as usual.
Screen Shot 2023-12-16 at 21 09 58

@dimitre
Copy link
Author

dimitre commented Dec 16, 2023

this would be a great addition to projectGenerator, if we could configure compiler flags to specific files.

@artificiel
Copy link

I think a generic post-processing step would be great as it allows to solve a variety of problems.

there is already a proposal for a post-compile step: openframeworks/projectGenerator#217 perhaps a similar ADDON_AFTER_PROJECT_GENERATED that allows an addon author to script actions to be performed right after generation?

(that being said, robustly scripting modifications to xcodeproj is not a solved problem by itself, unless some new methods appeared in the past year or so?)

@roymacdonald
Copy link

@artificiel certainly it would be great, but it falls out of the scope of this. Although a post compile would not fix this issue as it is a compilation issue.

@artificiel
Copy link

@roymacdonald about scope maybe i misunderstood @dimitre's idea but it requires some changes to to have instructions in addon.make so PG can mark some files as no-objc-arc — my suggestion was to investigate a generic post-processing step (beyond something specific to project file attributes).

as for the reference to openframeworks/projectGenerator#217 it was to give an example of a design that could serve as inspiration, but yeah a post-compile would not fix this issue hence my suggestion of implementing something like ADDON_AFTER_PROJECT_GENERATED

@roymacdonald
Copy link

@artificiel I get what you mean. :) I just meant that discussing any fix to the PG was out of the scope of this issue and addon. But for sure it would be great if we already had something in PG that would allow to set something in the addon_config.mk file that would allow to put those flags in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants