Open johnoscott opened 4 years ago
Thanks for the report - that's definitely odd, and definitely a bug.
My guess is that the WiX project template that is used to generate the installer hasn't been updated to reflect the new version number. I suspect that if you were to regenerate the app, rather than updating, you'd get the right version number, and the migration path would be what you expect.
If I'm right, a similar bug will probably exist on every platform, as there is metadata in the generated project files that is derived from pyproject.toml
, but only populated when briefcase create
is invoked. I'm guessing we'll need to add content to the briefcase.toml
file that is associated with the template to declare values that need to be updated, and modify the updated command to populate those values.
This is also a bug in briefcase, rather than the beeware tutorial; migrating the issue to that repository.
One approach that might work:
update
, regenerate the app template into a temporary directorybriefcase.toml
file associated with app templates, include a list of files that will be overwritten on updatebriefcase.toml
into the app being updated.This has come up again as #1015. As a result, I've renamed the ticket to reflect the generic problem, rather than the specific manifestation of the bug that was originally reported. I've also added the enhancement
flag, as there is a generic "quality of life" improvement associated with this idea, in addition to the specific bug that was reported.
I've had my attention drawn to copier, which is a mostly drop-in replacement for cookiecutter, but one that has support for updating an existing generated project. I haven't done a detailed investigation yet, but this might provide a viable path forward for updating projects after they have been initially generated.
Describe the bug After following the Beeware Tutorial, I decided to build a 2nd MSI Installer for Windows with a bump to the app version to 0.0.2. This created a file :
Hello World-0.0.2.msi
which I ran (I had already installed the previousHello World-0.0.1.msi
. When I look in the Control Panel\Programs**Programs and Features** I see two instances of the app and both show version 0.0.1To Reproduce Steps to reproduce the behavior:
On a Windows PC, complete the Beeware Tutorial to the end of Tutorial 3. https://docs.beeware.org/en/latest/tutorial/tutorial-3.html
Run the MSI created at the end of Tutorial 3 to install the application.
Hello_World-0.0.1.msi
Proceed with Tutorial 4 which updates the application code.
Bump the project version to 0.0.2 in
pyproject.toml
Build a new MSI installer by running these commands :
Run the 2nd MSI created at install the application update.
Hello_World-0.0.2.msi
Expected behavior I was expecting the 2nd MSI version to update the already installed version. While it does appear installed app code is updated (C:\Users\User\AppData\Local\Programs\Hello World\app\helloworld\app.py is the latest version), I don't think there should be multiple apps to uninstall in Programs and Features.
Screenshots Attached
Environment:
Operating System: Windows 10 Pro, Version 2004
Python version: Python 3.7.7
Software versions:
Additional context
RKM 2022-12-22: Although this was originally reported as a specific bug with Windows, it's a manifestation of a more generic problem - any content generated from template is locked in stone. We need a generic ability to update templated content after the original template has been generated, without the need to delete and re-generate the project.