I have made a game and I want to make debian installer for Ubuntu. Could you reccomend me app, that allows me to make directory and save my game data in it, than packs it in .deb. Most important, so after install, it adds shortcut in Unity dash and side bar. Please, reccomend me a good, free software to make this.
1 Answers
There is a lot to say about (creating) Debian packages, and information can be overwhelming.
The example below is to make the (very) first start, and create a Debian installer, as basic as it possibly gets, suited for "home" purposes.
Debian packages
A Debian package is in principle a scaled version of your system, seen from the perspective of the root directory. Directories are exactly organized like on your computer.
Looking inside a .deb installer file with archive manager, you can see where files and (possibly) directories will be installed:

In this example, files will be installed in /etc, /usr and /opt (the folder DEBIAN contains installation files, see further below)
Browsing deeper into /usr, you can see the .desktop file (represening your application in Dash) is installed in /usr/share/applications/

When an application is installed, the contents of this scaled version is "projected" on to your "real" system.
A simple example; create a first installer
Say you have a small application (script in this case), that you want to install into the directory /opt, together with its application icon. To represent the applications in Dash, you will also need a .desktop file.
Our example application will only show you a window, saying you succeeded:

The "application":
Copy the script below into an empty file, save it as
ididit(don't use theshextension)#!/bin/sh zenity --info --text 'It seems you succeeded making your first Debian installer...'The icon:
Simply download the icon below as
ididit.png
The
.desktopfile[Desktop Entry] Name=I did it! Exec=/opt/ididit/ididit Icon=/opt/ididit/ididit.png Type=ApplicationCopy it and save it as
ididit.desktop
Now create the scaled directory:
- Create an empty project folder somehwere, named (e.g.)
ididit_1.0-1 Inside this project folder, create the directories:
/opt/ididit /usr/share/applications /DEBIANThe last directory will not be installed, but contains files, needed by the package manager (see further below).
Copy both your script, named
ididit(noshextension), and the icon, namedididtit.pnginto your newly created directory:[.../ididit_1.0-1] /opt/ididitMake the script executable.
Copy the
.desktopfile into the directory:[.../ididit_1.0-1] /usr/share/applicationsThe
/DEBIANdirectory contains files, used by the package manager. It can contain a varying number of files, postinst scripts etc. (look here and here for more information). Since this is meant to be an example as simple as possible, we'll keep it to just one necessary (minimized) file: the control file:Package: ididit Version: 1.0-1 Section: unknown Architecture: amd64 Depends: zenity Maintainer: Your Name <your_email> Description: This is my first Debian installer.Copy it into an empty file, save it as
controlin theDEBIANfolder.note: replace
Architecture: amd64byArchitecture: i386if you use 32bit.Run the following command to make your first installer:
dpkg-deb --build /path/to/ididit_1.0-1The Debian installer will be created in the same directory as your project folder.
Now you can install it by:
sudo dpkg -i <package>
And uninstall it by:
sudo dpkg -r <package>
If all went well, you can run it from Dash.

If you install it by Software Center, it will complain about the "bad quality" of the package, since we skipped a number of files etc. To see exactly what the complaints are, you can run in a terminal:
lintian /path/to/package
As mentioned, this is only a small instruction on how to make a first working Debian installer. It might encourage you to develop your skills further into creating lintian- proof Debian installers.
More to read: Ubuntu packaging guide (and many, many other sources.)
- 85,475