primitive icon indicating copy to clipboard operation
primitive copied to clipboard

Add support for building snaps

Open igorljubuncic opened this issue 7 years ago • 2 comments

Hi Michael,

I've come across primitive - and I like it.

I do a lot of image processing, and I sometimes like to "artify" my images. I normally use GIMP for this, with the oilify and cartoon filters, and I think primitive is also really neat in this sense.

Now, I'd also like to consider adding support for snaps, which you probably know are cross-distro Linux software packages, supported on LTS and non-LTS Ubuntu, as well as many others distributions.

Making a snap of primitive will enable you to feature your app in the Snap Store (snapcraft.io/store), and reach a large audience of Linux users. There are also automatic updates, so that's quite handy if you want to add a new image processing algorithm and push it out there.

Here's the sequence of technicals bits needed to build snaps (locally) - you can also use a CI system or our free build system (build.snapcraft.io).

Install snapcraft - a command-line to build snaps. I used Ubuntu 18.04 LTS as the build system.

snap install snapcraft --classic --beta git clone https://github.com/igorljubuncic/primitive.git cd primitive git checkout add-snapcraft snapcraft

The last command creates a .snap file, something like primitive_1.0_amd64.snap.

This snap can be installed and tested locally with:

snap install primitive_1.0_amd64.snap --dangerous

The --dangerous flag is necessary because the snap hasn’t yet gone through the snap store review process and is not digitally signed.

The primitive command can be executed, e.g.: snap run primitive "input image" "output image".

Everything remains the same from the application behavior.

Then, you will need to complete a couple more steps to get the snap actually published in the store:

  • Register a developer account in the snap store https://snapcraft.io/account.
  • Register the primitive name in the store.

snapcraft login snapcraft register

  • Upload a built snap to the store. The store supports multiple risk levels as “channels”. Typically, the 'edge' channel is used to host the latest build from git master. Stable is for releases that have been thoroughly tested and are considered stable for production. You can also use beta and candidate channels.

snapcraft push primitive_1.0_amd64.snap --release edge

  • Test installing on a clean machine.

snap install primitive --edge

After you have completed your testing and you're happy, you can push a stable release to the stable channel, update the store page, and promote the application online. We can help there, and we'd be happy to feature your application in our store.

Thanks.

igorljubuncic avatar Dec 14 '18 16:12 igorljubuncic

Great addition. Please accept and push to snapcraft

CWharton avatar Dec 14 '18 20:12 CWharton

Hello guys, just a quick one - is there anything I can do to help here? It'd be very nice to get primitive in the snap store.

ghost avatar Mar 15 '19 10:03 ghost