* Includes your executable and pixmap as well as creating an app desktop file (app shortcut in /usr/local/share/application)

* Stores each applications settings in files which you can reuse (make changes and redeploy)

If enough people are interested in this kind of app, let me know, because I would spend a little extra time to make it a bit friendlier (file associations, deployment save to folder, license file support, and desktop actions).

Note: If anyone is familiar with deb files, how do you normally create the dependencies section of the deb control file? I want to make sure my programmatic method to find them isn't overkill.

Re: [Lazarus] Deployment tool: make deb

> If enough people are interested in this kind of app, let me know, because I would spend a little extra time to make it a bit friendlier (file associations, deployment save to folder, license file support, and desktop actions).

Re: [Lazarus] Deployment tool: make deb

To be clear, I didn't upload the tool. I am just asking if people are interested. I'll probably add a few features and use it to create i386 and amd64 deb files containing itself, then post those to some download page which I've yet to create. I'll let you know.

To install either double click the deb and use your package manager program (Software Center on Ubuntu) and press install.

Or type "sudo dpkg -i makedeb_1.0-1-x86_64.deb"

If you don't already have apt-file installed, installing this deb should also install apt-file. The apt-file program is required to look up package names of your application's dependencies. It should build the cache when installed, but if you need to do it manually (I don't believe you do) the command would be "sudo apt-file update".

To run the application type makedeb in any terminal, or search for Debian Packager in the dash (Ubuntu).

Usage should be self explanatory. You either type of the path to you application, or press the button with the green plus and choose your application. Fill out the fields and press build.

A few tips:

You can pick the desktop icon by clicking the big image in the top left and picking a graphic file.

The caption value is what will appear in the dash or if you pin the icon somewhere.

Search for you program using with apt-cache search or aptitude search using the package name.

Your short description will appear next to the package name when searching.

Re: [Lazarus] Deployment tool: make deb

>I've uploaded a 64bit version
> which you can download below. A 32bit version will be coming soon if you
> should need it.

>
> http://cache.getlazarus.org/debs/makedeb_1.0-1-x86_64.deb>
> To install either double click the deb and use your package manager
> program (Software Center on Ubuntu) and press install.
> Or type "sudo dpkg -i makedeb_1.0-1-x86_64.deb"
>
> If you don't already have apt-file installed, installing this deb should
> also install apt-file. The apt-file program is required to look up
> package names of your application's dependencies. It should build the
> cache when installed, but if you need to do it manually (I don't believe
> you do) the command would be "sudo apt-file update".

It turns out that you do need to do this, at least on my system (Kub
14.04 VM). It does install apt-file but immediately one gets a
notification that it needs to be "updated" and raises a dialog to allow
you to do so. The first few go rounds I ran the dialog, it opens a
terminal, runs and then hangs at the end.

After googling and trying things what one needs to do is IGNORE/CANCEL
that update notification because it runs with only user permissions!
Then do the "sudo apt-file update" manually, that works properly.

And thanks for the instructions you provided in private email, all
worked great, I paste an important bit here for others if they get a
missing libxml2.so message (from what I understand this is fixed now in
later build of Deb Packager):

Fix the problem by creating a symlink to libxml2.so.2 in /usr/lib/ folder.

How will this work with updates, transparently or will we need to do
something special?

Thanks for doing this! Looks like it is going to be very very handy,
easy, convenient, and quick. Is this open to dev on git or svn?

Julius

>
> To run the application type makedeb in any terminal, or search for
> Debian Packager in the dash (Ubuntu).
>
> Usage should be self explanatory. You either type of the path to you
> application, or press the button with the green plus and choose your
> application. Fill out the fields and press build.
>
> A few tips:
>
> You can pick the desktop icon by clicking the big image in the top left
> and picking a graphic file.
> The caption value is what will appear in the dash or if you pin the icon
> somewhere.
> Search for you program using with apt-cache search or aptitude search
> using the package name.
> Your short description will appear next to the package name when searching.
> Versions should be formatted majorver.minorver-packagever eg. 0.9-1
> Author should be in the form of Your Name <[hidden email]> <mailto:[hidden email]>>
>
>
> --
> _______________________________________________
> Lazarus mailing list
> [hidden email]> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>

Icon: Click the icon to pick a graphics file. Icons should support transparency, so select either a png, xpm, ico, or svg image file. They will all be resized as 64x64 pngs and packed into your deb, then deployed to /usr/local/share/icons/<package name>.png.

Application: The path to your executable. The binary format must be either i386 or amd64 architecture. Any other format will be rejected. The binary will be stripped before being placed in the deb.

Caption: The name of your application as seen when searching in the Ubuntu dash or other graphical application launcher. Will appear in the Name field of the generated desktop file deployed to /user/local/share/applications/<package name>.desktop.

Package name: The name of the package as seen by apt-get, dpkg, aptitude, apt-file, and other command line package tools. I force you to use an identifier name, i.e. following the same rules at variables. No spaces, no punctuation, letters, numbers, and underscore. Must start with a letter or underscore.

Package version: Should be app major version dot minor version dash package version. e.g. 1.0-1

Category: Used by some systems to group applications by functionality. Will be inserted into the desktop file and the DEBIAN control file.

Author: You name and email in to form of "John Doe <[hidden email]>" without the quotes.

Website: The url where people can download the deb from or read about the program.

Short description: Will appear in under next to the package name as the description in your package manager (apt-get, aptitude, Ubuntu Software Center).

Long description: Will appear in Ubuntu Software Center after the fold.

When you press build, make deb does the following:

Validates the fields are filled in correctly.

Checks that the application file is a valid amd64 or i386 executable binary.

Your previous deb file for that architecture is deleted if it already exists.

The deb folder structure is created, if it doesn't exists in the same directory at the application file.

You applicate is copied to app-folder/packagename_version/usr/local/bin.

Makedeb then locates the shared object files (.so) linked in the elf header of your application.

It checks if the .so has already been cached and associated with a package name and version..

If the .so hasn't been cached, apt-file is used to lookup the package and version (this can take a while).

The .so package name and version is then cached in your $HOME/.config/makedeb folder.

And finally your project information is saved to the same name as your application file with the .mkdeb extension added. The next time you open the file with makedeb (using the button next to the Application field). It will reuse your last settings.

You can then increment the application or package versions numbers, build again, and uploads the new deb file to your website. The user can download the new version, run "dpkg -i my_awesome_app_1.1-1-amd64.deb" and he will be upgraded, or double click the file to upgrade through a graphical interface tool.

If you want automatic upgrades (sudo apt-get upgrade), then you'll need to put the debs in a PPA, but that is beyond the scope of this email.

Re: [Lazarus] Deployment tool: make deb

I will definitely use this, please keep us apprised of deb packager
updates (for instance the umlaut ö problem)?

But you are right that it is ready to use now, though I'm still at a
loss as to why my program does not show up in Kub's utilities menu, your
deb packager shows up fine in development menu. Any ideas?

> Here's how it will work:
>
> On start of makedeb it checks if apt-file is installed.
> If apt-file is not installed the program will ask to install it for
> you or close.
> If you say okay to install, it'll popup the gksudo prompt and
> install apt-file.
> Else makedeb will terminate
>
> Once apt-file is detected it'll check that you have the cache has been built
> If not it will run apt-file update without sudo, to build the local
> apt-file user cache

I was reading about this and I, personally, prefer the manual sudo
method simply because the user permission terminal window for the
"apt-file update" hangs and never returns to a prompt. Maybe that's not
a real issue but I am reassured when I run it under sudo that the
terminal window returns to normal. The downside (if it is one), as
discussed on the sites I've read, is that once this decision is made
then the use of sudo must be consistent.

>
> After apt-file and its cache is working, you can then fill out the form
> with the information in you deb package:
>
> http://cache.getlazarus.org/images/makedeb-file.png>
> Fields Explained
>
> Icon: Click the icon to pick a graphics file. Icons should support
> transparency, so select either a png, xpm, ico, or svg image file. They
> will all be resized as 64x64 pngs and packed into your deb, then
> deployed to /usr/local/share/icons/<package name>.png.
>
> Application: The path to your executable. The binary format must be
> either i386 or amd64 architecture. Any other format will be rejected.
> The binary will be stripped before being placed in the deb.
>
> Caption: The name of your application as seen when searching in the
> Ubuntu dash or other graphical application launcher. Will appear in the
> Name field of the generated desktop file deployed to
> /user/local/share/applications/<package name>.desktop.
>
> Package name: The name of the package as seen by apt-get, dpkg,
> aptitude, apt-file, and other command line package tools. I force you to
> use an identifier name, i.e. following the same rules at variables. No
> spaces, no punctuation, letters, numbers, and underscore. Must start
> with a letter or underscore.
>
> Package version: Should be app major version dot minor version dash
> package version. e.g. 1.0-1
>
> Category: Used by some systems to group applications by functionality.
> Will be inserted into the desktop file and the DEBIAN control file.
>
> Author: You name and email in to form of "John Doe <[hidden email]> <mailto:[hidden email]>>" without the quotes.
>
> Website: The url where people can download the deb from or read about
> the program.
>
> Short description: Will appear in under next to the package name as the
> description in your package manager (apt-get, aptitude, Ubuntu Software
> Center).
>
> Long description: Will appear in Ubuntu Software Center after the fold.
>
> When you press build, make deb does the following:
>
> Validates the fields are filled in correctly.
> Checks that the application file is a valid amd64 or i386 executable binary.
> Your previous deb file for that architecture is deleted if it already
> exists.
> The deb folder structure is created, if it doesn't exists in the same
> directory at the application file.
> You applicate is copied to app-folder/packagename_version/usr/local/bin.
> Makedeb then locates the shared object files (.so) linked in the elf
> header of your application.
> It checks if the .so has already been cached and associated with a
> package name and version..
> If the .so hasn't been cached, apt-file is used to lookup the package
> and version (this can take a while).
> The .so package name and version is then cached in your
> $HOME/.config/makedeb folder.
> It copies your icon file to app-folder/packagename_version/usr/share/icons.
> It builds a desktop file and copies it to
> app-folder/packagename_version/usr/share/applications.
> It builds the app-folder/packagename_version/DEBIAN/control file.
> It builds the deb packagename_version-architecture.deb. e.g.
> my_awesome_app_1.0-1-amd64.deb
>
> And finally your project information is saved to the same name as your
> application file with the .mkdeb extension added. The next time you open
> the file with makedeb (using the button next to the Application field).
> It will reuse your last settings.
>
> You can then increment the application or package versions numbers,
> build again, and uploads the new deb file to your website. The user can
> download the new version, run "dpkg -i my_awesome_app_1.1-1-amd64.deb"
> and he will be upgraded, or double click the file to upgrade through a
> graphical interface tool.
>
> If you want automatic upgrades (sudo apt-get upgrade), then you'll need
> to put the debs in a PPA, but that is beyond the scope of this email.
>
>
>
> --
> _______________________________________________
> Lazarus mailing list
> [hidden email]> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>

Re: [Lazarus] Deployment tool: make deb

I'm not sure why it's not showing up. Do an "ls -l /usr/share/applications" and see if there is a package.desktop file there related to your application. You can "cat /usr/share/applications/yourapp.desktop" and check that the contents are correct. Maybe I am using the wrong category string. You should be eable to find it by Caption in the dash or whatever spotlight type tool you desktop provides.

I'll be posting another version of makedeb (final perhaps) this weekend.

Re: [Lazarus] Deployment tool: make deb

Ahhh, your cpugraph doesn't show up either, utilities is misspelled.

On 11/06/2015 10:15 AM, Anthony Walter wrote:

> I'm not sure why it's not showing up. Do an "ls -l
> /usr/share/applications" and see if there is a package.desktop file
> there related to your application. You can "cat
> /usr/share/applications/yourapp.desktop" and check that the contents are
> correct. Maybe I am using the wrong category string. You should be eable
> to find it by Caption in the dash or whatever spotlight type tool you
> desktop provides.
>
> I'll be posting another version of makedeb (final perhaps) this weekend.
>
>
> --
> _______________________________________________
> Lazarus mailing list
> [hidden email]> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>