Add a "idle" method to the state structure
[neverball] / macosx / Howto.txt
1 How to compile a universal binary of Neverball/Neverputt in OSX
2
3 1) Retrieve the universal binary dependencies. 
4 To be sure that you have universal binary frameworks installed use the following command :
5
6 file /Library/Frameworks/SDL.framework/Versions/Current/SDL
7
8 which normally outputs : 
9
10 /Library/Frameworks/SDL.framework/Versions/Current/SDL: Mach-O fat file with 2 architectures
11 /Library/Frameworks/SDL.framework/Versions/Current/SDL (for architecture i386): Mach-O dynamically linked shared library i386
12 /Library/Frameworks/SDL.framework/Versions/Current/SDL (for architecture ppc):  Mach-O dynamically linked shared library ppc
13         
14 If it is not the previous output, retrieve SDL.framework here : http://www.libsdl.org/download-1.2.php (Runtime Library for MacOSX)
15 Open the dmg file and copy the SDL.framework in /Library/Frameworks.
16 Do the same for:
17         - SDL_image     http://www.libsdl.org/projects/SDL_image/
18         - SDL_ttf       http://www.libsdl.org/projects/SDL_ttf/
19         - SDL_mixer     http://www.libsdl.org/projects/SDL_mixer/
20         
21 Now, all neverball dependencies have been installed for universal build.
22  - libintl, libpng and msgfmt tool are already included in this archive
23
24 2) Check to make sure you have the latest version of Xcode.
25
26 3) Use the Xcode project found in the macosx/xcode directory.
27                 
28 Just double click the file neverball.xcodeproj
29
30 5) In Xcode, double click on "Errors and Warnings" in the left tree to open the building view
31
32 6) Select :
33         Active target -> "Sparse Disk Image" 
34         Active executable -> neverball (although this doesn't matter as we are going to compile everything)
35         Active build configuration -> "Deployment" (In this mode both universal binary are created)
36         
37         Then click on the Build button
38         
39         It will take a long time.
40         First mapc is created
41         Second Maps are compiled
42         Third locale are generated
43         Then neverball is compiled
44         And neverputt
45         and finally a sparse (read and write) dmg file is created with all stuff without temp files
46         The script is now finished.
47         
48         You can modify the the view of the mounted sparse image (background image, icons, ...)
49         
50         Then unmount it and select: 
51                 Active target -> "Compressed disk image"
52                 Active executable -> neverball
53                 Active build configuration -> neverball
54
55          Then click on the Build button
56         
57          A read-only dmg file is generated
58         
59          All stuff is accessible in the svn directory under:
60         
61                 macosx/xcode/build/Deployment/
62         
63 That's all folks!