FLATPAK-BUILD-INIT(1)
π FLATPAK-BUILD-INIT π
okay bestie, we're doing a flatpak man page, this one's flatpak build-init from section 1 of the flatpak manual, and it's literally the "start a build dir from scratch" button. let's go π
β¨ NAME β¨
flatpak-build-init β initializes a build directory. that's it, that's the whole job, and she does it flawlessly π
πΈ SYNOPSIS πΈ
flatpak build-init [OPTION...] DIRECTORY APPNAME SDK RUNTIME [BRANCH]
π¦ DESCRIPTION π¦
So. It initializes a separate build directory. Let's break down the args, bestie, because they all matter:
DIRECTORYβ the name of the directory. that's where the magic happens.APPNAMEβ the application id of the app that will be built.SDKandRUNTIMEβ these specify the sdk and runtime that the application should be built against and run in. (yes, both, you need both, no skipping π)BRANCHβ specifies the version of sdk and runtime. optional but iconic.
It initializes a directory as a build directory which can be used as the target directory of flatpak build. It creates a metadata inside the given directory. Additionally, empty files and var subdirectories are created. little baby build dir, all set up π₯Ί
β οΈ and listen: it is an error to runbuild-initon a directory that has already been initialized as a build directory. she will NOT be doing a redo. she said no. (unless you pass--update, keep reading bestie, we get there π)
π OPTIONS π
The following options are understood β aka the whole menu, and we are NOT skimming, we're reading every single one like the good students we are πβ¨
-h,--helpβ Show help options and exit. the classic escape hatch π«Ά--arch=ARCHβ The architecture to use. Wanna know what's even available on your machine? Checkflatpak --supported-archesfor architectures supported by the host. slay, know your options.-v,--var=RUNTIMEβ Initializevarfrom the named runtime.-w,--writable-sdkβ Initialize/usrwith a copy of the sdk, which is writable duringflatpak build. This can be used if you need to install build tools in/usrduring the build. Heads up tho: this is stored in theusrsubdirectory of the app dir, but will not be part of the final app. it's giving "backstage pass, not the album" π--tag=TAGβ Add a tag to the metadata file. This option can be used multiple times. stack 'em, bestie π₯--sdk-extension=EXTENSIONβ When using--writable-sdk, in addition to the sdk, also install the specified extension. This option can be used multiple times. yes, again, as many as you want.--extension=NAME=VARIABLE[=VALUE]β Add extension point info. note the=VALUEpart is optional, iykyk π--sdk-dirβ Specify a custom subdirectory to use instead ofusrfor--writable-sdk.--updateβ Re-initialize the sdk and var, don't fail if already initialized. THIS is the one that rescues you from the "already initialized" error up there. she's forgiving after all ππ--base=APPβ Initialize the application with files from another specified application. building on someone else's shoulders, main character energy.--base-version=VERSIONβ Specify the version to use for--base. If not specified, will default to"master". (yes,"master", quoted and everything, that's the default, we don't make the rules β¨)--base-extension=EXTENSIONβ When using--base, also install the specified extension from the app. This option can be used multiple times. group chat rules: multiples allowed.--type=TYPEβ This can be used to build different types of things. The default is"app"which is a regular app, but"runtime"creates a runtime based on an existing runtime, and"extension"creates an extension for an app or runtime. three vibes, one flag π--extension-tag=EXTENSION_TAGβ If building an extension, the tag to use when searching for the mount point of the extension.--verboseβ Print debug information during command processing. nosy (affectionate) π--ostree-verboseβ Print OSTree debug information during command processing. even nosier, and honestly? respect π
π₯ EXAMPLES π₯
here's the whole thing in action, copy-paste it, live your truth:
$ flatpak build-init /build/my-app org.example.myapp org.gnome.Sdk org.gnome.Platform 3.36
see how DIRECTORY APPNAME SDK RUNTIME BRANCH line up? 3.36 is the branch, being iconic at the end π«
π§ SEE ALSO π§
the whole friend group fr fr, go read them next π«Ά
and that's a wrap!! this page came to you from flatpak, part of the FLATPAK BUILD-INIT(1) manual β go initialize something cute, and remember: no cap, read the options, --update exists, periodt πβ¨π
π¦ where this page comes from
- debian trixie: flatpak 1.16.6-1~deb13u3
- fedora 44: flatpak 1.18.4-1.fc44 Β· LGPL-2.1-or-later
- fedora 44: flatpak 1.18.4-1.fc44 Β· LGPL-2.1-or-later
- nixpkgs unstable: flatpak 1.18.4
- ubuntu stonking: flatpak 1.18.4-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms