News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Simutrans 111.3 linux deb (for Ubuntu, Debian, Mint)

Started by Vonjo, July 02, 2012, 08:35:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vonjo

(I'm not sure where to put this post.)

Here is the deb package file of Simutrans 111.3 release for Debian and its derivatives (Ubuntu, Linux Mint). It includes pak64. (111.3 release hasn't been available in the official sid repository when I write this).

This deb package is created using the official linux binary release, instead of compiled from source (with Debian patches), to avoid problem with online game. Therefore, there is only i386 release.

In Ubuntu, it can be installed by double clicking the deb file from file manager (eg Nautilus or Dolphin). Then it will launch Ubuntu Software Center or whatever package manager/installer available. It will automatically install depedencies. If not, try to right click the deb file and click 'Run as Ubuntu Software Center'. If no package installer available, install gdebi, then right click the deb file from file manager and click 'Run as GDebi'.

Simutrans will be installed in /usr/share/games/simutrans.
I'm not sure with the list of depedencies, please check it.
It should work with x86_64 too, but I haven't tested it.
If you have ever installed Simutrans from the official repository, you can optionally rename ~/.simutrans to ~/simutrans so it will not be hidden.

Download: http://db.tt/1QNq6Avc
Try and test it. Enjoy.  :)
Other pakset might come later.

prissi

Thank you very much. Do you have the source for this? It would be very interesting to release own debs (or via nightly builds).

The standard Debian separates game binaries and all other settings/paks. Otherwise pak install by pak-set manager and deb will install the same twice.

Moreover, as written in the german forum, you can use this also for x64, you just have to add "ia32-libs" as dependency. But judging you post, you already did?

jamespetts

It would be splendid to have regular .deb builds for Simutrans. Do you think that this could go on www.getdeb.net or into an official repository somewhere, perhaps for Ubuntu as well as the main Debian line?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

Simutrans is already into the official debian distribution; even the build for other architecture (Simutrans for instance runs well on the ARM device rasberry PI, the $25 computer ... )

Vonjo

Yes, Simutrans, pak64, and pak128.Britain have been available in the official Debian repository. However, it takes time to update when new simutrans version released.
But we may need to make .deb package for other pakset and Simutrans-Experimental.

Quote from: prissi on July 02, 2012, 09:35:04 PM
Thank you very much. Do you have the source for this? It would be very interesting to release own debs (or via nightly builds).
What source? I didn't even compile Simutrans. I just use the official binary from Sourceforge. But if you mean .dsc source package, maybe I'll try that later, if it is required.

Creating .deb package from binary build is easy. It should be scriptable, so we should be able make nightly deb too. I can explain how to do that, but I not sure to make the script.

Quote from: prissi on July 02, 2012, 09:35:04 PM
The standard Debian separates game binaries and all other settings/paks. Otherwise pak install by pak-set manager and deb will install the same twice.
Indeed, it should be packaged that way. But for now, I just want to make it easy for people to try and install it. If it works fine, it will be separated, just like in the official repo.
In my current .deb, simutrans-pak64 and simutrans-data are listed as conflict, so don't worry about duplicates.

Maybe I missed something, what is pak-set manager? How to use it?

Quote from: prissi on July 02, 2012, 09:35:04 PM
Moreover, as written in the german forum, you can use this also for x64, you just have to add "ia32-libs" as dependency. But judging you post, you already did?
No, I haven't tried it, but I know it is possible.

---

I think we need a new icon. The icon in the official repository is outdated. I'd like to have a new icon with 256x256px (current linux desktop manager usually display big icons).

prissi

Define "current Unix Desktop Manager" ... If this could be done with a single file, I would happily provide it. However, there seems each window manager and distribution has their own rules, lst time I checked (which is not so recent I confer).

And if you have the source to built the deb (the text input) making a script for the actual built is rather trivial.

Vonjo

Quote from: prissi on July 03, 2012, 12:31:57 PM
Define "current Unix Desktop Manager" ... If this could be done with a single file, I would happily provide it. However, there seems each window manager and distribution has their own rules, lst time I checked (which is not so recent I confer).
A png and xpm images should be enough for icon.

Quote from: prissi on July 03, 2012, 12:31:57 PM
And if you have the source to built the deb (the text input) making a script for the actual built is rather trivial.
Creating binary deb packages can be done by simply a line of command.

1. You can use my setup ( http://db.tt/m6fSxF9k ) to start. Extract it. (You can learn its contents and do some modification there. Note that /DEBIAN/control file is the most important file in deb package.)
2. To create DEB package from the extracted files above, run :

fakeroot dpkg-deb -b /path/to/the/extracted/directory/above

Done.

This article maybe outdated, but still works.
http://tldp.org/HOWTO/html_single/Debian-Binary-Package-Building-HOWTO/

kierongreen

I would keep the path compatibility with existing debian installations (this is what I do for my own builds). I notice you mention this, but are you using the the debian patches:

--- simutrans.orig/simmain.cc
+++ simutrans/simmain.cc
@@ -446,8 +446,9 @@
       strcat( umgebung_t::program_dir, path_sep );
    }
    else {
-      strcpy( umgebung_t::program_dir, argv[0] );
-      *(strrchr( umgebung_t::program_dir, path_sep[0] )+1) = 0;
+      // strcpy( umgebung_t::program_dir, argv[0] );
+      // *(strrchr( umgebung_t::program_dir, path_sep[0] )+1) = 0;
+      strcpy(umgebung_t::program_dir, "/usr/share/games/simutrans/");

       chdir( umgebung_t::program_dir );
    }

and

--- simutrans.orig/simsys.cc
+++ simutrans/simsys.cc
@@ -39,7 +39,7 @@
#elif defined __APPLE__
    sprintf(buffer, "%s/Library/Simutrans", getenv("HOME"));
#else
-   sprintf(buffer, "%s/simutrans", getenv("HOME"));
+   sprintf(buffer, "%s/.simutrans", getenv("HOME"));
#endif

    dr_mkdir(buffer);


or some other method? These won't prevent compatibility with other simutrans installs in online games and will mean that existing debian users can upgrade easily.

Vonjo

I don't apply that patch, but it should be compatible with debian's path. The only difference is that simutrans executable binary in my DEB is placed in /usr/share/games/simutrans/ instead of /usr/games/. In my DEB, /usr/games/simutrans can be a shell-script which call simutrans in /usr/share/games/simutrans/ (However, I didn't put the script into the deb file above. But I will update it later). I think it should be okay, so I don't need the first patch. I got a lot of problem with the first patch.

As with the second patch, Linux usually treats ~/.simutrans (hidden directory) and ~/simutrans as the same directory, doesn't it?

kierongreen

QuoteAs with the second patch, Linux usually treats ~/.simutrans (hidden directory) and ~/simutrans as the same directory, doesn't it?
Not that I know of? I'm not an expert on these things but as far as I was aware they are treated completely differently.

What problems did you get with first patch?

jamespetts

It would b
Quote from: Vonjo on July 03, 2012, 10:53:17 AM
Yes, Simutrans, pak64, and pak128.Britain have been available in the official Debian repository. However, it takes time to update when new simutrans version released.
But we may need to make .deb package for other pakset and Simutrans-Experimental.

It would be splendid to have one for Experimental. Is there anything that I can do to assist in preparing one?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vonjo

Quote from: kierongreen on July 03, 2012, 08:37:38 PM
What problems did you get with first patch?
I'm not sure. I think it is just the problem with my setup, but the patch doesn't work well for me. I'm still working with it.
Besides, with that patch, simutrans' files must be installed in /usr/share/games/simutrans/. Without that patch, I can manually extract the deb package and run Simutrans in any directory I want. I know I am weird, but thats how I install Google Chrome in the past. ;-p

Quote from: jamespetts on July 04, 2012, 12:04:05 AM
It would be splendid to have one for Experimental. Is there anything that I can do to assist in preparing one?
I'll ask if I get problem. I'm making the one for Experimental version too.

The problem is the paksets. There are a lot of paksets for Simutrans. Providing the DEB for all pakset will add another burden, whether it is for pakset maintainer or package maintainer. Even worse if we need to maintain RPM too. However, asking user to install paksets manually to /usr directory is really a bad idea and dangerous.
Maybe Simutrans need to be able to load pakset from /home directory too (e.g. ~/simutrans/paksets/pak128/). If multiuser installation is desired, we should also be able install pakset to /var directory.

jamespetts

Might I suggest including a few paksets with the distribution (say Pak128.Britaiin-Ex, Pak64.Experimental for the Experimental build and Pak64 and some choice others for Standard) for the time being?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.