Beginnings of the new mac launcher.
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -44,6 +44,9 @@ packaging/osx/launcher/OpenRA.xcodeproj/*.mode1v3
|
||||
temp.c
|
||||
temp.o
|
||||
temp.s
|
||||
|
||||
OpenRA.Launcher.Mac/build/
|
||||
OpenRA.Launcher.Mac/OpenRA.xcodeproj/*.pbxuser
|
||||
OpenRA.Launcher.Mac/OpenRA.xcodeproj/*.perspectivev3
|
||||
OpenRA.Launcher.Mac/OpenRA.xcodeproj/*.mode1v3
|
||||
*.config
|
||||
*.resources
|
||||
|
||||
18
OpenRA.Launcher.Mac/Controller.h
Normal file
18
OpenRA.Launcher.Mac/Controller.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@class ModEntry;
|
||||
@interface Controller : NSObject
|
||||
{
|
||||
ModEntry *sidebarItems;
|
||||
IBOutlet NSOutlineView *outlineView;
|
||||
}
|
||||
- (ModEntry *)modTree;
|
||||
@end
|
||||
113
OpenRA.Launcher.Mac/Controller.m
Normal file
113
OpenRA.Launcher.Mac/Controller.m
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
|
||||
#import "Controller.h"
|
||||
#import "ModEntry.h"
|
||||
#import "ImageAndTextCell.h"
|
||||
|
||||
@implementation Controller
|
||||
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
sidebarItems = [[ModEntry headerWithTitle:@""] retain];
|
||||
[sidebarItems addChild:[self modTree]];
|
||||
|
||||
NSTableColumn *col = [outlineView tableColumnWithIdentifier:@"mods"];
|
||||
ImageAndTextCell *imageAndTextCell = [[[ImageAndTextCell alloc] init] autorelease];
|
||||
[col setDataCell:imageAndTextCell];
|
||||
|
||||
[outlineView reloadData];
|
||||
[outlineView expandItem:[outlineView itemAtRow:1] expandChildren:YES];
|
||||
[outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:1] byExtendingSelection:NO];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[sidebarItems release]; sidebarItems = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (ModEntry *)modTree
|
||||
{
|
||||
// Create root item
|
||||
ModEntry *rootItem = [ModEntry headerWithTitle:@"MODS"];
|
||||
|
||||
NSString* imageName = [[NSBundle mainBundle] pathForResource:@"OpenRA" ofType:@"icns"];
|
||||
NSImage* imageObj = [[NSImage alloc] initWithContentsOfFile:imageName];
|
||||
|
||||
NSDictionary *foo = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
@"Test mod", @"Title",
|
||||
@"Foobar", @"Author",
|
||||
imageObj, @"Icon",
|
||||
nil];
|
||||
[imageObj release];
|
||||
[rootItem addChild:[ModEntry modWithFields:foo]];
|
||||
return rootItem;
|
||||
}
|
||||
|
||||
#pragma mark Sidebar Datasource and Delegate
|
||||
- (int)outlineView:(NSOutlineView *)anOutlineView numberOfChildrenOfItem:(id)item
|
||||
{
|
||||
// Can be called before awakeFromNib; return nothing
|
||||
if (sidebarItems == nil)
|
||||
return 0;
|
||||
|
||||
// Root item
|
||||
if (item == nil)
|
||||
return [[sidebarItems children] count];
|
||||
|
||||
return [[item children] count];
|
||||
}
|
||||
|
||||
- (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item
|
||||
{
|
||||
return (item == nil) ? YES : [[item children] count] != 0;
|
||||
}
|
||||
|
||||
- (id)outlineView:(NSOutlineView *)outlineView
|
||||
child:(int)index
|
||||
ofItem:(id)item
|
||||
{
|
||||
if (item == nil)
|
||||
return [[sidebarItems children] objectAtIndex:index];
|
||||
|
||||
return [[item children] objectAtIndex:index];
|
||||
}
|
||||
|
||||
-(BOOL)outlineView:(NSOutlineView*)outlineView isGroupItem:(id)item
|
||||
{
|
||||
if (item == nil)
|
||||
return NO;
|
||||
|
||||
return [item isHeader];
|
||||
}
|
||||
|
||||
- (id)outlineView:(NSOutlineView *)outlineView
|
||||
objectValueForTableColumn:(NSTableColumn *)tableColumn
|
||||
byItem:(id)item
|
||||
{
|
||||
return [item title];
|
||||
}
|
||||
|
||||
- (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem:(id)item;
|
||||
{
|
||||
// don't allow headers to be selected
|
||||
return ![item isHeader];
|
||||
}
|
||||
|
||||
- (void)outlineView:(NSOutlineView *)olv willDisplayCell:(NSCell*)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item
|
||||
{
|
||||
if ([[tableColumn identifier] isEqualToString:@"mods"])
|
||||
{
|
||||
if ([cell isKindOfClass:[ImageAndTextCell class]])
|
||||
{
|
||||
[(ImageAndTextCell*)cell setImage:[item icon]];
|
||||
}
|
||||
}
|
||||
}
|
||||
@end
|
||||
2
OpenRA.Launcher.Mac/English.lproj/InfoPlist.strings
Normal file
2
OpenRA.Launcher.Mac/English.lproj/InfoPlist.strings
Normal file
@@ -0,0 +1,2 @@
|
||||
/* Localized versions of Info.plist keys */
|
||||
|
||||
1581
OpenRA.Launcher.Mac/English.lproj/MainMenu.xib
Normal file
1581
OpenRA.Launcher.Mac/English.lproj/MainMenu.xib
Normal file
File diff suppressed because it is too large
Load Diff
62
OpenRA.Launcher.Mac/ImageAndTextCell.h
Executable file
62
OpenRA.Launcher.Mac/ImageAndTextCell.h
Executable file
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// File: ImageAndTextCell.h
|
||||
//
|
||||
// Abstract: Subclass of NSTextFieldCell which can display text and an image simultaneously.
|
||||
//
|
||||
// Version: 1.0
|
||||
//
|
||||
// Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. ("Apple")
|
||||
// in consideration of your agreement to the following terms, and your use,
|
||||
// installation, modification or redistribution of this Apple software
|
||||
// constitutes acceptance of these terms. If you do not agree with these
|
||||
// terms, please do not use, install, modify or redistribute this Apple
|
||||
// software.
|
||||
//
|
||||
// In consideration of your agreement to abide by the following terms, and
|
||||
// subject to these terms, Apple grants you a personal, non - exclusive
|
||||
// license, under Apple's copyrights in this original Apple software ( the
|
||||
// "Apple Software" ), to use, reproduce, modify and redistribute the Apple
|
||||
// Software, with or without modifications, in source and / or binary forms;
|
||||
// provided that if you redistribute the Apple Software in its entirety and
|
||||
// without modifications, you must retain this notice and the following text
|
||||
// and disclaimers in all such redistributions of the Apple Software. Neither
|
||||
// the name, trademarks, service marks or logos of Apple Inc. may be used to
|
||||
// endorse or promote products derived from the Apple Software without specific
|
||||
// prior written permission from Apple. Except as expressly stated in this
|
||||
// notice, no other rights or licenses, express or implied, are granted by
|
||||
// Apple herein, including but not limited to any patent rights that may be
|
||||
// infringed by your derivative works or by other works in which the Apple
|
||||
// Software may be incorporated.
|
||||
//
|
||||
// The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
|
||||
// WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
|
||||
// WARRANTIES OF NON - INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
|
||||
// PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION
|
||||
// ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
//
|
||||
// IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
|
||||
// CONSEQUENTIAL DAMAGES ( INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION ) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION
|
||||
// AND / OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
// UNDER THEORY OF CONTRACT, TORT ( INCLUDING NEGLIGENCE ), STRICT LIABILITY OR
|
||||
// OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Copyright (C) 2007 Apple Inc. All Rights Reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface ImageAndTextCell : NSTextFieldCell
|
||||
{
|
||||
@private
|
||||
NSImage *image;
|
||||
}
|
||||
|
||||
- (void)setImage:(NSImage *)anImage;
|
||||
- (NSImage*)image;
|
||||
|
||||
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView*)controlView;
|
||||
- (NSSize)cellSize;
|
||||
|
||||
@end
|
||||
252
OpenRA.Launcher.Mac/ImageAndTextCell.m
Executable file
252
OpenRA.Launcher.Mac/ImageAndTextCell.m
Executable file
@@ -0,0 +1,252 @@
|
||||
//
|
||||
// File: ImageAndTextCell.m
|
||||
//
|
||||
// Abstract: Subclass of NSTextFieldCell which can display text and an image simultaneously.
|
||||
//
|
||||
// Version: 1.0
|
||||
//
|
||||
// Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. ("Apple")
|
||||
// in consideration of your agreement to the following terms, and your use,
|
||||
// installation, modification or redistribution of this Apple software
|
||||
// constitutes acceptance of these terms. If you do not agree with these
|
||||
// terms, please do not use, install, modify or redistribute this Apple
|
||||
// software.
|
||||
//
|
||||
// In consideration of your agreement to abide by the following terms, and
|
||||
// subject to these terms, Apple grants you a personal, non - exclusive
|
||||
// license, under Apple's copyrights in this original Apple software ( the
|
||||
// "Apple Software" ), to use, reproduce, modify and redistribute the Apple
|
||||
// Software, with or without modifications, in source and / or binary forms;
|
||||
// provided that if you redistribute the Apple Software in its entirety and
|
||||
// without modifications, you must retain this notice and the following text
|
||||
// and disclaimers in all such redistributions of the Apple Software. Neither
|
||||
// the name, trademarks, service marks or logos of Apple Inc. may be used to
|
||||
// endorse or promote products derived from the Apple Software without specific
|
||||
// prior written permission from Apple. Except as expressly stated in this
|
||||
// notice, no other rights or licenses, express or implied, are granted by
|
||||
// Apple herein, including but not limited to any patent rights that may be
|
||||
// infringed by your derivative works or by other works in which the Apple
|
||||
// Software may be incorporated.
|
||||
//
|
||||
// The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
|
||||
// WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
|
||||
// WARRANTIES OF NON - INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
|
||||
// PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION
|
||||
// ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
//
|
||||
// IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
|
||||
// CONSEQUENTIAL DAMAGES ( INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION ) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION
|
||||
// AND / OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
// UNDER THEORY OF CONTRACT, TORT ( INCLUDING NEGLIGENCE ), STRICT LIABILITY OR
|
||||
// OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Copyright (C) 2007 Apple Inc. All Rights Reserved.
|
||||
//
|
||||
|
||||
#import "ImageAndTextCell.h"
|
||||
//#import "BaseNode.h"
|
||||
|
||||
@implementation ImageAndTextCell
|
||||
|
||||
#define kIconImageSize 16.0
|
||||
|
||||
#define kImageOriginXOffset 3
|
||||
#define kImageOriginYOffset 1
|
||||
|
||||
#define kTextOriginXOffset 2
|
||||
#define kTextOriginYOffset 2
|
||||
#define kTextHeightAdjust 4
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
// init:
|
||||
// -------------------------------------------------------------------------------
|
||||
- (id)init
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
// we want a smaller font
|
||||
[self setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
// dealloc:
|
||||
// -------------------------------------------------------------------------------
|
||||
- (void)dealloc
|
||||
{
|
||||
[image release];
|
||||
image = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
// copyWithZone:zone
|
||||
// -------------------------------------------------------------------------------
|
||||
- (id)copyWithZone:(NSZone*)zone
|
||||
{
|
||||
ImageAndTextCell *cell = (ImageAndTextCell*)[super copyWithZone:zone];
|
||||
cell->image = [image retain];
|
||||
return cell;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
// setImage:anImage
|
||||
// -------------------------------------------------------------------------------
|
||||
- (void)setImage:(NSImage*)anImage
|
||||
{
|
||||
if (anImage != image)
|
||||
{
|
||||
[image autorelease];
|
||||
image = [anImage retain];
|
||||
[image setSize:NSMakeSize(kIconImageSize, kIconImageSize)];
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
// image:
|
||||
// -------------------------------------------------------------------------------
|
||||
- (NSImage*)image
|
||||
{
|
||||
return image;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
// isGroupCell:
|
||||
// -------------------------------------------------------------------------------
|
||||
- (BOOL)isGroupCell
|
||||
{
|
||||
return ([self image] == nil && [[self title] length] > 0);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
// titleRectForBounds:cellRect
|
||||
//
|
||||
// Returns the proper bound for the cell's title while being edited
|
||||
// -------------------------------------------------------------------------------
|
||||
- (NSRect)titleRectForBounds:(NSRect)cellRect
|
||||
{
|
||||
// the cell has an image: draw the normal item cell
|
||||
NSSize imageSize;
|
||||
NSRect imageFrame;
|
||||
|
||||
imageSize = [image size];
|
||||
NSDivideRect(cellRect, &imageFrame, &cellRect, 3 + imageSize.width, NSMinXEdge);
|
||||
|
||||
imageFrame.origin.x += kImageOriginXOffset;
|
||||
imageFrame.origin.y -= kImageOriginYOffset;
|
||||
imageFrame.size = imageSize;
|
||||
|
||||
imageFrame.origin.y += ceil((cellRect.size.height - imageFrame.size.height) / 2);
|
||||
|
||||
NSRect newFrame = cellRect;
|
||||
newFrame.origin.x += kTextOriginXOffset;
|
||||
newFrame.origin.y += kTextOriginYOffset;
|
||||
newFrame.size.height -= kTextHeightAdjust;
|
||||
|
||||
return newFrame;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
// editWithFrame:inView:editor:delegate:event
|
||||
// -------------------------------------------------------------------------------
|
||||
- (void)editWithFrame:(NSRect)aRect inView:(NSView*)controlView editor:(NSText*)textObj delegate:(id)anObject event:(NSEvent*)theEvent
|
||||
{
|
||||
NSRect textFrame = [self titleRectForBounds:aRect];
|
||||
[super editWithFrame:textFrame inView:controlView editor:textObj delegate:anObject event:theEvent];
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
// selectWithFrame:inView:editor:delegate:event:start:length
|
||||
// -------------------------------------------------------------------------------
|
||||
- (void)selectWithFrame:(NSRect)aRect inView:(NSView*)controlView editor:(NSText*)textObj delegate:(id)anObject start:(NSInteger)selStart length:(NSInteger)selLength
|
||||
{
|
||||
NSRect textFrame = [self titleRectForBounds:aRect];
|
||||
[super selectWithFrame:textFrame inView:controlView editor:textObj delegate:anObject start:selStart length:selLength];
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
// drawWithFrame:cellFrame:controlView:
|
||||
// -------------------------------------------------------------------------------
|
||||
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView*)controlView
|
||||
{
|
||||
if (image != nil)
|
||||
{
|
||||
// the cell has an image: draw the normal item cell
|
||||
NSSize imageSize;
|
||||
NSRect imageFrame;
|
||||
|
||||
imageSize = [image size];
|
||||
NSDivideRect(cellFrame, &imageFrame, &cellFrame, 3 + imageSize.width, NSMinXEdge);
|
||||
|
||||
imageFrame.origin.x += kImageOriginXOffset;
|
||||
imageFrame.origin.y -= kImageOriginYOffset;
|
||||
imageFrame.size = imageSize;
|
||||
|
||||
if ([controlView isFlipped])
|
||||
imageFrame.origin.y += ceil((cellFrame.size.height + imageFrame.size.height) / 2);
|
||||
else
|
||||
imageFrame.origin.y += ceil((cellFrame.size.height - imageFrame.size.height) / 2);
|
||||
[image compositeToPoint:imageFrame.origin operation:NSCompositeSourceOver];
|
||||
|
||||
NSRect newFrame = cellFrame;
|
||||
newFrame.origin.x += kTextOriginXOffset;
|
||||
newFrame.origin.y += kTextOriginYOffset;
|
||||
newFrame.size.height -= kTextHeightAdjust;
|
||||
[super drawWithFrame:newFrame inView:controlView];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([self isGroupCell])
|
||||
{
|
||||
// Center the text in the cellFrame, and call super to do thew ork of actually drawing.
|
||||
CGFloat yOffset = floor((NSHeight(cellFrame) - [[self attributedStringValue] size].height) / 2.0);
|
||||
cellFrame.origin.y += yOffset;
|
||||
cellFrame.size.height -= (kTextOriginYOffset*yOffset);
|
||||
[super drawWithFrame:cellFrame inView:controlView];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
// cellSize:
|
||||
// -------------------------------------------------------------------------------
|
||||
- (NSSize)cellSize
|
||||
{
|
||||
NSSize cellSize = [super cellSize];
|
||||
cellSize.width += (image ? [image size].width : 0) + 3;
|
||||
return cellSize;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
// hitTestForEvent:
|
||||
//
|
||||
// In 10.5, we need you to implement this method for blocking drag and drop of a given cell.
|
||||
// So NSCell hit testing will determine if a row can be dragged or not.
|
||||
//
|
||||
// NSTableView calls this cell method when starting a drag, if the hit cell returns
|
||||
// NSCellHitTrackableArea, the particular row will be tracked instead of dragged.
|
||||
//
|
||||
// -------------------------------------------------------------------------------
|
||||
/*
|
||||
- (NSUInteger)hitTestForEvent:(NSEvent *)event inRect:(NSRect)cellFrame ofView:(NSView *)controlView
|
||||
{
|
||||
NSInteger result = NSCellHitContentArea;
|
||||
|
||||
NSOutlineView* hostingOutlineView = (NSOutlineView*)[self controlView];
|
||||
if (hostingOutlineView)
|
||||
{
|
||||
NSInteger selectedRow = [hostingOutlineView selectedRow];
|
||||
BaseNode* node = [[hostingOutlineView itemAtRow:selectedRow] representedObject];
|
||||
|
||||
if (![node isDraggable]) // is the node isDraggable (i.e. non-file system based objects)
|
||||
result = NSCellHitTrackableArea;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
*/
|
||||
@end
|
||||
|
||||
37
OpenRA.Launcher.Mac/ModEntry.h
Normal file
37
OpenRA.Launcher.Mac/ModEntry.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface ModEntry : NSObject {
|
||||
BOOL isHeader;
|
||||
NSString *title;
|
||||
NSString *version;
|
||||
NSString *author;
|
||||
NSString *requires;
|
||||
BOOL standalone;
|
||||
NSMutableArray *children;
|
||||
NSImage *icon;
|
||||
}
|
||||
|
||||
@property (readonly) BOOL isHeader;
|
||||
@property (readonly) NSString *title;
|
||||
@property (readonly) NSString *version;
|
||||
@property (readonly) NSString *author;
|
||||
@property (readonly) NSString *description;
|
||||
@property (readonly) NSString *requires;
|
||||
@property (readonly) BOOL standalone;
|
||||
@property (readonly) NSMutableArray* children;
|
||||
@property (readonly) NSImage* icon;
|
||||
|
||||
+ (id)headerWithTitle:(NSString *)aTitle;
|
||||
+ (id)modWithFields:(id)fields;
|
||||
- (id)initWithFields:(NSDictionary *)fields isHeader:(BOOL)header;
|
||||
- (void)addChild:(id)child;
|
||||
- (id)icon;
|
||||
@end
|
||||
66
OpenRA.Launcher.Mac/ModEntry.m
Normal file
66
OpenRA.Launcher.Mac/ModEntry.m
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
|
||||
#import "ModEntry.h"
|
||||
|
||||
|
||||
@implementation ModEntry
|
||||
@synthesize isHeader;
|
||||
@synthesize title;
|
||||
@synthesize version;
|
||||
@synthesize author;
|
||||
@synthesize description;
|
||||
@synthesize requires;
|
||||
@synthesize standalone;
|
||||
@synthesize children;
|
||||
@synthesize icon;
|
||||
|
||||
+ (id)headerWithTitle:(NSString *)aTitle
|
||||
{
|
||||
id newObject = [[self alloc] initWithFields:[NSDictionary dictionaryWithObject:aTitle forKey:@"Title"] isHeader:YES];
|
||||
[newObject autorelease];
|
||||
return newObject;
|
||||
}
|
||||
|
||||
+ (id)modWithFields:(id)fields
|
||||
{
|
||||
id newObject = [[self alloc] initWithFields:fields isHeader:NO];
|
||||
[newObject autorelease];
|
||||
return newObject;
|
||||
}
|
||||
|
||||
- (id)initWithFields:(NSDictionary *)fields isHeader:(BOOL)header
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
isHeader = header;
|
||||
title = [fields objectForKey:@"Title"];
|
||||
version = [fields objectForKey:@"Version"];
|
||||
author = [fields objectForKey:@"Author"];
|
||||
description = [fields objectForKey:@"Description"];
|
||||
requires = [fields objectForKey:@"Requires"];
|
||||
standalone = ([fields objectForKey:@"Standalone"] == @"True");
|
||||
icon = [[fields objectForKey:@"Icon"] retain];
|
||||
children = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)addChild:(ModEntry *)child
|
||||
{
|
||||
[children addObject:child];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[icon release]; icon = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
32
OpenRA.Launcher.Mac/OpenRA-Info.plist
Normal file
32
OpenRA.Launcher.Mac/OpenRA-Info.plist
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//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>OpenRA.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
OpenRA.Launcher.Mac/OpenRA.icns
Executable file
BIN
OpenRA.Launcher.Mac/OpenRA.icns
Executable file
Binary file not shown.
311
OpenRA.Launcher.Mac/OpenRA.xcodeproj/project.pbxproj
Normal file
311
OpenRA.Launcher.Mac/OpenRA.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,311 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
|
||||
256AC3DA0F4B6AC300CF3369 /* OpenRAAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* OpenRAAppDelegate.m */; };
|
||||
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 */; };
|
||||
DA81FA821290F5C800C48F2F /* Controller.m in Sources */ = {isa = PBXBuildFile; fileRef = DA81FA811290F5C800C48F2F /* Controller.m */; };
|
||||
DA81FAAA1290FA0000C48F2F /* ModEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = DA81FAA91290FA0000C48F2F /* ModEntry.m */; };
|
||||
DA81FB9312910A8B00C48F2F /* ImageAndTextCell.m in Sources */ = {isa = PBXBuildFile; fileRef = DA81FB9212910A8B00C48F2F /* ImageAndTextCell.m */; };
|
||||
DA81FBDC12910E4900C48F2F /* OpenRA.icns in Resources */ = {isa = PBXBuildFile; fileRef = DA81FBDB12910E4900C48F2F /* OpenRA.icns */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
256AC3D80F4B6AC300CF3369 /* OpenRAAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenRAAppDelegate.h; sourceTree = "<group>"; };
|
||||
256AC3D90F4B6AC300CF3369 /* OpenRAAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OpenRAAppDelegate.m; sourceTree = "<group>"; };
|
||||
256AC3F00F4B6AF500CF3369 /* OpenRA_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenRA_Prefix.pch; sourceTree = "<group>"; };
|
||||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; 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>"; };
|
||||
8D1107310486CEB800E47090 /* OpenRA-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "OpenRA-Info.plist"; sourceTree = "<group>"; };
|
||||
8D1107320486CEB800E47090 /* OpenRA.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OpenRA.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DA81FA801290F5C800C48F2F /* Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Controller.h; sourceTree = "<group>"; };
|
||||
DA81FA811290F5C800C48F2F /* Controller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Controller.m; sourceTree = "<group>"; };
|
||||
DA81FAA81290FA0000C48F2F /* ModEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModEntry.h; sourceTree = "<group>"; };
|
||||
DA81FAA91290FA0000C48F2F /* ModEntry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModEntry.m; sourceTree = "<group>"; };
|
||||
DA81FB9112910A8B00C48F2F /* ImageAndTextCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageAndTextCell.h; sourceTree = "<group>"; };
|
||||
DA81FB9212910A8B00C48F2F /* ImageAndTextCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageAndTextCell.m; sourceTree = "<group>"; };
|
||||
DA81FBDB12910E4900C48F2F /* OpenRA.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = OpenRA.icns; sourceTree = "<group>"; };
|
||||
/* 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 = (
|
||||
DA81FB9112910A8B00C48F2F /* ImageAndTextCell.h */,
|
||||
DA81FB9212910A8B00C48F2F /* ImageAndTextCell.m */,
|
||||
256AC3D80F4B6AC300CF3369 /* OpenRAAppDelegate.h */,
|
||||
256AC3D90F4B6AC300CF3369 /* OpenRAAppDelegate.m */,
|
||||
DA81FA801290F5C800C48F2F /* Controller.h */,
|
||||
DA81FA811290F5C800C48F2F /* Controller.m */,
|
||||
DA81FAA81290FA0000C48F2F /* ModEntry.h */,
|
||||
DA81FAA91290FA0000C48F2F /* ModEntry.m */,
|
||||
);
|
||||
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 /* OpenRA.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97314FDCFA39411CA2CEA /* OpenRA */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
080E96DDFE201D6D7F000001 /* Classes */,
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */,
|
||||
29B97317FDCFA39411CA2CEA /* Resources */,
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */,
|
||||
19C28FACFE9D520D11CA2CBB /* Products */,
|
||||
);
|
||||
name = OpenRA;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
256AC3F00F4B6AF500CF3369 /* OpenRA_Prefix.pch */,
|
||||
29B97316FDCFA39411CA2CEA /* main.m */,
|
||||
);
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97317FDCFA39411CA2CEA /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DA81FBDB12910E4900C48F2F /* OpenRA.icns */,
|
||||
8D1107310486CEB800E47090 /* OpenRA-Info.plist */,
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
|
||||
1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
|
||||
);
|
||||
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 /* OpenRA */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "OpenRA" */;
|
||||
buildPhases = (
|
||||
8D1107290486CEB800E47090 /* Resources */,
|
||||
8D11072C0486CEB800E47090 /* Sources */,
|
||||
8D11072E0486CEB800E47090 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = OpenRA;
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
productName = OpenRA;
|
||||
productReference = 8D1107320486CEB800E47090 /* OpenRA.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 "OpenRA" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
);
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA /* OpenRA */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8D1107260486CEB800E47090 /* OpenRA */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8D1107290486CEB800E47090 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
|
||||
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
|
||||
DA81FBDC12910E4900C48F2F /* OpenRA.icns in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D11072C0486CEB800E47090 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */,
|
||||
256AC3DA0F4B6AC300CF3369 /* OpenRAAppDelegate.m in Sources */,
|
||||
DA81FA821290F5C800C48F2F /* Controller.m in Sources */,
|
||||
DA81FAAA1290FA0000C48F2F /* ModEntry.m in Sources */,
|
||||
DA81FB9312910A8B00C48F2F /* ImageAndTextCell.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
089C165DFE840E0CC02AAC07 /* English */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
1DDD58150DA1D0A300B32029 /* English */,
|
||||
);
|
||||
name = MainMenu.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
C01FCF4B08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = OpenRA_Prefix.pch;
|
||||
INFOPLIST_FILE = "OpenRA-Info.plist";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
PRODUCT_NAME = OpenRA;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C01FCF4C08A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = OpenRA_Prefix.pch;
|
||||
INFOPLIST_FILE = "OpenRA-Info.plist";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
PRODUCT_NAME = OpenRA;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
C01FCF4F08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.6;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C01FCF5008A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.6;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "OpenRA" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF4B08A954540054247B /* Debug */,
|
||||
C01FCF4C08A954540054247B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "OpenRA" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF4F08A954540054247B /* Debug */,
|
||||
C01FCF5008A954540054247B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
}
|
||||
17
OpenRA.Launcher.Mac/OpenRAAppDelegate.h
Normal file
17
OpenRA.Launcher.Mac/OpenRAAppDelegate.h
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface OpenRAAppDelegate : NSObject <NSApplicationDelegate> {
|
||||
NSWindow *window;
|
||||
}
|
||||
|
||||
@property (assign) IBOutlet NSWindow *window;
|
||||
|
||||
@end
|
||||
19
OpenRA.Launcher.Mac/OpenRAAppDelegate.m
Normal file
19
OpenRA.Launcher.Mac/OpenRAAppDelegate.m
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
|
||||
#import "OpenRAAppDelegate.h"
|
||||
|
||||
@implementation OpenRAAppDelegate
|
||||
|
||||
@synthesize window;
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
|
||||
// Insert code here to initialize your application
|
||||
}
|
||||
|
||||
@end
|
||||
7
OpenRA.Launcher.Mac/OpenRA_Prefix.pch
Normal file
7
OpenRA.Launcher.Mac/OpenRA_Prefix.pch
Normal file
@@ -0,0 +1,7 @@
|
||||
//
|
||||
// Prefix header for all source files of the 'OpenRA' target in the 'OpenRA' project
|
||||
//
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#endif
|
||||
14
OpenRA.Launcher.Mac/main.m
Normal file
14
OpenRA.Launcher.Mac/main.m
Normal file
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// main.m
|
||||
// OpenRA
|
||||
//
|
||||
// Created by Paul Chote on 15/11/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
return NSApplicationMain(argc, (const char **) argv);
|
||||
}
|
||||
Reference in New Issue
Block a user