9 Replies Latest reply on Oct 10, 2015 3:32 PM by Rick E Johnson

    Can Xcode 7 be used for CS6 plugins?

    Rick E Johnson Level 1

      Xcode 5 worked well for me under Yosemite after running the XcodeLegacy.sh script, but it cannot be used since I upgraded to El Capitan, and there are issues with Xcode 6, as well.

       

      Has anybody tried Xcode 7 for older plugins? I'd prefer not to have to run a separate partition with an older OS, as it's much more convenient to have immediate access to all the work I do without rebooting.

       

      Any recommendations would be much appreciated.

       

      -- Rick

        • 1. Re: Can Xcode 7 be used for CS6 plugins?
          LeoTaro Level 4

          I just tried the FreeGrid project in XCode 7. I didn't use the XcodeLegacy.sh script, I just opened the project in XCode. I clicked on the project and then Build settings and changed the following two settings:

           

          Architectures | Base SDK -> Latest OS X (OSX 10.11)

          Build Options | Compiler -> Apple LLVM 7.0

           

          I then tried to build the project and got an error about Carbon.h not being found. I searched for Carbon.h in /Applications/Xcode.app/Contents/Developer and added the path it was found in (/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX 10.11.sdk/System/Library/Frameworks/Carbon.framework/Versions/A/Headers) to the "Search Paths | Header Search Paths" Build setting.


          I then got an error about this line in SPFiles.h

           

          #pragma options align=mac68k

           

          This is ancient and no longer relevant. After commenting this line out, the project built successfully.

          • 2. Re: Can Xcode 7 be used for CS6 plugins?
            Rick E Johnson Level 1

            Thanks, LeoTaro.

             

            Were you compiling for CS6? It's my understanding that CS6 needs the Xcode 10.6 SDK. Or maybe with a newer Xcode SDK the plugin runs in CS6, but requires a newer OS than 10.6 does.

             

            That "align=mac68k" has been a real nuisance. It's great to know it can safely just be commented out!

             

            I really appreciate your advice.

             

            -- Rick

            • 3. Re: Can Xcode 7 be used for CS6 plugins?
              LeoTaro Level 4

              Yes I was using the CS6 SDK. The align=mac68k line has been removed in the newer SDKs.

               

              Re running on older OS X versions. This is controlled by the Deployment target build setting which is already set to 10.6 in the sample projects, so it should run on 10.6 or later.

              • 4. Re: Can Xcode 7 be used for CS6 plugins?
                Rick E Johnson Level 1

                It was encouraging that I also got FreeGrid to build in Xcode 7 following your lead, but that one has a separate UI project. I've tried QT and Flex, and found them too cryptic to use without documentation (maybe I'm overlooking something that should have been obvious), so I was going to try native Xcode InterfaceBuilder panels as in the Empty Panel project. There I get "Redefinition of 'NSView' as a different kind of symbol" errors in AIPanel.h and AIControlBar.h.

                 

                Man, I sure miss ADM!

                • 5. Re: Can Xcode 7 be used for CS6 plugins?
                  LeoTaro Level 4

                  To build the Empty Panel project as well as making the changes to get FreeGrid working you need to make these changes:

                   

                  AIPanel.h

                   

                  Replace:

                   

                  #elif MAC_ENV

                    class NSView;

                    typedef NSView* AIPanelPlatformWindow;

                  #else


                  With (from the CC 2015 SDK headers)

                   

                  #elif MAC_ENV

                      #ifdef __OBJC__

                      @class NSView;

                      typedef NSView* AIPanelPlatformWindow;

                      #else

                      typedef void* AIPanelPlatformWindow;

                      #endif

                  #else

                   

                  AIControlBar.h

                   

                  Replace:

                   

                  #elif MAC_ENV

                    class NSView;

                    typedef NSView* AIControlBarPlatformWindow;

                  #else


                  With:

                   

                  #elif MAC_ENV

                    #ifdef __OBJC__

                      @class NSView;

                      typedef NSView* AIControlBarPlatformWindow;

                    #else

                      typedef void* AIControlBarPlatformWindow;

                    #endif

                  #else


                  And comment out this line in EmptyPanel.r

                   

                  #include "Types.r"


                  BTW, when you comment out this line in SPFiles.h:


                  #pragma options align=mac68k


                  You should also comment out the following line shortly after it (though it probably won't matter):


                  #pragma options align=reset



                  • 6. Re: Can Xcode 7 be used for CS6 plugins?
                    Rick E Johnson Level 1

                    Thank you! Now both Free Grid and Empty Panel compile

                     

                    Unfortunately, neither one loads into AI CS6 under El Capitan. I appreciate the advice, though, and I do feel I'm getting closer...

                    • 7. Re: Can Xcode 7 be used for CS6 plugins?
                      LeoTaro Level 4

                      Do you get any error messages?

                       

                      I don't have El Captain yet, but the FreeGrid plugin works for me (you need to install the FreeGridUI.zxp to get the GUI). I didn't try the EmptyPanel plugin before. I have just tried it and it crashes Illustrator. This is because of this code in EmptyPanelPlugin.cpp:

                       

                        NSBundle* bundle = [NSBundle bundleWithIdentifier:@"com.adobe.illustrator.plugins.EmptyPanel"];

                        BarController* barcontroller = [BarController alloc];

                        [barcontroller initWithNibName:@"ControlPanel" bundle:bundle];

                       

                        NSView* newView = [barcontroller view];

                       

                      This fails because bundle is nil. This is because the Info.plist does not include a bundle identifier. You can set this in the "Packaging | Product Bundle Identifier" Build Setting. Set it to "com.adobe.illustrator.plugins.EmptyPanel" for both debug and release.

                      • 8. Re: Can Xcode 7 be used for CS6 plugins?
                        LeoTaro Level 4

                        PS I think I heard somewhere that El Captain refuses to load anything without a bundle identifier, so this may also be the reason for the FreeGrid plugin not loading for you.

                        • 9. Re: Can Xcode 7 be used for CS6 plugins?
                          Rick E Johnson Level 1

                          Thank you again, LeoTaro,

                           

                          I still get errors on my 2008 MacBook Pro, but EmptyPanel compiles and runs perfectly on my 2012 iMac. When I build FreeGrid, it appears in the menu, but I can't install the .zxp UI; I get an error from the extension manager "Failed to install ... Please make sure the manifest.xml of this extension is valid and the Extension Manager recognizes at least one product which the extension supports." Maybe again, this is an El Capitan thing. I don't plan to make UIs this way, so it's not an issue for me--at least not yet.

                           

                          BTW, XcodeLegacy.sh appears to successfully install in Xcode 7 under El Capitan with the latest script, but it doesn't actually work for me. The symbolic links (aliases) fail, I suspect because of the tighter sandbox restrictions on the "/usr" directory where the actual SDKs are supposed to go.

                           

                          Thank you for all of your help. I very much appreciate it! I'm now able to move forward on porting my older plugins to CS6 and beyond. :-)

                           

                          -- Rick