Opened 22 years ago

Closed 22 years ago

Last modified 6 years ago

#7977 closed patch

QNX 6.x Build Support

Reported by: SF/theealien Owned by: fingolfin
Priority: normal Component: Ports
Version: Keywords:
Cc: Game:

Description

The patch provides/includes/dose the following:

* Makefile.qnx (So to build on QNX type "make -f Makefile.qnx"). * A few varables changes in actor.cpp, boxes.cpp, and scumm.h (The Dinkum C++ libraries don't seem to like certain math functions containing varables of certain types). * Adds a quick work around for a QNX quirk with string.h VS strings.h

ScummVM on QNX will work with SDL (default) so long as SDL is install. It will also work with the OpenGL version provided SDL and the Photon 3D libraries are installed. The X11 version will work as well so long as XFree86 and/or XPhoton are installed.

This patch was made with:

diff -N -u scummvmold scummvmnew > scummvmqnx.patch

This dose not alow for direct building on the eQuip platform, or for any other archecture other then x86 - But it would'nt be hard to add if you were determined enough.

...and thats about it I guess? ;-o

Ticket imported from: #578016. Ticket imported from: patches/82.

Attachments (1)

scummvmqnx.patch (4.0 KB ) - added by SF/theealien 22 years ago.
Allows for building of ScummVM on QNX 6.x

Download all attachments as: .zip

Change History (10)

by SF/theealien, 22 years ago

Attachment: scummvmqnx.patch added

Allows for building of ScummVM on QNX 6.x

comment:1 by fingolfin, 22 years ago

I doubt that you really have to change the params for getAngleFromPos - a simple typecast on the atan2 should be sufficient. The same for Dist1, Dist2, Dist3 in boxes.cpp. I put these typecasts into CVS, please try if they help you. If they do not help, please tell us the error message you recieve.

As for string.h vs. strings.h, that is a very strange thing, considering that string.h is part of ANSI C and has been for a looong time. Can you please tell us which issue is fixed by this change? I.e. what is the error message?

comment:2 by fingolfin, 22 years ago

Owner: set to fingolfin

comment:3 by SF/theealien, 22 years ago

I grabed the CVS code and tried to build, here's the first error that showed up (actor.cpp):

g++ -g -O -Wall -Wstrict-prototypes -Wuninitialized -Wno-long-long -Wno-multichar -DCOMPRESSED_SOUND_FILE -DUNIX -I./ -I./sound `sdl-config --cflags` -c actor.cpp -o actor.o actor.cpp: In method `int Actor::calcMovementFactor(int, int)': actor.cpp:150: call of overloaded `abs (int32)' is ambiguous /usr/include/stdlib.h:96: candidates are: int abs(int) /usr/include/math.h:232: double abs(double) /usr/include/math.h:273: float abs(float) /usr/include/math.h:403: long double abs(long double) make: *** [actor.o] Error 1

I changed:

int32 XYFactor, YXFactor;

to

int XYFactor, YXFactor;

And actor.cpp built fine. Then the reason why strings.h is needed over string.h poped up:

g++ -g -O -Wall -Wstrict-prototypes -Wuninitialized -Wno-long-long -Wno-multichar -DCOMPRESSED_SOUND_FILE -DUNIX -I./ -I./sound `sdl-config --cflags` -c sound.cpp -o sound.o sound.cpp: In method `void Scumm::playBundleSound(char *)': sound.cpp:923: implicit declaration of function `int strcasecmp(...)' make: *** [sound.o] Error 1

It happens all the time with C++ (never with C though) - I have no idea why really.

If you'd like I could give you telnet access to my machine (so you could see for yourself).

comment:4 by fingolfin, 22 years ago

The proper change for actor.cpp again is a typecast to double, I already put that into CVS.

As to strcasecmp: indeed that's a non-ANSI C function. However, you can still savely include string.h I'd guess. Did you try to include strings.h *in addition* to string.h? I made such a modification to the CVS source, so please try once more with the CVS source, if then all works fine we can look into adding Makefile support for QNX.

comment:5 by SF/theealien, 22 years ago

Your fixes appear to have worked perfectly. Good work ;o

Adding a Makefile for QNX isn't very vital (the one I provided in the patch used qcc instead of g++ only for the optimizations and the ability to link against the Dinkum libraries as compared to the GNU ones - which isn't that important in the long run).

comment:6 by fingolfin, 22 years ago

OK fine!

Are you interested in providing QNX binaries for the next ScummVM release? That would be most appreciated :-)

comment:7 by fingolfin, 22 years ago

Status: newclosed

comment:8 by SF/theealien, 22 years ago

Sure.

comment:9 by digitall, 6 years ago

Component: Ports
Note: See TracTickets for help on using tickets.