diff --git a/shell/apple/emulator-ios/LLDBInitFile b/shell/apple/emulator-ios/LLDBInitFile new file mode 100644 index 000000000..986c10d5e --- /dev/null +++ b/shell/apple/emulator-ios/LLDBInitFile @@ -0,0 +1 @@ +br set -r "UIApplication _run" -C "process handle -s false SIGBUS" -G true diff --git a/shell/apple/emulator-osx/LLDBInitFile b/shell/apple/emulator-osx/LLDBInitFile new file mode 100644 index 000000000..3937fcff7 --- /dev/null +++ b/shell/apple/emulator-osx/LLDBInitFile @@ -0,0 +1 @@ +br set -r "NSApplication run" -C "process handle -s false SIGBUS" -G true diff --git a/shell/apple/generate_xcode_project.command b/shell/apple/generate_xcode_project.command new file mode 100755 index 000000000..4a93c81cc --- /dev/null +++ b/shell/apple/generate_xcode_project.command @@ -0,0 +1,27 @@ +script_dir=$(dirname "$0") +cd $script_dir/../../ + +echo "1) macOS ($(uname -m))" +echo "2) iOS" +read -p "Choose your target platform: " x + +if [ $x -eq 2 ]; then + option="-DCMAKE_SYSTEM_NAME=iOS" + lldbinitfolder="emulator-ios" + echo 'Building iOS xcodeproj for debugging' + echo 'Remove CODE_SIGNING_ALLOWED=NO in Build Settings if you are using your Apple Developer Certificate for signing' +else + option="-DCMAKE_OSX_ARCHITECTURES=$(uname -m)" + lldbinitfolder="emulator-osx" + echo 'Building macOS xcodeproj for debugging' +fi + +if [[ -z "${VULKAN_SDK}" ]]; then + echo 'Warning: VULKAN_SDK is not set in environment variable' +fi + +cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=artifact -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=artifact $option -DCMAKE_XCODE_GENERATE_SCHEME=YES -G "Xcode" + +nl=$'\n' +sed -i '' -E "s/launchStyle/customLLDBInitFile = \"\$(SRCROOT)\/shell\/apple\/\\${lldbinitfolder}\/LLDBInitFile\"\\${nl}launchStyle/g" build/flycast.xcodeproj/xcshareddata/xcschemes/flycast.xcscheme +open build/flycast.xcodeproj