> Hello to all, hope you can help this windows MFC programmer who has
> managed to port his code to the mac but is struggling like mad at the
[quoted text clipped - 3 lines]
> version number. I have built a carbon sharedlib and macromedia director
> cross platform xtra.
What's wrong with the usual method:
const char *copyright[] = "Copyright G. Fozzard, 2005";
const char *version[] = "Version X.X.X";
Or am I missing something?
> 2. When I build a release version with codewarrior can I be sure that I
> have not accidently left debugging info in there. ie on VC the debug
> version embeds code text.
If you build your executables in non-debug mode, you have no reason to
worry, surely?
There is a Unix utility 'strip' (try 'man strip') that gets rid of
unnecessary symbols. It's my guess that it will only work on Mach-O
format files, though.
HTH
Alwyn
larry@skytag.com - 18 Jun 2005 19:23 GMT
>> 2. When I build a release version with codewarrior can I be sure that I
>> have not accidently left debugging info in there. ie on VC the debug
>> version embeds code text.
>
> If you build your executables in non-debug mode, you have no reason to
> worry, surely?
I'm not aware of a "debug mode" provided by CW. The normal way to
handle this is create debug and release targets within the same project
and configure them differently using different settings such as
optimization, and different compiler flags in their prefix files or the
C/C++ Preprocessor panel.
Larry
Gary Fozzard - 18 Jun 2005 21:22 GMT
thanks both for this, on the release code first the thing that got me is
that the release and debug binaries were a similar size leading me to
think that there may be some text in them. on VC the bebug bin is massive.
I was also used to version resource and was thinking there might be a
similar thing on CW. I have tried this method of putting a copyright
string in the file but it does not come up under finder when you go File
- Get Info.
Any ideas how to do that?
thanks
Gary
>>>2. When I build a release version with codewarrior can I be sure that I
>>>have not accidently left debugging info in there. ie on VC the debug
[quoted text clipped - 10 lines]
>
> Larry
Scott Ribe - 18 Jun 2005 22:24 GMT
> thanks both for this, on the release code first the thing that got me is
> that the release and debug binaries were a similar size leading me to
> think that there may be some text in them. on VC the bebug bin is massive.
CW puts that info in a separate file, the xsym file.
> I was also used to version resource and was thinking there might be a
> similar thing on CW. I have tried this method of putting a copyright
> string in the file but it does not come up under finder when you go File
> - Get Info.
Depends on platform and so on. Back on OS 9 and before it was a vers
resource. In the current system it's in a plist file in the bundle. If you
started with MW stationery, look for the .plc file and edit it. If you
didn't, then create a new project and look at the plc file and the project
settings regarding it.
David Phillip Oster - 18 Jun 2005 22:26 GMT
> I was also used to version resource and was thinking there might be a
> similar thing on CW. I have tried this method of putting a copyright
> string in the file but it does not come up under finder when you go File
> - Get Info.
Under Classic Mac OS, the version string came from a 'vers' resource.
In OS X, it comes from the appropriate keys in your Info.plist file, and there is provision for internationalizing those strings, so that users who see the interface in a different language, also see the version strings in that language.
this Google query will take you to my previous writings on this topic:
<http://groups-beta.google.com/groups?q=StandardInfoPlistKeys>
specifically CFBundleGetInfoString
<http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Conce
pts/PListKeys.html#//apple_ref/doc/uid/20001431-101976-TPXREF109>

Signature
David Phillip Oster
Gary Fozzard - 19 Jun 2005 09:13 GMT
OK I am still struggling here, I
looked at the doc tagetting mac os and found out its a plc file that get
compiled into the plist.
My sharedlib called MySharedLibTest so I made a plc called
MySharedLibTest.plc and took the example data from the targetting mac os
documentation and pasted it in, setting a version that I could tell if
it had worked.
the plc compliled ok I think, is its supposed to be output as
something.plist? cos I cannot find that file.
File Info on the library still says
Version 1.0 Copyright Apple Computer inc 1992
-98
QUicktime 3.0
says open with network scripting setup!
Gary
>>I was also used to version resource and was thinking there might be a
>>similar thing on CW. I have tried this method of putting a copyright
[quoted text clipped - 12 lines]
>
> <http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Conce
pts/PListKeys.html#//apple_ref/doc/uid/20001431-101976-TPXREF109>
Gary Fozzard - 19 Jun 2005 09:31 GMT
Ah I might be getting somewhere, I went the vers resource route and made
a file called version.r and put it in the project. I now get a warning
ignored duplicate resource "vers(1)
so I wonder where this is being picked up from,can I find out!?
G
>>I was also used to version resource and was thinking there might be a
>>similar thing on CW. I have tried this method of putting a copyright
[quoted text clipped - 12 lines]
>
> <http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Conce
pts/PListKeys.html#//apple_ref/doc/uid/20001431-101976-TPXREF109>
Scott Ribe - 19 Jun 2005 22:31 GMT
> Ah I might be getting somewhere, I went the vers resource route and made
> a file called version.r and put it in the project. I now get a warning
> ignored duplicate resource "vers(1)
>
> so I wonder where this is being picked up from,can I find out!?
The stationery you started from when you built the original project probably
included a resource file that defines a vers resource. Do you have a
"resources" folder in your project, if so look there.
FYI the plist is only for bundles, not libraries.
Gary Fozzard - 28 Jun 2005 16:07 GMT
thanks so much to everyone. Got there in the end. What had happened is
that codewarrior stationary for the lib had given me a test app target
which included rsrc too. I delted everything under resources and put in
my own .r file with a version definition. Phew. Anyway I am just going
to post a new question to you all about installers.
best wishes
Gary
>>Ah I might be getting somewhere, I went the vers resource route and made
>>a file called version.r and put it in the project. I now get a warning
[quoted text clipped - 7 lines]
>
> FYI the plist is only for bundles, not libraries.
Hi,
Usually you create another target called Release, just clone your existing
target and change the settings. I usually have 2 targets as so:
XXX-REL All opimizations on, debugging off.
XXX-DBG All optimizations off. debugging on.
To turn debugging on/off, click the little "bug" icon in the Project Window.
Option Click switches them on/off for every file.
Hope this helps
Dave
> Hello to all, hope you can help this windows MFC programmer who has
> managed to port his code to the mac but is struggling like mad at the
[quoted text clipped - 14 lines]
>
> Gary