Yactfeau


Few Q's on this, sorry I'm not that familiar with compiling (pretty much learned how to program this month in Python and Pygame)

How do I include the bit to my BashRC?
Edit - Have now edited the BashRC, for future people just go to your home directory and press ctrl + h and it'll appear. I've copied to the bottom of the file.
Qmake is optional? Do I install it, do i not?
Edit - installed Qmake anyway.
Ideally it'd be great if someone could hand hold me to getting a surface window of 800 * 600 which quits on a button press in C++ and SDL then I reckon I'd be ok.
Want to use KDevelop but wouldn't mind code blocks if people reckon that's better.
 
zRichi said:
How do I include the bit to my BashRC?
bashrc is a file in your home directory named .bashrc

zRichi said:
Qmake is optional? Do I install it, do i not?
As you want, it depend on what you want to do. I f you plan to use the KDE ide, it might be a good idea.

zRichi said:
Ideally it'd be great if someone could hand hold me to getting a surface window of 800 * 600 which quits on a button press in C++ and SDL then I reckon I'd be ok.
have a look here.

zRichi said:
Want to use KDevelop but wouldn't mind code blocks if people reckon that's better.
I'm a command-line/vi guy, so I cant help you here ;)
 
Last edited by a moderator:
Decided to go commmand line and I'll learn the IDE set-up later.
I copied the below code and ran the command. Didn't return any errors but created a file called myprogram in the directory of my cpp file.
The program doesn't do anything when I click on it though :unsure:

Code:
1)Create a source file with the following code:

#include "SDL/SDL.h" 
int main( int argc, char* args[] ) 

{ //Start SDL SDL_Init( SDL_INIT_EVERYTHING );

 //Quit SDL SDL_Quit(); return 0; }

2)Then type at the command line:
g++ -o myprogram mysource.cpp -lSDL
and you're done.

Also how do I Setup your environnement : setprj audacious
As I'm using command line?
When I do the step after that I get

Code:
snow@snow:~/Pandora/Audacious/libmowgli-0.7.1$     make all install
Makefile:4: buildsys.mk: No such file or directory
make: *** No rule to make target `buildsys.mk'. Stop.
snow@snow:~/Pandora/Audacious/libmowgli-0.7.1$     cd ..

Sorry these questions probably come off really stupid =/
 
Here is simple test :

Start a new terminal, and :
Code:
mkdir ~/Pandora/simpletest
setprj simpletest
In that directory, create 2 files, here is the code (test.cpp) :
Code:
#include <SDL/SDL.h>

int main( void )
{
        SDL_Surface* test = NULL;
        SDL_Surface* screen = NULL;
        SDL_Event event;
        SDL_Rect offset;

        int quit = 0;

        // Init the Video fullscreen
        SDL_Init( SDL_INIT_VIDEO );
        screen = SDL_SetVideoMode( 800, 480, 16, SDL_SWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN );
        SDL_WM_SetCaption( "Test", NULL );

        // load an image
        test = SDL_LoadBMP( "image.bmp" );
        offset.x = 0;
        offset.y = 0;
        if (test != NULL)       // if the image have loaded display it on screen
                SDL_BlitSurface( test, NULL, screen, &offset );

        // actually render to the physical screen
        SDL_Flip( screen );

        // Simple wait even loop that will quit on key press
        while( quit == 0 ) {
                while( SDL_PollEvent( &event ) ) {
                        switch (event.type) {
                                case SDL_QUIT:
                                case SDL_KEYDOWN:
                                        quit = 1;
                                        break;
                        }
                }
                // As we haven't changed the screen, no need to flip ;) 
        }

        // Exit cleanly
        SDL_FreeSurface( test );
        SDL_Quit();

        return 0;
}
Here is your Makefile :
Code:
EXE = test
PREFIX  = /mnt/utmp/$(EXE)
RM = rm -f
INSTALL_PROG = install -m 755 
STRIP ?= $(CC:%gcc=%strip)

# Add SDL dependency
LDFLAGS +=-lSDL_gfx -lSDL_image $(shell sdl-config --libs)
CFLAGS +=$(shell sdl-config --cflags)

# Define targets
SRCS=$(shell echo *.cpp)
OBJS=$(SRCS:%.cpp=%.o)

ALL : $(EXE)

.c.o:
        $(CC) $(CFLAGS) $(CXXFLAGS) -c $*.c -o $*.o 
.cpp.o:
        $(CXX) $(CFLAGS) $(CXXFLAGS) -c $*.cpp -o $*.o 

$(EXE) : $(OBJS)
        $(CXX) $(OBJS) -o $(EXE) $(LDFLAGS)
        $(STRIP) $(EXE)

install : $(EXE)
        $(INSTALL_PROG) $(EXE) $(PREFIX)

uninstall :
        $(RM) $(PREFIX)/$(EXE)

clean :
        $(RM) $(OBJS) $(EXE)

.PHONY:clean install uninstall ALL

Now compile and install that :
Code:
make all install

It's now time to create a pnd out of that :
Code:
genpxml -v 1.0.0
pndmakeauto

copy $HOME/Pandora/PNDs/simpletest.pnd on your pandora and enjoy your new simpletest v1.0.0 rocking :D

EDIT: add an image.bmp (up to 640*480) in your /pandora/appdata/simpletest on pandora. (or in /mnt/utmp/simpletest before creating the PND) to actually have something on screen beside the black
 
Thanks so much for this sebt3.

Now I'm almost there (ha sorry I hate asking!)
But the bottom line indicates I need version 4 of squashfs. I've done a google on squashfs and only found their website which had version 3.4 :S

Code:
snow@snow:~/Pandora/simpletest$ pndmakeauto
-c set, will create compressed squasfs image instead of iso -p
PNDNAME set to /home/snow/Pandora/PNDs/simpletest.pnd
FOLDER set to /mnt/utmp/simpletest
ICON set to /mnt/utmp/simpletest/icon.png
PXML set to /mnt/utmp/simpletest/PXML.xml
/usr/local/angstrom/arm/bin/pnd_make: line 44: mksquashfs: command not found
your squashfs version is older then version 4, pleas upgrade to 4.0 or later
 
Here is your real issue :
zRichi said:
Code:
/usr/local/angstrom/arm/bin/pnd_make: line 44: mksquashfs: command not found
Solution (as you are using a debian base distro) :
sudo aptitude install squashfs-tools
 
Last edited by a moderator:
Thanks a ton!!! :D
First app compiled and done, won't be long before I port Robo Hell to SDL :D

(had to use sudo apt-get, for anyone else trying to follow this on ubuntu)
 
Howdy, first up, thanks for the tool chain and tutorial, it is mega awesome!

So, I'm running ubuntu on VirtualBox on Mac OS 10.6, I followed the tutorial to compile audacious and it all seems to work fine. I copy the audacious.pnd to the SD card and it shows up on the Pandora desktop, but when I try to launch it I get the error message:


Code:
Failed to open "/usr/share/applications/audacious-audacious2-21083" 
No such file or directory.

I'm way beyond my limits of what I know how to do, can anybody shed any light on what the matter might be?

Cheers

Cake
 
I_Like_Cake said:
I'm way beyond my limits of what I know how to do, can anybody shed any light on what the matter might be?
I'll need your PXML.xml file and the /tmp/pndrun_audacious* file.
 
Last edited by a moderator:
[/quote]
I'll need your PXML.xml file and the /tmp/pndrun_audacious* file.
[/quote]

Cool, thanks, I tried recompiling the whole thing but I still get the same problem. I tried creating the directory /usr/share/applications/audacious-audacious2-21083 but when I try to launch audacious it just opens that folder in Thunar.

Here is the PXML:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<PXML xmlns="http://openpandora.org/namespaces/PXML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PXML_schema.xsd">
<!-- please see http://pandorawiki.org/PXML_specification for more information before editing -->

  <application id="audacious-audacious2-6015" appdata="audacious">
    <exec command="scripts/audacious2.sh"/>
    <author name="sebt3" website="http://sebt3.openpandora.org/pnd/"/>         <!--Optional email and website, name required-->
    <osversion major="1" minor="0" release="0" build="0"/>              <!--The minimum OS version required-->
    <previewpics>
<!-- <pic src="previews/audacious2.png"/> -->
    </previewpics>
    <version major="2" minor="4" release="3" build="1"/>              <!--This programs version-->
    <title lang="en_US">Audacious</title>
    <description lang="en_US">Listen to music</description>
    <icon src="/mnt/utmp/audacious/share/icons/hicolor/48x48/apps/audacious.png"/>
    <categories>
      <!-- http://standards.freedesktop.org/menu-spec/latest/apa.html -->
      <category name="AudioVideo">
        <subcategory name="Audio"/>
      </category>
      <category name="Player">
        <subcategory name="GTK"/>
      </category>
    </categories>
  </application>

</PXML>

And I coudn't find a file at /tmp/pndrun_audacious*, but there was one at /tmp/pndrunaudacious_run.out, which I include here:

Code:
rm: cannot remove `/tmp/cpuspeed': No such file or directory
not mounted on loop yet, doing so
LoopMountedon: 
/dev/loop4
Filetype is Squashfs
sudo mount -t squashfs  /dev/loop4
mounting union!
Filesystem is vfat
[------------------------------]{ App start }[---------------------------------]

** (audacious2:2308): WARNING **: Failed to connect to the session manager: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed

ALL OUTPUT PLUGINS FAILED TO INITIALIZE.
/usr/pandora/scripts/pnd_run.sh: line 31:  2308 Segmentation fault      LD_LIBRARY_PATH="/mnt/utmp/$PND_NAME" "./$EXENAME" $ARGUMENTS
[-------------------------------]{ App end }[----------------------------------]
cleanup done

which seems to suggest that its looking for something in /mnt/utmp/, but /mnt/utmp/ is empty.
 
I_Like_Cake said:
Code:
ALL OUTPUT PLUGINS FAILED TO INITIALIZE.
Here is your issue. Let me guess, you have followed my instruction closely, and /mnt/utmp/audacious/lib/audacious/* contain no files.
Audacious core without any plugins cant do anything, not even open the sound card, you'll need to build the plugin's too (and their dependencies).
see http://audacious-media-player.org/downloads
 
Last edited by a moderator:
Hi sebt3,

Are the instructions on the first post up-to-date?

The pnd_make script link does not work. Is this important?

I got up to pndconfigure and it said "Command not found".

Cheers
 
quartercast said:
Are the instructions on the first post up-to-date?
Yes.

quartercast said:
I got up to pndconfigure and it said "Command not found".
I guess that's for the configure script, what are you trying to build ?
Else that's because you havent run the setprj command (which does load anything important, the pndconfigure command included)

quartercast said:
The pnd_make script link does not work. Is this important?
pnd_make.sh is a script to build a PND. It requiere that the PND directory is ready to build pakaged :)
 
Last edited by a moderator:
I am working through the tutorial, trying to build libmowgli for audacious.

sebt3 said:
EDIT : I forgot to include the pnd_make script (put pnd_run instead !!!)
So any user will need to download that file. and copy it to
/usr/local/angstrom/arm/bin/pnd_make

This link is broken, I think ED deleted the script. Is this the correct script?

Cheers
 
Last edited by a moderator:
quartercast said:
I am working through the tutorial, trying to build libmowgli for audacious.

sebt3 said:
EDIT : I forgot to include the pnd_make script (put pnd_run instead !!!)
So any user will need to download that file. and copy it to
/usr/local/angstrom/arm/bin/pnd_make

This link is broken, I think ED deleted the script. Is this the correct script?

Cheers
That edit is only here for virtualbox user (as I dont have yet updated the image), if you're using only the toolchain tarball you should be fine :)
But else, yes
 
Last edited by a moderator:
Yes I am using virtualbox on Osx. Cool I'll give it another try tonight. I wonder why ED deleted it?

Also, how to login as root in VB? 'devel' does not work.
 
Thanks for this sebt3!

I installed it last night, hit a few brick walls and didn't manage to build anything (won't bore you with the details). Today I happened to see a PND update request in this thread, gave it a shot, job done.

Excellent work making this so accessible. :)

Tip for other newbies:
The few problems I hit were along the lines of "unable to create /blah/pnd" or "/blah.pnd does not exist". These are permissions issues. If you're totally stuck, do it the newbie way. Open your file manager as root and assign permissions to the appropriate folders (recursively) by right clicking. For example your /home/[yourname]/Pandora folder, and your /utmp/[pndname] folder. Keep this practice isolated to the Pandora folders you're working with though!

Also, check the PXML every time. There will be things in there that need fixing.
 
Last edited by a moderator:
I'm having some trouble trying to build programs using Allegro.
Invoking "allegro-config --libs" (basically same thing as "sdl-config --libs" which works fine) is reporting my system's library path rather than Yactfeau's.
So does Yactfeau do anything special to make sdl-config work which I can copy for allegro-config or is allegro-config just lacking the necessary smarts?

EDIT:
Nevermind.
allegro-config was installed in /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/bin/ which for some reason is in path after /usr/bin/. Just moved it to /usr/local/angstrom/arm/bin/ with sdl-config.
 
Hello, I am trying to compile Viewnior using the VirtualBox ubuntu image.

When I run pndconfigure I get:

Code:
config.status: creating Makefile
./config.status: line 1354: /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/bin/gawk: cannot execute binary file
config.status: error: could not create Makefile

I understand the toolchain has been updated, so I downloaded the latest toolchain and ran

Code:
devel@devel-VirtualBox:~$ tar -C / -xjf pandora-toolchain-20110206.tar.bz2

But I still get the same error. Am I not updating the toolchain correctly?
 
Back
Top