Portability considerations for Linux and Mac

For questions or suggestions related to the source code.

Postby amac on Wed, 23rd Jul 2008, 17:30

Good work! No texture errors at all now;

OpenBVE on Linux Screenshot

Don't have time to test much else just now, but wanted to let you know that your attempts were successful anyway. Still something odd going on with the needles on the gauges, but very impressive anyway.
amac
 
Posts: 8
Joined: Mon, 21st Jul 2008, 19:35

Postby michelle on Wed, 23rd Jul 2008, 17:52

Let's hope that rlazur also get's it to work on Mac. Surprisingly few problems are left then. As for the needles, I expect that images using screendoor transparency do not work because they are edited in-memory, and when the format is somehow different, then the editing will produce corruption. I will look into it...

Still, your work is not yet finished. As you were required to install the Tao framework and maybe different stuff, you can consider your computer a development platform, and it might differ from a casual user's computer. Thus, you will need to deploy everything on a completely different machine and see what files are maybe missing, so you can collect everything for an actual distribution. Once these kind of things are figured out and the remaining problems solved, I think it is safe to say that version 1.0 will definitely be available for at least two platforms, officially that is.
User avatar
michelle
Site Admin
 
Posts: 1139
Joined: Mon, 14th Apr 2008, 20:36

Postby amac on Thu, 24th Jul 2008, 16:36

Well, I had intended to leave this part to someone else... but here's a trial run for any timid but trusting linux users to test (no liability accepted :-) )

OpenBVE-0.7.0 for Linux

I installed opensuse 11 on a spare PC and it was very easy indeed to make openbve run; required packages are all available from the SuSE repositories and are:

mono-basic
openal
freealut
SDL_mixer

I can't see any reason why it shouldn't be just as easy to make run on any other distro if you have working OpenGL.

You will obviously still need some BVE routes installed from somewhere else, as with the Windows version; my package is purely the openbve program.

For anyone unsure of how to run it - extract the tarball somewhere, then, in a terminal, cd to the newly-created 0.7.0-linux directory and run "mono OpenBve.exe"
amac
 
Posts: 8
Joined: Mon, 21st Jul 2008, 19:35

Postby amac on Fri, 25th Jul 2008, 08:50

Could anyone who's downloaded and tried the Linux package please let me know whether it's worked for you, and which distro you're using?

If it hasn't worked, let me know how far you've got and what any error messages say and I'll try to help.
amac
 
Posts: 8
Joined: Mon, 21st Jul 2008, 19:35

Postby rlazur on Mon, 4th Aug 2008, 13:51

I am essentially stuck at this. I do not have the technical expertise on the mac platform to get a libalut.so.0 binary, and there does not seem to be anyone out there distributing it. So until someone with more OS X hacking experience can help out (or somehow magically finds a libalut.so.0 binary which google fails to find) things are essentially unworkable. This is disappointing as the video card in my linux box just died leaving me with only my macbook and htpc running.


The Tao forums are essentially useless as well as all the mailing lists I've gone through for someone like me.

The only thing I can think of doing is to completely remove OpenAL and any reference to sound in OpenBVE to get it to actually run (for testing purposes).
rlazur
 
Posts: 23
Joined: Tue, 27th May 2008, 21:53

Postby michelle on Mon, 4th Aug 2008, 15:18

Luckily, I have the sound manager as a separated module, so it can be exchanged at any time. In the past, I had also an SDL implementation in use, which of course was not able to handle 3D sounds, but only stereo. Of course, it was inferior as it was also only for testing purposes, but I could revive it and put it into the source code for Mac. Then you are more likely to get openBVE to run, provided that SDL (and SDL_mixer) are no problem under Mac. Give me a day though...

Just by the way, as it seems, ALUT has been discontinued but replaced by FREEALUT. You can download that at the OpenAL website. I don't know if it is binary compatibile, probably not.
User avatar
michelle
Site Admin
 
Posts: 1139
Joined: Mon, 14th Apr 2008, 20:36

Postby rlazur on Mon, 4th Aug 2008, 16:01

Err right, I have the freealut source. I'm just not familiar with the required changes so that I don't get duplicate symbols on linking (Apple's OpenAL framework includes alut symbols for backwards compatibility).


I wouldn't bother with SDL audio for one platform as that would make things more difficult to maintain for you.
rlazur
 
Posts: 23
Joined: Tue, 27th May 2008, 21:53

Postby michelle on Mon, 4th Aug 2008, 16:24

Sadly, I don't understand either what Apple means on the site you mentioned earlier.

However, technically, it should not be required for me to use ALUT or FREEALUT at all. These are basically libraries that handle the initialization of OpenAL and offer additional functions like easier loading of audio files. Possibly, I could do without them and do all of the stuff mentioned myself, thus getting rid of the dependency altogether. However, as I am facing problems loading WAV files already, this seems to be something unlikely to happen soon, except it actually helps me in solving those loading issues, too.
User avatar
michelle
Site Admin
 
Posts: 1139
Joined: Mon, 14th Apr 2008, 20:36

Postby rlazur on Tue, 5th Aug 2008, 13:48

Okay, temporarily I have commented out all references to SoundManager in OpenBVE 0.7 source. I was able to load a route file albeit with some issues. This was just a test to see how mono performs. There is some clipping issues with the file browser and route error dialogs. I have not investigated anything further than this.

Code: Select all
kuroringo:OpenBVE rlazur$ mono OpenBve.exe
Tue Aug  5 09:35:17 kuroringo.local mono[23175] <Error>: doClip: empty path.
Tue Aug  5 09:35:17 kuroringo.local mono[23175] <Error>: doClip: empty path.
Tue Aug  5 09:35:20 kuroringo.local mono[23175] <Error>: CGContextDrawImage: invalid context
Tue Aug  5 09:35:20 kuroringo.local mono[23175] <Error>: CGContextSynchronize: invalid context
Tue Aug  5 09:35:20 kuroringo.local mono[23175] <Error>: CGContextSynchronize: invalid context
Tue Aug  5 09:35:34 kuroringo.local mono[23175] <Error>: doClip: empty path.
Tue Aug  5 09:35:34 kuroringo.local mono[23175] <Error>: doClip: empty path.
Tue Aug  5 09:35:50 kuroringo.local mono[23175] <Error>: doClip: empty path.
Tue Aug  5 09:35:50 kuroringo.local mono[23175] <Error>: doClip: empty path.
Tue Aug  5 09:35:50 kuroringo.local mono[23175] <Error>: doClip: empty path.
Tue Aug  5 09:35:50 kuroringo.local mono[23175] <Error>: doClip: empty path.
Tue Aug  5 09:35:50 kuroringo.local mono[23175] <Error>: doClip: empty path.
Tue Aug  5 09:35:50 kuroringo.local mono[23175] <Error>: doClip: empty path.
Tue Aug  5 09:35:50 kuroringo.local mono[23175] <Error>: doClip: empty path.
Tue Aug  5 09:35:50 kuroringo.local mono[23175] <Error>: doClip: empty path.


Image

It does display but flickers.

Image

Unable to drive until I remap keys for OpenBVE (no extended keyboard).
rlazur
 
Posts: 23
Joined: Tue, 27th May 2008, 21:53

Postby michelle on Tue, 5th Aug 2008, 15:37

Some things that bother me:

The pole objects are my compatibility objects. However, the Uchibo route provides its own, meaning that there must have been some file loading errors. If you say that the error message box appears (but flickers), could you try finding some load errors and their causes? I guess that the same problem caused none of the other textures to appear. Also, if you compiled yourself, make sure you set the MAC compilation flag. And maybe, you should try with 0.8.0.1. There is a Mac OS X download available, too, which you can try without recompilation.

As with amac and Linux, it seems that transparency does not work correctly. My compatibility objects uses PNG textures with alpha channels and seem to be correctly displayed, however, the ATS lamps do too, and are not. Maybe full alpha is not supported on Linux and Mac, however, why should this be the case if it is an OpenGL feature?

[hr]
By the way, the alut library should be part of the Tao framework SDK. Download at http://sourceforge.net/project/showfiles.php?group_id=170616. After downloading, I found the alut.dll for the Windows release in the 'lib' directory. Assuming that there are Mac versions with the DMG download, you should find that file then this way. But no guarantee, as I wasn't able to find any program to extract DMG on Windows.

Just as a side question: What is the preferred compression format for Mac OS X (non-installers)?
User avatar
michelle
Site Admin
 
Posts: 1139
Joined: Mon, 14th Apr 2008, 20:36

Postby rlazur on Tue, 5th Aug 2008, 16:23

michelle wrote:By the way, the alut library should be part of the Tao framework SDK. Download at http://sourceforge.net/project/showfiles.php?group_id=170616. After downloading, I found the alut.dll for the Windows release in the 'lib' directory. Assuming that there are Mac versions with the DMG download, you should find that file then this way. But no guarantee, as I wasn't able to find any program to extract DMG on Windows.


Unfortunately the Tao Framework package for Mac only contains some SDL and Core Graphic library dependencies. Unlike the win32dep directory which has alut.dll. This could either be an indication of the hacking required to get libalut working.

michelle wrote:Just as a side question: What is the preferred compression format for Mac OS X (non-installers)?


The current zip package is okay. Unfortunately there really isn't a good 7zip extractor although I use one myself ;-). One other thing of note is that the Tao .config files do not include info. about OS X (though the example below is modified from stock since my co-workers constantly tell me to put new frameworks in my user library directory, not /System/Library or /Library ):

Code: Select all
      <dllentry os="osx" dll="~/Library/Frameworks/SDL_image.framework/SDL_image" />


Edit: I should note that dropping in replacements directly into the OpenBVE directly should work. However you then run into the alut issue.

michelle wrote:The pole objects are my compatibility objects. However, the Uchibo route provides its own, meaning that there must have been some file loading errors. If you say that the error message box appears (but flickers), could you try finding some load errors and their causes? I guess that the same problem caused none of the other textures to appear. Also, if you compiled yourself, make sure you set the MAC compilation flag. And maybe, you should try with 0.8.0.1.


Yes, I noticed this too. I had built it once w/o the MAC compiler flag, but then realized that mistake and rebuilt. But it seemed to have the same issue. I'm going to try again with 0.8.0.1 source after I disable SoundManager again.
rlazur
 
Posts: 23
Joined: Tue, 27th May 2008, 21:53

Postby rlazur on Tue, 5th Aug 2008, 17:50

rlazur wrote:
michelle wrote:The pole objects are my compatibility objects. However, the Uchibo route provides its own, meaning that there must have been some file loading errors. If you say that the error message box appears (but flickers), could you try finding some load errors and their causes? I guess that the same problem caused none of the other textures to appear. Also, if you compiled yourself, make sure you set the MAC compilation flag. And maybe, you should try with 0.8.0.1.


Yes, I noticed this too. I had built it once w/o the MAC compiler flag, but then realized that mistake and rebuilt. But it seemed to have the same issue. I'm going to try again with 0.8.0.1 source after I disable SoundManager again.


My build environment for 0.7.0.0 must not have gotten completely cleaned in MonoDevelop. Here's 0.8.0.1 with SoundManager hacked out:

Image

Note: i just realized I messed a bit with settings.cfg, and turned down some settings.

I'll try to get framerate, but I can't use normal function key f9-f12 on my macbook as it invokes spaces, dashboard, etc... (switched to using fn-function key instead of default where all the function keys are mapped to other things).
rlazur
 
Posts: 23
Joined: Tue, 27th May 2008, 21:53

Re: Portability considerations for Linux and Mac

Postby railtux on Wed, 3rd Sep 2008, 02:31

openBVE 0.8.7.0 compiled on Debian / Sid

Image
[right]
Image
railtux
 
Posts: 14
Joined: Mon, 11th Aug 2008, 23:28

Re: Portability considerations for Linux and Mac

Postby michelle on Wed, 3rd Sep 2008, 03:08

Good to know that it stills works somehow. Only one thing that has bothered me since the first one reported openBVE to basically work on Linux/Mac: What happens with alpha transparency? As I do not have Linux or Mac, I cannot evaluate it. Take for example the lower-right corner of your screenshot. The lamps do not employ actual alpha transparency (which they should), but look more like if the transparency was dithered. Is this only appearing this way in the screenshot, or somehow temporally dithered so you cannot see the effect when the program is running continously? If you have compiled it yourself, could you tell me if you have at least some knowledge of programming? If so, there are some easy-to-do things that I would like to try out in this regard, but cannot do myself.
User avatar
michelle
Site Admin
 
Posts: 1139
Joined: Mon, 14th Apr 2008, 20:36

Re: Portability considerations for Linux and Mac

Postby rlazur on Wed, 3rd Sep 2008, 13:15

Mac issues with .8.7.0:

I still get massive clipping. :(

In the new interface, there are issues resizing the window. The clipping makes it hard to modify controls or see what's going on.

It looks like it's combining screens.

The keys are pretty buggy in the actual simulation. I tried pressing ESC several times and having no luck at getting it to quit. The F and B keys by default seem to have some trouble. Not sure what framerate, need to change keys around.
Attachments
Picture 4.png
Picture 4.png (73.38 KiB) Viewed 735 times
Picture 1.png
Picture 1.png (15.46 KiB) Viewed 736 times
rlazur
 
Posts: 23
Joined: Tue, 27th May 2008, 21:53

PreviousNext

Return to Source code

Who is online

Users browsing this forum: No registered users and 0 guests