Skip to content

Commit 034bf5c

Browse files
committedDec 20, 2015
Added Xcode Project
1 parent 229abec commit 034bf5c

File tree

10 files changed

+1855
-4
lines changed

10 files changed

+1855
-4
lines changed
 

‎.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
*.fsproj merge=union
1010
*.dbproj merge=union
1111

12+
# Custom for Xcode
13+
*.pbxproj merge=union
14+
1215
# Standard to msysgit
1316
*.doc diff=astextplain
1417
*.DOC diff=astextplain

‎.gitignore

+32
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ sdl
55
# Compiled dll
66
openrct2.dll
77

8+
# Compiled linux executable
9+
openrct2
10+
811
# Distribution
912
distribution/windows/*.exe
1013

@@ -199,9 +202,38 @@ Desktop.ini
199202
# Recycle Bin used on file shares
200203
$RECYCLE.BIN/
201204

205+
#############
206+
## Xcode
207+
#############
208+
209+
# Build generated
210+
build/
211+
DerivedData
212+
213+
# Various settings
214+
*.pbxuser
215+
!default.pbxuser
216+
*.mode1v3
217+
!default.mode1v3
218+
*.mode2v3
219+
!default.mode2v3
220+
*.perspectivev3
221+
!default.perspectivev3
222+
xcuserdata
223+
224+
# Other
225+
*.xccheckout
226+
*.moved-aside
227+
*.xcuserstate
228+
202229
# Mac crap
203230
.DS_Store
204231

232+
# We link logo files to .xcassets in Xcode project, so don't sync them
233+
distribution/osx/Assets.xcassets/AppIcon.appiconset/*.png
234+
235+
# Extra Xcode-specific lib files
236+
libxc
205237

206238
#############
207239
## Python

‎OpenRCT2.xcodeproj/project.pbxproj

+1,676
Large diffs are not rendered by default.

‎OpenRCT2.xcodeproj/project.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "E48FB7C08C6966C4BACE7D0390CDFA7C64DD04D8",
3+
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
4+
5+
},
6+
"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
7+
"E48FB7C08C6966C4BACE7D0390CDFA7C64DD04D8" : 0
8+
},
9+
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "6B7243E0-B9B8-4E6D-ACE9-4DF346FA52C7",
10+
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
11+
"E48FB7C08C6966C4BACE7D0390CDFA7C64DD04D8" : "OpenRCT2\/"
12+
},
13+
"DVTSourceControlWorkspaceBlueprintNameKey" : "OpenRCT2",
14+
"DVTSourceControlWorkspaceBlueprintVersion" : 204,
15+
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "OpenRCT2.xcodeproj"
16+
}

‎build.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ if [[ ! -d build ]]; then
1313
fi
1414

1515
# keep in sync with version in install.sh
16-
sha256sum=69ff98c9544838fb16384bc78af9dc1c452b9d01d919e43f5fec686d02c9bdd8
16+
if [[ $(uname -s) == "Darwin" ]]; then
17+
# keep in sync with version in Xcode project
18+
sha256sum=2cec3958352477fbb876a5b6398722077084b5ff7e95a7d3cd67492abf5012fc
19+
else
20+
sha256sum=69ff98c9544838fb16384bc78af9dc1c452b9d01d919e43f5fec686d02c9bdd8
21+
fi
1722
libVFile="./libversion"
1823
libdir="./lib"
1924
currentversion=0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"images" : [
3+
{
4+
"size" : "16x16",
5+
"idiom" : "mac",
6+
"filename" : "icon_16x16.png",
7+
"scale" : "1x"
8+
},
9+
{
10+
"size" : "16x16",
11+
"idiom" : "mac",
12+
"filename" : "icon_16x16@2x.png",
13+
"scale" : "2x"
14+
},
15+
{
16+
"size" : "32x32",
17+
"idiom" : "mac",
18+
"filename" : "icon_32x32.png",
19+
"scale" : "1x"
20+
},
21+
{
22+
"size" : "32x32",
23+
"idiom" : "mac",
24+
"filename" : "icon_32x32@2x.png",
25+
"scale" : "2x"
26+
},
27+
{
28+
"size" : "128x128",
29+
"idiom" : "mac",
30+
"filename" : "icon_128x128.png",
31+
"scale" : "1x"
32+
},
33+
{
34+
"size" : "128x128",
35+
"idiom" : "mac",
36+
"filename" : "icon_128x128@2x.png",
37+
"scale" : "2x"
38+
},
39+
{
40+
"size" : "256x256",
41+
"idiom" : "mac",
42+
"filename" : "icon_256x256.png",
43+
"scale" : "1x"
44+
},
45+
{
46+
"size" : "256x256",
47+
"idiom" : "mac",
48+
"filename" : "icon_256x256@2x.png",
49+
"scale" : "2x"
50+
},
51+
{
52+
"size" : "512x512",
53+
"idiom" : "mac",
54+
"filename" : "icon_512x512.png",
55+
"scale" : "1x"
56+
},
57+
{
58+
"size" : "512x512",
59+
"idiom" : "mac",
60+
"filename" : "icon_512x512@2x.png",
61+
"scale" : "2x"
62+
}
63+
],
64+
"info" : {
65+
"version" : 1,
66+
"author" : "xcode"
67+
}
68+
}

‎distribution/osx/Info.plist

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleExecutable</key>
6+
<string>$(EXECUTABLE_NAME)</string>
7+
<key>CFBundleIdentifier</key>
8+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
9+
<key>CFBundleInfoDictionaryVersion</key>
10+
<string>6.0</string>
11+
<key>CFBundleName</key>
12+
<string>$(PRODUCT_NAME)</string>
13+
<key>CFBundlePackageType</key>
14+
<string>APPL</string>
15+
<key>CFBundleShortVersionString</key>
16+
<string>1.0</string>
17+
<key>CFBundleSignature</key>
18+
<string>ORCT</string>
19+
<key>CFBundleVersion</key>
20+
<string>1</string>
21+
<key>LSMinimumSystemVersion</key>
22+
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
23+
<key>NSHumanReadableCopyright</key>
24+
<string>OpenRCT2 is licensed under the GNU General Public License version 3</string>
25+
</dict>
26+
</plist>

‎install.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ SDL2_PV=2.0.3
44
SDL2_TTF_PV=2.0.12
55

66
cachedir=.cache
7-
liburl=https://openrct2.website/files/orctlibs.zip
7+
if [[ $(uname -s) == "Darwin" ]]; then
8+
liburl=https://openrct2.website/files/orctlibs-osx.zip
9+
else
10+
liburl=https://openrct2.website/files/orctlibs.zip
11+
fi
812
mkdir -p "$cachedir"
913

1014
# Sets default target to "linux", if none specified

‎src/cmdline.c

+16-2
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,23 @@ int cmdline_run(const char **argv, int argc)
9999
* a null pointer in the array. Because of this, AppKit in OS X 10.10 will
100100
* dereference it, causing a segmentation fault.
101101
*/
102-
char** mutableArgv = malloc(argvsize);
102+
const char** mutableArgv = malloc(argvsize);
103+
104+
#ifdef __APPLE__
105+
/**
106+
* Fixes problems with the default settings in the Xcode debugger
107+
* with it adding the option "-NSDocumentRevisionsDebugMode"
108+
*/
109+
int k=0;
110+
for (int i=0; i < argc; ++i)
111+
if (strcmp(argv[k], "-NSDocumentRevisionsDebugMode") != 0)
112+
mutableArgv[k++] = argv[i];
113+
argc = k;
114+
#else
103115
memcpy(mutableArgv,argv,argvsize);
104-
argc = argparse_parse(&argparse, argc, (const char**)mutableArgv);
116+
#endif
117+
118+
argc = argparse_parse(&argparse, argc, mutableArgv);
105119

106120
if (version) {
107121
print_version();

0 commit comments

Comments
 (0)
Please sign in to comment.