DBP file format: Difference between revisions

From Pyra Wiki
Jump to navigation Jump to search
(→‎Package Entry: Adding dbpd sources link where applicable)
Line 101: Line 101:
|-
|-
|Id
|Id
|R
|[https://dev.pyra-handheld.com/packages/dbp/-/blob/e0e58fe10a07ce1deb598dc5a6f794aaad9f10f1/dbp-validate-extracted/validate.c#L277 R]
|[https://dev.pyra-handheld.com/sebt3/pyraRepo/-/blob/566a9ffbbf914247654c63b7dc688018d96a2fcb/classes/UploadPage.php#L97 R]
|[https://dev.pyra-handheld.com/sebt3/pyraRepo/-/blob/566a9ffbbf914247654c63b7dc688018d96a2fcb/classes/UploadPage.php#L97 R]
|Unique identifier for the dbp file.
|Unique identifier for the dbp file.
Line 107: Line 107:
|-
|-
|Name
|Name
|R
|N
|[https://dev.pyra-handheld.com/sebt3/pyraRepo/-/blob/566a9ffbbf914247654c63b7dc688018d96a2fcb/classes/UploadPage.php#L102 R]
|[https://dev.pyra-handheld.com/sebt3/pyraRepo/-/blob/566a9ffbbf914247654c63b7dc688018d96a2fcb/classes/UploadPage.php#L102 R]
|Name of the package
|Name of the package
Line 113: Line 113:
|-
|-
|Arch
|Arch
|O
|[https://dev.pyra-handheld.com/packages/dbp/-/blob/e0e58fe10a07ce1deb598dc5a6f794aaad9f10f1/dbp-run/common/run.vala#L43 O]
|[https://dev.pyra-handheld.com/sebt3/pyraRepo/-/blob/566a9ffbbf914247654c63b7dc688018d96a2fcb/classes/UploadPage.php#L105 R]
|[https://dev.pyra-handheld.com/sebt3/pyraRepo/-/blob/566a9ffbbf914247654c63b7dc688018d96a2fcb/classes/UploadPage.php#L105 R]
|Binary architecture of that package
|Binary architecture of that package
|Arch=armhf
|Arch=armhf
|-
|Appdata
|[https://dev.pyra-handheld.com/packages/dbp/-/blob/e0e58fe10a07ce1deb598dc5a6f794aaad9f10f1/dbp-validate-extracted/validate.c#L292 O]
|N
|Name of the appdata to use (default: name of the package)
|Appdata=dosbox
|-
|-
|Icon
|Icon
|N
|[https://dev.pyra-handheld.com/packages/dbp/-/blob/e0e58fe10a07ce1deb598dc5a6f794aaad9f10f1/dbp-validate-extracted/validate.c#L283 O]
|[https://dev.pyra-handheld.com/sebt3/pyraRepo/-/blob/566a9ffbbf914247654c63b7dc688018d96a2fcb/classes/UploadPage.php#L119 O]
|[https://dev.pyra-handheld.com/sebt3/pyraRepo/-/blob/566a9ffbbf914247654c63b7dc688018d96a2fcb/classes/UploadPage.php#L119 O]
|Icon of the package (found in the "icons" directory)
|Icon of the package (found in the "icons" directory)
Line 131: Line 137:
|-
|-
|Exec
|Exec
|R
|[https://dev.pyra-handheld.com/packages/dbp/-/blob/e0e58fe10a07ce1deb598dc5a6f794aaad9f10f1/dbpd/package.c#L169 O]
|N
|N
|TODO
|List of executables to export With environment override
|Exec=bin/dosbox;dosbox.launch
|Exec=bin/dosbox;dosbox.launch
|-
|NoEnvExec
|[https://dev.pyra-handheld.com/packages/dbp/-/blob/e0e58fe10a07ce1deb598dc5a6f794aaad9f10f1/dbpd/package.c#L170 O]
|N
|List of executables to export Without environment override
|
|-
|-
|Dependency[deb]
|Dependency[deb]
|R
|[https://dev.pyra-handheld.com/packages/dbp/-/blob/e0e58fe10a07ce1deb598dc5a6f794aaad9f10f1/libdbpmgr/dependencies.c#L555 O]
|[https://dev.pyra-handheld.com/sebt3/pyraRepo/-/blob/566a9ffbbf914247654c63b7dc688018d96a2fcb/classes/UploadPage.php#L115 O]
|[https://dev.pyra-handheld.com/sebt3/pyraRepo/-/blob/566a9ffbbf914247654c63b7dc688018d96a2fcb/classes/UploadPage.php#L115 O]
|Debian packages requiered.
|Debian packages requiered.
Line 143: Line 155:
|-
|-
|Dependency[dbp]
|Dependency[dbp]
|R
|[https://dev.pyra-handheld.com/packages/dbp/-/blob/e0e58fe10a07ce1deb598dc5a6f794aaad9f10f1/libdbpmgr/dependencies.c#L556 O]
|[https://dev.pyra-handheld.com/sebt3/pyraRepo/-/blob/566a9ffbbf914247654c63b7dc688018d96a2fcb/classes/UploadPage.php#L113 O]
|[https://dev.pyra-handheld.com/sebt3/pyraRepo/-/blob/566a9ffbbf914247654c63b7dc688018d96a2fcb/classes/UploadPage.php#L113 O]
|dbp package requiered to run this one.
|dbp package requiered to run this one.

Revision as of 19:48, 19 March 2021

Please note: we're not going to describe something as painful as the pxml file here :P

file structure

a .dbp files is composed of 2 concatenated files :

  1. a squashfs file
  2. an *uncompressed* zip

The squashfs part contain your application(s) and everything it might need to run.

The zip part contain the meta-data related to the DBP.

Sample session to build a dbp

Say you have a your application in a "rootfs" directory and a meta" directory containing the metadata.

 $ ls
 icons  meta  rootfs
 $ mksquashfs rootfs target.squash -all-root -force-gid 0
 Creating 4.0 filesystem on target.squash, block size 131072.
 ....
 $ zip -r target.zip meta icons
   adding: meta/ (stored 0%)
 ...
 $ cat target.squash target.zip > target.dbp

meta-data structure

the desktop file(s)

This file format is normed by the free-desktop community. The specs can be found here.

Desktop Entry

In a dbp file, none to many [Desktop Entry] can be create. Each of them will be an application from withing the dbp package. Each [Desktop Entry] section need to be a dedicated file. Here is the standard fields the dbp system reuse.

LABEL dbpd Repo Description Example
Name R R Name of the app Name=dosbox
Comment N O Description of the app Comment=A DOS emulator
Categories N O Categories Categories=Game;Emulator
Exec R N The binary in the squashfs part to start Exec=dosbox
Icon O O The icon in the "icons" directory (expect .png) Icon=dosbox.png
Version N N Version of the app Version=0.74+svn20200103
Type N N Type of app Type=Application
Terminal N N Spawn a terminal for this app to run in, if set. Terminal=false

Package Entry

This section doesnt exist in the free-desktop specification (So this is dbp exclusive stuff here). One and only one of this section should be found per dbp package. Here are the fields :

LABEL dbpd Repo Description Example
Id R R Unique identifier for the dbp file. Id=dosbox
Name N R Name of the package Name=DOSbox
Arch O R Binary architecture of that package Arch=armhf
Appdata O N Name of the appdata to use (default: name of the package) Appdata=dosbox
Icon O O Icon of the package (found in the "icons" directory) Icon=dosbox.png
Version N R Version of the package Version=0.74+svn20200103
Exec O N List of executables to export With environment override Exec=bin/dosbox;dosbox.launch
NoEnvExec O N List of executables to export Without environment override
Dependency[deb] O O Debian packages requiered. Dependency[deb]=libsdl2-image-2
Dependency[dbp] O O dbp package requiered to run this one. Dependency[dbp]=dosbox

legend

letter meaning
R Required
O Optionnal
N Not used