diff --git a/Misc/macBundleTemplate/SHADERed.app/Contents/Info.plist b/Misc/macBundleTemplate/SHADERed.app/Contents/Info.plist new file mode 100644 index 00000000..b8ab9642 --- /dev/null +++ b/Misc/macBundleTemplate/SHADERed.app/Contents/Info.plist @@ -0,0 +1,50 @@ + + + + + BuildMachineOSBuild + 21D62 + CFBundleDevelopmentRegion + en + CFBundleExecutable + SHADERed + CFBundleIdentifier + com.dfranx.shadered + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SHADERed + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 13C100 + DTPlatformName + macosx + DTPlatformVersion + 12.1 + DTSDKBuild + 21C46 + DTSDKName + macosx12.1 + DTXcode + 1321 + DTXcodeBuild + 13C100 + LSMinimumSystemVersion + 11.0 + NSHumanReadableCopyright + + NSPrincipalClass + NSApplication + + diff --git a/README.md b/README.md index a828b00c..1676e1f3 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,7 @@ Build: ```sh mkdir build +cp -R bin build cd build cmake ../ make -j8 @@ -198,10 +199,11 @@ make -j8 > ln -s "$(xcrun --sdk macosx --show-sdk-path)" "$(xcrun --sdk macosx --show-sdk-platform-path)/Developer/SDKs/MacOSX10.15.sdk" > ``` -Run: +You can run the executable directly or use the SHADERed.app in the bin folder: ``` ./bin/SHADERed ``` +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. ### Windows 1. Install SDL2, GLEW & GLM through your favourite package manager (I recommend vcpkg) diff --git a/build_macos.sh b/build_macos.sh new file mode 100755 index 00000000..e9701706 --- /dev/null +++ b/build_macos.sh @@ -0,0 +1,10 @@ +[ -d build ] || mkdir build +cd build +cmake .. +make -j8 + +# package the macOS app bundle +cd .. +[ -d "build/SHADERed.app" ] || cp -R Misc/macBundleTemplate/SHADERed.app build/bin +cp -a bin/ build/bin/SHADERed.app/Contents/MacOS +cp -a build/bin/SHADERed build/bin/SHADERed.app/Contents/MacOS \ No newline at end of file