Pyra How to made a DBP for Pyra


Farox

Certified Guru
Joined
Jan 8, 2009
Messages
2,430
Age
56
Location
Italy
Website
rbnet.it
Hi
Someone asked for a recipe/guide on how to make a *.dbp package for the Pyra.

The infos that i share here are mostly taken from other people that have published many Pyra dbp's before me, so the gratitude should be sent to this great guys.

Also i followed the guide available on Pyra Wiki https://pyra-handheld.com/wiki/index.php?title=DBP_file_format
All the important info's and commands on how to create the dbp is available here.

Another important link is from slaeshjag (the man who created the dbp and the utils to manage it) post on forum
https://pyra-handheld.com/boards/threads/a-possible-pnd-system-replacement.74709/post-1312281

And another one is from Wally here https://pyra-handheld.com/boards/threads/creating-a-dbp-amended-instructions.76085/

Feel free to correct me if something is not correct or you have more infos on how to do it.

Let's start.

Once you have your app/game compiled or already available, made a directory with all the files/directory's needed.
I called it "made_dbp" but feel free to call it with a name of your choise.

Now you need a folder that contains the compiled exe along with the extra libs (if needed and not available inside the Debian image of the Pyra),
and the start script to execute all the operations needed to run correctly.

As an example we take the Halloween 3D game package :
i made a directory with the name "halloween3d" (under the master directory "made_dbp" that i created before) which will contain all the datas, the exe
and the libbass.so library (as is not present on Debian repo) needed to run the game.
Plus i added some files that need to be copied on the appdata (on the SDCard) to configure the game to run at best on Pyra
(they are some config files and the config file to swap the operation of the nubs).

Next to the "halloween3d" directory we must create another 3 dirs "meta", "icons" and "teasers"

Into "meta" you need to put the "default.desktop" file

here is an example from ptitSeb (HydraCastleLabyrinth) and one of mine (Halloween 3D)
[Desktop Entry]
Version=1.0.3.02
Type=Application
Categories=Game;ActionGame;
Name=Hydra Castle Labyrinth
Comment=Hydra Castle Labyrinth
Exec=hydracastlelabyrinth.sh
Icon=hydracastlelabyrinth.png
Terminal=false
StartupNotify=false
X-DBP-Screenshot=preview01.png

[Package Entry]
Id=hydracastlelabyrinth
Arch=armhf
Exec=hydracastlelabyrinth.sh
Name=Hydra Castle Labyrinth
Version=1.0.3.02
Icon=hydracastlelabyrinth.png
Dependency[deb]=libsdl2-2.0-0;libsdl2-mixer-2.0-0;

[Desktop Entry]
Version=1.0.0.01
Type=Application
Categories=Game;ActionGame;
Name=Halloween 3D
Comment=Halloween 3D a Free Crazy FPS with OpenSource Game Engine
Exec=halloween3d.sh
Icon=h3d.png
Terminal=false
StartupNotify=false

[Package Entry]
Id=farox_halloween3d
Arch=armhf
Exec=halloween3d.sh
Name=Halloween 3D
Appdata=halloween3d
Version=1.0.0.01
Icon=h3d.png
Dependency[deb]=libsdl1.2pyra;

Remember when you create a new desktop file that [Package Entry] need to be after [Desktop Entry].
To select the right category/sub-category of your app/game you must follow the rules of the freedesktop
available here https://specifications.freedesktop.org/menu-spec/latest/apa.html

Into the "icons" directory you must put the icons
in mine dir i have one file "h3d.png"

the "teasers" one should contain the screenshots for the Repo....but i have not added this to the package
and added manually to the repo. Look at ptitSeb default.desktop file on how he added one screenshot to the package.

Now you have all the directory's ready to build your DBP file.

Open a terminal session on the main directory ("made_dbp" in my case) and type this commands:

mksquashfs halloween3d target.squash -all-root -force-gid 0
(where halloween3d is the directory where are the game and all the files needed ...change it with you actual directory name)
It create a "target.squash" file

zip -Z store -r target.zip meta icons teasers
(it create a "target.zip" that contains the 3 dirs "meta" "icons" and "teasers")
On my example the teasers dir is empty.

cat target.squash target.zip > halloween3d.dbp
(it concatenate the files *.squash and *.zip into a new one (in my example halloween3d.dbp change it to your needs))

and finally
zip -A halloween3d.dbp
( fix the DBP package...naturally change the name of the dbp file to what have you created before).

Now copy the just created DBP file to the directory "dragonbox/packages" of your SDCard and test it.


Hope that will be usefull.
 
Hi all :)

@Farox : thank you very much for this detailed HOWTO, really appreciated !

One question remains though: regarding "Once you have your app/game compiled or already available", didn't you have to compile and install your stuff to a specific directory, the way we used to do on the Pandora (/mnt/utmp/my_app) ?

Isn't the future mount point of the DBP important ?

Cheers, Magic Sam
 
didn't you have to compile and install your stuff to a specific directory, the way we used to do on the Pandora (/mnt/utmp/my_app) ?
I'm not sure here, maybe for programs that need to be installed on the system, for Halloween 3D for example i simply compiled with make without changing anything on mount directory, then i made a tar.gz file of all the datas and then extracted during first run of the dbp.
Maybe is not the right way of doing, but it worked.

If someone more expert than me, want to clarify...is really appreciated :)
 
Back
Top