Re: How to optify in MADDE?

Re: How to optify in MADDE?

Antonio Aloisio
Karma: 261
2010-06-10 10:49 UTC
Hi Sasha,
Take a look at this example.. remove targets you don't need

Regards,
Antonio

TEMPLATE = app
TARGET = myapp
DEPENDPATH += .
INCLUDEPATH += .
DESTDIR = ../

# Input
HEADERS += mainwindow.h
SOURCES += main.cpp mainwindow.cpp
RESOURCES += application.qrc

unix {
#VARIABLES
isEmpty(PREFIX) {
PREFIX = /opt/usr
}
BINDIR = $$PREFIX/bin
DATADIR = /usr/share

DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"

#MAKE INSTALL
INSTALLS += target desktop iconxpm icon26 icon40 icon64

target.path =$$BINDIR

desktop.path = $$DATADIR/applications/hildon
desktop.files += qt-maemo-example.desktop

iconxpm.path = $$DATADIR/pixmap
iconxpm.files += data/maemo/qt-maemo-example.xpm

icon26.path = $$DATADIR/icons/hicolor/26x26/apps
icon26.files += data/26x26/qt-maemo-example.png

icon40.path = $$DATADIR/icons/hicolor/40x40/apps
icon40.files += data/40x40/qt-maemo-example.png

icon64.path = $$DATADIR/icons/hicolor/64x64/apps
icon64.files += data/64x64/qt-maemo-example.png


On Thu, Jun 10, 2010 at 1:15 PM, Sascha Mäkelä <sascha.makela@gmail.com>wrote:

> OK, could someone give me or point me to example on how to do this?
> Basically the only the src.pro and the .desktop files need to be modified,
> right?
>
> Cheers,
> Sascha
>
>
> On Thu, Jun 10, 2010 at 12:49, daniel wilms <daniel.wilms@nokia.com>wrote:
>
>> Hi,
>>
>> ext Daniil Ivanov wrote:
>>
>>> Hi Daniel!
>>>
>>> You have to keep ratio 80%/20% /opt/usr it's not so easy to achieve
>>> manually.
>>>
>>>
>>
>> it is not required to have this ratio and I think this is rather confusing
>> to give that out as a goal. The easiest way is to put everything into a
>> separate application-specific folder in opt and the desktop file in it's
>> place.
>>
>>
>> Moreover, if you put binary to /opt on MADDE dpkg-buildpackage will
>>> fail to set
>>> execution bit to your binary (I hope it will be fixed soon).
>>>
>>>
>>>
>>
>> This is what I said. It is fixed already (this morning ;) ) and should be
>> in the next release.
>>
>>
>> Daniel
>>
>> Thanks, Daniil.
>>>
>>> On Thu, Jun 10, 2010 at 11:45 AM, daniel wilms <daniel.wilms@nokia.com>
>>> wrote:
>>>
>>>
>>>> Hi,
>>>>
>>>> ext Daniil Ivanov wrote:
>>>>
>>>>
>>>>> Hi Daniel!
>>>>>
>>>>> Of course manual optification is the way to go when there is no other
>>>>> way.
>>>>> But is it so that installing scratchbox and performing optification
>>>>> there is considered as too difficult?
>>>>>
>>>>>
>>>>>
>>>> I think the manual way is reasonably easy. Or which drawback do you see
>>>> here? If you have set up your environment already with MADDE, the
>>>> optification should not be a reason to install the Platform SDK with
>>>> Scratchbox etc. There is just one bug in MADDE, if you package your
>>>> application that way, you have to set the rights of your binary to
>>>> executable in the postinst file.
>>>>
>>>>
>>>>
>>>>
>>>>> BTW, are there any chances maemo-optify will be included into MADDE?
>>>>>
>>>>>
>>>>>
>>>> I doubt that, but I'm not sure. Will find that out.
>>>>
>>>> Daniel
>>>>
>>>>
>>>>> Thanks, Daniil.
>>>>>
>>>>> On Thu, Jun 10, 2010 at 11:12 AM, daniel wilms <daniel.wilms@nokia.com
>>>>> >
>>>>> wrote:
>>>>>
>>>>>
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> ext Sascha Mäkelä wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> OK and how would I do that? Should I edit the src.pro <
>>>>>>> http://src.pro>
>>>>>>> file and how should it look? Is something else needed?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> one thing you could do is putting the files of the application (like
>>>>>> binary,
>>>>>> images etc.) in a folder like /opt/myapp/. This you can specify in
>>>>>> your
>>>>>> src.pro. There is a packaging guide for Qt applications available in
>>>>>> the
>>>>>> wiki [1]. After doing that you can then have the right path to your
>>>>>> executable in the *.desktop file.
>>>>>>
>>>>>> 1. http://wiki.maemo.org/Packaging_a_Qt_application
>>>>>>
>>>>>> Daniel
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Thanks,
>>>>>>> Sascha
>>>>>>>
>>>>>>> On Thu, Jun 10, 2010 at 10:53, Pasi Savanainen <
>>>>>>> pasi.savanainen@nixu.com
>>>>>>> <mailto:pasi.savanainen@nixu.com>> wrote:
>>>>>>>
>>>>>>> On 6/9/10 5:58 PM, Sascha Mäkelä wrote:
>>>>>>> > How can I optify a package in Windows using MADDE? Does this work:
>>>>>>> >
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> http://maemo.org/packages/package_instance/view/fremantle_extras_free_armel/maemo-optify/0.2.1/
>>>>>>> >
>>>>>>> > If it does, how can I install it to MADDE?
>>>>>>> >
>>>>>>> > Cheers,
>>>>>>> > Sascha
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> > _______________________________________________
>>>>>>> > maemo-developers mailing list
>>>>>>> > maemo-developers@maemo.org <mailto:maemo-developers@maemo.org>
>>>>>>> > https://lists.maemo.org/mailman/listinfo/maemo-developers
>>>>>>>
>>>>>>> You cannot use that with MADDE, because maemo-optify* commands use
>>>>>>> internally some dpkg* command options that are not implemented by
>>>>>>> MADDE.
>>>>>>> You have to do optify our packages by hand.
>>>>>>>
>>>>>>> -- Pasi
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
>
>
>

  •  Reply

Re: How to optify in MADDE?

daniel wilms
Karma: 597
2010-06-10 10:55 UTC
ext Sascha Mäkelä wrote:
> OK, could someone give me or point me to example on how to do this?
> Basically the only the src.pro <http://src.pro> and the .desktop files
> need to be modified, right?
I will post something how to do that and will publish it latest
tomorrow, then you will have an example with some explanations. Here
some advises:

1) Put all your application files, apart from your *.desktop file into a
folder like /opt/<application-name>. This you can do by setting the path
variable of the INSTALL target used in the *.pro file.

2) Point in the desktop file to your executable, like:
X-Path=/opt/<application-name>/<application-executable>

3) Because of the bug mentioned earlier, add a file called postinst in
your debian-folder, which looks like:

#!/bin/sh
chmod +x /opt/<application-name>/<application-executable>


As I said, I will post a more detailed example soon. This was just in
brief how it should work.

Daniel

>
> Cheers,
> Sascha
>
> On Thu, Jun 10, 2010 at 12:49, daniel wilms <daniel.wilms@nokia.com
> <mailto:daniel.wilms@nokia.com>> wrote:
>
> Hi,
>
> ext Daniil Ivanov wrote:
>
> Hi Daniel!
>
> You have to keep ratio 80%/20% /opt/usr it's not so easy to
> achieve manually.
>
>
>
> it is not required to have this ratio and I think this is rather
> confusing to give that out as a goal. The easiest way is to put
> everything into a separate application-specific folder in opt and
> the desktop file in it's place.
>
>
> Moreover, if you put binary to /opt on MADDE
> dpkg-buildpackage will
> fail to set
> execution bit to your binary (I hope it will be fixed soon).
>
>
>
>
> This is what I said. It is fixed already (this morning ;) ) and
> should be in the next release.
>
>
> Daniel
>
> Thanks, Daniil.
>
> On Thu, Jun 10, 2010 at 11:45 AM, daniel wilms
> <daniel.wilms@nokia.com <mailto:daniel.wilms@nokia.com>> wrote:
>
>
> Hi,
>
> ext Daniil Ivanov wrote:
>
>
> Hi Daniel!
>
> Of course manual optification is the way to go when
> there is no other
> way.
> But is it so that installing scratchbox and
> performing optification
> there is considered as too difficult?
>
>
>
> I think the manual way is reasonably easy. Or which
> drawback do you see
> here? If you have set up your environment already with
> MADDE, the
> optification should not be a reason to install the
> Platform SDK with
> Scratchbox etc. There is just one bug in MADDE, if you
> package your
> application that way, you have to set the rights of your
> binary to
> executable in the postinst file.
>
>
>
>
> BTW, are there any chances maemo-optify will be
> included into MADDE?
>
>
>
> I doubt that, but I'm not sure. Will find that out.
>
> Daniel
>
>
> Thanks, Daniil.
>
> On Thu, Jun 10, 2010 at 11:12 AM, daniel wilms
> <daniel.wilms@nokia.com <mailto:daniel.wilms@nokia.com>>
> wrote:
>
>
>
> Hi,
>
> ext Sascha Mäkelä wrote:
>
>
>
> OK and how would I do that? Should I edit the
> src.pro <http://src.pro> <http://src.pro>
> file and how should it look? Is something else
> needed?
>
>
>
> one thing you could do is putting the files of the
> application (like
> binary,
> images etc.) in a folder like /opt/myapp/. This
> you can specify in your
> src.pro <http://src.pro>. There is a packaging
> guide for Qt applications available in the
> wiki [1]. After doing that you can then have the
> right path to your
> executable in the *.desktop file.
>
> 1. http://wiki.maemo.org/Packaging_a_Qt_application
>
> Daniel
>
>
>
>
>
> Thanks,
> Sascha
>
> On Thu, Jun 10, 2010 at 10:53, Pasi Savanainen
> <pasi.savanainen@nixu.com
> <mailto:pasi.savanainen@nixu.com>
> <mailto:pasi.savanainen@nixu.com
> <mailto:pasi.savanainen@nixu.com>>> wrote:
>
> On 6/9/10 5:58 PM, Sascha Mäkelä wrote:
> > How can I optify a package in Windows using
> MADDE? Does this work:
> >
>
>
> http://maemo.org/packages/package_instance/view/fremantle_extras_free_armel/maemo-optify/0.2.1/
> >
> > If it does, how can I install it to MADDE?
> >
> > Cheers,
> > Sascha
> >
> >
> >
> >
> > _______________________________________________
> > maemo-developers mailing list
> > maemo-developers@maemo.org
> <mailto:maemo-developers@maemo.org>
> <mailto:maemo-developers@maemo.org
> <mailto:maemo-developers@maemo.org>>
> >
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
> You cannot use that with MADDE, because
> maemo-optify* commands use
> internally some dpkg* command options that
> are not implemented by
> MADDE.
> You have to do optify our packages by hand.
>
> -- Pasi
>
>
>
>
>
> _______________________________________________
> maemo-developers mailing list
> maemo-developers@maemo.org
> <mailto:maemo-developers@maemo.org>
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
>
>
>
>
>
>
> _______________________________________________
> maemo-developers mailing list
> maemo-developers@maemo.org <mailto:maemo-developers@maemo.org>
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
>

  •  Reply

Re: How to optify in MADDE?

Ville Vainio
Karma: 295
2010-06-10 11:06 UTC
On Thu, Jun 10, 2010 at 12:49 PM, daniel wilms <daniel.wilms@nokia.com> wrote:

>>   Moreover, if you put binary to /opt on MADDE dpkg-buildpackage will
>> fail to set
>>   execution bit to your binary (I hope it will be fixed soon).
>>
>>
>
> This is what I said. It is fixed already (this morning ;) ) and should be in
> the next release.

What's the schedule for next release? We have several commercial
developers complaining about this issue already, and it would be nice
to point them to fixed madde instead of patch/workaround...




>
> Daniel
>
>> Thanks, Daniil.
>>
>> On Thu, Jun 10, 2010 at 11:45 AM, daniel wilms <daniel.wilms@nokia.com>
>> wrote:
>>
>>>
>>> Hi,
>>>
>>> ext Daniil Ivanov wrote:
>>>
>>>>
>>>> Hi Daniel!
>>>>
>>>>  Of course manual optification is the way to go when there is no other
>>>> way.
>>>>  But is it so that installing scratchbox and performing optification
>>>> there is considered as too difficult?
>>>>
>>>>
>>>
>>> I think the manual way is reasonably easy. Or which drawback do you see
>>> here? If you have set up your environment already with MADDE, the
>>> optification should not be a reason to install the Platform SDK with
>>> Scratchbox etc. There is just one bug in MADDE, if you package your
>>> application that way, you have to set the rights of your binary to
>>> executable in the postinst file.
>>>
>>>
>>>
>>>>
>>>>  BTW, are there any chances maemo-optify will be included into MADDE?
>>>>
>>>>
>>>
>>> I doubt that, but I'm not sure. Will find that out.
>>>
>>> Daniel
>>>
>>>>
>>>> Thanks, Daniil.
>>>>
>>>> On Thu, Jun 10, 2010 at 11:12 AM, daniel wilms <daniel.wilms@nokia.com>
>>>> wrote:
>>>>
>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> ext Sascha Mäkelä wrote:
>>>>>
>>>>>
>>>>>>
>>>>>> OK and how would I do that? Should I edit the src.pro <http://src.pro>
>>>>>> file and how should it look? Is something else needed?
>>>>>>
>>>>>>
>>>>>
>>>>> one thing you could do is putting the files of the application (like
>>>>> binary,
>>>>> images etc.) in a folder like /opt/myapp/. This you can specify in your
>>>>> src.pro. There is a packaging guide for Qt applications available in
>>>>> the
>>>>> wiki [1]. After doing that you can then have the right path to your
>>>>> executable in the *.desktop file.
>>>>>
>>>>> 1. http://wiki.maemo.org/Packaging_a_Qt_application
>>>>>
>>>>> Daniel
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> Sascha
>>>>>>
>>>>>> On Thu, Jun 10, 2010 at 10:53, Pasi Savanainen
>>>>>> <pasi.savanainen@nixu.com
>>>>>> <mailto:pasi.savanainen@nixu.com>> wrote:
>>>>>>
>>>>>>  On 6/9/10 5:58 PM, Sascha Mäkelä wrote:
>>>>>>  > How can I optify a package in Windows using MADDE? Does this work:
>>>>>>  >
>>>>>>
>>>>>>
>>>>>>
>>>>>>  http://maemo.org/packages/package_instance/view/fremantle_extras_free_armel/maemo-optify/0.2.1/
>>>>>>  >
>>>>>>  > If it does, how can I install it to MADDE?
>>>>>>  >
>>>>>>  > Cheers,
>>>>>>  > Sascha
>>>>>>  >
>>>>>>  >
>>>>>>  >
>>>>>>  >
>>>>>>  > _______________________________________________
>>>>>>  > maemo-developers mailing list
>>>>>>  > maemo-developers@maemo.org <mailto:maemo-developers@maemo.org>
>>>>>>  > https://lists.maemo.org/mailman/listinfo/maemo-developers
>>>>>>
>>>>>>  You cannot use that with MADDE, because maemo-optify* commands use
>>>>>>  internally some dpkg* command options that are not implemented by
>>>>>>  MADDE.
>>>>>>  You have to do optify our packages by hand.
>>>>>>
>>>>>>  -- Pasi
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>
>



--
Ville M. Vainio
http://tinyurl.com/vainio
  •  Reply

Re: How to optify in MADDE?

daniel wilms
Karma: 597
2010-06-11 15:59 UTC
Hi,

Wilms Daniel (Nokia-D/Helsinki) wrote:
> As I said, I will post a more detailed example soon. This was just in
> brief how it should work.
>
>

here is the example for the homescreen-widget. Maybe it helps:

http://danielwilms.de/new/?p=140

Daniel

  •  Reply