Skip to content

Commit

Permalink
Added Xcode Project
Browse files Browse the repository at this point in the history
  • Loading branch information
LRFLEW committed Dec 20, 2015
1 parent 229abec commit 034bf5c
Show file tree
Hide file tree
Showing 10 changed files with 1,855 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
*.fsproj merge=union
*.dbproj merge=union

# Custom for Xcode
*.pbxproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
Expand Down
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ sdl
# Compiled dll
openrct2.dll

# Compiled linux executable
openrct2

# Distribution
distribution/windows/*.exe

Expand Down Expand Up @@ -199,9 +202,38 @@ Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/

#############
## Xcode
#############

# Build generated
build/
DerivedData

# Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata

# Other
*.xccheckout
*.moved-aside
*.xcuserstate

# Mac crap
.DS_Store

# We link logo files to .xcassets in Xcode project, so don't sync them
distribution/osx/Assets.xcassets/AppIcon.appiconset/*.png

# Extra Xcode-specific lib files
libxc

#############
## Python
Expand Down
1,676 changes: 1,676 additions & 0 deletions OpenRCT2.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "E48FB7C08C6966C4BACE7D0390CDFA7C64DD04D8",
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {

},
"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
"E48FB7C08C6966C4BACE7D0390CDFA7C64DD04D8" : 0
},
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "6B7243E0-B9B8-4E6D-ACE9-4DF346FA52C7",
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
"E48FB7C08C6966C4BACE7D0390CDFA7C64DD04D8" : "OpenRCT2\/"
},
"DVTSourceControlWorkspaceBlueprintNameKey" : "OpenRCT2",
"DVTSourceControlWorkspaceBlueprintVersion" : 204,
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "OpenRCT2.xcodeproj"
}
7 changes: 6 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ if [[ ! -d build ]]; then
fi

# keep in sync with version in install.sh
sha256sum=69ff98c9544838fb16384bc78af9dc1c452b9d01d919e43f5fec686d02c9bdd8
if [[ $(uname -s) == "Darwin" ]]; then
# keep in sync with version in Xcode project
sha256sum=2cec3958352477fbb876a5b6398722077084b5ff7e95a7d3cd67492abf5012fc
else
sha256sum=69ff98c9544838fb16384bc78af9dc1c452b9d01d919e43f5fec686d02c9bdd8
fi
libVFile="./libversion"
libdir="./lib"
currentversion=0
Expand Down
68 changes: 68 additions & 0 deletions distribution/osx/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"images" : [
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "icon_16x16.png",
"scale" : "1x"
},
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "icon_32x32.png",
"scale" : "1x"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "icon_128x128.png",
"scale" : "1x"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "icon_256x256.png",
"scale" : "1x"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "icon_512x512.png",
"scale" : "1x"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "[email protected]",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
26 changes: 26 additions & 0 deletions distribution/osx/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?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>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</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>ORCT</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
<string>OpenRCT2 is licensed under the GNU General Public License version 3</string>
</dict>
</plist>
6 changes: 5 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ SDL2_PV=2.0.3
SDL2_TTF_PV=2.0.12

cachedir=.cache
liburl=https://openrct2.website/files/orctlibs.zip
if [[ $(uname -s) == "Darwin" ]]; then
liburl=https://openrct2.website/files/orctlibs-osx.zip
else
liburl=https://openrct2.website/files/orctlibs.zip
fi
mkdir -p "$cachedir"

# Sets default target to "linux", if none specified
Expand Down
18 changes: 16 additions & 2 deletions src/cmdline.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,23 @@ int cmdline_run(const char **argv, int argc)
* a null pointer in the array. Because of this, AppKit in OS X 10.10 will
* dereference it, causing a segmentation fault.
*/
char** mutableArgv = malloc(argvsize);
const char** mutableArgv = malloc(argvsize);

#ifdef __APPLE__
/**
* Fixes problems with the default settings in the Xcode debugger
* with it adding the option "-NSDocumentRevisionsDebugMode"
*/
int k=0;
for (int i=0; i < argc; ++i)
if (strcmp(argv[k], "-NSDocumentRevisionsDebugMode") != 0)
mutableArgv[k++] = argv[i];
argc = k;
#else
memcpy(mutableArgv,argv,argvsize);
argc = argparse_parse(&argparse, argc, (const char**)mutableArgv);
#endif

argc = argparse_parse(&argparse, argc, mutableArgv);

if (version) {
print_version();
Expand Down

0 comments on commit 034bf5c

Please sign in to comment.