Beeware Desktop App
Python 3.5 or higher
Git, a version control system. You can download Git from from git-scm.org
.
WiX Toolset, a set of utilities for building Windows installers. An installer can be obtained from the WiX Toolset website
#setting up virtual environment
md beeware-tutorial
cd beeware-tutorial
py -m venv beeware-venv
beeware-venv\Scripts\activate.bat
We need to install briefcase. Briefcase is a BeeWare tool that can be used to package your application for distribution to end users - but it can also be used to bootstrap a new project.
python -m pip install briefcase
briefcase new command to create our application MyCalculator
briefcase new
Briefcase will ask us for some details of our new application
Formal Name - Accept the default value:
App Name - Accept the default value:
Bundle - If you own your own domain, enter that domain in reversed order. (For example, if you own the domain “cupcakes.com”, enter com.cupcakes as the bundle). If you don’t own your own domain, accept the default bundle (com.example)
Project Name - Accept the default value:
Description - Accept the default value (or, if you want to be really creative, come up with your own description!)
Author - Enter your own name here
Author’s email - Enter your own email address. This will be used in the configuration file, in help text, and anywhere that an email is required when submitting the app to an app store.
URL - The URL of the landing page for your application. Again, if you own your own domain, enter a URL at that domain (including the https://). Otherwise, just accept the default URL (https://example.com/helloworld). This URL doesn’t need to actually exist (for now); it will only be used if you publish your application to an app store.
License - Accept the default license (BSD).
GUI framework - Accept the default option, Toga (BeeWare’s own GUI toolkit).
file system is generated which look like:
beeware-tutorial
beeware-venv
...
MyCalculator/
LICENSE
README.rst
pyproject.toml
src/
MyCalculator/
resources/
MyCalculator.icns
MyCalculator.ico
MyCalculator.png
init.py
main.py
app.py
#running app in developer mode
cd MyCalculator
briefcase dev
This will open the window having calculator GUI.
#packaging for distribution in window
briefcase create
#building application
briefcase build
#building installer
briefcase build
Once this step completes, the windows folder will contain a file named MyCalculator-0.0.1.msi. If you double click on this installer it will install with usual procedure of installation on window.