Fusilli Client (Alternative C4A Client)


And a new version of fusilli client again. I implemented some features requests of Ghandi (btw. your Avatar reminds my on Chopper from One Piece).

I spend some time to make --cache work with --test-me. But after a test I realized: That doesn't make sense at all! In fact these options are two solutions for the same problem. And mixing them doesn't make sense. So it is forbidden in fc now. ;)

But I have also some real features. I added these OPTIONS to pull:

  • --filtered: Shows a filtered view, where every user only appears once. But with that you would not now the rank, so I implemented also
  • --ranks: This shows the rank of the user as first entry. Of course the output then uses 5 instead of 4 lines for every user.
  • --MMYYYY: You have to replace MM with a two digit month like 09 for september and YYYY with a four digit year like 2014. Then you get only the scores of september 2014. ;)
  • --thismonth: With this you get always the score of the recent month.
This version 1.2.0.0 is compiled for every target (except i386 linux) and needs to be tested now! :D
@ptitseb: No reason for you to update again, because you use only push, which I didn't touch except, that I don't allow --test-me and --cache at once. ;)

Greetings,

Ziz
 
Hmm, looking at the mass update of ptitSeb's PNDs it's becoming obvious that this might be good to have in firmware, right?

The only bad thing is bad executable name choice - fc is an existing shell command:

Code:
fc: fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]
    Display or execute commands from the history list.
   
    fc is used to list or edit and re-execute commands from the history list.
    FIRST and LAST can be numbers specifying the range, or FIRST can be a
    string, which means the most recent command beginning with that
    string.
 
Hey yes, could be good that have it in the firmware, so it became an integral part of the Pandora ecosystem :)

Why not fusilli then for the name?
 
I would like to keep it two-letter-ish... How about "fu"? :p

Just kidding.

If "fusilli" is fine, I would make a minor update, which changes the name. :)
 
And a new version of fusilli client again. I implemented some features requests of Ghandi (btw. your Avatar reminds my on Chopper from One Piece).
Thanks again!

I am taking a few days off next week so I hope to get everything ready then...

The avatar is Geocaching Souvenir for finding a cache on the 12. of December 2012 -_- .

My son is quite a One Piece fan though, so I know Chopper and have to admit there is a slight similarity.... :D
 
Hmm, looking at the mass update of ptitSeb's PNDs it's becoming obvious that this might be good to have in firmware, right?

The only bad thing is bad executable name choice - fc is an existing shell command:

fc: fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]
    Display or execute commands from the history list.
   
    fc is used to list or edit and re-execute commands from the history list.
    FIRST and LAST can be numbers specifying the range, or FIRST can be a
    string, which means the most recent command beginning with that
    string.
I renamed it to fusilli. The download link stays the same, but with new subdirectories (fusilli instead of fc)https://github.com/theZiz/fusilli-client/tree/master/build

Greetings,

Ziz

Edit: Even if this is not going to be added to the firmware, it may be more handy than "fc" ;)
 
Last edited by a moderator:
Hy Ziz - I've got one more question:

I don't get an error when trying to pull scores when wifi is disabled.

I do get an error though when scores cannot be read due to a inaccessible server - as it is ATM.

Is this intentional?

I'm testing for a working C4A connection by pulling the scores ATM and testing if mod(count(ResultRows), 4) = 0 [pseudocode].

This won't work with the current behaviour because I cannot distinguish between an empty scores list and a failure because of disabled wifi.

[EDIT]

Never mind!

Since I am planning to use the "--cache" parameter anyway it is not really necessary to know why thes server delivers no scores...
 
Last edited by a moderator:
You get an error!

Just check the return code of fusilli! I added this part to the application help:

Code:
Return values:
       *  0 if everything went fine
       * -1 (255) at submission error. This is even -1 if the submission failed,
         but was cached and if no submission was done on purpose because of
         --test-me.
       * -2 (254) if no profile file is found, but needed
 
I've finally added this to the firmware, but haven't tested it, please run the update and see if it's ok.

It wasn't easy to integrate this into OS builder, as your makefile is a mess:

- CPP means "C PreProcessor" and is normally set to "gcc -E", which is what the OS build system overrides it to. To get gcc use CC, to get g++ use CXX.

- You are not supposed to set any compile flags on CC, CPP, CXX or LD variables, it must be just the binary name. Many build systems rely on it. Because OS build system replaces it with arm-...-gcc, -DX86CPU was getting lost and build failed. Use CFLAGS, CXXFLAGS or custom variables for flags.

- -DX86CPU ?? Really? I had no idea we have x86 CPU in our pandoras (doesn't build without it, I've checked).

- setting -Wl,-rpath ("runtime path") on static linking makes no sense whatsoever

- setting -fPIC on a binary makes no sense whatsoever

- consider adding -Wall and fixing the warnings
 
Last edited by a moderator:
One question: Could it be implemented in fusilli that it grabs the current highscores of a game and offers these on request? Won't easily work with MAME, but normal games (and we have many!) could then show the current internet highscore list in-game.


That's basically the only thing I miss right now - would be nice to know at least what score you're trying to beat while playing :)
 
I've finally added this to the firmware, but haven't tested it, please run the update and see if it's ok.

It wasn't easy to integrate this into OS builder, as your makefile is a mess:
I know. First of all: Thanks for integrating this. However the Makefile was made for easily compiling all my games for different systems like the GCW, Pandora, GP2X, etc. It was never meant to be used by anyone except me. And above all it was not meant to be used for some CLI tool like the fusilli client. So, yes I NEED to rewrite them...
- CPP means "C PreProcessor" and is normally set to "gcc -E", which is what the OS build system overrides it to. To get gcc use CC, to get g++ use CXX.
Interesting, I always thought CPP is for C++... (Which is still wrong, I know...)
- You are not supposed to set any compile flags on CC, CPP, CXX or LD variables, it must be just the binary name. Many build systems rely on it. Because OS build system replaces it with arm-...-gcc, -DX86CPU was getting lost and build failed. Use CFLAGS, CXXFLAGS or custom variables for flags.
Thanks for the hints! I will improve my Makefile next week!
- -DX86CPU ?? Really? I had no idea we have x86 CPU in our pandoras (doesn't build without it, I've checked).
As said, the Makefile is for easy compiling stuff on different systems. My main developing system is my PC (I started with sparrow3d before I got a Pandora), so everything in the Makefile is preconfigured with this "target". If I want to compile for another system I do e.g. "make TARGET=pandora". In that case the ./target-files/pandora.mk is included somewhere in the Makefile and the variables are overwritten. As said above: This is hacky and was meant for me. Now you did a build for the PC, not for the Pandora... The differences for the fusilli client are small, but a fusilli call will now submit "linux" as system, not "pandora"... So the correct flags would be "-DMOBILE_DEVICE -DARMCPU -DPANDORA".
- setting -Wl,-rpath ("runtime path") on static linking makes no sense whatsoever
Have to have a look at this. Some things grow evolutionary. Something didn't work, so I fiddled around until it worked.
- setting -fPIC on a binary makes no sense whatsoever
Yes. Too much copy and paste.
- consider adding -Wall and fixing the warnings
What exactly did you compile btw.? SparrowNet + Fusilli Client?In fact when you told, it may be a good idea to add the client to the firmware, I thought you will just add the binary I released, not compiling it on your own...

I am very used to release games / applications on my own and not to release the source code, so that other people compile them on their own...

---------------------------------------------------------------------

One question: Could it be implemented in fusilli that it grabs the current highscores of a game and offers these on request? Won't easily work with MAME, but normal games (and we have many!) could then show the current internet highscore list in-game.

That's basically the only thing I miss right now - would be nice to know at least what score you're trying to beat while playing :)
Maybe I misunderstand you, but doesn't
./fusilli pull GAME_NAMEdo exactly, what you mean?Furthermore you can add options to show only the scores of a specific month, to show every user only once and to show the rank.

Greetings, Ziz
 
Last edited by a moderator:
Now you did a build for the PC, not for the Pandora... The differences for the fusilli client are small, but a fusilli call will now submit "linux" as system, not "pandora"...
I did have -DPANDORA also set, and it says "Built for Open Pandora" when I run it.


Check for yourself, you can just run "sudo opkg install ..." on http://openpandora.org/feeds/unstable/armv7a/fusilli-client_git-r0.5_armv7a.ipkif you don't wat to run OS upgrade.

So the correct flags would be "-DMOBILE_DEVICE -DARMCPU -DPANDORA".
Hmm I don't see MOBILE_DEVICE or ARMCPU being used in fusilli or sparrowNet.


BTW if you want to detect ARM, better use __arm__ which is set by the compiler, no need to worry about makefiles then. Other archs also have similar built-in defines.

What exactly did you compile btw.? SparrowNet + Fusilli Client?
Yeah

In fact when you told, it may be a good idea to add the client to the firmware, I thought you will just add the binary I released, not compiling it on your own...


I am very used to release games / applications on my own and not to release the source code, so that other people compile them on their own...
The OS build system (OE) is designed to only compile from source. There are some exceptions like SGX driver, but it's a lot of pain to get that into OS build. If you don't want it to be built from source we'll have to drop fusilli from the OS.
 
Now you did a build for the PC, not for the Pandora... The differences for the fusilli client are small, but a fusilli call will now submit "linux" as system, not "pandora"...
I did have -DPANDORA also set, and it says "Built for Open Pandora" when I run it.Check for yourself, you can just run "sudo opkg install ..." on http://openpandora.org/feeds/unstable/armv7a/fusilli-client_git-r0.5_armv7a.ipkif you don't wat to run OS upgrade.
I believe you. ;) However I will test it later, thanks for the link. I am a bit afraid of the glib update, because I use Sylpheed on a daily basis and I am afraid, that it may be broken.
So the correct flags would be "-DMOBILE_DEVICE -DARMCPU -DPANDORA".
Hmm I don't see MOBILE_DEVICE or ARMCPU being used in fusilli or sparrowNet.BTW if you want to detect ARM, better use __arm__ which is set by the compiler, no need to worry about makefiles then. Other archs also have similar built-in defines.
You are right, I don't use them. I just define both for every of my three sparrow libraries. Thanks for the __arm__ hint, I will use this instead of -DARMCPU in the future.
What exactly did you compile btw.? SparrowNet + Fusilli Client?
Yeah
In fact when you told, it may be a good idea to add the client to the firmware, I thought you will just add the binary I released, not compiling it on your own...

I am very used to release games / applications on my own and not to release the source code, so that other people compile them on their own...
The OS build system (OE) is designed to only compile from source. There are some exceptions like SGX driver, but it's a lot of pain to get that into OS build. If you don't want it to be built from source we'll have to drop fusilli from the OS.
You misunderstood me. My post was just an explanation, what circumstances lead to this Makefile and the chosen way of distribution. I don't mind, if you compile it on your own. If I would, GPL would be a bad choice for a license, wouldn't it? For now it seems to work somehow, but I will include your critics and suggestions in my build system this week.
Thanks for your work. ;)

Greetings,

Ziz
 
Okay, I fixed the most important stuff:

  • I use CC instead of CPP. Furthmore I do not preset it (except for build target include)
  • Every previous flag of CPP is now in the variable FLAGS
  • I renamed the define from X86CPU to DESKTOP, that makes more sense.
  • I removed the defines WIN32 and ARMCPU and replaced them with _win32 and __arm__, which are predefined.
I hope, this makes things easier for you, notaz.
Greetings, Ziz
 
Looks better now, thanks. DESKTOP is still kind of ambiguous, pandora has a / can be used as a desktop, sort of.
Of course. In fact DESKTOP is meant in opposite to "handheld". Keep in mind normally I make fullscreen games, not CLI tools... I use the define DESKTOP only once in sparrowNet while determining the correct location of the C4A profile. Ironically this is one point, at which the Pandora is not like a normal desktop system, which would save every user config in ~/.config and not in the appdata folder of an SD card. ;)
make PARAMETER="-DPANDORA" + your default settings for CC should work properly for sparrowNet and fusilli-client now?

I downloaded the last one and started it without parameters, which looked fine. However I didn't submit any score. I will test this tomorrow or the day after. ;)
Greetings,

Ziz
 
Hy Ziz,

Asmo reported a potential issue over at the Squared! thread.

Maybe you can take a look at it.

Should I update the PND to the latest fusilli version?

Cheers, Gandi
 
Last edited by a moderator:
Should I update the PND to the latest fusilli version?
You should use the one in firmware when it's available to get latest version automatically.


Something like:

Code:
if test -e /usr/bin/fusilli; then
  /usr/bin/fusilli some args here
else
  ./inside_pnd/fusilli some args here
fi
 
Back
Top