Is there a way to build snap or a linux app without using snapcraft?

337

Solution 1

Yes this can be used to make a desktop app for windows mac and linux

https://github.com/go-flutter-desktop/hover

Solution 2

Your question is conflating two different steps: building an application, and packaging an application. To build a Linux application with Flutter all you need to do is run flutter build, and you'll get a release mode Linux application.

How you package it for distribution is to you; nothing about Flutter requires snaps as the distribution option. For instance, you could just zip up the contents of the bundle folder in the build output directory, and post that somewhere for people to download.

Share:
337
sonu ishaq
Author by

sonu ishaq

Winning isn't everything

Updated on November 24, 2022

Comments

  • sonu ishaq
    sonu ishaq over 1 year

    I'm using flutter dev and I wanted to enable linux support to many applications and followed this tutorial but the thing is

    Everytime I try to run snapcraft launches a VM and installs flutter again from the snap

    this uses lot of my disk space,time and internet snapcraft --use-lxd does the same

    So is there any other way to build a linux app either a deb file, appimage or anything is fine?

    Thanks.

    • Atul Chaudhary
      Atul Chaudhary over 2 years
      hey facing the same problem with snapcraft, even though i don't have any storage issue my build fails with snapcraft, my question is did you find any other way of doing it.
    • Bhikkhu Subhuti
      Bhikkhu Subhuti about 2 years
      haha.. I had the same problem
  • smorgan
    smorgan over 3 years
    Note that that's a completely different embedding with its own set of feature and bugs, separate plugin ecosystem, etc. It's not just different tooling for Flutter's desktop support.
  • smorgan
    smorgan over 2 years
    @BhikkhuSubhuti My answer has nothing to do with snap, so you seem to have posted your comment in the wrong location. The question asked was whether it's possible to build a Flutter app for Linux without using snapcraft. My answer is explaining that it is. I cannot "install a hello world app to the snap store using this method [I] describe" because what my answer is describing is not using snap.
  • Bhikkhu Subhuti
    Bhikkhu Subhuti over 2 years
    Maybe the title changed while you were away. "Is there a way to build snap or a linux app without using snapcraft?" Once I have a snap, installing to the snapstore is easy. I have done so with another app made with electron-builder. I guess you were speaking in the context of non release builds. Flutter run will do the trick to have a desktop run on linux.
  • smorgan
    smorgan over 2 years
    @BhikkhuSubhuti The title hasn't changed; "or a Linux app" is a key part of that title. See also the actual question: "So is there any other way to build a linux app either a deb file, appimage or anything is fine?" I was not speak ing in the context of non-release builds, no. I explicitly said how to build a release build in my answer. If you want to ask a question that is only about building a snap, you should post a new question to the site asking that instead of complaining that my answer to a different question doesn't tell you how to make a snap.