Closed zhenzi0322 closed 1 month ago
When reporting a bug, it's really important that you provide full reproduction instructions. You've given 3 commands - but haven't provided any details about the other inputs you've used (such as the name of your app), or the system where you're running (including operating system versions, briefcase versions, etc). The bug template asks for these details for reason - if you don't provide these details, it can be very difficult for us to diagnose the problem. I've updated your report to include some of the details you've omitted.
In this case, the problem is that the build
step has been missed. A Windows app needs a build step to set some metadata on the binary. This should be picked up automatically, but it appears it isn't.
As a workaround, you can manually run:
briefcase build
This will only be needed on the initial build. Once the metadata has been set once, no additional builds will be required.
I believe the specific issue is caused because you did run briefcase create
. If you invoke briefcase run
without invoking briefcase create
first, this triggers the create
, which then causes a build to occur. However, if you invoke create, the template and the binary both exist, so Run assumes no build is required.
The same problem exists for both the macOS app
and Windows app
template, for the same reason - they're both stub apps that require additional modifications after the template is rolled out.
One fix would be to modify the app template so that the stub binary generated by the template is literally stub.exe
; then the "build" step would be "rename stub.exe to
Thank you
I believe this is the same issue as https://github.com/beeware/briefcase/issues/807. Nonetheless, this should be resolved by https://github.com/beeware/briefcase/pull/1714 since running the build
step would no longer be dependent on the presence of the app binary.
Describe the bug
When running an app on macOS or Windows,
briefcase run
will fail if abuild
step hasn't been executed.On Windows, the error manifests as:
On macOS, it is
Steps to reproduce
Expected behavior
App should start without error. The
run
should imply the need for abuild
on the macOS/Windows app templates, but because the template and binary both exist, the need for a build isn't detected.Screenshots
No response
Environment
Logs
Additional context
The briefcase dev is normal, but the briefcase run is abnormal.
If you invoke
briefcase run
on a clean project, the app works.If you invoke
briefcase build
before invokingbriefcase run
, the app works.This only affects the
app
targets; theXcode
/VisualStudio
templates do the right thing, because they require an explicit compilation step to create the binary.