RigsOfRods / ror-linux-buildscripts

Shell scripts to build Rigs of Rods git on apt based GNU/Linux systems
http://forum.rigsofrods.org/thread-21.html
16 stars 8 forks source link

Awesome scripts, Thanks!! Also, is there a way to install older versions of RoR? #5

Closed ShannonVanWagner closed 7 years ago

ShannonVanWagner commented 9 years ago

Hi, I've successfully built RoR 0.4~ on my GNU/Linux rig with these scripts and the game works great!

One problem I'm having is that the typical downloads for RoR monster trucks/tracks/etc.. are made for RoR <= 0.4. There was a change to the way the terrains are built on the RoR >= 0.4.

For example, there are many tracks available for download at sim-monsters.com, but they are for the pre-0.4 RoR. See http://sim-monsters.com/index.php?/topic/1203-kothphilly-2010/#entry113401

Is it possible to have the rigsofrods-linuxscripts build an older version of RoR? If not, I'd like to suggest it.

Otherwise, if that's too much of a hassle, do you know of some easy way to convert RoR pre-0.4 terrains to be compatible with 0.4~ ?

Thanks very much for your time and these awesome scripts!!!

Cheers!

Hiradur commented 9 years ago

Thanks for your kind words.

In theory only minor changes would be needed to compile 0.38 with these scripts. 0.38 is only available through SVN so RoRCore.sh needs to be adopted and some dependencies may need to be downgraded. I don't know to which version though. Maybe @tritonas00 can shed some light on this.

Adopting the scripts should be simple. But we are currently dedicating our time to provide a new stable release soon so I won't do it myself until it's out. Feel free to try it yourself and start a pull request.

about 0.4 and terrains:

tritonas00 commented 9 years ago

Well its really a pain to compile 0.38 now. You need old gcc (i only managed to compiled it with 4.5)

You can see the PKGBUILDS and sources i used for archlinux here: https://github.com/tritonas00/rigsofrods

Hiradur commented 9 years ago

I pushed a 0.38 branch. However, it's not finished yet. The dependencies compile fine but RoR itself doesn't. I'm going on vacation very soon and I doubt I can finish it before that. Maybe you can finish it.

This is what it looks like now:

/home/hiradur/rigs-of-rods-0.38/install/include/angelscript.h:357:77: error: invalid static_cast from type ‘<unresolved overloaded function type>’ to type ‘bool (*)(const string&, const string&) {aka bool (*)(const std::basic_string<char>&, const std::basic_string<char>&)}’
 #define asFUNCTIONPR(f,p,r) asFunctionPtr((void (*)())(static_cast<r (*)p>(f)))
                                                                             ^
/home/hiradur/rigs-of-rods-0.38/source/rigsofrods-source-0.38/source/angelscript_addons/scriptstdstring/scriptstdstring.cpp:640:86: note: in expansion of macro ‘asFUNCTIONPR’
  r = engine->RegisterObjectMethod("string", "bool opEquals(const string &in) const", asFUNCTIONPR(operator ==, (const string &, const string &), bool), asCALL_CDECL_OBJFIRST); assert( r >= 0 );
                                                                                      ^
make[2]: *** [source/angelscript_addons/CMakeFiles/angelscript_addons.dir/scriptstdstring/scriptstdstring.cpp.o] Error 1

@tritonas00 Is the Angelscript error the reason why you switched to gcc 4.5?

tritonas00 commented 9 years ago

I dont remember the errors now, but i think it was after angelscript.

Also the ppa creator for ubuntu told me that he used 4.6, but in Arch it builds only with 4.5

ShannonVanWagner commented 9 years ago

Hiradur@ - Awesome! Thanks for including the older version! I hope you have a great vacation!

I tried compling .38 but I'm getting an "incomplete type" error: /home/shannon/rigs-of-rods-0.38/source/rigsofrods-source-0.38/source/main/gui/Console.cpp: In member function ‘void Console::outputCurrentTerrainHeight()’: /home/shannon/rigs-of-rods-0.38/source/rigsofrods-source-0.38/source/main/gui/Console.cpp:987:50: error: invalid use of incomplete type ‘struct HeightFinder’ /home/shannon/rigs-of-rods-0.38/source/rigsofrods-source-0.38/source/main/RoRPrerequisites.h:130:7: error: forward declaration of ‘struct HeightFinder’

In the meantime, I'm trying .39.

Is there some code edit I can try to fix the "incomplete type" error? I'll keep plugging at it.

Cheers!

Hiradur commented 8 years ago

Perhaps gcc 4.5 can compile it. You can install it from here: https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test and then export CXX="g++-4.5" CC="gcc-4.5" to use it

Downgrading gcc is the only thing that comes to my mind at the moment (without touching the code), since people were able to build it back in the day (and tritonas' PKGBUILD also builds RoR without patching the code if I'm not mistaken).

Hiradur commented 8 years ago

@ShannonVanWagner This doesn't solve the compiling problems but maybe it's enough for you: http://www.rigsofrods.com/threads/120467-Portable-RoR-0-38-66-for-all-linux-distro-s-!

ShannonVanWagner commented 8 years ago

@Hiradur - Thanks for all the suggestions.

I tried the PPA you mentioned above, but it doesn't seem to have gcc-4.5 for some reason.

So I was going to see about building gcc-4.5 and making a PPA to install but I haven't had a chance to get it going yet.

As for the portable version, that seems like a cool idea.. I downloaded it and tried it but am getting an error: 'error while loading shared libraries: libglib-2.0.so.0: cannot open shared object file: No such file or directory'

Rigs of Rods 0.38.66-r1-archlinux-x86.run

$file RigsofRods0.38.66-r1x86.run RigsofRods0.38.66-r1x86.run: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.15, BuildID[sha1]=fe926b7ea13be61d05cdd605e313f50042040153, stripped

I'm running Ubuntu 15.10 64-bit GNU/Linux at this point.. so there seems to be a linkage or arch mismatch.

I'll keep looking at it.

Cheers!

Hiradur commented 8 years ago

@ShannonVanWagner Looks like gcc 4.5 is not available in that PPA for newer Ubuntu distributions.

I haven't tried the standalone executable myself yet. But maybe this helps resolving the missing library: http://www.cyberciti.biz/faq/install-libgobject-2-0-so-0-on-debian-ubuntu-linux/

tritonas00 commented 8 years ago

I wouldn't recommend this package. The creator used my old sources. That means no boost, no caelum and modified game source.

I rebuilded ror 0.38 untouched with boost and caelum and unsetting GCC flags to prevent some issues.

One package has all depedencies (rigsofrods-deps) and the other is the game itself (rigsofrods). But those packages are for Arch only, and this standalone container also.

If is there anyway to make a single archive that will run on any distro (like firefox per example), let me know. :)

Hiradur commented 8 years ago

If is there anyway to make a single archive that will run on any distro (like firefox per example), let me know. :)

kskarthik, the author of that thread made me of aware of this: http://www.portablelinuxapps.org/ and the AppImageKit in particular. In this video it looks fairly easy to achieve a crossplatform standalone build: https://www.youtube.com/watch?v=pAazgNUfS4g

I haven't tried it yet since I'm still waiting for a replacement for the dead PSU of my computer.

kskarthik also said that this 0.38 standalone runs on Linux Mint so even though ArchLinux is in the filename it's apparently not a requirement.

probonopd commented 8 years ago

Is this still alive?

Hiradur commented 8 years ago

@probonopd The OP asked about an old version of RoR specifically and to be honest I'm not interested in providing an AppImage for a version which is almost 5 years old (one of the reasons is that people would stick to this version and not port their content to newer versions which is not good for the future).

Thanks for your support, but in this case I think it's safe to remove this issue from your list.

probonopd commented 8 years ago

OK thanks for the clarification @Hiradur

ShannonVanWagner commented 7 years ago

Seems like the site I originally posted about has made a separate category for ".4 compatible" items so I'm going to close this issue. Going forward to .4 is the way to go!

Example: http://sim-monsters.com/index.php?/files/category/16-ror-045-content/

Thanks for providing these awesome scripts Hiradur! My Son and I have been enjoying RoR on Ubuntu GNU/Linux (currently 16.04) for quite some time now thanks to yours and RoR efforts!

Cheers!