[OLD-1] AGS engine Linux port

Started by BigMc, Sun 03/06/2012 19:04:20

Previous topic - Next topic

scottchiefbaker

While we're on the topics of builds. Is there a way to include the version number in the --help? Specifically like build date/time? Or some unique number? Right now ALL my builds say 3.21.1115.

make VERSION_STRING=foo

Something like that?

BigMc

#141
Right now you'd have to change ACI_VERSION_TEXT in Engine/main/main.h.

EDIT: But you should better not change that, because it's used to check if a game is compatible with the engine.
You can always change the help text in Engine/main/main.cpp.

EDIT2: We could include build date and time there.

scottchiefbaker

Quote from: BigMc on Mon 28/01/2013 23:20:30
EDIT2: We could include build date and time there.

Better than a build date, would be a build string. Then I could do

make BUILD_STR="3.1-TestFixes" or something to give textual information as well as a version number?

scottchiefbaker

Holy crap I think that just might work! I made up an updated standalone (distro agnostic) package of the Shivah demo:

http://www.perturb.org/tmp/shivah-demo-2013-01-28.tar.gz

This was compiled on 32 bit Fedora 18. I've tested the following distros so far:

Fedora 18 32bit
Fedora 17 64bit
Ubuntu 12.10 32bit
Linux Mint 13 32bit

And it run just fine. Anyone else want to help test, please let me know.

I renamed the ags executable shivah, so it looks more legit (better than ./ags shivah.ags) and ran in to two minor issues:

#1) It seems to ignore the acsetup.cfg, the gfxfilter isn't applied.
#2) If you run ./shivah --help the usage still says Usage: ags [<options>] [<gamefile or directory>]

Is it possible to make the usage output $0 (executable name) instead of the hardcoded string "ags"? Not a huge deal, purely cosmetic.

BigMc

#144
It does not work on Debian Wheezy, because it requires glibc 2.15 and Debian has 2.13. If it was compiled with glibc 2.13 it might work everywhere.

EDIT: Seems like it's just Fedoras Allegro that needs glibc 2.15. After deleting that (and using Debians) it works.

EDIT2: If you want to use Debians Allegro, it's here:
http://packages.debian.org/sid/liballegro4.4

But in this case, the ALSA plugin is separate,
http://packages.debian.org/sid/liballegro4.4-plugin-alsa

so the files modules.lst and alleg-alsadigi.so from there are also needed. And the environment variable ALLEGRO_MODULES must be set to specify the path. I can help with that tomorrow.

scottchiefbaker

I have a Fedora 14 box that had glibc 2.13 and Allegro 4.2 on it. I can try that. Can you post "ldd shivah" from Debian Wheezy so I have an idea what we're talking about. Is that a 32 or 64bit install?

scottchiefbaker

I don't know much C, but I can edit a Makefile. Consider this formal patch my contribution to the code:

http://www.perturb.org/tmp/ags-strip.patch

The resulting binary was ~10MB, and ~2MB after being stripped. I've been using:

Code: AGS
make clean && make all && make strip


to get my binaries. I will feel very accomplished if I can get some actual code committed, even insignificant code such as this :)

scottchiefbaker

Quote from: BigMc on Mon 28/01/2013 20:08:48
Another idea would be to use the openSUSE Build Service to provide AGS packages for all major distributions.

I like the idea of getting ags into a lot of the major Linux distros. I have some experience getting a package into the Fedora repositories.

For me this would be a secondary goal, primary being getting a generic (cross distro) ags binary I can package up for Wadjet's Linux releases. Once I get something to Wadjet I'd love to work on getting this packaged. AGS compiles quite simply, so it should be easy to package up.

BigMc

#148
Quote from: scottchiefbaker on Tue 29/01/2013 01:33:43
I have a Fedora 14 box that had glibc 2.13 and Allegro 4.2 on it. I can try that. Can you post "ldd shivah" from Debian Wheezy so I have an idea what we're talking about. Is that a 32 or 64bit install?

Don't you think it would be nicer to use Allegro 4.4? I could cook something up later if you want. 64 bit.

Quote from: scottchiefbaker on Tue 29/01/2013 04:12:43
I like the idea of getting ags into a lot of the major Linux distros. ... AGS compiles quite simply, so it should be easy to package up.

With my Debian hat on, the main obstruction is that AGS contains a lot of external code in Engine/libsrc. I would not want to maintain these libraries separately (they mostly have no upstream anymore), but I think I would not upload AGS like that either. (And I would also wait for a stable AGS release I guess.)

EDIT: About your suggestions: Maybe create a github account and create pull requests, that way you are properly shown as the author of the changes.

EDIT2: I think I'll push a shell script that prepares everything (on Debian) to the repo in the evening. Build ags with rpath and copy libraries and their licenses to the right place etc.

Sslaxx

Ubuntu 12.10, Allegro 4.4 used to compile the latest (as of today) code... and found an odd bug with Primordia. The close-up for the generator doesn't disappear when you tell it to close. It doesn't disappear at all - moving to another room has it still there (and nothing underneath it is interactable, unless you're in the generator's location).
Stuart "Sslaxx" Moore.

BigMc

Better report that in the bug tracker (here or on github).

Crimson Wizard

Quote from: Sslaxx on Tue 29/01/2013 16:11:58
Ubuntu 12.10, Allegro 4.4 used to compile the latest (as of today) code... and found an odd bug with Primordia. The close-up for the generator doesn't disappear when you tell it to close. It doesn't disappear at all - moving to another room has it still there (and nothing underneath it is interactable, unless you're in the generator's location).
Can you provide a saved game close to that location?
Also, if you tried, did that happen to previous builds?

Sslaxx

Quote from: Crimson Wizard on Tue 29/01/2013 16:33:07
Quote from: Sslaxx on Tue 29/01/2013 16:11:58
Ubuntu 12.10, Allegro 4.4 used to compile the latest (as of today) code... and found an odd bug with Primordia. The close-up for the generator doesn't disappear when you tell it to close. It doesn't disappear at all - moving to another room has it still there (and nothing underneath it is interactable, unless you're in the generator's location).
Can you provide a saved game close to that location?
Also, if you tried, did that happen to previous builds?
Of course. I hadn't tried with previous builds of the code (or of the Linux runtime).

http://sslaxx.twu.net/tmp/PrimordiaGeneratorViewBugs.zip - there are two saves - one before, one after.
Stuart "Sslaxx" Moore.

scottchiefbaker

Quote from: Sslaxx on Tue 29/01/2013 16:11:58
Ubuntu 12.10, Allegro 4.4 used to compile the latest (as of today) code... and found an odd bug with Primordia. The close-up for the generator doesn't disappear when you tell it to close. It doesn't disappear at all - moving to another room has it still there (and nothing underneath it is interactable, unless you're in the generator's location).

I had that same problem with the demo. I didn't try the windows version, I just assumed it was a bug in the demo.

scottchiefbaker

Can you guys test my latest creation:

http://www.perturb.org/tmp/shivah-demo-2013-01-28.tar.gz

This should include a 32bit AND 64bit executable. I haven't built it against glibc 2.13, so currently Wheezy won't work, but everything else (modern) should.

Once we get a stable binary and libs/ directory, that works on multiple distros, we shouldn't need to change much. If we compile ags, and get the libs/ from it once, it's not like we'll need to do it every night. I consider the linux binary to be pretty solid, so I feel comfortable releasing with it. What do you guys think?

Crimson Wizard

There's one long-present bug with saved games, which affect only games which have odd number of animated buttons (yeah, lol). The bug itself makes saved games be incompatible with 3.21.
I finally managed to properly fix it (the previous two attempts were mistakes), but this change is still in separate branch ('develop'). Not that its critical, but if that change will eventually get to 'master', new builds will require some kind of savegame converter for the games saved in meanwhile (yes, only for those that have odd number of animated buttons).

Sort of a warning, FYC.

BigMc

Quote from: scottchiefbaker on Tue 29/01/2013 19:00:42
This should include a 32bit AND 64bit executable.

It contains just one binary and one set of libraries. That should work on most systems, because most 64 bit systems have a 32 bit libc installed. But what do you mean with 32bit AND 64bit executable?

scottchiefbaker

My bad... I posed the wrong link (to yesterday's build). Try this guy, that's from TODAY.

http://www.perturb.org/tmp/shivah-demo-2013-01-29.tar.gz

Crimson Wizard

Quote from: Sslaxx on Tue 29/01/2013 16:11:58
Ubuntu 12.10, Allegro 4.4 used to compile the latest (as of today) code... and found an odd bug with Primordia. The close-up for the generator doesn't disappear when you tell it to close. It doesn't disappear at all - moving to another room has it still there (and nothing underneath it is interactable, unless you're in the generator's location).

Fixed!

Sslaxx

Quote from: Crimson Wizard on Tue 29/01/2013 22:55:01
Quote from: Sslaxx on Tue 29/01/2013 16:11:58
Ubuntu 12.10, Allegro 4.4 used to compile the latest (as of today) code... and found an odd bug with Primordia. The close-up for the generator doesn't disappear when you tell it to close. It doesn't disappear at all - moving to another room has it still there (and nothing underneath it is interactable, unless you're in the generator's location).

Fixed!
What was the issue?
Stuart "Sslaxx" Moore.

SMF spam blocked by CleanTalk