=============================
Project configuration options
=============================
Briefcase is a `PEP518 `__-compliant build
tool. It uses a ``pyproject.toml`` file, in the root directory of your project,
to provide build instructions for the packaged file.
If you have an application called "My App", with source code in the ``src/myapp``
directory, the simplest possible ``pyproject.toml`` Briefcase configuration
file would be::
[tool.briefcase]
project_name = "My Project"
bundle = "com.example"
version = "0.1"
[tool.briefcase.app.myapp]
formal_name = "My App"
description = "My first Briefcase App"
sources = ['src/myapp']
The configuration sections are tool specific, and start with the prefix
``tool.briefcase``.
The location of the ``pyproject.toml`` file is treated as the root of the
project definition. Briefcase should be invoked in a directory that contains a
``pyproject.toml`` file, and all relative file path references contained in the
``pyproject.toml`` file will be interpreted relative to the directory that
contains the ``pyproject.toml`` file.
Changes to these options will not take effect until you run the appropriate
``briefcase`` command:
* For :attr:`sources`, run ``briefcase update``, or pass the ``-u`` option to
``briefcase build`` or ``briefcase run``.
* For :attr:`requires`, run ``briefcase update -r``, or pass the ``-r``
option to ``briefcase build`` or ``briefcase run``.
* For :attr:`icon` (including an :attr:`document_type_id.icon`
definition in a document type), run ``briefcase update --update-resources``, or pass
the ``--update-resources`` option to ``briefcase build`` or ``briefcase run``.
* For any other options, you'll need to re-run ``briefcase create``.
Configuration sections
======================
A project that is packaged by Briefcase can declare multiple *applications*.
Each application is a distributable product of the build process. A simple
project will only have a single application. However, a complex project may
contain multiple applications with shared code.
Each setting can be specified:
* At the level of an output format (e.g., settings specific to building macOS
DMGs);
* At the level of an platform for an app (e.g., macOS specific settings);
* At the level of an individual app; or
* Globally, for all applications in the project.
When building an application in a particular output format, Briefcase will look
for settings in the same order. For example, if you're building a macOS DMG for
an application called ``myapp``, Briefcase will look for macOS DMG settings for
``myapp``, then for macOS settings for ``myapp``, then for ``myapp`` settings,
then for project-level settings.
``[tool.briefcase]``
--------------------
The base ``[tool.briefcase]`` section declares settings that project specific,
or are are common to all applications in this repository.
``[tool.briefcase.app.]``
-----------------------------------
Configuration options for a specific application.
```` must adhere to a valid Python distribution name as specified in
`PEP508 `__. The app name must also
*not* be a reserved word in Python, Java or JavaScript (i.e., app names like
``switch`` or ``pass`` would not be valid); and it may not include any of the
`filenames prohibited by Windows
`__
(i.e., ``CON``, ``PRN``, or ``LPT1``).
``[tool.briefcase.app..]``
----------------------------------------------
Configuration options for an application that are platform specific. The
platform must match a name for a platform supported by Briefcase (e.g.,
``macOS`` or ``windows``). A list of the platforms supported by Briefcase can
be obtained by running ``briefcase -h``, and inspecting the help for the
``platform`` option
``[tool.briefcase.app...