Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions snap/gui/musescore.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[Desktop Entry]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick note for anybody who might decide to pick this up. This file is basically the same as build/Linux+BSD/mscore.desktop.in with just a few slight (but important) differences. The two files should probably be combined into a single file, with those differences inserted at build time by CMake.

Version=1.1
Name=MuseScore
GenericName=Music notation
GenericName[de]=Notensatz
GenericName[fr]=Notation musicale
Comment=Create, play and print sheet music
Comment[ru]=Визуальный редактор нотных партитур
Comment[fr]=Gravure de partitions musicales
Copy link
Contributor

@ecstrema ecstrema Mar 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would say "Engravure de partitions musicales"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same 'mistake' as in build/Linux+BSD/mscore.desktop.in

Exec=musescore.mscore %F
Icon=${SNAP}/usr/share/icons/hicolor/scalable/apps/mscore.svg
StartupNotify=true
Terminal=false
Type=Application
Categories=Qt;Audio;Sequencer;Midi;AudioVideoEditing;Music;AudioVideo;
MimeType=application/x-musescore;application/x-musescore+xml;application/vnd.recordare.musicxml;application/vnd.recordare.musicxml+xml;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this here is much shorter than that from build/Linux+BSD/mscore.desktop.in, why?


192 changes: 192 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
name: musescore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure anymore what is the rule for uppercasing

Copy link
Contributor

@Jojo-Schmitz Jojo-Schmitz Jan 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still "MuseScore", like further up. Not neccessarily here though I think

adopt-info: musescore
summary: Create, play and print beautiful sheet music.
description: |
MuseScore is the world's leading free and open-source software for writing
music, with a user-friendly interface and immensely powerful features.
It is free to install on Windows, Mac, and Linux.

Some interfaces need to be connected manually:

$ sudo snap connect musescore:cups-control
$ sudo snap connect musescore:alsa
$ sudo snap connect musescore:removable-media

But most of the application functionality works without them.

grade: stable
confinement: strict
base: core18

plugs: # plugs for theming, font settings, cursor and to use gtk3 file chooser
gtk-3-themes:
interface: content
target: $SNAP/data-dir/themes
default-provider: gtk-common-themes:gtk-3-themes
icon-themes:
interface: content
target: $SNAP/data-dir/icons
default-provider: gtk-common-themes:icon-themes
sound-themes:
interface: content
target: $SNAP/data-dir/sounds
default-provider: gtk-common-themes:sounds-themes

apps:
mscore:
adapter: full
command: usr/bin/mscore
command-chain:
- bin/desktop-launch
environment:
# Make this the default till Qt apps in wayland look & work better
DISABLE_WAYLAND: 1
QT_QPA_PLATFORMTHEME: gtk3
plugs:
- gsettings
- home
- network
- pulseaudio
- audio-playback
- unity7
- x11
- opengl
- cups-control
- alsa
- desktop
- wayland
- desktop-legacy
- removable-media

parts:
musescore:
source: https://github.com/musescore/MuseScore
source-type: git
plugin: make
override-build: |
make revision
QT_SELECT=qt5 snapcraftctl build
override-pull: |
snapcraftctl pull
"$SNAPCRAFT_STAGE"/scriptlets/selective-checkout \
--release-tag-prefix='v' \
--stable-tag-pattern=[[:digit:]]+$ \
--force-stable
build-packages:
#- extra-cmake-modules
#- doxygen
# From https://musescore.org/en/handbook/developers-handbook/compilation/compile-instructions-ubuntu-1604lts-and-1804lts-git
# Tools
- cmake
- g++
# Audio & others
- libasound2-dev
- portaudio19-dev
- libmp3lame-dev
- libsndfile1-dev
- libportmidi-dev
- libssl-dev
- libpulse-dev
- libfreetype6-dev
- libfreetype6
# «Failed to find "GL" in "".»
- libdrm-dev
- libgl1-mesa-dev
- libegl1-mesa-dev
# QT
- qtbase5-dev
- qttools5-dev
- qttools5-dev-tools
- qtwebengine5-dev
- qtscript5-dev
- libqt5xmlpatterns5-dev
- libqt5svg5-dev
- libqt5webkit5-dev
- qtquickcontrols2-5-dev
make-parameters:
- PREFIX=/usr
- UPDATE_CACHE=FALSE
# TODO: This shouldn't be necessary
# https://musescore.org/en/comment/884393
- BUILD_WEBENGINE=off
stage-packages:
- libqt5core5a
- libqt5gui5
- libqt5network5
- libqt5xml5
- libqt5xmlpatterns5
- libqt5svg5
- libqt5printsupport5
- libqt5webkit5
- libcanberra-gtk-module
- overlay-scrollbar-gtk2
- unity-gtk2-module
- libatk-adaptor
- libgail-common
- libmp3lame0
- libportmidi0
- libvorbis0a
- libsndfile1
- libportaudio2
- libpulse0
- libjack0
- libasyncns0
- libflac8
- qtwayland5
- libqt5help5
- libqt5sql5
# Palettes need these, see:
# https://forum.snapcraft.io/t/missing-dependency-for-musescore/14884
- qml-module-qtgraphicaleffects
- qml-module-qtquick-controls2
- qml-module-qtqml-models2
# https://musescore.org/en/node/301501#comment-980979
- qml-module-qtquick-controls
- qml-module-qtquick-dialogs
- qml-module-qt-labs-folderlistmodel
- qml-module-qt-labs-settings
after: [desktop-qt5, selective-checkout]

# Part for supporting various desktop technologies
# Refer: https://github.com/ubuntu/snapcraft-desktop-helpers/blob/master/snapcraft.yaml
desktop-qt5:
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-depth: 1
source-subdir: qt
plugin: make
make-parameters: ["FLAVOR=qt5"]
build-packages:
- build-essential
- qtbase5-dev
- dpkg-dev
stage-packages:
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libqt5gui5
- libgdk-pixbuf2.0-0
- libqt5svg5 # for loading icon themes which are svg
- try: [appmenu-qt5] # not available on core18
- locales-all
- xdg-user-dirs
- fcitx-frontend-qt5

qt5-gtk-platform:
plugin: nil
stage-packages:
- qt5-gtk-platformtheme

# Check out the tagged release revision if it isn't promoted to the stable channel
# https://forum.snapcraft.io/t/selective-checkout-check-out-the-tagged-release-revision-if-it-isnt-promoted-to-the-stable-channel/10617
selective-checkout:
plugin: nil
build-packages:
- git
stage-snaps:
- selective-checkout
prime:
- -*