Compiling with parameter -a on Caanoo help needed with a .gpe file

Started by square, June 20, 2011, 02:38:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

square

So far I'm trying to compile my game with all the resources packed inside of the .dcb with no such luck.

My understanding is this following bash script should work, (edited from SplinterGU's official .gpe for Caanoo):

#!/bin/sh
unset OS_ID

## Is important set first bgd-runtime folder
LD_LIBRARY_PATH_BAK=$LD_LIBRARY_PATH
PATH_BAK=$PATH

LD_LIBRARY_PATH=../bgd-runtime:$LD_LIBRARY_PATH
PATH=../bgd-runtime:$PATH

### For use Wiz games on Caanoo uncomment the next lines
#OS_ID=8
#export OS_ID

echo 2 > /proc/cpu/alignment

for prg in *.prg; do
    name=`basename $prg .prg`
    bgdc -a $prg
    bgdi $name
done

sync

LD_LIBRARY_PATH=$LD_LIBRARY_PATH_BAK
PATH=$PATH_BAK

cd /usr/gp2x
exec /usr/gp2x/gp2xmenu


My only addition was the -a parameter in the line to compile. It fails to compile on Caanoo.

Do I have to specify a resources directory?

As I am in Windows, I have created a unix file for this code in Notepad++ and saved the above code within, but still no difference.

Help please!
Square-theorist.

square

Ok I have a slight fear now.

My resources I would like to compile into the .dcb by way of -a parameter compile, but not the ones loaded by LOAD () - I have not included certain files (config, save state files) as they must NOT be part of the .dcb package.

My problem perhaps is even these files (using LOAD () commands) are needed present for a successful compile with -a parameter?

I did think the "native" files (those loaded with load_fpg, load_wav etc.) were the only ones added to the package.

Should I be using -f parameter to add the resource files individually in this case?

EDIT: answer: -f parameter only adds one file. So what is my solution here do you think?
Square-theorist.

FreeYourMind

To exclude the config files it's simple, compile the game without this files on the folder.
After, when you play the game and save things to this files, these are created outside the dcb.
You can make the distro with this files or not, depends if you wants to show default config saved by default on the variables in the code, or read them from this files.

square

No, i am so stupid. It was just taking a very long time to compile and include all my graphics and lengthy sounds. I thought the console had crashed, but just now I waited a full minute for compile and it WORKS!

The -a parameter compile does at least include all files that are present.

I think in this case it's not only native files are the only inclusions to the package. So it works, thanks FreeYourMind.

It did not try to package files that weren't there, in this case, such as program created data files or loaded in ones. Congrats Bennu!
Square-theorist.

SplinterGU

-a parameters include only files that are reference in strings in the code (with path)

good example

Quote
library = "fpg/enemies.fpg";

library = "items.fpg"

sound_fire = "fire.wav";
main_music = "mus/music.ogg";

bad examples:

Quote
library = path +"enemies.fpg";

library = "items" + extension;

sound_fire = "fire" + number + ".wav";
main_music = sound_folder + "music.ogg";

bad examples, mean that this file will don't be included, the compiler need found the file in the file system before add it to dcb.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2