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 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:
$ git clone https://github.com/ukui/kylin-video.git
Then, install the command line tool snapcraft and build tools:
$ sudo apt update
$ sudo apt install snapcraft build-essential
Then, Use snapcraft to generate the template snapcraft.yaml file which describe the entire build process for a snap:
$ cd kylin-video
$ snapcraft init
name: my-snap-name # you probably want to 'snapcraft register
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
This is my-snap's description. You have a paragraph or two to tell the
most important story about your snap. Keep it under 100 words though,
we live in tweetspace and your description wants to look good in the snap
store.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
parts:
my-part:
# See 'snapcraft plugins'
plugin: nil
Modify the name, version, summary entries to fit our case:
name: kylin-video
version: "1.1.6"
summary: Kylin Video
description: |
Qt5 Mplayer and MPV front-end, with basic features like playing
videos and audios to more advanced features. It supports both x86
and ARM platform, and supports most of the audio and video formats.
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。
grade: devel
confinement: devmode
The “apps” YAML subsection exposes apps and daemon from your package to the host system, declares their permissions and run conditions.
apps:
kylin-video:
command: desktop-launch kylin-video
plugs: [home, unity7, network, network-binding, desktop, pulseaudio, x11]
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.
parts:
kylin-video:
plugin: qmake
source: .
qt-version: qt5
build-packages:
- g++
- qtbase5-dev
- qt5-qmake
- qtscript5-dev
- qttools5-dev-tools
- zlib1g-dev
stage-packages:
- libc6
- libgcc1
- libqt5core5a
- libqt5gui5
- libqt5network5
- libqt5widgets5
- libstdc++6
- zlib1g
- mplayer
- mpv
- mesa-vdpau-drivers
- libxcb1
- libglu1-mesa
- freeglut3
- libgpm2
- qttranslations5-l10n
after: [desktop-qt5]
“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:
$ snapcraft
and install it:
$ sudo snap install kylin-video_1.1.6_amd64.snap --devmode
you can use the “snap info” command to get more details about it:
$ snap info kylin-video
name: kylin-video
summary: Kylin Video
publisher:
license: unknown
description: |
Qt5 Mplayer and MPV front-end, with basic features like playing
videos and audios to more advanced features. It supports both x86
and ARM platform, and supports most of the audio and video formats.
commands:
- kylin-video
refresh-date: yesterday at 20:03 CST
installed: 1.1.6 (x2) 149MB -
Finally, you can launch it:
$ kylin-video
Congratulations, you’ve just made a snap, and you can obtain more knowledge from snapcraft.io.
-
Ubuntu One Files service is about to stop , Ubuntu Kylin joint Kingsoft KUAI PAN TO Relay[2014/04/06]
-
YHKylin Operating System Community Version 4.0.2-SP2 Has Released Officially![2017/12/22]
-
Upcoming UbuntuKylin activity “find bugs”[2013/11/19]
-
Ubuntu Kylin 14.04 enhanced version released, out of the box![2014/07/04]
-
Ubuntu Kylin 18.10 Final Now Available for Download![2018/10/19]
-
Ubuntu Kylin 24.10 officially released[2024/10/11]
-
Ubuntu Kylin 18.04.4 LTS Version Released![2020/02/14]
-
Faster, More Stable And More Efficient! Ubuntu Kylin 20.04 Pro SP1 officially Release[2021/12/31]
-
Ubuntu Kylin 21.04 Release Notes[2021/05/27]
-
Ubuntu Kylin 22.04 LTS officially released - UKUI 3.1 starts a new experience![2022/04/24]
-
Countdown : Windowx XP Stop Update Service[2014/03/23]
-
Ubuntu/Ubuntu Kylin 19.10 Alpha Summer Camp[2019/08/24]
-
Ubuntu awarded W3Techs operating system champion of 2013[2014/01/07]
-
[News] Kingsoft Kuaipan for UbuntuKylin Beta version released today[2019/08/16]
-
Ubuntu Kylin 2014 ready to go[2013/12/25]
-
A New Feature of Ubuntu Kylin 18.10:biometrics[2019/09/27]
-
【System Update V2】Ubuntu Kylin 20.04 LTS Version Weekly Report[2020/05/21]