Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: beeware/.github/.github/workflows/app-build-verify.yml@main
with:
python-version: ${{ matrix.python-version }}
runner-os: windows-latest
runner-os: ${{ matrix.runs-on }}
framework: ${{ matrix.framework }}
target-platform: windows
target-format: VisualStudio
Expand All @@ -40,10 +40,21 @@ jobs:
matrix:
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
framework: [ "toga", "pyside6", "pygame", "console" ]
# Pygame hasn't published 3.14 wheels yet.
# Toga is waiting on a release of Python.net for 3.14
runs-on: ["windows-latest", "windows-11-arm"]
exclude:
# Github Actions doesn't provide Windows/ARM64 builds for Python 3.10
- python-version: "3.10"
runs-on: "windows-11-arm"
# Pygame hasn't published 3.14 wheels.
- python-version: "3.14"
framework: pygame
# Pygame hasn't published any Windows/ARM64 wheels.
- framework: pygame
runs-on: windows-11-arm
# Toga is waiting on a release of Python.net for 3.14
- python-version: "3.14"
framework: toga
# Toga tests won't run on Windows/ARM64 until
# https://github.com/actions/partner-runner-images/issues/174 is resolved
- framework: "toga"
runs-on: windows-11-arm
28 changes: 14 additions & 14 deletions .github/workflows/update-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ jobs:
python-version: [ "3.11", "3.12", "3.13", "3.14" ]
config:
- runner: windows-latest
arch: x64
suffix: '-amd64'
vscode_arch: x64
arch: amd64
- runner: windows-11-arm
arch: ARM64
suffix: '-arm64'
vscode_arch: ARM64
arch: arm64
include:
# GitHub doesn't provide ARM64 binaries for Python 3.10
- python-version: "3.10"
config:
runner: windows-latest
arch: x64
suffix: '-amd64'
vscode_arch: x64
arch: amd64

runs-on: ${{ matrix.config.runner }}
steps:
Expand Down Expand Up @@ -67,13 +67,13 @@ jobs:
cd stub
briefcase build windows visualstudio

echo "Build ${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }} console stub artefact"
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 }}-${{ matrix.config.arch }}-${{ env.BUILD_NUMBER }} console stub artefact"
mv "./build/console-stub/windows/visualstudio/${{ matrix.config.vscode_arch }}/Release/console-stub.exe" ./Stub.exe
7z a Console-Stub-${{ env.PYTHON_TAG }}-${{ matrix.config.arch }}-${{ env.BUILD_NUMBER }}.zip Stub.exe

echo "Build ${{ env.PYTHON_TAG }}-${{ env.BUILD_NUMBER }} GUI stub artefact"
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 "Build ${{ env.PYTHON_TAG }}-${{ matrix.config.arch }}-${{ env.BUILD_NUMBER }} GUI stub artefact"
mv "./build/gui-stub/windows/visualstudio/${{ matrix.config.vscode_arch }}/Release/GUI Stub.exe" ./Stub.exe
7z a GUI-Stub-${{ env.PYTHON_TAG }}-${{ matrix.config.arch }}-${{ env.BUILD_NUMBER }}.zip Stub.exe

echo "Stub binaries:"
ls -1 *.zip
Expand All @@ -88,5 +88,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 }}${{ 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
aws s3 cp stub/Console-Stub-${{ env.PYTHON_TAG }}-${{ matrix.config.arch }}-${{ env.BUILD_NUMBER }}.zip s3://briefcase-support/python/${{ env.PYTHON_TAG }}/windows/Console-Stub-${{ env.PYTHON_TAG }}-${{ matrix.config.arch }}-${{ env.BUILD_NUMBER }}.zip
aws s3 cp stub/GUI-Stub-${{ env.PYTHON_TAG }}-${{ matrix.config.arch }}-${{ env.BUILD_NUMBER }}.zip s3://briefcase-support/python/${{ env.PYTHON_TAG }}/windows/GUI-Stub-${{ env.PYTHON_TAG }}-${{ matrix.config.arch }}-${{ env.BUILD_NUMBER }}.zip
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ venv/
stub/build/
stub/dist/
stub/logs/
*.zip
*.exe
6 changes: 3 additions & 3 deletions {{ cookiecutter.format }}/briefcase.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ extras_path = "extras"
{{ {
"3.10": "support_revision = 11",
"3.11": "support_revision = 9",
"3.12": "support_revision = 9",
"3.13": "support_revision = 8",
"3.14": "support_revision = 0",
"3.12": "support_revision = 10",
"3.13": "support_revision = 13",
"3.14": "support_revision = 4",
}.get(cookiecutter.python_version|py_tag, "") }}

icon = "{{ cookiecutter.formal_name }}/icon.ico"
Expand Down
15 changes: 11 additions & 4 deletions {{ cookiecutter.format }}/{{ cookiecutter.formal_name }}/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,20 @@ void setup_stdout(FileVersionInfo^ version_info) {
// Python uses the CRT for I/O, and it requires the descriptors are reopened.
// Windows GUI apps return to the prompt immediately, so console output from
// this app is able to contaminate output from other commands being executed;
// but that's better than not seeing console output at all.
// but that's better than not seeing console output at all. However, we can't
// do this in test mode, because it prevents Briefcase seeing test output.
FILE *new_stdin;
FILE *new_stdout;
FILE *new_stderr;
freopen_s(&new_stdin, "CONIN$", "r", stdin);
freopen_s(&new_stdout, "CONOUT$", "w", stdout);
freopen_s(&new_stderr, "CONOUT$", "w", stderr);
wchar_t *app_module_str;
size_t size;

_wdupenv_s(&app_module_str, &size, L"BRIEFCASE_MAIN_MODULE");
if (!app_module_str) {
freopen_s(&new_stdin, "CONIN$", "r", stdin);
freopen_s(&new_stdout, "CONOUT$", "w", stdout);
freopen_s(&new_stderr, "CONOUT$", "w", stderr);
}
}

debug_log("Log started: %S\n", wstr(DateTime::Now.ToString("yyyy-MM-dd HH:mm:ssZ")));
Expand Down