From b31a465703bea8fa3f2e4262d931e04bac30410b Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 22 Jul 2026 15:16:59 +0800 Subject: [PATCH] Add support for non-framework app builds. --- cookiecutter.json | 1 + {{ cookiecutter.format }}/briefcase.toml | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/cookiecutter.json b/cookiecutter.json index d28253e..0cf59e3 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -14,6 +14,7 @@ "host_arch": "arm64", "python_version": "3.X.0", "min_os_version": "11.0", + "use_framework": true, "_extensions": [ "briefcase.integrations.cookiecutter.PythonVersionExtension", "briefcase.integrations.cookiecutter.PListExtension", diff --git a/{{ cookiecutter.format }}/briefcase.toml b/{{ cookiecutter.format }}/briefcase.toml index c468e8f..4eb1008 100644 --- a/{{ cookiecutter.format }}/briefcase.toml +++ b/{{ cookiecutter.format }}/briefcase.toml @@ -8,7 +8,11 @@ app_path = "{{ cookiecutter.formal_name|escape_toml }}.app/Contents/Resources/ap app_packages_path = "{{ cookiecutter.formal_name|escape_toml }}.app/Contents/Resources/app_packages" info_plist_path = "{{ cookiecutter.formal_name|escape_toml }}.app/Contents/Info.plist" entitlements_path = "Entitlements.plist" +{% if cookiecutter.use_framework -%} support_path = "{{ cookiecutter.formal_name|escape_toml }}.app/Contents/Frameworks" +{% else -%} +support_path = "{{ cookiecutter.formal_name|escape_toml }}.app/Contents/Resources/python" +{% endif -%} runtime_path = "Python.xcframework/macos-arm64_x86_64/Python.framework" {{ { "3.10": "support_revision = 14", @@ -19,10 +23,13 @@ runtime_path = "Python.xcframework/macos-arm64_x86_64/Python.framework" }.get(cookiecutter.python_version|py_tag, "") }} stub_binary_revision = 14 cleanup_paths = [ +{% if cookiecutter.use_framework -%} "support/Python.xcframework/**/Headers", "support/Python.xcframework/**/include", "support/Python.xcframework/**/python*/config-*-darwin", "support/Python.xcframework/**/pkgconfig", +{% else -%} +{% endif -%} ] icon = "{{ cookiecutter.formal_name|escape_toml }}.app/Contents/Resources/{{ cookiecutter.app_name }}.icns" {% for extension, doctype in cookiecutter.document_types.items() -%}