The International Simutrans Forum

 

Author Topic: Snap packet  (Read 636 times)

0 Members and 1 Guest are viewing this topic.

Offline garro

  • *
  • Posts: 9
Snap packet
« on: March 28, 2019, 09:07:42 PM »
Can I produce a packet of Simutrans for the Snap packet store (snapcraft)?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9514
  • Languages: De,EN,JP
Re: Snap packet
« Reply #1 on: March 29, 2019, 01:54:10 AM »
This is allowed by the artistic license, as long as you not charge for it. But please only if you maintain it for years and update regulary, like the steam distribution.

But it does not make sense at all. Simutrans has not specific requirements beyond SDL2, which is installed on almost any system. It will run with almost any version of it. One just needs a rpm or deb package, no need to use snap. (Also snap is still mostly Ubuntu anyway, a deb or rpm is even more universal!)

Seems like I really need to change the nightly to produce a package for Linux ...

snaps make some more sense for server applications, a simutrans server together with some useful scripts may help people to set one up. (If they really fail at compile something.)
« Last Edit: March 29, 2019, 02:09:01 AM by prissi »

Offline garro

  • *
  • Posts: 9
Re: Snap packet
« Reply #2 on: March 29, 2019, 09:56:02 AM »
I will try to maintain it as long as can. When I will not be able to maintain it anymore, I will come to this forum to find if someone wants to substitute me.

Simutrans has some requirements, like sdl2, libvorbis and libflac.
Snap is actually universal. Snap packages are supported by Arch, Debian and Fedora and their derivatives, and it is easy to publish and update a snap package because you don't need to get in touch with the repository maintainers or similar. Now Simutrans is not in the Ubuntu Software (because there is not a deb neither a snap in the repositories), that is probably one of the main places Ubuntu users look up for software. And Ubuntu is one of the most used GNU/Linux distributions.

I also want to learn how to package applications and I think it's better to learn a newer technology than the old one. Once I do this, I could also think about the headless server. But for this I also need to understand how to solve https://forum.simutrans.com/index.php/topic,18884.0.html

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9514
  • Languages: De,EN,JP
Re: Snap packet
« Reply #3 on: March 29, 2019, 01:00:36 PM »
Simutrans does not require libvorbis or libflac. Actually, we use PCM code joint mono samples for most of the noises, so certainly not flac ...

Nevertheless, even those requirements are easily fullfilled with packets. Snaps have less advantages than packages, they are more like docker containers with all their runtime overhead. Since Simutrans is mostly limited by memory, increasing the memory overhead with snaps sound not like the way forward. But ok, I have probably become an old man over the years, so you can ignore me. But unless you set up an automatic building system to distribute nightly snaps, I would ask you to call you packets not official versions.

And by the way Simutrans is an Ubuntu package (actually more because of the pak sets): https://packages.ubuntu.com/search?keywords=simutrans Actually several versions are contained, which Ubuntu inherited from Debian since ages.

Offline garro

  • *
  • Posts: 9
Re: Snap packet
« Reply #4 on: March 29, 2019, 01:50:39 PM »
Oh. You are right. But there are some problems:
1: The package is not updated.
2: The game is not shown at all in the Ubuntu Software, that I don't know why, use to hide some packages. Someone should investigate this problem, because it is a pity that most people cannot know this awesome game.

About the required libraries, i say this because when I set up the snap, I had to add the dependencies to be able to run the game.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9514
  • Languages: De,EN,JP
Re: Snap packet
« Reply #5 on: March 30, 2019, 06:53:39 AM »
Simutrans in its current state needs essentially four libraries (not counting standard stuff like threading and libc).
libsdl2-2.0, libbz2-1.0, zlibc, libfreetype6
If you want to play MIDI, you may need libsdl2-mixer-2.0-0 and freepats (but not sure this works) In this case forget about libsdl2-2.0, since this is automatically installed with the mixer SDL2. That indeed may download libflac, but it should be taken care from the dependencies. If zou look at the packages, then even mor elibs depends on libSDL2 mixer https://packages.ubuntu.com/de/trusty/libsdl2-mixer-2.0-0

Hope this helps.

And to install the current version and more pak sets, here is another deb: https://forum.simutrans.com/index.php/topic,17356.0.html still maintained, even though the user is inactive on this forum
« Last Edit: March 30, 2019, 07:08:08 AM by prissi »

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5525
  • Languages: EN, NO
Re: Snap packet
« Reply #6 on: March 30, 2019, 05:06:02 PM »
I suspect that it is SDL-mixer that is pulling in these various codec libraries. Dynamically linked libraries have a tendency to grow like that.