We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 53 - CodeWarrior projects updated
Summary: CodeWarrior projects updated
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 1.2
Hardware: PowerPC Mac OS Classic
: P2 blocker
Assignee: Anders F Bj
QA Contact: Sam Lantinga
URL:
Keywords:
: 14 (view as bug list)
Depends on: 218 221 222 223
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-19 07:39 UTC by Sam Lantinga
Modified: 2006-05-11 04:40 UTC (History)
3 users (show)

See Also:


Attachments
CWprojects-xml.zip (606.52 KB, application/zip)
2006-05-09 09:48 UTC, Anders F Bj
Details
CWprojects-cw9.zip (240.32 KB, application/zip)
2006-05-09 18:36 UTC, Anders F Bj
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Lantinga 2006-01-19 07:39:26 UTC
ate: Wed, 14 Sep 2005 23:22:24 +0200
From: Anders_F_Bj&#65533;klund <afb@algonet.se>
Subject: [SDL] CodeWarrior projects updated

I've updated the CodeWarrior projects to
build the latest SDL version (from CVS)

Both the old CW5 project, as well as an
updated version for CW6 (Classic/Carbon)


I also found some problems with the old
projects, except for missing files etc:

- both the debug/static and release/dynamic
   library was using the name "SDL.X86.LIB" ?
- CW5 couldn't build for Carbon correctly
   (a known problem, but I removed the targets)
- CW6 didn't really want to use the old StdCLib
   (so I just linked against MSL for the "new")

The OpenGL used was an old version, so I
just deleted that and built against 1.2.
(with a path of "{CodeWarrior}:OpenGL")
It can be downloaded from Apple's FTP:
ftp://ftp.apple.com/developer/opengl/SDK/

Also did some minor changes in naming:
- renamed "SDL.PPC.DLL" to SDLClassic
- renamed "Carbon" suffix to just CRB
- changed SDL.X86.LIB to just SDL.LIB
- changed SDL.X86.DLL to just SDL.DLL


Here is a portrait of all of the family together:
http://www.algonet.se/~afb/libsdl/SDL-cw.png

"SDL" is the old Mac-library that is even MPW-compatible,
SDLClassic is for InterfaceLib and SDLCarbon for CarbonLib

You can only have one of them "active", or you'll get errors
like these: http://www.algonet.se/~afb/libsdl/linkerrors.html

Tested with Mac OS X, Mac OS 9 (Classic), Windows 98 (VPC)
and seems to be working just fine - including the GL demo.


Here are the exported XML project files, from CodeWarrior:
http://www.algonet.se/~afb/libsdl/CWprojects-xml.zip

It also includes a few new/updated Mac support files.
I'll make a binary version of "CWProjects.sea" later.

--anders

PS. Yes, it's all obsolete... Still works fine, though ?
     For the real builds, I'm using Xcode. (GNU Make too)
Comment 1 Ryan C. Gordon 2006-01-27 11:23:17 UTC
Setting Sam as "QA Contact" on all bugs (even resolved ones) so he'll definitely be in the loop to any further discussion here about SDL.

--ryan.

Comment 2 Sam Lantinga 2006-02-25 14:00:17 UTC
*** Bug 14 has been marked as a duplicate of this bug. ***
Comment 3 Anders F Bj 2006-03-26 05:51:05 UTC
OK, I will try to update the old projects but there are some additions in the new SDL that are not compatible with the old Mac builds such as the "../*" includes.

So it's possible that there won't be projects for Classic or Win32, just a Carbon project (for Mac OS 9 / Mac OS X CFM) Adding a Mach-O project to CW could be done.

What kind of backwards compatibility is SDL looking at ?
(I guess the MPW and Xcode projects are outside this bug)
Comment 4 Anders F Bj 2006-03-26 06:11:54 UTC
Removing these files:
audio/SDL_audiomem.c
endian/SDL_endian.c
SDL_getenv.c
SDL_loadso.c

Adding these files:
stdlib/SDL_getenv.c
loadso/macos/SDL_sysloadso.c

Probably some others, before it builds.

Also need to change SDL_opengl.h:

#if defined(__MACOSX__)
#include <OpenGL/gl.h>	/* Header File For The OpenGL Library */
#include <OpenGL/glu.h>	/* Header File For The GLU Library */
#elif defined(__MACOS__)
#include <gl.h>	/* Header File For The OpenGL Library */
#include <glu.h>	/* Header File For The GLU Library */
#else
#include <GL/gl.h>	/* Header File For The OpenGL Library */
#include <GL/glu.h>	/* Header File For The GLU Library */
#endif

Can't activate UNIX paths otherwise,
as it doesn't find the GL headers ?
Comment 5 Anders F Bj 2006-03-26 08:19:26 UTC
Here are the available targets, for each version:

CW5:
- MacOS (PPC)
- Win32 (X86)

CW6:
- Classic (MacOS)
- Carbon
- Win32

CW9:
- CFM (Carbon)
- Mach-O
- Win32

The Mach-O project currently doesn't build,
since the platform headers don't work for it.
("SDL_platform.h" thinks that it is Classic,
seems to only recognize Apple's GCC compilers)
Comment 6 Anders F Bj 2006-03-26 08:20:32 UTC
OpenGL headers added as Bug 183
Comment 7 Sam Lantinga 2006-04-13 23:41:26 UTC
Can you attach the updated projects?  The ones at http://www.algonet.se/~afb/libsdl/CWprojects-xml.zip appear to be old.

Thanks!
Comment 8 Anders F Bj 2006-05-04 08:47:01 UTC
Will do...
Comment 9 Sam Lantinga 2006-05-07 17:09:29 UTC
I'd like to get this fixed for SDL 1.2.10 release, if possible.
Comment 10 Anders F Bj 2006-05-09 09:48:02 UTC
Created attachment 116 [details]
CWprojects-xml.zip

XML-exported projects for CodeWarrior 5 and 6
Rez-exported resource files, for CodeWarrior
Comment 11 Anders F Bj 2006-05-09 09:50:58 UTC
Uploaded oldskool projects for Classic and for Carbon/CFM,
CW9 project for Mach-O/Carbon.framework not working 100%

Trying to submit the necessary code changes separately,
for compiling with Carbon/CFM and Win32 with CodeWarrior.
Comment 12 Anders F Bj 2006-05-09 18:36:47 UTC
Created attachment 121 [details]
CWprojects-cw9.zip
Comment 13 Anders F Bj 2006-05-09 18:40:33 UTC
There will be no Win32 targets for CW9/CW10.
Instead, the following targets were added:

CW9:
- CFM (Carbon)
- Carbon (Mach-O)
- Cocoa (Mach-O)

It builds the following Mach-O:
- SDLmainCarbon.lib
- SDLCarbon.dylib
- SDLmainCocoa.lib
- SDLCocoa.dylib
All linking to libSystem.dylib
Comment 14 Anders F Bj 2006-05-10 03:34:56 UTC
Seems like all the changes are in Subversion now,
so it's soon time for the big "smoke test" of it...

Time for another "family portrait", with the new members
"Carbon Mach-O" and "Cocoa Mach-O" in addition to the old


Maybe I'll take a peek at the MPW and ProjectBuilder
too, but I'm not sure if it's worth any effort or not?
(that was: the old Mac OS X .pbproj and .xcode projects,
and the Makefiles for build Mac OS 9 libraries with MPW)
Comment 15 Sam Lantinga 2006-05-10 03:37:56 UTC
(In reply to comment #14)
> Seems like all the changes are in Subversion now,
> so it's soon time for the big "smoke test" of it...
> 
> Time for another "family portrait", with the new members
> "Carbon Mach-O" and "Cocoa Mach-O" in addition to the old

Great. :)
Go ahead and attach any new projects, and obsolete the old attachments.
Thanks!

> Maybe I'll take a peek at the MPW and ProjectBuilder
> too, but I'm not sure if it's worth any effort or not?
> (that was: the old Mac OS X .pbproj and .xcode projects,
> and the Makefiles for build Mac OS 9 libraries with MPW)

The MPW Makefiles are all up to date.  The Xcode projects are up to date, and build Universal binaries and redistributable packages.  The Project Builder files are gone for good.

Comment 16 Anders F Bj 2006-05-10 03:44:11 UTC
(In reply to comment #15)
> The MPW Makefiles are all up to date.  The Xcode projects are up to date, and
> build Universal binaries and redistributable packages.  The Project Builder
> files are gone for good.

I meant the Xcode 1.5 projects, which also seem "gone for good".
In the tarball there was only Xcode 2 projects for Mac OS X 10.4

All this project file version craziness is a good reason (for me)
to leave both CodeWarrior and Xcode behind and just use MPW/Make.
Comment 17 Sam Lantinga 2006-05-11 04:33:53 UTC
Thanks!  I've updated CWprojects.sea.bin with the CodeWarrior 5 and 6 projects.

In addition, I did the following for the CodeWarrior 5 projects:
* Updated the version string to 1.2.10
* Removed Win32 targets from CodeWarrior 5 projects (since I don't have Win32 compiler support)
* Cleaned up access paths
* Removed unnecessary macos_prefix.h
* Added all necessary StdCLib headers to Support:MacOS 
* Added OpenGL 1.2 API headers and libraries to Support:MacOS
* Added testdyngl test program
* Removed OpenGL stub from all test programs except for testgl
Comment 18 Anders F Bj 2006-05-11 04:40:04 UTC
(In reply to comment #17)
> In addition, I did the following for the CodeWarrior 5 projects:

Keeping busy! :-)

The Win32 target did require some patching of the SDL sources,
so there's a big patch needed in order for that to work anyway...
I tested the earlier Win CW builds with Windows 98 (in VPC :-) ),
but haven't gotten around to doing so with these new SDL 1.2.10