Skip to content

Commit fa07c31

Browse files
author
Stephen Hall
committed
MacOS files
created some MacOS specific files. bundle.sh wraps the executable in an OS x Application bundle, and info.plist is a property sheet needed by that bundle.
1 parent e62ebe3 commit fa07c31

File tree

3 files changed

+65
-2
lines changed

3 files changed

+65
-2
lines changed

.gitignore

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77
*.filters
88
*.opensdf
99
*.exe
10+
*.pdb
11+
*.ilk
12+
*.DS_Store
1013

14+
chesspp
1115
debug.txt
1216

1317
ChessPlusPlus/
1418
Debug/
1519
Release/
1620
libs/SFML-4fbefe7/build_vs11/
17-
*.pdb
18-
*.ilk
21+
bin/

MacOS/bundle.sh

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/sh
2+
3+
# bundle.sh
4+
#
5+
#
6+
# Created by Steve Hall on 3/8/13.
7+
#
8+
9+
# Remove old .app if exists
10+
if [ -d bin/ChessPlusPlus.app ]; then
11+
echo "Removing old .app"
12+
rm -rf bin/ChessPlusPlus.app
13+
fi
14+
15+
# Create bundle structure in bin/
16+
echo "Creating bundle structure"
17+
mkdir -p bin bin/ChessPlusPlus.app bin/ChessPlusPlus.app/Contents bin/ChessPlusPlus.app/Contents/MacOS bin/ChessPlusPlus.app/Contents/Resources/res bin/ChessPlusPlus.app/Contents/Frameworks
18+
19+
# Copy resources
20+
echo "Copying resources to bundle"
21+
cp -pR res bin/ChessPlusPlus.app/Contents/Resources/
22+
cp -pR MacOS/info.plist bin/ChessPlusPlus.app/Contents
23+
cp -pR ./config.xml bin/ChessPlusPlus.app/Contents/Resources
24+
25+
# Copy SFML frameworks
26+
echo "Copying SFML Frameworks to bundle"
27+
cp -Rn /Library/Frameworks/SFML.framework bin/ChessPlusPlus.app/Contents/Frameworks
28+
cp -Rn /Library/Frameworks/sfml-system.framework bin/ChessPlusPlus.app/Contents/Frameworks
29+
cp -Rn /Library/Frameworks/sfml-window.framework bin/ChessPlusPlus.app/Contents/Frameworks
30+
cp -Rn /Library/Frameworks/sfml-graphics.framework bin/ChessPlusPlus.app/Contents/Frameworks
31+
32+
# Move executable
33+
echo "Moving executable to bundle"
34+
mv -f ./chesspp bin/ChessPlusPlus.app/Contents/MacOS

MacOS/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>CFBundleShortVersionString</key>
6+
<string>0.0.1</string>
7+
<key>CFBundleIdentifier</key>
8+
<string>com.cplusplus.chesspp</string>
9+
<key>CFBundleName</key>
10+
<string>ChessPlusPlus</string>
11+
<key>CFBundleSignature</key>
12+
<string>com.cplusplus.chesspp</string>
13+
<key>CFBundleInfoDictionaryVersion</key>
14+
<string>6.0</string>
15+
<key>CFBundleGetInfoString</key>
16+
<string>ChessPlusPlus</string>
17+
<key>CFBundleExecutable</key>
18+
<string>chesspp</string>
19+
<key>CFBundlePackageType</key>
20+
<string>APPL</string>
21+
<key>CFBundleVersion</key>
22+
<string>0.0.0.1</string>
23+
<key>NSAppleScriptEnabled</key>
24+
<true/>
25+
</dict>
26+
</plist>

0 commit comments

Comments
 (0)