Debian Codegraph @

docs/en/reference/commands/build.md

raw
1 # build
2
3 Compile/build an application. By default, targets the current platform's default output format.
4
5 This will only compile the components necessary to *run* the application. It won't necessarily result in the generation of an installable artefact.
6
7 ## Usage
8
9 To build the application for the default output format for the current platform:
10
11 ```console
12 $ briefcase build
13 ```
14
15 To build the application for a different platform:
16
17 ```console
18 $ briefcase build <platform>
19 ```
20
21 To build the application for a specific output format:
22
23 ```console
24 $ briefcase build <platform> <output format>
25 ```
26
27 /// admonition | Build tool requirements
28
29 Building for some platforms depends on the build tools for the platform you're targeting being available on the platform you're using. For example, you will only be able to create iOS applications on macOS. Briefcase will check for any required tools, and will report an error if the platform you're targeting is not supported.
30
31
32 ///
33
34 ## Options
35
36 The following options can be provided at the command line.
37
38 ### `-a <app name>` / `--app <app name>`
39
40 Run a specific application target in your project. This argument is only required if your project contains more than one application target. The app name specified should be the machine-readable package name for the app.
41
42 ### `-u` / `--update`
43
44 Update the application's source code before building. Equivalent to running:
45
46 ```console
47 $ briefcase update
48 $ briefcase build
49 ```
50
51 ### `-r` / `--update-requirements`
52
53 Update application requirements before building. Equivalent to running:
54
55 ```console
56 $ briefcase update -r
57 $ briefcase build
58 ```
59
60 ### `--update-resources`
61
62 Update application resources such as icons before building. Equivalent to running:
63
64 ```console
65 $ briefcase update --update-resources
66 $ briefcase build
67 ```
68
69 ### `--update-support`
70
71 Update application support package before building. Equivalent to running:
72
73 ```console
74 $ briefcase update --update-resources
75 $ briefcase build
76 ```
77
78 ### `--update-stub`
79
80 Update stub binary before building. Equivalent to running:
81
82 ```console
83 $ briefcase update --update-stub
84 $ briefcase build
85 ```
86
87 ### `--test`
88
89 Build the app in test mode in the bundled app environment. Running `build --test` will also cause an update to ensure that the packaged application contains the current test code. To prevent this update, use the `--no-update` option.
90
91 If you have previously run the app in "normal" mode, you may need to pass `-r` / `--update-requirements` the first time you build in test mode to ensure that your testing requirements are present in the test app.
92
93 ### `--no-update`
94
95 Prevent the automated update of app code that is performed when specifying by the `--test` option.
96
97 ### `--debug <debugger>`
98
99 Install the selected debugger into the bundled app.
100
101 Briefcase provides a [plugin interface][debugger-interface] that allows third-party debugger integrations. Currently the following debuggers are supported:
102
103 - `pdb`: This is used for debugging via console (see [Debug via PDB][debug-pdb])
104 - `debugpy`: This is used for debugging via VS Code (see [Debug via VS Code][debug-vscode])
105
106 If calling only `--debug` without selecting a debugger explicitly, `pdb` is used as default.
107
108 This is an **experimental** new feature, that is currently only supported on Windows, macOS, iOS and Android.
109
110 This option may slow down the app a little bit.
111
112 If you have previously run the app in "normal" mode, you may need to pass `-r` / `--update-requirements` the first time you build in debug mode to ensure that the debugger is embedded in your bundled app.
113
114 The selected debugger in `build --debug <debugger>` has to match the selected debugger in `run --debug <debugger>`.