Thanks for writing this up!
I added SDL_atomic.h, SDL_power.h and SDL_revision.h to the public headers,
as well as added the atomic API source files. They don’t compile yet, but
they should go into the project.
SDL 1.3 doesn’t need SDL_main() anymore, so that was intentionally left
out. Were you running into issues because that was missing?
I also updated SDL_image with the ICO and CUR file formats, though I suspect
the CUR loader doesn’t work.
See ya!On Thu, Jul 30, 2009 at 5:09 AM, jeroen clarysse <jeroen.clarysse at telenet.be wrote:
here’s my final walkthrough after 2 hours of sweat :
ALMOST there !
a short walk-trhough on what I did :
-
download SDL from svn : in terminal change directory to wherever you’re
going to build SDL, and type
svn checkout http://svn.libsdl.org/trunk/SDL
-
the resulting directory will contain a subdir named XCode, which has a
project file SDL.xcodeproj. Open that one
-
you will need to add three files to the project : SDL_power.h &
SDL_atomic which already exist, and a new file SDL_revsion.h, which does NOT
yet exist. That last file should simply contain one define statement that
holds the current SDL version :
#define SDL_REVISION 4567
-
add these files by chosing “add to project” from the “project” menu
-
make sure you mark the checkbox in front of the framework target, or the
files will NOT be copied to your compiled framework
-
you’ll have to tell the project that these two files are PUBLIC, and need
to be copied to the exported headers :
* in the left column, inside the “targets” subtree, select
"framework".
* The main pane of the project window should show the details of the
target. If not, click “details” on top
* look for sDL_power.h, and make sure the 2nd column “role” is set
to “public” rather than “project”
* repeat for SDL_atomic.h
* repeat for SDL_revision.h
-
fix a bug in SDL_main.h : inside the SDL folder, there’s a subfolder
"include", with a file named SDL_main.h
-
open that file
-
the #if statement on line 30 is incomplete in SDL 1.3 ! Somehow the Mac
part is missing. It should look like this :
#if defined(WIN32) ||
(defined(MWERKS) && !defined(BEOS)) ||
defined(MACOS) || defined(MACOSX) ||
defined(SYMBIAN32) || defined(QWS)
-
change it & save it
-
make sure you’ve set the deployment target if that’s what you want
-
compile
-
when done, the XCode folder will contain a “build” folder, in which
you’ll find a subfolder “deployment” or “development” folder, depending on
which target you’ve set
-
inside the deply/develop folder, there will be a SDL.Framework folder.
-
Drag that folder to /Library/Frameworks
now we need to add SDL_image. Get it from subvrsion :
svn checkout http://svn.libsdl.org/trunk/SDL_image
- again, there’s an xcode folder, but it is still zipped. Unzip it and open
the project file
- try to compile. You’ll get some link errors because 4 functions defined
in bmp.c need to be copied to IMG_imageio.c. Make sure your copy the
functions that return 0 and NULL
- compile again. should be fine now
- you’ll have a build folder now inside the SDL_image/XCode folder.
- Inside that build folder should be a deply/develop folder, which contains
SDL_image.framework
- copy that SDL_image.framework folder to /Library/Frameworks
now we’re going to test it : inside the SDL_image/XCode folder, you’ll find
a folder named ShowImage, which contains another XCode project. Open it and
try to compile…
should work now… (fingers crossed)
if you have no compile errors, the app should work, but since it is a
command-line application, you’ll have to test it from terminal :
- open a terminal window
- drag the app to the terminal window to get the proper path (the app is
inside the ShowImage/build/deploy folder)
- type a space inside the terminal window
- drag a bmp or jpg or other image file to terminal window to add that path
to the current command
- hit enter
-…
- http://www.instantrimshot.com/
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC