Updated Read Me, added preliminary code for help menu in SDLMain.m

This commit is contained in:
Martin Fuhrer 2005-11-30 03:50:40 +00:00
parent 8daa357a51
commit 659b29cb68
3 changed files with 46 additions and 6 deletions

View file

@ -17,7 +17,7 @@
<key>CFBundleSignature</key>
<string>TXPT</string>
<key>CFBundleVersion</key>
<string>0.9.14</string>
<string>2005-11-26</string>
<key>NSMainNibFile</key>
<string>SDLMain</string>
<key>NSPrincipalClass</key>

View file

@ -1,6 +1,5 @@
Tux Paint Xcode Project
Tux Paint Xcode 2.2 Project
notes by Martin Fuhrer <mfuhrer@alumni.ucalgary.ca>
$Id$
This Tux Paint project file is located in a folder titled "macosx", which should in turn be placed in the root folder of the Tux Paint source code distribution. The project will then be able to access all the source code files.
@ -21,9 +20,9 @@ These frameworks should ideally be the non-development versions (without the hea
So where does the project reference the SDL header files, if they are not in the frameworks? Via the Fink installation of SDL. So be sure to install all SDL-related packages in Fink.
-- PNG and Internationalization Libraries --
-- PNG, Internationalization, and Character Set Conversion Libraries --
Install PNG (libpng.a) and the GNU internationalization library (libintl.a) via Fink. These libraries will be statically linked into the Tux Paint binary.
Install PNG (libpng.a), the GNU internationalization (libintl.a), and character set conversion (libiconv.la) via Fink. These libraries will be statically linked into the Tux Paint binary.
-- Translation Files --
@ -35,3 +34,18 @@ make install-gettext
This will generate translation files in /usr/local/share/locale. Move the locale folder into the root folder of the Tux Paint source distribution, and the Tux Paint XCode project will be able to bundle the files into the Tux Paint application.
-- Cross Development --
In order to allow Tux Paint application to run on older versions of Mac OS X, this project compiles and links against an older version of the Mac OS X SDK (eg. Mac OS X 10.2.8) using an older version of gcc (eg. gcc 3.3). Various versions of the Mac OS X SDKs and gcc can be installed from the XCode Installation DVD. Note that any libraries Tux Paint links against (eg. libraries installed by Fink) should also be compiled and linked against the same SDK, using the same version of gcc.
To set the desired Mac OS X SDK:
1) Choose Project > Edit Project Settings
2) Click on the General tab.
2) Choose the desired SDK from the "Cross-Develop Using Target SDK" menu.
To set the desired compiler version:
1) Choose Project > Edit Active Target
2) Click on the Rules tab.
3) Set the desired associations between file types (eg. C++ source files) and the compiler version (eg. GCC 3.3).

View file

@ -3,13 +3,13 @@
Non-NIB-Code & other changes: Max Horn <max@quendi.de>
Feel free to customize this file to suit your needs
$Id$
*/
#import "SDL.h"
#import "SDLMain.h"
#import <sys/param.h> /* for MAXPATHLEN */
#import <unistd.h>
#include "wrapperdata.h"
/* Use this flag to determine whether we use SDLMain.nib or not */
@ -242,6 +242,31 @@ static void setupWindowMenu(void)
[windowMenuItem release];
}
/* Create a window menu */
static void setupHelpMenu(void)
{
NSMenu *helpMenu;
NSMenuItem *helpMenuItem;
NSMenuItem *menuItem;
helpMenu = [[NSMenu alloc] initWithTitle:@"Help"];
/* "Help" item */
NSString *appName = getApplicationName();
menuItem = [[NSMenuItem alloc] initWithTitle:[appName stringByAppendingString:@" Help"] action:@selector(showHelp:) keyEquivalent:@"?"];
[helpMenu addItem:menuItem];
[menuItem release];
/* Put menu into the menubar */
helpMenuItem = [[NSMenuItem alloc] initWithTitle:@"Help" action:nil keyEquivalent:@""];
[helpMenuItem setSubmenu:helpMenu];
[[NSApp mainMenu] addItem:helpMenuItem];
/* Finally give up our references to the objects */
[helpMenu release];
[helpMenuItem release];
}
/* Replacement for NSApplicationMain */
static void CustomApplicationMain (argc, argv)
{
@ -268,6 +293,7 @@ static void CustomApplicationMain (argc, argv)
[NSApp setMainMenu:[[NSMenu alloc] init]];
setApplicationMenu();
setupWindowMenu();
setupHelpMenu();
/* Pass information to SDL application */
bridge = [[CocoaToSDLBridge alloc] init];