[Tux4kids-tuxtype-dev] [Tuxmath-devel] TuxMath and TuxType BeOS ports

David Bruce davidstuartbruce at gmail.com
Mon Dec 15 15:56:19 UTC 2008


Hi Luc,

On 12/15/08, Schrijvers Luc <Begasus at skynet.be> wrote:
> Hi there,
>
> Been checking up on the latest tgz files released on the homepage.
> Both compile without any real problem so far for BeOS.
>
> TuxMath even runs Factroids!! great work there!
> Only problem is that it can seem to find the config file
> ("find_tuxmath_dir()") is the error it's giving when running from
> terminal aside from that TuxMath is running fine.

Tuxmath creates a "./tuxmath" dir inside the user's home the first
time it runs, then looks for when the program is run again.  It is
possible that it doesn't know where to look on BeOS.  This dir is used
for things like keeping track of high scores and gold stars.

>
> TuxType however can't be started, it compiles without errors (just a few
> parse errors but they can't hurt).
> It's complaining about finding the data path's.
> 	SetupPaths(): Error - cound not find data path.
> 	SetupPaths(): Error - could not find data path.
> 	LoadKeyboard(): Error finding file for keyboard setup!
> 	ERROR could not load required graphics file standby.png
> The above lines are when trying to start it from terminal. TuxType is
> compiled with --prefix=/boot/apps/Games/TuxType2 so all files should be
> in place.
>
> Any Ideas?

TuxType and TuxMath both try out various paths to see if they are
valid, and subsequently the first valid path identified is used to
find the data files.  In TuxType, these paths are:

const char PATHS[NUM_PATHS][FNLEN] =
{
  DATA_PREFIX"/share/"PACKAGE"/data",
  "/usr/share/"PACKAGE"/data",
  "/usr/local/share/"PACKAGE"/data",
  "./data"
};

The top line is the one that is supposed to work on Unix-type systems,
the next two are apparently hard-coded fallbacks in case "DATA_PREFIX"
isn't set correctly, and the last one is for the Windows build.

(I would think DATA_PREFIX *should* stand for the entire we are
looking for, but it doesn't the way it is currently written).

AFAICT, "DATA_PREFIX" gets set to be the same as "prefix" in TuxType.

Did TuxType work previously on BeOS?  The path function hasn't been
changed in a long time.  I guess we need to see what DATA_PREFIX and
PACKAGE come out as in the BeOS install.  fwiw, I've been trying to
get rid of the '2' in "TuxType2", so it is conceivable that your
prefix worked before (sort of by accident), but doesn't work if
PACKAGE is just "tuxtype".

As a quick fix, it would be easy enough to add a line to the enum with
the actual BeOS path.  Later we can try to make it less kludgy.

Cheers,

David



More information about the Tux4kids-tuxtype-dev mailing list