picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.66k stars 333 forks source link

How to publish/pack application for Linux #1894

Open zejtin opened 3 years ago

zejtin commented 3 years ago

Hello people,

I'm wondering how to publish Eto application to DEB or tag.gz file for Linux? Like with dependencies to dotnet runtime etc.

Specifications

cwensley commented 3 years ago

I have been looking into the same. Now that I've finished getting .dmg's built for macOS, I'm looking into Linux and Windows packaging.

For linux, I'm looking at this as a reference for packaging eto apps.

I'm not sure about the dotnet runtime dependency, but at the least you could publish your app with the .net runtime included by adding <SelfContained>true</SelfContained> to your .csproj.

InfinityGhost commented 3 years ago

That's something you'd really have to do yourself. Different distributions handle things in different ways, so its typically necessary to maintain those packages manually. In the case of Debian/Ubuntu dependencies, those aren't included in the deb package itself, they're fetched at install time by aptitude.

Check out my packaging scripts I use for packaging releases for my graphics tablet driver that uses Eto as its UI framework.

InfinityGhost commented 3 years ago

I'm not sure about the dotnet runtime dependency, but at the least you could publish your app with the .net runtime included by adding true to your .csproj.

You really shouldn't publish self contained on Linux, the runtime should instead be installed as a dependency of the application's package. This reduces waste of space in the case that multiple .NET applications are installed on the same system, and ensures the runtime is always running the latest security updates.

cwensley commented 3 years ago

@InfinityGhost I agree about that, however afaik the .NET Core runtime is not available by default on most distros without adding additional sources..

InfinityGhost commented 3 years ago

@InfinityGhost I agree about that, however afaik the .NET Core runtime is not available by default on most distros without adding additional sources..

Realistically I still don't believe that justifies not using the package. Only distributions I'm aware of that require some sort of additional source package is Debian, Fedora, and openSUSE. Arch Linux, CentOS, RHEL, and NixOS for example already have dotnet in their package repositories.

There's really no perfect way to go about that, but the proper Linux way is that it should be up to the system administrator to resolve those missing dependencies.

cwensley commented 3 years ago

@InfinityGhost fair enough, that make sense. I appreciate your feedback and the samples you pointed to. It really helps!

I think I might at least make the default depend on the dotnet package, unless you set it as self contained explicitly given your suggestions.

Miepee commented 2 years ago

Some more ressources that also might be useful if you don't mind shipping the .net runtime: Appimages: https://github.com/AppImage/AppImageKit/wiki/Bundling-.NET-Core-apps Flatpaks: https://docs.flatpak.org/en/latest/first-build.html