From baf48873535e30066ed3953028f211a61bf23706 Mon Sep 17 00:00:00 2001 From: Abdo Date: Fri, 10 Apr 2026 16:01:54 +0300 Subject: [PATCH 01/12] Update for ARM64 --- .../{{ cookiecutter.formal_name }}.sln | 6 +++ .../packages.config | 1 + .../{{ cookiecutter.formal_name }}.vcxproj | 38 +++++++++++++++---- 3 files changed, 37 insertions(+), 8 deletions(-) diff --git a/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.sln b/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.sln index e8c4b70..71ade49 100644 --- a/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.sln +++ b/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.sln @@ -9,12 +9,18 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 Release|x64 = Release|x64 + Debug|ARM64 = Debug|ARM64 + Release|ARM64 = Release|ARM64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {6887C8E5-0B59-4F0A-84AC-6CB7282BF296}.Debug|x64.ActiveCfg = Debug|x64 {6887C8E5-0B59-4F0A-84AC-6CB7282BF296}.Debug|x64.Build.0 = Debug|x64 {6887C8E5-0B59-4F0A-84AC-6CB7282BF296}.Release|x64.ActiveCfg = Release|x64 {6887C8E5-0B59-4F0A-84AC-6CB7282BF296}.Release|x64.Build.0 = Release|x64 + {6887C8E5-0B59-4F0A-84AC-6CB7282BF296}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {6887C8E5-0B59-4F0A-84AC-6CB7282BF296}.Debug|ARM64.Build.0 = Debug|ARM64 + {6887C8E5-0B59-4F0A-84AC-6CB7282BF296}.Release|ARM64.ActiveCfg = Release|ARM64 + {6887C8E5-0B59-4F0A-84AC-6CB7282BF296}.Release|ARM64.Build.0 = Release|ARM64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/packages.config b/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/packages.config index 8e78fcb..135a4ee 100644 --- a/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/packages.config +++ b/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/packages.config @@ -1,4 +1,5 @@  + diff --git a/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.vcxproj b/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.vcxproj index f713f35..f812145 100644 --- a/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.vcxproj +++ b/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.vcxproj @@ -1,6 +1,7 @@ - + + Debug @@ -10,6 +11,14 @@ Release x64 + + Debug + ARM64 + + + Release + ARM64 + 17.0 @@ -34,25 +43,37 @@ true Unicode + + Application + true + v143 + Unicode + + + Application + false + v143 + Unicode + - + - + - + {% if cookiecutter.console_app %}{{ cookiecutter.app_name }}{% else %}{{ cookiecutter.formal_name }}{% endif %} - + {% if cookiecutter.console_app %}{{ cookiecutter.app_name }}{% else %}{{ cookiecutter.formal_name }}{% endif %} - + Level3 _DEBUG;%(PreprocessorDefinitions) @@ -63,7 +84,7 @@ Main - + Level3 NDEBUG;%(PreprocessorDefinitions) @@ -109,6 +130,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + + From 173f9a4134989f7815787a7eeec9257a5222ee8f Mon Sep 17 00:00:00 2001 From: Abdo Date: Fri, 10 Apr 2026 17:46:29 +0300 Subject: [PATCH 02/12] Set CLRSupport for ARM Turned out to be required --- .../{{ cookiecutter.formal_name }}.vcxproj | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.vcxproj b/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.vcxproj index f812145..a5295fd 100644 --- a/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.vcxproj +++ b/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.vcxproj @@ -29,32 +29,20 @@ 10.0 - + Application true v143 true Unicode - + Application false v143 true Unicode - - Application - true - v143 - Unicode - - - Application - false - v143 - Unicode - From d7a2c7ea462927ef124cd9165789df501c3c0d80 Mon Sep 17 00:00:00 2001 From: Abdo Date: Fri, 10 Apr 2026 18:38:43 +0300 Subject: [PATCH 03/12] Update template paths --- cookiecutter.json | 2 ++ {{ cookiecutter.format }}/briefcase.toml | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cookiecutter.json b/cookiecutter.json index 91ba96f..56dd4aa 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -23,6 +23,8 @@ "post_install_script": "", "pre_uninstall_script": "", "python_version": "3.X.0", + "host_arch": "AMD64", + "configuration": "{{ 'ARM64' if cookiecutter.host_arch == 'ARM64' else 'x64' }}", "_extensions": [ "briefcase.integrations.cookiecutter.PythonVersionExtension", "briefcase.integrations.cookiecutter.UUIDExtension", diff --git a/{{ cookiecutter.format }}/briefcase.toml b/{{ cookiecutter.format }}/briefcase.toml index eccdcb5..e18cdcc 100644 --- a/{{ cookiecutter.format }}/briefcase.toml +++ b/{{ cookiecutter.format }}/briefcase.toml @@ -3,9 +3,9 @@ target_version = "0.3.24" [paths] -app_path = "x64/Release/app" -app_packages_path = "x64/Release/app_packages" -support_path = "x64/Release" +app_path = "{{ cookiecutter.configuration }}/Release/app" +app_packages_path = "{{ cookiecutter.configuration }}/Release/app_packages" +support_path = "{{ cookiecutter.configuration }}/Release" extras_path = "extras" {# Minor versions for 3.10, 3.11, and 3.12 cannot be bumped further -#} {# since Python is not hosting embeddable zipped versions of them -#} @@ -22,5 +22,5 @@ icon = "{{ cookiecutter.formal_name }}/icon.ico" document_type_icon.{{ document_type_id }} = "{{ cookiecutter.app_name }}-{{ document_type_id }}.ico" {% endfor %} cleanup_paths = [ - "x64/Release/python*.exe", + "{{ cookiecutter.configuration }}/Release/python*.exe", ] From 102420e344052c56116abedfa6ee9afb2c11b2f2 Mon Sep 17 00:00:00 2001 From: Abdo Date: Fri, 10 Apr 2026 19:52:42 +0300 Subject: [PATCH 04/12] Update Build Tools version --- .../{{ cookiecutter.formal_name }}.vcxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.vcxproj b/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.vcxproj index a5295fd..65e5cbf 100644 --- a/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.vcxproj +++ b/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.vcxproj @@ -32,14 +32,14 @@ Application true - v143 + v145 true Unicode Application false - v143 + v145 true Unicode From 8d2e6e95a70cf52234a9e306ec58c85dae05e054 Mon Sep 17 00:00:00 2001 From: Abdo Date: Fri, 10 Apr 2026 20:05:44 +0300 Subject: [PATCH 05/12] Revert "Update Build Tools version" This reverts commit 102420e344052c56116abedfa6ee9afb2c11b2f2. GitHub CI uses Visual Studio 2022 --- .../{{ cookiecutter.formal_name }}.vcxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.vcxproj b/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.vcxproj index 65e5cbf..a5295fd 100644 --- a/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.vcxproj +++ b/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.vcxproj @@ -32,14 +32,14 @@ Application true - v145 + v143 true Unicode Application false - v145 + v143 true Unicode From 9f423707b650dec6268578ff21823665d849b4f1 Mon Sep 17 00:00:00 2001 From: Abdo Date: Fri, 10 Apr 2026 20:56:57 +0300 Subject: [PATCH 06/12] Update build workflow --- .github/workflows/update-binary.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update-binary.yml b/.github/workflows/update-binary.yml index 432de01..3c93f43 100644 --- a/.github/workflows/update-binary.yml +++ b/.github/workflows/update-binary.yml @@ -15,10 +15,17 @@ defaults: jobs: build-stubs: name: Build stub binaries - runs-on: windows-latest strategy: matrix: python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ] + config: + - runner: windows-latest + arch: x64 + suffix: '' + - runner: windows-11-arm + arch: ARM64 + suffix: '-arm' + runs-on: ${{ matrix.config.runner }} steps: - name: Set Build Variables id: build-vars @@ -52,11 +59,11 @@ jobs: briefcase build windows visualstudio echo "Build ${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }} console stub artefact" - mv "./build/console-stub/windows/visualstudio/x64/Release/console-stub.exe" ./Stub.exe + mv "./build/console-stub/windows/visualstudio/${{ matrix.config.arch }}/Release/console-stub.exe" ./Stub.exe 7z a Console-Stub-${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }}.zip Stub.exe echo "Build ${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }} GUI stub artefact" - mv "./build/gui-stub/windows/visualstudio/x64/Release/GUI Stub.exe" ./Stub.exe + mv "./build/gui-stub/windows/visualstudio/${{ matrix.config.arch }}/Release/GUI Stub.exe" ./Stub.exe 7z a GUI-Stub-${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }}.zip Stub.exe echo "Stub binaries:" @@ -72,5 +79,5 @@ jobs: python -m pip install -U setuptools python -m pip install awscli - aws s3 cp stub/Console-Stub-${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }}.zip s3://briefcase-support/python/${{ env.PYTHON_TAG }}/windows/Console-Stub-${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }}.zip - aws s3 cp stub/GUI-Stub-${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }}.zip s3://briefcase-support/python/${{ env.PYTHON_TAG }}/windows/GUI-Stub-${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }}.zip + aws s3 cp stub/Console-Stub-${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }}.zip s3://briefcase-support/python/${{ env.PYTHON_TAG }}/windows/Console-Stub-${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }}${{ matrix.config.suffix }}.zip + aws s3 cp stub/GUI-Stub-${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }}.zip s3://briefcase-support/python/${{ env.PYTHON_TAG }}/windows/GUI-Stub-${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }}${{ matrix.config.suffix }}.zip From f8caedaf36bc3f36a33ba14e48f954bd89665272 Mon Sep 17 00:00:00 2001 From: Abdo Date: Fri, 10 Apr 2026 21:05:05 +0300 Subject: [PATCH 07/12] Conditionally include pythonarm64 --- .../{{ cookiecutter.formal_name }}/packages.config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/packages.config b/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/packages.config index 135a4ee..3d9925c 100644 --- a/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/packages.config +++ b/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/packages.config @@ -1,5 +1,8 @@  - + {% if cookiecutter.host_arch == 'ARM64' %} + {% else %} + + {% endif %} From e1ce74bd84b878dd2a66f8e2083f2ff0f9ad49bc Mon Sep 17 00:00:00 2001 From: Abdo Date: Fri, 10 Apr 2026 21:42:27 +0300 Subject: [PATCH 08/12] Update README.rst --- README.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index c5f503e..2f032aa 100644 --- a/README.rst +++ b/README.rst @@ -42,7 +42,7 @@ However, if you *do* want use this template directly... * **Deskop Development with C++** - default options, plus the "C++/CLI Support for v143 build tools". 4. `Obtain a Python Windows Embeddable package`_, and extract it into the - ``My Project/x64/Release`` directory generated by the template. This will give you a + ``My Project/x64/Release`` directory generated by the template (`ARM64` if you're on ARM64). This will give you a ``python3.dll`` (amongst other artefacts) in the ``My Project/x64/Release`` folder. 5. Add your code to the template, into the ``My Project/x64/Release/app`` directory. @@ -87,6 +87,8 @@ file. Open a command prompt, and change into the ``My Project`` directory. Then: C:\...>wix build -ext WixToolset.UI.wixext -arch x64 my-project.wxs -loc unicode.wxl -o "My Project.msi" +Use `-arch arm64` if you're on ARM64. + The MSI file can then be used to install your application. When installed, your application will have an entry in your Start menu. From d4e846f2c97df15dd1cc19c9fae4dc83dea8403f Mon Sep 17 00:00:00 2001 From: Abdo Date: Mon, 13 Apr 2026 13:44:12 +0300 Subject: [PATCH 09/12] Tweak arch suffixes --- .github/workflows/update-binary.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-binary.yml b/.github/workflows/update-binary.yml index 3c93f43..9480168 100644 --- a/.github/workflows/update-binary.yml +++ b/.github/workflows/update-binary.yml @@ -21,10 +21,10 @@ jobs: config: - runner: windows-latest arch: x64 - suffix: '' + suffix: '-amd64' - runner: windows-11-arm arch: ARM64 - suffix: '-arm' + suffix: '-arm64' runs-on: ${{ matrix.config.runner }} steps: - name: Set Build Variables From 72679446c0559b4eedc44eb8b11ad411d21ffcee Mon Sep 17 00:00:00 2001 From: Abdo Date: Mon, 13 Apr 2026 13:50:56 +0300 Subject: [PATCH 10/12] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 2f032aa..ee799ac 100644 --- a/README.rst +++ b/README.rst @@ -42,7 +42,7 @@ However, if you *do* want use this template directly... * **Deskop Development with C++** - default options, plus the "C++/CLI Support for v143 build tools". 4. `Obtain a Python Windows Embeddable package`_, and extract it into the - ``My Project/x64/Release`` directory generated by the template (`ARM64` if you're on ARM64). This will give you a + ``My Project/x64/Release`` directory generated by the template (`My Project/ARM64/Release` if you're on ARM64). This will give you a ``python3.dll`` (amongst other artefacts) in the ``My Project/x64/Release`` folder. 5. Add your code to the template, into the ``My Project/x64/Release/app`` directory. From b4ef03c8e6969372599857ce1d1939de3dc60b23 Mon Sep 17 00:00:00 2001 From: Abdo Date: Mon, 13 Apr 2026 14:28:05 +0300 Subject: [PATCH 11/12] Include both Python packages --- .../{{ cookiecutter.formal_name }}/packages.config | 3 --- 1 file changed, 3 deletions(-) diff --git a/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/packages.config b/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/packages.config index 3d9925c..e6017c3 100644 --- a/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/packages.config +++ b/{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/packages.config @@ -1,8 +1,5 @@  - {% if cookiecutter.host_arch == 'ARM64' %} - {% else %} - {% endif %} From 0996e3224c34492286cba51065236d163a581922 Mon Sep 17 00:00:00 2001 From: Abdo Date: Mon, 13 Apr 2026 15:03:56 +0300 Subject: [PATCH 12/12] configuration -> vscode_platform --- cookiecutter.json | 2 +- {{ cookiecutter.format }}/briefcase.toml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cookiecutter.json b/cookiecutter.json index 56dd4aa..c80373b 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -24,7 +24,7 @@ "pre_uninstall_script": "", "python_version": "3.X.0", "host_arch": "AMD64", - "configuration": "{{ 'ARM64' if cookiecutter.host_arch == 'ARM64' else 'x64' }}", + "vscode_platform": "{{ 'ARM64' if cookiecutter.host_arch == 'ARM64' else 'x64' }}", "_extensions": [ "briefcase.integrations.cookiecutter.PythonVersionExtension", "briefcase.integrations.cookiecutter.UUIDExtension", diff --git a/{{ cookiecutter.format }}/briefcase.toml b/{{ cookiecutter.format }}/briefcase.toml index e18cdcc..8e146ab 100644 --- a/{{ cookiecutter.format }}/briefcase.toml +++ b/{{ cookiecutter.format }}/briefcase.toml @@ -3,9 +3,9 @@ target_version = "0.3.24" [paths] -app_path = "{{ cookiecutter.configuration }}/Release/app" -app_packages_path = "{{ cookiecutter.configuration }}/Release/app_packages" -support_path = "{{ cookiecutter.configuration }}/Release" +app_path = "{{ cookiecutter.vscode_platform }}/Release/app" +app_packages_path = "{{ cookiecutter.vscode_platform }}/Release/app_packages" +support_path = "{{ cookiecutter.vscode_platform }}/Release" extras_path = "extras" {# Minor versions for 3.10, 3.11, and 3.12 cannot be bumped further -#} {# since Python is not hosting embeddable zipped versions of them -#} @@ -22,5 +22,5 @@ icon = "{{ cookiecutter.formal_name }}/icon.ico" document_type_icon.{{ document_type_id }} = "{{ cookiecutter.app_name }}-{{ document_type_id }}.ico" {% endfor %} cleanup_paths = [ - "{{ cookiecutter.configuration }}/Release/python*.exe", + "{{ cookiecutter.vscode_platform }}/Release/python*.exe", ]