OSX Cocoa PrefsEditor - code and Xcode project

This commit is contained in:
asvitkine 2007-01-24 03:35:51 +00:00
parent f12f5173be
commit b1f1592f44
9 changed files with 829 additions and 0 deletions

View File

@ -0,0 +1,50 @@
{
IBClasses = (
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{
ACTIONS = {
addDisk = id;
browseForROMFileClicked = id;
createDisk = id;
removeDisk = id;
useRawKeyCodesClicked = id;
};
CLASS = PrefsEditor;
LANGUAGE = ObjC;
OUTLETS = {
bootFrom = NSComboBox;
disableCdrom = NSButton;
disableSound = NSButton;
diskSaveSize = NSView;
diskSaveSizeField = NSTextField;
disks = NSTableView;
dontUseCPUWhenIdle = NSButton;
enable68kDREmulator = NSButton;
enableJIT = NSButton;
ethernetInterface = NSTextField;
height = NSComboBox;
ignoreIllegalMemoryAccesses = NSButton;
mixDevice = NSTextField;
modemPort = NSTextField;
mouseWheel = NSPopUpButton;
outDevice = NSTextField;
printerPort = NSTextField;
qdAccel = NSButton;
ramSize = NSTextField;
ramSizeStepper = NSStepper;
rawKeyCodes = NSTextField;
refreshRate = NSPopUpButton;
romFile = NSTextField;
scrollLines = NSTextField;
scrollLinesStepper = NSStepper;
unixRoot = NSTextField;
useRawKeyCodes = NSButton;
videoType = NSPopUpButton;
width = NSComboBox;
window = NSWindow;
};
SUPERCLASS = NSObject;
}
);
IBVersion = 1;
}

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>135 142 356 240 0 0 1680 1028 </string>
<key>IBEditorPositions</key>
<dict>
<key>29</key>
<string>132 352 305 44 0 0 1680 1028 </string>
<key>342</key>
<string>715 652 249 104 0 0 1680 1028 </string>
</dict>
<key>IBFramework Version</key>
<string>446.1</string>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
</array>
<key>IBSystem Version</key>
<string>8L2127</string>
</dict>
</plist>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>net.sourceforge.SheepShaverPrefs</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.1</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

View File

@ -0,0 +1,70 @@
/*
* PrefsEditor.h - Preferences editing in Cocoa on Mac OS X
*
* Copyright (C) 2006-2007 Alexei Svitkine
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#import <Cocoa/Cocoa.h>
@interface PrefsEditor : NSObject
{
IBOutlet NSWindow *window;
IBOutlet NSView *diskSaveSize;
IBOutlet NSTextField *diskSaveSizeField;
NSMutableArray *diskArray;
// Setup
IBOutlet NSTableView *disks;
IBOutlet NSComboBox *bootFrom;
IBOutlet NSButton *disableCdrom;
IBOutlet NSTextField *ramSize;
IBOutlet NSStepper *ramSizeStepper;
IBOutlet NSTextField *romFile;
IBOutlet NSTextField *unixRoot;
// Audio/Video
IBOutlet NSPopUpButton *videoType;
IBOutlet NSPopUpButton *refreshRate;
IBOutlet NSComboBox *width;
IBOutlet NSComboBox *height;
IBOutlet NSButton *qdAccel;
IBOutlet NSButton *disableSound;
IBOutlet NSTextField *outDevice;
IBOutlet NSTextField *mixDevice;
// Keyboard/Mouse
IBOutlet NSButton *useRawKeyCodes;
IBOutlet NSTextField *rawKeyCodes;
IBOutlet NSPopUpButton *mouseWheel;
IBOutlet NSTextField *scrollLines;
IBOutlet NSStepper *scrollLinesStepper;
// CPU/Misc
IBOutlet NSButton *ignoreIllegalMemoryAccesses;
IBOutlet NSButton *dontUseCPUWhenIdle;
IBOutlet NSButton *enableJIT;
IBOutlet NSButton *enable68kDREmulator;
IBOutlet NSTextField *modemPort;
IBOutlet NSTextField *printerPort;
IBOutlet NSTextField *ethernetInterface;
}
- (id) init;
- (IBAction) addDisk:(id)sender;
- (IBAction) removeDisk:(id)sender;
- (IBAction) createDisk:(id)sender;
- (IBAction) useRawKeyCodesClicked:(id)sender;
- (IBAction) browseForROMFileClicked:(id)sender;
- (void) windowWillClose: (NSNotification *) aNotification;
- (void) dealloc;
@end

View File

@ -0,0 +1,329 @@
/*
* PrefsEditor.m - Preferences editing in Cocoa on Mac OS X
*
* Copyright (C) 2006-2007 Alexei Svitkine
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#import "PrefsEditor.h"
#import "sysdeps.h"
#import "prefs.h"
const int CDROMRefNum = -62; // RefNum of driver
@implementation PrefsEditor
- (id) init
{
self = [super init];
AddPrefsDefaults();
AddPlatformPrefsDefaults();
// Load preferences from settings file
LoadPrefs();
chdir([[[NSBundle mainBundle] bundlePath] cString]);
chdir("..");
return self;
}
- (int)numberOfRowsInTableView:(NSTableView *)aTable
{
return [diskArray count];
}
- (id)tableView:(NSTableView *)aTable objectValueForTableColumn:(NSTableColumn *)aCol row:(int)aRow
{
return [diskArray objectAtIndex: aRow];
}
NSString *getStringFromPrefs(const char *key)
{
const char *value = PrefsFindString(key);
if (value == NULL)
return @"";
return [NSString stringWithCString: value];
}
- (void) awakeFromNib
{
diskArray = [[NSMutableArray alloc] init];
const char *dsk;
int index = 0;
while ((dsk = PrefsFindString("disk", index++)) != NULL)
[diskArray addObject: [NSString stringWithCString: dsk ]];
[disks setDataSource: self];
[disks reloadData];
int bootdriver = PrefsFindInt32("bootdriver"), active = 0;
switch (bootdriver) {
case 0: active = 0; break;
case CDROMRefNum: active = 1; break;
}
[bootFrom selectItemAtIndex: active ];
[romFile setStringValue: getStringFromPrefs("rom") ];
[unixRoot setStringValue: getStringFromPrefs("extfs") ];
[disableCdrom setIntValue: PrefsFindBool("nocdrom") ];
[ramSize setIntValue: PrefsFindInt32("ramsize") / (1024*1024) ];
[ramSizeStepper setIntValue: PrefsFindInt32("ramsize") / (1024*1024) ];
int display_type = 0;
int dis_width = 640;
int dis_height = 480;
const char *str = PrefsFindString("screen");
if (str != NULL) {
if (sscanf(str, "win/%d/%d", &dis_width, &dis_height) == 2)
display_type = 0;
else if (sscanf(str, "dga/%d/%d", &dis_width, &dis_height) == 2)
display_type = 1;
}
[videoType selectItemAtIndex: display_type ];
[width setIntValue: dis_width ];
[height setIntValue: dis_height ];
int frameskip = PrefsFindInt32("frameskip");
int item = -1;
switch (frameskip) {
case 12: item = 0; break;
case 8: item = 1; break;
case 6: item = 2; break;
case 4: item = 3; break;
case 2: item = 4; break;
case 1: item = 5; break;
case 0: item = 5; break;
}
if (item >= 0)
[refreshRate selectItemAtIndex: item ];
[qdAccel setIntValue: PrefsFindBool("gfxaccel") ];
[disableSound setIntValue: PrefsFindBool("nosound") ];
[outDevice setStringValue: getStringFromPrefs("dsp") ];
[mixDevice setStringValue: getStringFromPrefs("mixer") ];
[useRawKeyCodes setIntValue: PrefsFindBool("keycodes") ];
[rawKeyCodes setStringValue: getStringFromPrefs("keycodefile") ];
[rawKeyCodes setEnabled:[useRawKeyCodes intValue]];
int wheelmode = PrefsFindInt32("mousewheelmode"), wheel = 0;
switch (wheelmode) {
case 0: wheel = 0; break;
case 1: wheel = 1; break;
}
[mouseWheel selectItemAtIndex: wheel ];
[scrollLines setIntValue: PrefsFindInt32("mousewheellines") ];
[scrollLinesStepper setIntValue: PrefsFindInt32("mousewheellines") ];
[ignoreIllegalMemoryAccesses setIntValue: PrefsFindBool("ignoresegv") ];
[dontUseCPUWhenIdle setIntValue: PrefsFindBool("idlewait") ];
[enableJIT setIntValue: PrefsFindBool("jit") ];
[enable68kDREmulator setIntValue: PrefsFindBool("jit68k") ];
[modemPort setStringValue: getStringFromPrefs("seriala") ];
[printerPort setStringValue: getStringFromPrefs("serialb") ];
[ethernetInterface setStringValue: getStringFromPrefs("ether") ];
}
- (IBAction) addDisk:(id)sender
{
NSOpenPanel *open = [NSOpenPanel openPanel];
[open setCanChooseDirectories:NO];
[open setAllowsMultipleSelection:NO];
[open beginSheetForDirectory: @""
file: @"Unknown"
modalForWindow: window
modalDelegate: self
didEndSelector: @selector(_addDiskEnd: returnCode: contextInfo:)
contextInfo: nil];
}
- (void) _addDiskEnd: (NSOpenPanel *) open returnCode: (int) theReturnCode contextInfo: (void *) theContextInfo
{
if (theReturnCode == NSOKButton) {
char cwd[1024], filename[1024];
int cwdlen;
strlcpy(filename, [[open filename] cString], sizeof(filename));
getcwd(cwd, sizeof(cwd));
cwdlen = strlen(cwd);
if (!strncmp(cwd, filename, cwdlen)) {
if (cwdlen >= 0 && cwd[cwdlen-1] != '/')
cwdlen++;
[diskArray addObject: [NSString stringWithCString: filename + cwdlen ]];
} else {
[diskArray addObject: [open filename]];
}
[disks reloadData];
}
[(NSData *)theContextInfo release];
}
- (IBAction) removeDisk:(id)sender
{
int selectedRow = [disks selectedRow];
if (selectedRow >= 0) {
[diskArray removeObjectAtIndex: selectedRow];
[disks reloadData];
}
}
- (IBAction) createDisk:(id)sender
{
NSSavePanel *save = [NSSavePanel savePanel];
[save setAccessoryView: diskSaveSize];
[save beginSheetForDirectory: @""
file: @"New.dsk"
modalForWindow: window
modalDelegate: self
didEndSelector: @selector(_createDiskEnd: returnCode: contextInfo:)
contextInfo: nil];
}
- (void) _createDiskEnd: (NSSavePanel *) save returnCode: (int) theReturnCode contextInfo: (void *) theContextInfo
{
if (theReturnCode == NSOKButton) {
int size = [diskSaveSizeField intValue];
if (size >= 0 && size <= 10000) {
char cmd[1024];
snprintf(cmd, sizeof(cmd), "dd if=/dev/zero \"of=%s\" bs=1024k count=%d", [[save filename] cString], [diskSaveSizeField intValue]);
int ret = system(cmd);
if (ret == 0) {
char cwd[1024], filename[1024];
int cwdlen;
strlcpy(filename, [[save filename] cString], sizeof(filename));
getcwd(cwd, sizeof(cwd));
cwdlen = strlen(cwd);
if (!strncmp(cwd, filename, cwdlen)) {
if (cwdlen >= 0 && cwd[cwdlen-1] != '/')
cwdlen++;
[diskArray addObject: [NSString stringWithCString: filename + cwdlen ]];
} else {
[diskArray addObject: [save filename]];
}
[disks reloadData];
}
}
}
[(NSData *)theContextInfo release];
}
- (IBAction) useRawKeyCodesClicked:(id)sender
{
[rawKeyCodes setEnabled:[useRawKeyCodes intValue]];
}
- (IBAction) browseForROMFileClicked:(id)sender
{
NSOpenPanel *open = [NSOpenPanel openPanel];
NSString *dir = @"";
NSString *file = [romFile stringValue];
[open setCanChooseDirectories:NO];
[open setAllowsMultipleSelection:NO];
[open beginSheetForDirectory: dir
file: file
modalForWindow: window
modalDelegate: self
didEndSelector: @selector(_browseForROMFileEnd: returnCode: contextInfo:)
contextInfo: nil];
}
- (void) _browseForROMFileEnd: (NSOpenPanel *) open returnCode: (int) theReturnCode contextInfo: (void *) theContextInfo
{
if (theReturnCode == NSOKButton) {
char cwd[1024], filename[1024];
int cwdlen;
strlcpy(filename, [[open filename] cString], sizeof(filename));
getcwd(cwd, sizeof(cwd));
cwdlen = strlen(cwd);
if (!strncmp(cwd, filename, cwdlen)) {
if (cwdlen >= 0 && cwd[cwdlen-1] != '/')
cwdlen++;
[romFile setStringValue: [NSString stringWithCString: filename + cwdlen ]];
} else {
[romFile setStringValue: [open filename]];
}
}
[(NSData *)theContextInfo release];
}
- (void) windowWillClose: (NSNotification *) aNotification;
{
while (PrefsFindString("disk"))
PrefsRemoveItem("disk");
for (int i = 0; i < [diskArray count]; i++) {
PrefsAddString("disk", [[diskArray objectAtIndex:i] cString]);
}
PrefsReplaceInt32("bootdriver", ([bootFrom indexOfSelectedItem] == 1 ? CDROMRefNum : 0));
PrefsReplaceString("rom", [[romFile stringValue] cString]);
PrefsReplaceString("extfs", [[unixRoot stringValue] cString]);
PrefsReplaceBool("nocdrom", [disableCdrom intValue]);
PrefsReplaceInt32("ramsize", [ramSize intValue] << 20);
char pref[256];
snprintf(pref, sizeof(pref), "%s/%d/%d", [videoType indexOfSelectedItem] == 0 ? "win" : "dga", [width intValue], [height intValue]);
PrefsReplaceString("screen", pref);
int rate = 8;
switch ([refreshRate indexOfSelectedItem]) {
case 0: rate = 12; break;
case 1: rate = 8; break;
case 2: rate = 6; break;
case 3: rate = 4; break;
case 4: rate = 2; break;
case 5: rate = 1; break;
}
PrefsReplaceInt32("frameskip", rate);
PrefsReplaceBool("gfxaccel", [qdAccel intValue]);
PrefsReplaceBool("nosound", [disableSound intValue]);
PrefsReplaceString("dsp", [[outDevice stringValue] cString]);
PrefsReplaceString("mixer", [[mixDevice stringValue] cString]);
PrefsReplaceBool("keycodes", [useRawKeyCodes intValue]);
PrefsReplaceString("keycodefile", [[rawKeyCodes stringValue] cString]);
PrefsReplaceInt32("mousewheelmode", [mouseWheel indexOfSelectedItem]);
PrefsReplaceInt32("mousewheellines", [scrollLines intValue]);
PrefsReplaceBool("ignoresegv", [ignoreIllegalMemoryAccesses intValue]);
PrefsReplaceBool("idlewait", [dontUseCPUWhenIdle intValue]);
PrefsReplaceBool("jit", [enableJIT intValue]);
PrefsReplaceBool("jit68k", [enable68kDREmulator intValue]);
PrefsReplaceString("seriala", [[modemPort stringValue] cString]);
PrefsReplaceString("serialb", [[printerPort stringValue] cString]);
PrefsReplaceString("ether", [[ethernetInterface stringValue] cString]);
SavePrefs();
PrefsExit();
exit(0);
}
- (void) dealloc
{
[super dealloc];
}
@end

View File

@ -0,0 +1,303 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 42;
objects = {
/* Begin PBXBuildFile section */
084186B10B3A0515004B1F63 /* PrefsEditor.m in Sources */ = {isa = PBXBuildFile; fileRef = 084186B00B3A0515004B1F63 /* PrefsEditor.m */; };
08DC90BD0B67074C00799A45 /* prefs_items.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08DC90BC0B67074C00799A45 /* prefs_items.cpp */; };
08DC90BF0B67075D00799A45 /* prefs_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08DC90BE0B67075D00799A45 /* prefs_unix.cpp */; };
08DC90C10B67077300799A45 /* prefs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08DC90C00B67077300799A45 /* prefs.cpp */; };
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
084186AF0B3A0515004B1F63 /* PrefsEditor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PrefsEditor.h; sourceTree = "<group>"; };
084186B00B3A0515004B1F63 /* PrefsEditor.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = PrefsEditor.m; sourceTree = "<group>"; };
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
08DC90BC0B67074C00799A45 /* prefs_items.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = prefs_items.cpp; path = ../../prefs_items.cpp; sourceTree = SOURCE_ROOT; };
08DC90BE0B67075D00799A45 /* prefs_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = prefs_unix.cpp; path = ../../Unix/prefs_unix.cpp; sourceTree = SOURCE_ROOT; };
08DC90C00B67077300799A45 /* prefs.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = prefs.cpp; path = ../../prefs.cpp; sourceTree = SOURCE_ROOT; };
08DC90C20B67078300799A45 /* prefs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = prefs.h; path = ../../include/prefs.h; sourceTree = SOURCE_ROOT; };
08DC90C40B67079800799A45 /* sys.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sys.h; path = ../../include/sys.h; sourceTree = SOURCE_ROOT; };
08DC90C50B6707AC00799A45 /* user_strings_unix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = user_strings_unix.h; path = ../../Unix/user_strings_unix.h; sourceTree = SOURCE_ROOT; };
08DC90C60B6707B400799A45 /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = config.h; path = ../../Unix/config.h; sourceTree = SOURCE_ROOT; };
08DC90C70B6707BE00799A45 /* sysdeps.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sysdeps.h; path = ../../Unix/sysdeps.h; sourceTree = SOURCE_ROOT; };
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
32CA4F630368D1EE00C91783 /* SheepShaverPrefs_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SheepShaverPrefs_Prefix.pch; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* SheepShaverPrefs.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SheepShaverPrefs.app; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
8D11072E0486CEB800E47090 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
);
name = Classes;
sourceTree = "<group>";
};
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
isa = PBXGroup;
children = (
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
);
name = "Linked Frameworks";
sourceTree = "<group>";
};
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
isa = PBXGroup;
children = (
29B97324FDCFA39411CA2CEA /* AppKit.framework */,
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
19C28FACFE9D520D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8D1107320486CEB800E47090 /* SheepShaverPrefs.app */,
);
name = Products;
sourceTree = "<group>";
};
29B97314FDCFA39411CA2CEA /* SheepShaverPrefs */ = {
isa = PBXGroup;
children = (
08DC90C20B67078300799A45 /* prefs.h */,
08DC90C40B67079800799A45 /* sys.h */,
08DC90C50B6707AC00799A45 /* user_strings_unix.h */,
08DC90C60B6707B400799A45 /* config.h */,
08DC90C70B6707BE00799A45 /* sysdeps.h */,
08DC90BC0B67074C00799A45 /* prefs_items.cpp */,
08DC90BE0B67075D00799A45 /* prefs_unix.cpp */,
08DC90C00B67077300799A45 /* prefs.cpp */,
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
084186AF0B3A0515004B1F63 /* PrefsEditor.h */,
084186B00B3A0515004B1F63 /* PrefsEditor.m */,
);
name = SheepShaverPrefs;
sourceTree = "<group>";
};
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
32CA4F630368D1EE00C91783 /* SheepShaverPrefs_Prefix.pch */,
29B97316FDCFA39411CA2CEA /* main.m */,
);
name = "Other Sources";
sourceTree = "<group>";
};
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
8D1107310486CEB800E47090 /* Info.plist */,
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
29B97318FDCFA39411CA2CEA /* MainMenu.nib */,
);
name = Resources;
sourceTree = "<group>";
};
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
8D1107260486CEB800E47090 /* SheepShaverPrefs */ = {
isa = PBXNativeTarget;
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SheepShaverPrefs" */;
buildPhases = (
8D1107290486CEB800E47090 /* Resources */,
8D11072C0486CEB800E47090 /* Sources */,
8D11072E0486CEB800E47090 /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = SheepShaverPrefs;
productInstallPath = "$(HOME)/Applications";
productName = SheepShaverPrefs;
productReference = 8D1107320486CEB800E47090 /* SheepShaverPrefs.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SheepShaverPrefs" */;
hasScannedForEncodings = 1;
mainGroup = 29B97314FDCFA39411CA2CEA /* SheepShaverPrefs */;
projectDirPath = "";
targets = (
8D1107260486CEB800E47090 /* SheepShaverPrefs */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
8D1107290486CEB800E47090 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */,
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
8D11072C0486CEB800E47090 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D11072D0486CEB800E47090 /* main.m in Sources */,
084186B10B3A0515004B1F63 /* PrefsEditor.m in Sources */,
08DC90BD0B67074C00799A45 /* prefs_items.cpp in Sources */,
08DC90BF0B67075D00799A45 /* prefs_unix.cpp in Sources */,
08DC90C10B67077300799A45 /* prefs.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
089C165DFE840E0CC02AAC07 /* English */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = {
isa = PBXVariantGroup;
children = (
29B97319FDCFA39411CA2CEA /* English */,
);
name = MainMenu.nib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
C01FCF4B08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = PREFS_EDITOR;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
OTHER_CFLAGS = "$(inherited)";
PRODUCT_NAME = SheepShaverPrefs;
WRAPPER_EXTENSION = app;
ZERO_LINK = YES;
};
name = Debug;
};
C01FCF4C08A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
ppc,
i386,
);
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp;
GCC_MODEL_TUNING = G5;
GCC_PREPROCESSOR_DEFINITIONS = PREFS_EDITOR;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
OTHER_CFLAGS = "$(inherited)";
PRODUCT_NAME = SheepShaverPrefs;
WRAPPER_EXTENSION = app;
};
name = Release;
};
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
};
name = Debug;
};
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SheepShaverPrefs" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4B08A954540054247B /* Debug */,
C01FCF4C08A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SheepShaverPrefs" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4F08A954540054247B /* Debug */,
C01FCF5008A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
}

View File

@ -0,0 +1,26 @@
/*
* main.m - Preferences editing in Cocoa on Mac OS X
*
* Copyright (C) 2006-2007 Alexei Svitkine
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#import <Cocoa/Cocoa.h>
int main(int argc, char *argv[])
{
return NSApplicationMain(argc, (const char **) argv);
}