On 26/11/2014 at 06:26, xxxxxxxx wrote:
Pim,
can you please try the following procedure to move your project. I started with monkeytack's recipe (thanks for that) and added steps where needed. Step 11 in there is definitely not recommended. So here's what I came up with:
BEFORE moving anything, if you ever had opened the project you want to move in Xcode, open the project again and select Product -> Clean from menu (Shift+Cmd+K). Then close the project again.
Now, make sure you have no other instances of Xcode open, in which you are working on a plugin project.
Before continuing, I recommend a backup copy of the project to be moved (I'll use cinema4dsdk as example in the following). This backup should be outside the Cinema 4D tree (or at least outside the plugins folder).
1. Move your cinema4dsdk folder to your plugin directory (one level up).
2. Inside the folder open cinema4dsdk.xcodeproj
3. In Xcode go to the configurations folder of the project and delete the debugbase.xcconfig and
the releasebase.xcconfig file
4. You may be asked to unlock, accept this.
5. Right click on the configurations folder and choose Add files to "cinema4dsdk"...
In MAXON/CINEMA 4D R16/frameworks/settings you´ll find the debugbase.xcconfig and the releasebase.xcconfig files, select them both and make sure that the checkbox for Destination is off and the checkbox at folders is set to "Create groups for any added folders" (in Xcode 6 this is "Added folders: Create groups"). Click Add.
6. Select your project file and on the main window click info.
In the Configurations dropdown there is a Debug and a Release Dropdown.
Choose debugbase and releasebase accordingly, but only for the "blue icons".
You´ll see 1 Configuration Set now at the drop downs.
7. In your project structure on the left side, go to the libs folder and delete the cinema.framework.xcodeproj file.
8. Right click on the libs folder and choose Add files to "cinema4dsdk"...
In MAXON/CINEMA 4D R16/frameworks/cinema.framework/project you´ll find the cinema.framework.xcodeproj file, Click Add.
9. If you click on the frameworkproject file inside xcode indexing will process, wait until it is finished (Xcode 6 will do so without further ado).
10. In the main window go to Build Settings Choose Basic and Combined, under the User-Defined Settings you will find a MAXON_ROOTDIR. Change the path to ../../ (if you moved the project one directory level up)
11. Select the cinema4dsdk in the tree on the left (topmost, blue icon). Under Build Settings make sure to select the "Target" cinema4dsdk. Go into Build Phases. In "Link Binary With Libraries" click the + and select lib cinema.framework.a
This step is vital, otherwise your plugin will not be correctly linked against the framework and the link step will fail.
Because monkeytack suggested it in his step 11, please do NOT change the Mach-O Type to static library. This is not desirable and will lead to wrong results!
12. Perhaps an Xcode guru can help me out here. But on my system with Xcode 6 there are several (build) directories created, while going through the above procedure. I really like to know, how this can be prevented. Anyway, BEFORE continuing these need to be deleted. Please be careful with delete operations and check the contents of the proposed folders. Perhaps you have stored valuable data in there.... The following locations need to be checked. In the MAXON directory next to the CINEMA 4D R16 folder, if there's a (build) folder, delete it. In CINEMA 4D R16 directory go into the (build) folder, if it exists and delete cinema4dsdk.build in there. Then in plugins if there's a (build) folder, check its contents and delete cinema4dsdk in there, or the entire folder. Finally in plugins/cinema4dsdk delete any cinema4dsdk.dylib and if there's a build and/or (build) subdir delete theses as well.
Now you should be good to go.
13. Build the cinema4dsdk examples and start up Cinema 4D.
Perhaps a last note. I did this with Xcode 6.0.1. I'm pretty sure it will work the same in Xcode 5.1.1. I read somewhere, that Xcode 5.0.2 would not run properly on Yosemite, so I could not test this.