Enjoy Snap pacakge for kylin-video on Ubuntu and Ubuntu Kylin!
Snaps are containerised software packages that are simple to create and install. They could auto-update and are safe to run. Forthermore, because they bundle their dependencies, they could w
Snaps are containerised software packages that are simple to create and install. They could auto-update and are safe to run. Forthermore, because they bundle their dependencies, they could work on all major Linux systems without modification.
Kylin Video is the default video player on Ubuntu Kylin, which utilizes MPV and MPlayer as background play engine. Kylin Video supports most of the audio and video formats, with a professional user interface. It supports both x86 and ARM platform.
We are going to show you how to snap kylin-video on Ubuntu/Ubuntu Kylin 16.04 which is the recommend platforms.
First, get the source code of kylin-video from github:
Then, install the command line tool snapcraft and build tools:
Then, Use snapcraft to generate the template snapcraft.yaml file which describe the entire build process for a snap:
Modify the name, version, summary entries to fit our case:
For the convenience of testing, we set grade to devel, and confinement to devmode, and after everything works fine, we change it to stable and strict。
The “apps” YAML subsection exposes apps and daemon from your package to the host system, declares their permissions and run conditions.
In this case, we have a app “kylin-video” and we launch our app by “desktop-launch” program. All GUI applications need to use desktop-launch so that the application is granted the necessary access to the desktop.
The “plugs” represent the list of interfaces the app should have access to. For example, “home” means your app can access non-hidden files in user's $HOME and gvfs mounted directories owned by the user to read/write/lock. “network” means your app can access the network as a client. For more details please refer to：https://docs.snapcraft.io/core/interfaces
The “parts” YAML subsection declares individual pieces of code to be imported – and possibly built or modified – in your snap at packaging time.
“plugin” tell snapcraft how to build kylin-video and “source” point to the location of source code.
“build-packages” list the packages to install on the build host before building the part.
“stage-packages” list the packages to be downloaded and unpacked to join the part before it’s build.
“after” make sure it build “desktop-qt5” which is the necessary part of Qt-based applications before build kylin-video.
Now, you can build your snap from the project directory by running snapcraft:
and install it:
you can use the “snap info” command to get more details about it:
Finally, you can launch it:
Congratulations, you’ve just made a snap, and you can obtain more knowledge from snapcraft.io.