text
stringlengths 1
372
|
|---|
<topic_start>
|
flutter snapcraft.yaml example
|
place the YAML file in your flutter
|
project under <project root>/snap/snapcraft.yaml.
|
(and remember that YAML files are sensitive to white space!)
|
for example:
|
the following sections explain the various pieces of the YAML file.
|
<topic_end>
|
<topic_start>
|
metadata
|
this section of the snapcraft.yaml file defines and
|
describes the application. the snap version is
|
derived (adopted) from the build section.
|
<topic_end>
|
<topic_start>
|
grade, confinement, and base
|
this section defines how the snap is built.
|
<topic_end>
|
<topic_start>
|
apps
|
this section defines the application(s) that exist inside the snap.
|
there can be one or more applications per snap. this example
|
has a single application—super_cool_app.
|
when a providing snap is installed, snapd will
|
generate security policy that will allow it to
|
listen on the well-known DBus name on the specified
|
bus. if the system bus is specified, snapd will also
|
generate DBus bus policy that allows ‘root’ to own
|
the name and any user to communicate with the
|
service. non-snap processes are allowed to
|
communicate with the providing snap following
|
traditional permissions checks. other (consuming)
|
snaps might only communicate with the providing
|
snap by connecting the snaps’ interface.
|
<topic_end>
|
<topic_start>
|
parts
|
this section defines the sources required to
|
assemble the snap.
|
parts can be downloaded and built automatically using plugins.
|
similar to extensions, snapcraft can use various plugins
|
(such as python, c, java, and ruby) to assist in the
|
building process. snapcraft also has some special plugins.
|
<topic_end>
|
<topic_start>
|
desktop file and icon
|
desktop entry files are used to add an application
|
to the desktop menu. these files specify the name and
|
icon of your application, the categories it belongs to,
|
related search keywords and more. these files have the
|
extension .desktop and follow the XDG desktop entry
|
specification version 1.1.
|
<topic_end>
|
<topic_start>
|
flutter super-cool-app.desktop example
|
place the .desktop file in your flutter project
|
under <project root>/snap/gui/super-cool-app.desktop.
|
notice: icon and .desktop file name must be the same as your app name in
|
yaml file!
|
for example:
|
place your icon with .png extension in your flutter
|
project under <project root>/snap/gui/super-cool-app.png.
|
<topic_end>
|
<topic_start>
|
build the snap
|
once the snapcraft.yaml file is complete,
|
run snapcraft as follows from the root directory
|
of the project.
|
to use the multipass VM backend:
|
to use the LXD container backend:
|
<topic_end>
|
<topic_start>
|
test the snap
|
once the snap is built, you’ll have a <name>.snap file
|
in your root project directory.
|
$ sudo snap install ./super-cool-app_0.1.0_amd64.snap –dangerous
|
<topic_end>
|
<topic_start>
|
publish
|
you can now publish the snap.
|
the process consists of the following:
|
<topic_end>
|
<topic_start>
|
snap store channels
|
the snap store uses channels to differentiate among
|
different versions of snaps.
|
the snapcraft upload command uploads the snap file to
|
the store. however, before you run this command,
|
you need to learn about the different release channels.
|
each channel consists of three components:
|
<topic_end>
|
<topic_start>
|
snap store automatic review
|
the snap store runs several automated checks against
|
your snap. there might also be a manual review,
|
depending on how the snap was built, and if there are
|
any specific security concerns. if the checks pass
|
without errors, the snap becomes available in the store.
|
<topic_end>
|
<topic_start>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.