ofxAudioUnit
ofxAudioUnit copied to clipboard
ARC Compatibility
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
OF 0.12.0 is out finally !
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.
Thank you! I'll copy @2bbb and @artificiel here, in the case they have time to have a look.
@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!
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.
this would be a great addition to projectGenerator, if we could configure compiler flags to specific files.
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: https://github.com/openframeworks/projectGenerator/pull/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?)
@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.
@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 https://github.com/openframeworks/projectGenerator/pull/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
@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.