Merge lp:~lkundrak/kicad/appstream-data into lp:kicad/product

Proposed by Lubomir Rintel
Status: Needs review
Proposed branch: lp:~lkundrak/kicad/appstream-data
Merge into: lp:kicad/product
Diff against target: 90 lines (+57/-0)
2 files modified
CMakeLists.txt (+7/-0)
resources/linux/appdata/kicad.appdata.xml (+50/-0)
To merge this branch: bzr merge lp:~lkundrak/kicad/appstream-data
Reviewer Review Type Date Requested Status
Chris Pavlina Needs Information
Review via email: mp+293391@code.launchpad.net

Description of the change

Add AppStream metadata

This will ensure KiCad will be easily installable from the app stores such as
GNOME Software.

The screenshots probably need a better home. Not that it would matter
too much -- the Linux distributions do cache them with their feeds, so
the app store applications don't access them from this source directly.

Screenshots from the web [1] can't be used since they are too large for use
in the app store application. :(

To post a comment you must log in.
Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

Looks mostly good. Could you make or address a couple changes?

1. Why is the component type "addon"? Seems to me it should be "desktop".
2. Please update the copyright line to reflect the format used throughout the source tree:

    Copyright (C) 2016 Author <email>
    Copyright (C) 2016 KiCad Developers.

Note that the source tree currently uses "KiCad Developers, see CHANGELOG.TXT for contributors." but CHANGELOG.TXT is woefully out of date - I'm going to prod the dev mailing list about that shortly.

It seems to me we can just keep the screenshots in the source tree exactly how you're doing, and just rewrite the .xml to refer to them under github.com/kicad. I don't have an issue with where you've put them.

review: Needs Information
Revision history for this message
Lubomir Rintel (lkundrak) wrote :

On Fri, 2016-04-29 at 12:27 +0000, Chris Pavlina wrote:
> Review: Needs Information
>
> Looks mostly good. Could you make or address a couple changes?
>
> 1. Why is the component type "addon"? Seems to me it should be
> "desktop".

Whoops. Fixed; I would've expected validate to complain.

> 2. Please update the copyright line to reflect the format used
> throughout the source tree:
>
>     Copyright (C) 2016 Author <email>
>     Copyright (C) 2016 KiCad Developers.

The Copyright line was added because appstream-util suggested it should
be there. No need for the Author line I guess; it can easily go out of
date when people edit the file and it's kept in the commit history
anyway.

> It seems to me we can just keep the screenshots in the source tree
> exactly how you're doing, and just rewrite the .xml to refer to them
> under github.com/kicad. I don't have an issue with where you've put
> them.

Okay; done.

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

> > 2. Please update the copyright line to reflect the format used
> > throughout the source tree:
> >
> > Copyright (C) 2016 Author <email>
> > Copyright (C) 2016 KiCad Developers.
>
> The Copyright line was added because appstream-util suggested it should
> be there. No need for the Author line I guess; it can easily go out of
> date when people edit the file and it's kept in the commit history
> anyway.

Understood about the Author line, but the project standards require it anyway; it's a pretty standard thing as source files can become separated from revision history.

Thanks for editing. I'm going to wait to merge it until I hear back from the Head Dude about CHANGELOG.TXT, though - obviously this file shouldn't reference CHANGELOG.TXT, but current policy requires it.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

I do not like the idea of adding the screenshots to the source code. I'll see if I can get one of our website devs to change the screenshot sizes or create an alternate page with the appropriately sized screenshots. I'm assuming that you can link to them in the appdata xml file. What is the preferred appdata screenshot size?

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

Screenshots under kicad-pcb.org ought to be just fine as well, if we can decide on a size I can submit a pullreqeust on the kicad-website repository, that way the website maintainers can just merge it.

Interestingly freedesktop does not give a preferred size, only a *minimum*. What is "too large"?

From https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#sect-Quickstart-DesktopApps:

"All screenshots should have a 16:9 aspect ratio, and should have a width that is no smaller than 620px (software center applications will be able to fill in the screenshots in the space they provide for that more easily then)."

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

On 4/29/2016 9:43 AM, Chris Pavlina wrote:
> Screenshots under kicad-pcb.org ought to be just fine as well, if we can decide on a size I can submit a pullreqeust on the kicad-website repository, that way the website maintainers can just merge it.
>
> Interestingly freedesktop does not give a preferred size, only a *minimum*. What is "too large"?
>
>>From https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#sect-Quickstart-DesktopApps:
>
> "All screenshots should have a 16:9 aspect ratio, and should have a width that is no smaller than 620px (software center applications will be able to fill in the screenshots in the space they provide for that more easily then)."
>

I didn't bother to check the aspect ratio of the screenshots on the
website but I'm guessing they will need to be changed. The reason I
asked about the size is @Lubomir's original statement says "Screenshots
from the web [1] can't be used since they are too large for use in the
app store application. :(". In any event, I would prefer that the
screenshots not be in the source repo.

Revision history for this message
Lubomir Rintel (lkundrak) wrote :

On Fri, 2016-04-29 at 13:37 +0000, Wayne Stambaugh wrote:
> I do not like the idea of adding the screenshots to the source code.

Not sure what's your reason for that; but projects commonly do that.
The requirements for hosting the files are not too high -- the
distributions cache the screenshots; to there are no particular
requirements for latency or bandwith or even availability.

No the other hands, screenshots on web sites are commonly used too;
it's just sometimes a bigger hassle for the developers to update them.

>  I'll see if I can get one of our website devs to change the
> screenshot sizes or create an alternate page with the appropriately
> sized screenshots.  I'm assuming that you can link to them in the
> appdata xml file.  What is the preferred appdata screenshot size?

Here's the formal requirements:

https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#qsr-app-screenshots-info

In general:
* 16:9. 800px wide is known to look okay. Bigger screenshots (such as ones that look fine on website) might be scaled down too much
* Take the screenshot with stock Gtk+. No distro patches & themes
* No desktop & borders

The whole point is to have a screenshot that looks good in the app
store, which tends to look like this:

https://people.freedesktop.org/~lkundrak/gnomesw.png

Note the size and the shape of the screenshot.

Lubo

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

On 4/29/2016 10:06 AM, Lubomir Rintel wrote:
> On Fri, 2016-04-29 at 13:37 +0000, Wayne Stambaugh wrote:
>> I do not like the idea of adding the screenshots to the source code.
>
> Not sure what's your reason for that; but projects commonly do that.
> The requirements for hosting the files are not too high -- the
> distributions cache the screenshots; to there are no particular
> requirements for latency or bandwith or even availability.

It's redundant and the screenshots of the KiCad UI changes are more
likely to be kept up to day on the KiCad website than in the source repo.

>
> No the other hands, screenshots on web sites are commonly used too;
> it's just sometimes a bigger hassle for the developers to update them.

Our website devs have been doing a great job of supporting the source
dev needs so I'm confident that this will not be an issue.

>
>> I'll see if I can get one of our website devs to change the
>> screenshot sizes or create an alternate page with the appropriately
>> sized screenshots. I'm assuming that you can link to them in the
>> appdata xml file. What is the preferred appdata screenshot size?
>
> Here's the formal requirements:
>
> https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#qsr-app-screenshots-info
>
> In general:
> * 16:9. 800px wide is known to look okay. Bigger screenshots (such as ones that look fine on website) might be scaled down too much
> * Take the screenshot with stock Gtk+. No distro patches & themes
> * No desktop & borders
>
> The whole point is to have a screenshot that looks good in the app
> store, which tends to look like this:
>
> https://people.freedesktop.org/~lkundrak/gnomesw.png
>
> Note the size and the shape of the screenshot.
>
> Lubo
>

Revision history for this message
Lubomir Rintel (lkundrak) wrote :

On Fri, 2016-04-29 at 14:27 +0000, Wayne Stambaugh wrote:
> On 4/29/2016 10:06 AM, Lubomir Rintel wrote:
> >
> > On Fri, 2016-04-29 at 13:37 +0000, Wayne Stambaugh wrote:
> > >
> > > I do not like the idea of adding the screenshots to the source
> > > code.
> > Not sure what's your reason for that; but projects commonly do
> > that.
> > The requirements for hosting the files are not too high -- the
> > distributions cache the screenshots; to there are no particular
> > requirements for latency or bandwith or even availability.
> It's redundant and the screenshots of the KiCad UI changes are more
> likely to be kept up to day on the KiCad website than in the source
> repo.

I don't think it's redundant; the screenshots you'd like to display on
your website are probably different than what should be in the
AppStream.

On website there are screenshots showing off different platforms for a
good reason; whereas that's something that's prohibited in appdata and
would break validation. Similarly, the appstream screenshots look good
in the app store, but are probably inconveniently small for a web site.

>
> >
> >
> > No the other hands, screenshots on web sites are commonly used too;
> > it's just sometimes a bigger hassle for the developers to update
> > them.
> Our website devs have been doing a great job of supporting the source
> dev needs so I'm confident that this will not be an issue.
>
> >
> >
> > >
> > >  I'll see if I can get one of our website devs to change the
> > > screenshot sizes or create an alternate page with the
> > > appropriately
> > > sized screenshots.  I'm assuming that you can link to them in the
> > > appdata xml file.  What is the preferred appdata screenshot size?
> > Here's the formal requirements:
> >
> > https://www.freedesktop.org/software/appstream/docs/chap-Quickstart
> > .html#qsr-app-screenshots-info
> >
> > In general:
> > * 16:9. 800px wide is known to look okay. Bigger screenshots (such
> > as ones that look fine on website) might be scaled down too much
> > * Take the screenshot with stock Gtk+. No distro patches & themes
> > * No desktop & borders
> >
> > The whole point is to have a screenshot that looks good in the app
> > store, which tends to look like this:
> >
> > https://people.freedesktop.org/~lkundrak/gnomesw.png
> >
> > Note the size and the shape of the screenshot.
> >
> > Lubo
> >
>

Revision history for this message
Lubomir Rintel (lkundrak) wrote :

Happy first birthday, this bug report. Let's see if we can move this forward...

> Our website devs have been doing a great job of supporting the source
> dev needs so I'm confident that this will not be an issue.

Submitted some screenshots their way: https://github.com/KiCad/kicad-website/pull/197

Revision history for this message
Lubomir Rintel (lkundrak) wrote :

A new merge request, now in Git: https://code.launchpad.net/~lkundrak/kicad/+git/kicad/+merge/323027

No idea how do I close this one without loosing the history.

Unmerged revisions

6715. By Lubomir Rintel

Add AppStream metadata

This will ensure KiCad will be easily installable from the app stores such as
GNOME Software.

The screenshots probably need a better home. Not that it would matter
too much -- the Linux distributions do cache them with their feeds, so
the app store applications don't access them from this source directly.

Screenshots from the web [1] can't be used since they are too large for use
in the app store application. :(

[1] http://kicad-pcb.org/discover/screenshots/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2016-04-05 17:56:01 +0000
3+++ CMakeLists.txt 2016-04-29 13:06:24 +0000
4@@ -725,6 +725,7 @@
5 set( UNIX_MIME_FILES ${UNIX_MIME_DIR}/mime )
6 set( UNIX_ICON_FILES ${UNIX_MIME_DIR}/icons )
7 set( UNIX_APPLICATIONS_FILES ${UNIX_MIME_DIR}/applications )
8+ set( UNIX_APPDATA_FILES resources/linux/appdata )
9
10 # Install Mimelnk directory
11 install( DIRECTORY ${UNIX_MIMELNK_FILES}
12@@ -749,6 +750,12 @@
13 DESTINATION ${CMAKE_INSTALL_PREFIX}/share
14 COMPONENT resources
15 )
16+
17+ # Install AppStream directory (app store entry)
18+ install( DIRECTORY ${UNIX_APPDATA_FILES}
19+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share
20+ COMPONENT resources
21+ )
22 endif()
23
24 #include( CTest )
25
26=== added directory 'resources/linux/appdata'
27=== added file 'resources/linux/appdata/kicad.appdata.xml'
28--- resources/linux/appdata/kicad.appdata.xml 1970-01-01 00:00:00 +0000
29+++ resources/linux/appdata/kicad.appdata.xml 2016-04-29 13:06:24 +0000
30@@ -0,0 +1,50 @@
31+<?xml version="1.0" encoding="UTF-8"?>
32+<!-- Copyright (C) 2016 Lubomir Rintel <lkundrak@v3.sk> -->
33+<!-- Copyright (C) 2016 KiCad Developers. -->
34+<component type="desktop">
35+ <id>kicad.desktop</id>
36+ <name>KiCad</name>
37+ <project_license>GPL-2.0+</project_license>
38+ <metadata_license>CC0-1.0</metadata_license>
39+ <summary>EDA Suite</summary>
40+
41+ <keywords>
42+ <keyword>KiCad</keyword>
43+ <keyword>EDA</keyword>
44+ <keyword>PCB</keyword>
45+ <keyword>Schema</keyword>
46+ <keyword>PcbNew</keyword>
47+ <keyword>Eeschema</keyword>
48+ </keywords>
49+
50+ <description>
51+ <p>A Cross Platform and Open Source Electronics Design Automation Suite.</p>
52+ <p>The programs handle Schematic Capture, and PCB Layout with Gerber output.</p>
53+ </description>
54+
55+ <screenshots>
56+ <screenshot type="default">
57+ <image width="800" height="450">https://raw.githubusercontent.com/kicad/kicad-source-mirror/master/resources/linux/screenshots/kicad.png</image>
58+ </screenshot>
59+
60+ <screenshot type="default">
61+ <caption>Eeschema Schematic Editor</caption>
62+ <image width="800" height="450">https://raw.githubusercontent.com/kicad/kicad-source-mirror/master/resources/linux/screenshots/kicad-schema.png</image>
63+ </screenshot>
64+
65+ <screenshot type="default">
66+ <caption>PcbNew PCB Layout</caption>
67+ <image width="800" height="450">https://raw.githubusercontent.com/kicad/kicad-source-mirror/master/resources/linux/screenshots/kicad-pcbnew.png</image>
68+ </screenshot>
69+
70+ <screenshot type="default">
71+ <caption>PcbNew 3D Viewer</caption>
72+ <image width="800" height="450">https://raw.githubusercontent.com/kicad/kicad-source-mirror/master/resources/linux/screenshots/kicad-3d.png</image>
73+ </screenshot>
74+ </screenshots>
75+
76+ <url type="homepage">http://kicad-pcb.org/</url>
77+ <url type="bugtracker">http://kicad-pcb.org/help/report-a-bug/</url>
78+ <update_contact>kicad-developers@lists.launchpad.net</update_contact>
79+ <developer_name>The KiCad Developers</developer_name>
80+</component>
81
82=== added directory 'resources/linux/screenshots'
83=== added file 'resources/linux/screenshots/kicad-3d.png'
84Binary files resources/linux/screenshots/kicad-3d.png 1970-01-01 00:00:00 +0000 and resources/linux/screenshots/kicad-3d.png 2016-04-29 13:06:24 +0000 differ
85=== added file 'resources/linux/screenshots/kicad-pcbnew.png'
86Binary files resources/linux/screenshots/kicad-pcbnew.png 1970-01-01 00:00:00 +0000 and resources/linux/screenshots/kicad-pcbnew.png 2016-04-29 13:06:24 +0000 differ
87=== added file 'resources/linux/screenshots/kicad-schema.png'
88Binary files resources/linux/screenshots/kicad-schema.png 1970-01-01 00:00:00 +0000 and resources/linux/screenshots/kicad-schema.png 2016-04-29 13:06:24 +0000 differ
89=== added file 'resources/linux/screenshots/kicad.png'
90Binary files resources/linux/screenshots/kicad.png 1970-01-01 00:00:00 +0000 and resources/linux/screenshots/kicad.png 2016-04-29 13:06:24 +0000 differ