Copy link to clipboard
Copied
Hi,
Any other developers trying to develop using idsdk5 for CS3 using Snow Leopard and XCode 3.2.1 ? Adobe says it is an unsupported configuration.
I don't like to downgrade, and am wondering if there are others with the same issue and possible solutions?
Thanks,
Remco
Copy link to clipboard
Copied
I am using Xcode 3.2 and that seems to work, after a bit of fiddling. The 'key' thing I had to do to make it work was to add
...
GCC_VERSION = 4.0
Copy link to clipboard
Copied
Hi Kris,
Thanks for sharing your setup!
The ability to use Xcode 3.2.x for compiling all ID/IC Plug-Ins sounds great! Do you use it for CS3 and CS4 Plug-In development? Does Xcode 2.5 run on Snow Leopard?
I currently use the recommened compilers for all of my Plug-In development work (and, yes, it is a real pain), because I'm worried that some issue might come up where the Adobe "unsupported" compiler might cause problems. How can one be sure that no problems will occur in a released Plug-In when using an unsupported compiler? Am I being too paranoid?!
So, do you think that if a Plug-In--built with an unsupported compiler--runs without issue in the Debug and Release Builds of ID on one's own systems, that it will work fine in the real world, or are there some gotchas? Sadly, I'm not a complier guru, so I have to count on experts (like you!) on these kinds of things! 😉
Thanks again!
-- Jim
Copy link to clipboard
Copied
Hi Kris,
This is working perfect using xcode 3.2.1, gcc 4.0 and 10.4 sdk on
snow leopard.
Thanks.
Remco
Copy link to clipboard
Copied
Hi Jim,
I use Xcode 3.2.x for CS3 and CS4 development (I tend to make 'combined' projects that have CS3 and CS4 targets built from a common code base). I use my own xconfig - gives you more control. I have a two project-level xconfig files (one for CS3, one for CS4) and then a bunch of separate, small xconfig file - one for each target. These small xconfig files are 'merged' with the big project-level xconfig through the project and target settings. Works well for me. I've structured my xconfig so it is very easy to re-use for new projects: simply adjust a few lines at the top.
During development, I live dangerously - I use the latest compiler I manage to get working (so my CS/CS2 development is still on CodeWarrior 8.x and 9.x), but for CS3/CS4 development on Mac I use Xcode 3.2.x. AFAIK there are no guarantees - so whether it works or not is a matter of a lot of testing.
I tried to hardhandedly 'shoehorn' GCC 3.3 into Xcode 3.2.x, but I got nowhere - it's not supported.
Xcode 2.5 seems to work fine on Snow Leopard - and it uses GCC 3.3.
I don't think the actual Xcode version really matters all that much - what really matters is the underlying GCC version. So, by using Xcode 3.2.x I am now on GCC 4.0 - which AFAIK is 'out of spec' for the InDy SDK, but if I want to be absolutely sure (e.g. for final compiles) I can use Xcode 2.5 which gives me GCC 3.3 - which AFAIK is 'in spec' for the InDy SDK. Don't quote me on any of this - I've not looked at the docs.
Here's what my current approach is/will be:
1) Use Xcode 3.2.x during development
2) When the time comes for an official release, I'll use Xcode 2.5 to generate the release version
Hope that gives some useful food for thought!
Cheers,
Kris
Copy link to clipboard
Copied
Kris,
Thanks for the excellent reply!
Eventually, I may upgrade to 3.2.x and see what happens. What could I possibly do wrong?! 😉
Cheers!
-- Jim
Copy link to clipboard
Copied
Kris,
similar setup here, regarding heavily customized xcconfig.
SLow Leopard (the old one) and XCode 3.1 mostly due to my laziness, maybe I should move forward. On the other hand, I still write the largest share of code with 10.3.9 and CodeWarrior because the editor and turn-around times are so much faster. InDesign CS2 Debug is already loaded when XCode is still wondering about dependencies.
Some less known xcconfig features that may simplify live:
- as you mentioned, one should definitely know about the differences between project and target
- #include works
- there are conditional overrides ( too few conditions though )
- look for a special "descend folders" syntax similar to CodeWarrior, rather than list folders explicit.
One warning though about compiler versions - Apple silently changes even such essential settings as dead stripping. Search for "no_dead_strip_inits_and_terms" if you want more details.
Also recently seen on the XCode list:
Well, the SDK in use is the 10.4 SDK. So is it a bug that Xcode is still using GCC 4.2 even though the 10.4 SDK is selected?
Not a bug in Xcode; as I said, it uses the default if the SDK doesn't define one. When the 10.4u SDK was built, we were unaware that a yet-unborn compiler would be incompatible with it, so it doesn't define a default compiler version. And we have not remastered the 10.4u SDK.
defaults write com.apple.Xcode NSRecentDocumentsLimit 20
Copy link to clipboard
Copied
>> SLow Leopard (the old one)
LOL!
Thanks for the other tips - most are news to me.
Let's comparing some more notes!
Here's a few things I believe (I won't say 'I know' - I have no hard proof, and I don't have a budget to investigate getting hard proof
)
I had extremely frustrating debugging issues with Xcode 3.1 - most of the time breaking into assembly code instead of showing the source code. No clear pattern: same breakpoint hit the first time shows the source code, second time assembly code. Fiddling with 'back arrows' sometimes got the source code to show up. It got so bad that I often had to revert to command-line debugging using gdb. Also a lot of 'mumble mode' - things just ................ coming to a pizza-colored cursor for no ................ apparent reason.
As a result, I've gotten into the habit of doing my coding and debugging on Windows XP with Visual Studio - once you get rid of the C-compiler RSP files and put the include paths into your project file instead, it works rather nicely, and to me it feels much faster than Xcode, even in a virtual machine.
I still do a lot of coding and debugging with InDesign CS on Windows/VS2003 - turnaround times (launch/debug/exit/...) are so much faster.
With Xcode 3.2.x on Snow Leopard things seem to work much better - so I might start to gravitate back to Mac-based debugging; time will tell.
CodeWarrior is over for me - I only use it to generate release versions (I still have some PowerPC macs around 'just in case' I need to debug something with CodeWarrior, but it's not been necessary).
As to Windows debugging: I use both Parallels and VMware, and my gut feeling is that Parallels seems to work quite a bit faster. Totally subjective, and probably unfair (the virtual machines have different histories, etc...) - but currently I find myself a lot in Parallels, with a virtual machine stored on an external USB drive connected to my laptop - I have heaps of virtual machines around, too many to store on the internal HD. Even with the slow USB bus 'underneath' it all, it works well.
With VMware I get a lot of mumble mode - machine non-responsive for minutes at a time, even with the virtual machine on the internal HD. Parallels has not done that to me (yet).
Another thing (might be fixed in Snow Leopard) - but have you ever had it happen that your InDy CS3 and CS4 plug-ins suddenly get a folder icon instead of a plug-in icon? Typically, all plugins will exhibit that behavior when it happens.
It's something with the package/bundle stuff, and the Finder getting confused. This is my unconfirmed theory: the Finder accepts a whole host of bundle formats, and the bundle structure used by the Adobe sample projects is 'iffy' - the Finder supports it, but occasionally, the Finder gets confused, and shows these plug-ins as folders (and that then further leads to customer support requests).
Now, if you go into the plugin package, it looks different from most other packages I've seen.
Here's how I fixed it: I added another build phase to the target - a 'Run Script' called 'Restructure Bundle'. I've put in the following shell script (using /bin/sh):
rm -rf $TARGET_BUILD_DIR/$PRODUCT_NAME.InDesignPlugin/Contents
mkdir $TARGET_BUILD_DIR/$PRODUCT_NAME.InDesignPlugin/Contents
echo InD3InDn > $TARGET_BUILD_DIR/$PRODUCT_NAME.InDesignPlugin/Contents/PkgInfo
mv $TARGET_BUILD_DIR/$PRODUCT_NAME.InDesignPlugin/Resources/Info.plist $TARGET_BUILD_DIR/$PRODUCT_NAME.InDesignPlugin/Contents
mv $TARGET_BUILD_DIR/$PRODUCT_NAME.InDesignPlugin/Versions $TARGET_BUILD_DIR/$PRODUCT_NAME.InDesignPlugin/Contents
mv $TARGET_BUILD_DIR/$PRODUCT_NAME.InDesignPlugin/Resources $TARGET_BUILD_DIR/$PRODUCT_NAME.InDesignPlugin/Contents
mv $TARGET_BUILD_DIR/$PRODUCT_NAME.InDesignPlugin/$PRODUCT_NAME $TARGET_BUILD_DIR/$PRODUCT_NAME.InDesignPlugin/Contents
Copy link to clipboard
Copied
Sheesh, those broken breakpoints? Sounds familiar, especially on restart. Be glad if they break at all!
VS2003 - I haven't used that for a while, the C++ template were just too broken, you'd need too many hoops for selection suite templates.
I don't even have it on VM, it still sits around on an old laptop, together with ID2.
Besides the old InDesign versions have all those annoying asserts about unexpectedly high prefix IDs, and my patch against the asserts is Mac only. I'm lucky to have some low prefix numbers (the earliest start with 6) but reusing prefixes even limited to isolated debug builds is no fun.
Parallels vs. VMWare: last time I compared them (previous version) I had the same experience, Parallels much faster. Besides the VMWare UI is a proof that some cross platform libraries need more work. It feels so Linux. I dearly miss AppleScript support with Parallels, though. It has some other means for remote control but I haven't followed that trail.
If you're debugging in VS, note there is some place deep in debugger preferences where you can specify a Microsoft server, and suddenly at least the stack frames of of the system dlls make sense to the debugger. Of course this comes at the price of speed and memory, but as a last resort ... GDB has ways more to show in that regard, even comparing to its XCode wrapper.
Easy solution for the folder-instead-of-bundle problem: create an archive via context menu, drop the original, unpack in place.
Dirk
Copy link to clipboard
Copied
Hi Dirk,
we've had some conversations prior.
We are so fare with our plug-in development at XP too.
There I've met an strange error.
The plug-in, which is not yet finally finished, could be build and loaded for severel months.
Since last week InDesign is claiming, that the plug-in is invalid and does not load it at all.
After a while of searching for a solution, I've opened the plug-in with an editor and have recogniced, that it containes the line 'This programm cannot be run in DOS mode'.
It seems that the building tool of VS7 is setting that property. But I did not change(and do not find) any respective compatibility mode setting there.
Do you have an advice, how to fix that problem?
Jochen
Copy link to clipboard
Copied
Jochen, you are adding to a 7 year old thread mainly on old Xcode versions. Please open a new thread for new issues.
To get over your problem, restore the latest working revision from your source code control history or other backup means. If you don't know how to do source code control, start over from a working SDK plugin and mix in lines from your plugin until it breaks.
Regarding that string, back in Windows 95 or earlier it used to be a prefix in every .exe and .dll, added with the default runtime library.
Google took me here, among others: This program cannot be run in DOS-mode
Copy link to clipboard
Copied
Hi Dirk,
I only relyed to that thraed, because heere you stated, that you have you hands on XP.
As I know so fare, the Line comes frm a failure in XP.
I hope that SP3 will fix that problem. I is due to 'compabtibilitiy mode'.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more