Wally
I am a banana!
Hey all, made some instructions for creating a DBP file incase some people wish to get their pyra foo up to scratch.
Packaging DBP files
29/06/2015
1. Package Prerequisites
You should have the following out before you begin to package an application
i) *nix box, Macintosh or cygwin (Windows)
ii) squashfs tools
2. Create directory structure for DBP
Applicationname
|
-
gamedata (This contains any files to execute the application, including scripts)
meta (This is for .desktop files)
icons (For icons, in PNG format with no size restrictions)
3. Create application launch scripts
You need to make a script to target so that the application can be launched.
4. Create metadata (.desktop files)
Some things to note:
i) Default.Desktop is a requirement for all packages and needs a [Package Entry] then [Desktop Entry], both are explained shortly.
ii) Categories are FreeDesktop Standard
iii) Id needs to be unique, nothing else can be the same identifier.
Please see example / comments for Leisure Suit Larry Package, stuff in bold should not be placed.
[Package Entry] - Required for package initialisation,
Id=leisuresuitlarry - Unique ID
Name=Leisure Suit Larry 1 - Name of Application (This is launched when you double click .DBP file)
Arch=armhf - Architecture supported
Exec=larry1.launch;larry2.launch;larry3.launch;larry5.launch;larry6.launch - Other executables contained in package, each must be initialised here or there may be problems
PkgDependency=scummvm - Dependancies for package, in this case scummvm is used and is located in /usr/local/bin
Version=1.0.0 - Package Version
Appdata=larry - AppData Folder, this is for ALL applications inside package
Icon=larry1.png - Of course the icon for the default dbp
[Desktop Entry] - default.desktop can contain One Desktop Entry, each additional desktop entry needs its own .desktop file, this is displayed in the Menu
Version=1.0 - Version of Package
Type=Application - Type for category
Categories=Game;AdventureGame - Categories for game
Name=Leisure Suit Larry 1 - Name of first Desktop Entry
Exec=larry1.launch - Executable for target
Icon=larry1.png - Icon for Menu
There is no limit to .desktop files at this point but default.desktop is required.
Additional Desktop initialisers can be found here http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
5. Compiling Desktop File
Once you have everything you can now compile a DBP.
I have made a handy little script to do this but it’s not final at this stage, you may not wish to have compression but whatever.
#!/bin/bash
#capture folder name
folder=$(pwd)
#grab DBP Directory name
#DBPNAME = $(basename “$folder”)
# create gamedata squashfs file
mksquashfs gamedata gamedata.sqfs -comp xz
# zip metadata and icon folders
zip -r data.zip meta icons
# append gamedata squashfs file to zip
cat gamedata.sqfs data.zip > $(basename "$folder").dbp
# clean up
rm -r data.zip gamedata.sqfs
You Should now have a .DBP file, place this in a read /write location and double click it!
Edit:
Fixed Previews / appdata dir
Changed metadata to meta
Packaging DBP files
29/06/2015
1. Package Prerequisites
You should have the following out before you begin to package an application
i) *nix box, Macintosh or cygwin (Windows)
ii) squashfs tools
2. Create directory structure for DBP
Applicationname
|
-
gamedata (This contains any files to execute the application, including scripts)
meta (This is for .desktop files)
icons (For icons, in PNG format with no size restrictions)
3. Create application launch scripts
You need to make a script to target so that the application can be launched.
4. Create metadata (.desktop files)
Some things to note:
i) Default.Desktop is a requirement for all packages and needs a [Package Entry] then [Desktop Entry], both are explained shortly.
ii) Categories are FreeDesktop Standard
iii) Id needs to be unique, nothing else can be the same identifier.
Please see example / comments for Leisure Suit Larry Package, stuff in bold should not be placed.
[Package Entry] - Required for package initialisation,
Id=leisuresuitlarry - Unique ID
Name=Leisure Suit Larry 1 - Name of Application (This is launched when you double click .DBP file)
Arch=armhf - Architecture supported
Exec=larry1.launch;larry2.launch;larry3.launch;larry5.launch;larry6.launch - Other executables contained in package, each must be initialised here or there may be problems
PkgDependency=scummvm - Dependancies for package, in this case scummvm is used and is located in /usr/local/bin
Version=1.0.0 - Package Version
Appdata=larry - AppData Folder, this is for ALL applications inside package
Icon=larry1.png - Of course the icon for the default dbp
[Desktop Entry] - default.desktop can contain One Desktop Entry, each additional desktop entry needs its own .desktop file, this is displayed in the Menu
Version=1.0 - Version of Package
Type=Application - Type for category
Categories=Game;AdventureGame - Categories for game
Name=Leisure Suit Larry 1 - Name of first Desktop Entry
Exec=larry1.launch - Executable for target
Icon=larry1.png - Icon for Menu
There is no limit to .desktop files at this point but default.desktop is required.
Additional Desktop initialisers can be found here http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
5. Compiling Desktop File
Once you have everything you can now compile a DBP.
I have made a handy little script to do this but it’s not final at this stage, you may not wish to have compression but whatever.
#!/bin/bash
#capture folder name
folder=$(pwd)
#grab DBP Directory name
#DBPNAME = $(basename “$folder”)
# create gamedata squashfs file
mksquashfs gamedata gamedata.sqfs -comp xz
# zip metadata and icon folders
zip -r data.zip meta icons
# append gamedata squashfs file to zip
cat gamedata.sqfs data.zip > $(basename "$folder").dbp
# clean up
rm -r data.zip gamedata.sqfs
You Should now have a .DBP file, place this in a read /write location and double click it!
Edit:
Fixed Previews / appdata dir
Changed metadata to meta
Last edited by a moderator: