Plugin Authorization File Path for Mac AAX


#1

If this has been covered somewhere already, my apologies, since I have not been able to find it.

I have plugin authorization code running on Mac and PC.  For plugin authorization, I am using the Juce_Tracktion_Marketplace module, with a small amount of my own code to implement a trial period.

The environment is JUCE 4.1, Projucer, Mac Yosemite, XCode 7.2, 64bit builds.

The code works as expected on Windows for all formats, VST, VST3, and AAX.

On Mac, it works as expected for VST, VST3, and AU.  However, I cannot load or save the authorization file in Pro Tools (12)!

The folder and file are created and read/write for Mac VST, VST3, and AU.  But, in Pro Tools, it does not create the folder or file, and, of course, does not read/write.

String fileSpec = File::getSpecialLocation(File::userApplicationDataDirectory).getFullPathName() + "/Application Support/CompanyName/plugin.auth";

The file is just storing a String.

I'm stumped.  I've tried everything I can think of, permission variations etc., but I cannot get it to work.

Is there some operating mode for Mac Pro Tools that requires specific permissions to read/write files and folders?

I sent an email to Avid, but I have not heard back from them yet.

Any guidance is most appreciated!

 

 


#2

A recurrent tip from Jules, just a few days ago:

http://www.juce.com/forum/topic/open-pdf-file#comment-318642

...and did you check the assembled filename in the debugger?

Then check that location by hand or in bash (called Terminal) with ls -la to see, if you have there permission...

HTH, Daniel


#3

Thank you for the reminder about using ".getChildFile()" to build paths.  I do remember seeing Jules recommend that, but had not implemented that way.  I've made changes accordingly.

However,  using ".getChildFile()" to build the path has actually made things worse!

​        String fileSpec = File::getSpecialLocation(File::userApplicationDataDirectory).getFullPathName();
        File file(fileSpec);
        file.getChildFile("Application Support").getChildFile("CompanyName").getChildFile("plugin.auth");

With my original code (see my first post) the plugin was able to create and access the authorization file on Mac OSX for the VST, VST3, and AU plugin types.  It was only the AAX plugins from within Pro Tools that were unable to create and access the file.  Now, none of them work.

As bad as this is, I am thinking this will be a major clue to someone who has a better understanding of all this than I do.


So, to restate my problem: - with the code in my original post, my plugins can succesfully create and access the plugin authorization file on Mac OSX Yosemite as long as the plugin is of the VST, VST3, or AU type.  BUT, the AAX plugins can neither create, nor access the file.

It seems unlikely to me that it can be permissions related, because the VST, VST3, and AU plugin types work as expected.  But I've been wrong before!

There must be something different with the AAX plugins.  But what?

So, any help that can be offered will be gratefully received.


#4

Wow.....turns out my problem had nothing to do with the path or permissions.

I'll explain....

You know how during development you slap things together to try something out, then plan to go back later and "do it right"?

Well, I had done just such a thing with a global variable.  Yes, I know.  They always seem to bite you in the backside.

Well, this particular global variable had ownership of my RegAsyncUpdater from which I call my registration and trial period system.

As a global variable, it was being called from the Mac VST, VST3, and AU plugins, but was not being called from AAX plugins!

I moved the variable inside my AudioProcessor class, and voila!  Now everything works for all plugin types!  Yes!

In the rush to get the project completed, I overlooked getting back to the "do it right" part.  I should know better.


Thank you to everyone who contributes here.  This site is an amazing resource, and so many are very helpful and generous with their time and expertise.  High fives all around!

And.....Jules......what can I say?  Thank you for Tracktion.  Thank you for JUCE.  Thank you for being so involved with all levels of everything here.  You are awesome!

Bill

 


#5

Ah, global variables.. Nothing good ever comes of them! :)