Skip to content

Commit 0dc2b0a

Browse files
committed
Add application icon to snap
1 parent edab522 commit 0dc2b0a

File tree

2 files changed

+10
-21
lines changed

2 files changed

+10
-21
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ Some useful notes for the development of this application, not needed to actuall
5555

5656
### Snapcraft
5757

58-
You'll need [snapcraft](https://snapcraft.io/) to build the snap yourself, the `snapcraft.yaml` file contains the snap build instructions and can be found in the `/snap` directory. Run `snapcraft` from the project's root directory of the project, not from within the `/snap` directory, it will download the necessary dependencies and spit out the snap package. Build on 16.04 since 17.10 seems to have some problems.
58+
You'll need [snapcraft](https://snapcraft.io/) to build the snap yourself, the `snapcraft.yaml` file contains the snap build instructions and can be found in the `/snap` directory. Run `snapcraft cleanbuild` from the project's root directory of the project, not from within the `/snap` directory, it will download the necessary dependencies and spit out the snap package. You'll need [LXD](https://docs.snapcraft.io/build-snaps/build-on-lxd-docker) to build the snap with cleanbuild (it uses a container).
5959

6060
You can try out the local snap with:
6161

6262
```bash
63-
sudo snap install codav_0.1_*.snap --devmode
63+
snap install codav_0.1_*.snap --dangerous
6464
```

snap/snapcraft.yaml

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,29 @@ version: '0.1'
33
summary: Reads CODA SEPA payment XML files
44
description: |
55
An "XML message for Credit Transfer Initiation" (ISO 20022 XML) file encodes European credit transfers (SEPA) in a standard way. It's often refered to as a "CODA (Coded Statement of Account) file". It requests the movement of funds from the debtor account to a creditor. CODAv is a desktop application that understands these electronic messages and serves as a viewer to verify the contents of these files. CODAv follows the Belgian implementation guidelines as defined by the Belgian sector federation Febelfin.
6+
icon: data/codav.png
67
grade: devel # must be 'stable' to release into candidate/stable channels
78
confinement: strict
8-
architectures:
9-
- i386
10-
- amd64
119

1210
apps:
1311
codav:
14-
command: desktop-launch codav
15-
desktop: share/applications/codav.desktop
12+
command: desktop-launch $SNAP/bin/codav
13+
desktop: codav.desktop
1614
plugs:
15+
- desktop
1716
- home
1817
- x11
19-
- unity7
20-
- desktop
21-
- wayland
2218

2319
parts:
24-
gnome-3-26: # needed for Wayland
25-
plugin: nil
26-
prepare: |
27-
apt-get install software-properties-common -y
28-
add-apt-repository -y ppa:ubuntu-desktop/gnome-3-26
29-
apt-get update
30-
apt-get upgrade -yqq
31-
desktop-gtk3:
32-
after:
33-
- gnome-3-26
3420
codav:
3521
source: .
3622
plugin: cmake
3723
after:
38-
- gnome-3-26
3924
- desktop-gtk3
25+
override-build: |
26+
snapcraftctl build
27+
cp ../../../data/codav.desktop $SNAPCRAFT_PART_INSTALL/codav.desktop
28+
sed -i -e 's/Icon=codav/Icon=${SNAP}\/meta\/gui\/icon.png/' $SNAPCRAFT_PART_INSTALL/codav.desktop
4029
build-packages:
4130
- valac
4231
- libxml2-dev

0 commit comments

Comments
 (0)