Skip to content

Commit f250e7b

Browse files
committed
macos build and package
1 parent 780e967 commit f250e7b

File tree

3 files changed

+63
-1
lines changed

3 files changed

+63
-1
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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>BuildMachineOSBuild</key>
6+
<string>21D62</string>
7+
<key>CFBundleDevelopmentRegion</key>
8+
<string>en</string>
9+
<key>CFBundleExecutable</key>
10+
<string>SHADERed</string>
11+
<key>CFBundleIdentifier</key>
12+
<string>com.dfranx.shadered</string>
13+
<key>CFBundleInfoDictionaryVersion</key>
14+
<string>6.0</string>
15+
<key>CFBundleName</key>
16+
<string>SHADERed</string>
17+
<key>CFBundlePackageType</key>
18+
<string>APPL</string>
19+
<key>CFBundleShortVersionString</key>
20+
<string>1.0</string>
21+
<key>CFBundleSupportedPlatforms</key>
22+
<array>
23+
<string>MacOSX</string>
24+
</array>
25+
<key>CFBundleVersion</key>
26+
<string>1</string>
27+
<key>DTCompiler</key>
28+
<string>com.apple.compilers.llvm.clang.1_0</string>
29+
<key>DTPlatformBuild</key>
30+
<string>13C100</string>
31+
<key>DTPlatformName</key>
32+
<string>macosx</string>
33+
<key>DTPlatformVersion</key>
34+
<string>12.1</string>
35+
<key>DTSDKBuild</key>
36+
<string>21C46</string>
37+
<key>DTSDKName</key>
38+
<string>macosx12.1</string>
39+
<key>DTXcode</key>
40+
<string>1321</string>
41+
<key>DTXcodeBuild</key>
42+
<string>13C100</string>
43+
<key>LSMinimumSystemVersion</key>
44+
<string>12.1</string>
45+
<key>NSHumanReadableCopyright</key>
46+
<string></string>
47+
<key>NSPrincipalClass</key>
48+
<string>NSApplication</string>
49+
</dict>
50+
</plist>

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ Build:
187187

188188
```sh
189189
mkdir build
190+
cp -R bin build
190191
cd build
191192
cmake ../
192193
make -j8
@@ -198,10 +199,11 @@ make -j8
198199
> ln -s "$(xcrun --sdk macosx --show-sdk-path)" "$(xcrun --sdk macosx --show-sdk-platform-path)/Developer/SDKs/MacOSX10.15.sdk"
199200
> ```
200201
201-
Run:
202+
You can run the executable directly or use the SHADERed.app in the bin folder:
202203
```
203204
./bin/SHADERed
204205
```
206+
The first time you run the app if you are on a laptop you will need to adjust the UI scale in `Project -> Options -> UI scale` to be somewhere in the 1.5 - 2.0 range on any retina devices.
205207
206208
### Windows
207209
1. Install SDL2, GLEW & GLM through your favourite package manager (I recommend vcpkg)

build_macos.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[ -d build ] || mkdir build
2+
cd build
3+
cmake ..
4+
make -j8
5+
6+
# package the macOS app bundle
7+
cd ..
8+
[ -d "build/SHADERed.app" ] || cp -R Misc/macBundleTemplate/SHADERed.app build/bin
9+
cp -a bin/ build/bin/SHADERed.app/Contents/MacOS
10+
cp -a build/bin/SHADERed build/bin/SHADERed.app/Contents/MacOS

0 commit comments

Comments
 (0)