Added Xcode project files in projectfiles/...
...and removed macproject/ and the readme pointing to it.
This commit is contained in:
parent
b99f9ac6f9
commit
c3533ffc5a
30 changed files with 3503 additions and 1959 deletions
File diff suppressed because it is too large
Load diff
4
projectfiles/Xcode/.gitignore
vendored
Normal file
4
projectfiles/Xcode/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
build
|
||||
lib
|
||||
Headers
|
||||
Wesnoth.dmgCanvas
|
BIN
projectfiles/Xcode/English.lproj/InfoPlist.strings
Normal file
BIN
projectfiles/Xcode/English.lproj/InfoPlist.strings
Normal file
Binary file not shown.
32
projectfiles/Xcode/Info.plist
Normal file
32
projectfiles/Xcode/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>ATSApplicationFontsPath</key>
|
||||
<string>fonts/</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>icon.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.wesnoth.Wesnoth</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.9+svn</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.9+svn</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>SDLMain</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
14
projectfiles/Xcode/Mac Sources/SDLMain.h
Normal file
14
projectfiles/Xcode/Mac Sources/SDLMain.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
SDLMain.m - main entry point for our Cocoa-ized SDL app
|
||||
Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
|
||||
Non-NIB-Code & other changes: Max Horn <max@quendi.de>
|
||||
Edited a lot for Wesnoth by Ben Anderman <ben@happyspork.com>
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface SDLMain : NSObject
|
||||
{
|
||||
}
|
||||
- (IBAction)openHomepage:(id)sender;
|
||||
@end
|
105
projectfiles/Xcode/Mac Sources/SDLMain.m
Normal file
105
projectfiles/Xcode/Mac Sources/SDLMain.m
Normal file
|
@ -0,0 +1,105 @@
|
|||
/* SDLMain.m - main entry point for our Cocoa-ized SDL app
|
||||
Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
|
||||
Non-NIB-Code & other changes: Max Horn <max@quendi.de>
|
||||
Edited a lot for Wesnoth by Ben Anderman <ben@happyspork.com>
|
||||
*/
|
||||
|
||||
#import "SDL.h"
|
||||
#import "SDLMain.h"
|
||||
|
||||
static int gArgc;
|
||||
static char **gArgv;
|
||||
|
||||
@interface SDLApplication : NSApplication
|
||||
@end
|
||||
|
||||
@implementation SDLApplication
|
||||
/* Invoked from the Quit menu item */
|
||||
- (void)terminate:(id)sender
|
||||
{
|
||||
/* Post a SDL_QUIT event */
|
||||
SDL_Event event;
|
||||
event.type = SDL_QUIT;
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
|
||||
- (BOOL)_handleKeyEquivalent:(NSEvent *)theEvent
|
||||
{
|
||||
[[super mainMenu] performKeyEquivalent:theEvent];
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void) sendEvent:(NSEvent *)event
|
||||
{
|
||||
if(NSKeyDown == [event type] || NSKeyUp == [event type])
|
||||
{
|
||||
if([event modifierFlags] & NSCommandKeyMask)
|
||||
{
|
||||
[super sendEvent: event];
|
||||
}
|
||||
} else {
|
||||
[super sendEvent: event];
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
/* The main class of the application, the application's delegate */
|
||||
@implementation SDLMain
|
||||
|
||||
- (IBAction) openHomepage:(id)sender
|
||||
{
|
||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.wesnoth.org/"]];
|
||||
}
|
||||
|
||||
/* Called when the internal event loop has just started running */
|
||||
- (void) applicationDidFinishLaunching: (NSNotification *) note
|
||||
{
|
||||
/* This makes SDL give events to Cocoa, so it can handle things like command+h to hide, etc. */
|
||||
setenv ("SDL_ENABLEAPPEVENTS", "1", 1);
|
||||
setenv ("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 1);
|
||||
int status;
|
||||
|
||||
/* Set the working directory to the .app's Resources directory */
|
||||
chdir([[[NSBundle mainBundle] resourcePath] fileSystemRepresentation]);
|
||||
|
||||
//setenv("PYTHONHOME", ".", 1); //not needed because we don't use Python anymore
|
||||
|
||||
/* Hand off to main application code */
|
||||
status = SDL_main (gArgc, gArgv);
|
||||
|
||||
/* We're done, thank you for playing */
|
||||
exit(status);
|
||||
}
|
||||
@end
|
||||
|
||||
#ifdef main
|
||||
# undef main
|
||||
#endif
|
||||
|
||||
/* Main entry point to executable - should *not* be SDL_main! */
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
/* Copy the arguments into a global variable */
|
||||
int i;
|
||||
|
||||
/* This is passed if we are launched by double-clicking */
|
||||
if (argc >= 2 && strncmp (argv[1], "-psn", 4) == 0)
|
||||
{
|
||||
gArgc = 1;
|
||||
} else {
|
||||
gArgc = argc;
|
||||
}
|
||||
gArgv = (char**) malloc (sizeof(*gArgv) * (gArgc+1));
|
||||
assert (gArgv != NULL);
|
||||
for (i = 0; i < gArgc; i++)
|
||||
gArgv[i] = argv[i];
|
||||
gArgv[i] = NULL;
|
||||
|
||||
// [SDLApplication poseAsClass:[NSApplication class]];
|
||||
// NSApplicationMain (argc, argv);
|
||||
[SDLApplication sharedApplication];
|
||||
[NSBundle loadNibNamed:@"SDLMain" owner:NSApp];
|
||||
[NSApp run];
|
||||
return 0;
|
||||
}
|
29
projectfiles/Xcode/Mac Sources/Wesnoth_Prefix.pch
Normal file
29
projectfiles/Xcode/Mac Sources/Wesnoth_Prefix.pch
Normal file
|
@ -0,0 +1,29 @@
|
|||
//
|
||||
// Prefix header for all source files of the 'Wesnoth' target in the 'Wesnoth' project
|
||||
//
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <cassert>
|
||||
#include <climits>
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/smart_ptr.hpp>
|
||||
#include <SDL.h>
|
||||
|
||||
#include "wesconfig.h"
|
||||
#endif
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#endif
|
27
projectfiles/Xcode/Mac Sources/server_main.m
Normal file
27
projectfiles/Xcode/Mac Sources/server_main.m
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* server_main.cpp
|
||||
* Wesnoth
|
||||
*
|
||||
* Created by Ben Anderman on 4/5/09.
|
||||
* Copyright 2009 Ben Anderman.
|
||||
*
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2
|
||||
or at your option any later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY.
|
||||
*/
|
||||
|
||||
#import "SDL.h"
|
||||
#import "SDLMain.h"
|
||||
|
||||
#ifdef main
|
||||
# undef main
|
||||
#endif
|
||||
|
||||
int SDL_main (int argc, char **argv);
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
return SDL_main(argc, argv);
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
<?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>DefaultNotifications</key>
|
||||
<array>
|
||||
<string>Turn changed</string>
|
||||
<string>Chat message</string>
|
||||
</array>
|
||||
<key>TicketVersion</key>
|
||||
<integer>1</integer>
|
||||
<key>AllNotifications</key>
|
||||
<array>
|
||||
<string>Turn changed</string>
|
||||
<string>Chat message</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
2393
projectfiles/Xcode/Resources/SDLMain.nib/designable.nib
generated
Normal file
2393
projectfiles/Xcode/Resources/SDLMain.nib/designable.nib
generated
Normal file
File diff suppressed because it is too large
Load diff
BIN
projectfiles/Xcode/Resources/SDLMain.nib/keyedobjects.nib
generated
Normal file
BIN
projectfiles/Xcode/Resources/SDLMain.nib/keyedobjects.nib
generated
Normal file
Binary file not shown.
BIN
projectfiles/Xcode/Resources/icon.icns
Normal file
BIN
projectfiles/Xcode/Resources/icon.icns
Normal file
Binary file not shown.
7
projectfiles/Xcode/Resources/pango.aliases
Normal file
7
projectfiles/Xcode/Resources/pango.aliases
Normal file
|
@ -0,0 +1,7 @@
|
|||
"DejaVu Sans" = "Arial Unicode MS,DejaVu Sans"
|
||||
"WenQuanYi Zen Hei" = "arial unicode ms,WenQuanYi Zen Hei"
|
||||
|
||||
# sans = "lucida sans unicode,microsoft sans serif,mingliu,simhei,gulimche,ms gothic,latha,mangal,code2000"
|
||||
sans = "dejavu sans,arial,mingliu,simhei,gulimche,ms gothic,latha,mangal,code2000"
|
||||
serif = "times new roman,angsana new,mingliu,simsun,gulimche,ms gothic,latha,mangal,code2000"
|
||||
monospace = "courier new,courier monothai,mingliu,simsun,gulimche,ms gothic,latha,mangal,code2000"
|
25
projectfiles/Xcode/Resources/pango.modules
Normal file
25
projectfiles/Xcode/Resources/pango.modules
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Pango Modules file
|
||||
# Automatically generated file, do not edit
|
||||
#
|
||||
# ModulesPath = ./pango/1.6.0/modules
|
||||
#
|
||||
./pango/1.6.0/modules/pango-arabic-fc.so ArabicScriptEngineFc PangoEngineShape PangoRenderFc arabic:* nko:*
|
||||
./pango/1.6.0/modules/pango-arabic-lang.so ArabicScriptEngineLang PangoEngineLang PangoRenderNone arabic:*
|
||||
./pango/1.6.0/modules/pango-basic-atsui.so BasicScriptEngineATSUI PangoEngineShape PangoRenderATSUI common:
|
||||
./pango/1.6.0/modules/pango-basic-fc.so BasicScriptEngineFc PangoEngineShape PangoRenderFc latin:* cyrillic:* greek:* armenian:* georgian:* runic:* ogham:* bopomofo:* cherokee:* coptic:* deseret:* ethiopic:* gothic:* han:* hiragana:* katakana:* old-italic:* canadian-aboriginal:* yi:* braille:* cypriot:* limbu:* osmanya:* shavian:* linear-b:* ugaritic:* glagolitic:* cuneiform:* phoenician:* common:
|
||||
./pango/1.6.0/modules/pango-hangul-fc.so HangulScriptEngineFc PangoEngineShape PangoRenderFc hangul:*
|
||||
./pango/1.6.0/modules/pango-hebrew-fc.so HebrewScriptEngineFc PangoEngineShape PangoRenderFc hebrew:*
|
||||
./pango/1.6.0/modules/pango-indic-lang.so devaIndicScriptEngineLang PangoEngineLang PangoRenderNone devanagari:*
|
||||
./pango/1.6.0/modules/pango-indic-lang.so bengIndicScriptEngineLang PangoEngineLang PangoRenderNone bengali:*
|
||||
./pango/1.6.0/modules/pango-indic-lang.so guruIndicScriptEngineLang PangoEngineLang PangoRenderNone gurmukhi:*
|
||||
./pango/1.6.0/modules/pango-indic-lang.so gujrIndicScriptEngineLang PangoEngineLang PangoRenderNone gujarati:*
|
||||
./pango/1.6.0/modules/pango-indic-lang.so oryaIndicScriptEngineLang PangoEngineLang PangoRenderNone oriya:*
|
||||
./pango/1.6.0/modules/pango-indic-lang.so tamlIndicScriptEngineLang PangoEngineLang PangoRenderNone tamil:*
|
||||
./pango/1.6.0/modules/pango-indic-lang.so teluIndicScriptEngineLang PangoEngineLang PangoRenderNone telugu:*
|
||||
./pango/1.6.0/modules/pango-indic-lang.so kndaIndicScriptEngineLang PangoEngineLang PangoRenderNone kannada:*
|
||||
./pango/1.6.0/modules/pango-indic-lang.so mlymIndicScriptEngineLang PangoEngineLang PangoRenderNone malayalam:*
|
||||
./pango/1.6.0/modules/pango-indic-lang.so sinhIndicScriptEngineLang PangoEngineLang PangoRenderNone sinhala:*
|
||||
./pango/1.6.0/modules/pango-khmer-fc.so KhmerScriptEngineFc PangoEngineShape PangoRenderFc khmer:*
|
||||
./pango/1.6.0/modules/pango-syriac-fc.so SyriacScriptEngineFc PangoEngineShape PangoRenderFc syriac:*
|
||||
./pango/1.6.0/modules/pango-thai-fc.so ThaiScriptEngineFc PangoEngineShape PangoRenderFc thai:* lao:*
|
||||
./pango/1.6.0/modules/pango-tibetan-fc.so TibetanScriptEngineFc PangoEngineShape PangoRenderFc tibetan:*
|
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-arabic-fc.so
Executable file
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-arabic-fc.so
Executable file
Binary file not shown.
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-arabic-lang.so
Executable file
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-arabic-lang.so
Executable file
Binary file not shown.
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-basic-atsui.so
Executable file
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-basic-atsui.so
Executable file
Binary file not shown.
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-basic-fc.so
Executable file
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-basic-fc.so
Executable file
Binary file not shown.
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-hangul-fc.so
Executable file
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-hangul-fc.so
Executable file
Binary file not shown.
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-hebrew-fc.so
Executable file
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-hebrew-fc.so
Executable file
Binary file not shown.
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-indic-fc.so
Executable file
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-indic-fc.so
Executable file
Binary file not shown.
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-indic-lang.so
Executable file
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-indic-lang.so
Executable file
Binary file not shown.
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-khmer-fc.so
Executable file
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-khmer-fc.so
Executable file
Binary file not shown.
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-syriac-fc.so
Executable file
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-syriac-fc.so
Executable file
Binary file not shown.
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-thai-fc.so
Executable file
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-thai-fc.so
Executable file
Binary file not shown.
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-tibetan-fc.so
Executable file
BIN
projectfiles/Xcode/Resources/pango/1.6.0/modules/pango-tibetan-fc.so
Executable file
Binary file not shown.
2
projectfiles/Xcode/Wesnoth.xcodeproj/.gitignore
vendored
Normal file
2
projectfiles/Xcode/Wesnoth.xcodeproj/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
*.mode1v3
|
||||
*.pbxuser
|
File diff suppressed because it is too large
Load diff
49
projectfiles/Xcode/readme.txt
Normal file
49
projectfiles/Xcode/readme.txt
Normal file
|
@ -0,0 +1,49 @@
|
|||
--- Building with Xcode ---
|
||||
|
||||
-- Requirements --
|
||||
* Xcode 3.0+
|
||||
* Mac OS X 10.5+ (required by Xcode 3.0)
|
||||
* scons and gettext-tools (if you want to compile translations)
|
||||
* DMG Canvas (if you want to make a fancy .dmg)
|
||||
* The Headers and lib folders, which can be found in the newest zip here:
|
||||
https://sourceforge.net/downloads/wesnoth/unofficial/Mac%20Compile%20Stuff/
|
||||
|
||||
Once you download the zip, unzip it and move "Headers" and "lib" into the same folder as the Xcode project.
|
||||
|
||||
|
||||
-- Targets --
|
||||
|
||||
- Wesnoth:
|
||||
Builds the actual game, depends on wesnothd. If you don't want to build wesnothd, get info on the Wesnoth target, go to the General tab, and remove wesnothd from its dependencies.
|
||||
|
||||
- wesnothd:
|
||||
Builds the multiplayer server. The MP server is needed for hosting a local MP server, not for connecting to the official one.
|
||||
|
||||
- unit_tests:
|
||||
Builds the unit tests, but probably doesn't work currently. If it does build, there's still no good way to run it.
|
||||
|
||||
|
||||
-- Configurations --
|
||||
|
||||
- Release:
|
||||
Builds for maximum (runtime) speed and compatibility; it builds for PPC and i386 (Intel), and with the 10.4 SDK, and targets 10.4. Consequently, you need 10.4 to build it. This is what's used for official releases.
|
||||
|
||||
- Debug:
|
||||
Builds for maximum compiling speed, and uses the current OS as the SDK. If you just want to compile for testing things yourself, this is the way to go.
|
||||
|
||||
|
||||
-- Translations --
|
||||
|
||||
To compile translations you need gettext-tools and scons. In the Terminal, cd to the Wesnoth root directory, and run "scons translations". This will compile all the translations into a translations directory, and then you can move this into Wesnoth.app/Contents/Resources/ to use it.
|
||||
|
||||
|
||||
-- Packaging --
|
||||
|
||||
* Update version numbers in Info.plist
|
||||
* Update the changelog in SDLMain.nib with player_changelog
|
||||
* Rebuild all in XCode (clean all, then build)
|
||||
* Rebuild translations, and move to Resources (see above)
|
||||
* Make dmg with Wesnoth.dmgCanvas (also included in the zip), after updating the volume name with the version number
|
||||
|
||||
|
||||
~ Ben Anderman / crimson_penguin <ben@happyspork.com>, August 12 2010 --
|
|
@ -1 +0,0 @@
|
|||
The xcode projectfile is in /macproject
|
Loading…
Add table
Reference in a new issue