maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Technology Preview: MADDE (https://talk.maemo.org/showthread.php?t=38075)

calvin_42 2010-02-18 19:45

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by pta0007 (Post 535064)
Then I tried to build the project with MADDE, using mad qmake. I got 'pkg-config' is not recognized as an internal or external command, operable program or batch file.

I have asked the question at Nokia forum, but it seems I still can't get the solution. Any one help?

Cheers.

Does the following command work for you in a terminal ?

Code:

mad pkg-config --list-all

pta0007 2010-02-18 23:57

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by calvin_42 (Post 535116)
Does the following command work for you in a terminal ?

Code:

mad pkg-config --list-all

yes, it works.

If I enter a project and type the commad "mad pkg-config --cflags gtk+-2.0", the terminal shows
Code:

-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/freetype2 -DMAEMO_CHANGES
does this mean the command works as well? but when mad qmake and mad make, the header file I need still can not be found.

calvin_42 2010-02-19 00:04

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by pta0007 (Post 535635)
yes, it works.

If I enter a project and type the commad "mad pkg-config --cflags gtk+-2.0", the terminal shows
Code:

-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/freetype2 -DMAEMO_CHANGES
does this mean the command works as well? but when mad qmake and mad make, the header file I need still can not be found.

Are you really sure you're actually compiling with MADDE and not just using the Compile function of Qt Creator ? I ask because I made the mistake once and got exactly the same message than you.

pta0007 2010-02-19 00:09

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by calvin_42 (Post 535647)
Are you really sure you're actually compiling with MADDE and not just using the Compile function of Qt Creator ? I ask because I made the mistake once and got exactly the same message than you.

yes, I only create and edit the project with Qt Creator. I compile it in MADDE, using mad qmake and mad make. I think the problem is qmake can not run the function such as pkg-config, which does not belong to its own functions, in MADDE. (maybe this is the bug?not sure)

Could you tell me how you handled the problem then?

calvin_42 2010-02-19 00:10

Re: Technology Preview: MADDE
 
Are you on Windows ?

pta0007 2010-02-19 00:13

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by calvin_42 (Post 535656)
Are you on Windows ?

yes! that is the reason I use MADDE.

calvin_42 2010-02-19 00:21

Re: Technology Preview: MADDE
 
Just wanted to be sure.

Anyway unzip the files here to c:\windows\system32 and then try again to compile.

pta0007 2010-02-19 00:33

Re: Technology Preview: MADDE
 
I unzip the file into system32, and now the pkg-config works, but I get another message:
Code:

Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found

what should I do then? Can I add the directory to the MADDE, which includes gtk+?

calvin_42 2010-02-19 00:42

Re: Technology Preview: MADDE
 
That's what I thought. You're using the windows pkg-config and not the one provided by MADDE.

But I can't figure why. Try to create a new QT project, maybe the .pro files are wrong configured. You can post them here if you want.

pta0007 2010-02-19 00:51

Re: Technology Preview: MADDE
 
Here is my .pro file
Code:

TARGET = MadCamera
TEMPLATE = app
SOURCES += main.cpp \
    mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
unix {
    CONFIG += link_pkgconfig
    PKGCONFIG += gtk+-2.0 hildon-1 gstreamer-0.10
}


calvin_42 2010-02-19 01:46

Re: Technology Preview: MADDE
 
Nope that's correct.

Can't help you on this one. Sorry :(

pta0007 2010-02-19 02:14

Re: Technology Preview: MADDE
 
thx anyway. I just want to write a program using the n900 camera to capture picture. any idea for this? best to have a solution on Windows, or I have to use Ubuntu Maemo5 SDK...

nochnoy 2010-02-19 06:06

Re: Technology Preview: MADDE
 
I installed madde on windows 7. If the directory with project sources is not under /home/<username> qmake generates absolute paths for include dirs, like this:

-Id:/prog/MADDE/0.6.14/sysroots/fremantle-arm-sysroot-2.2009-51-1-qt453/usr/include/qt4/QtCore

then g++ doesn't find the header files:

error: QApplication: No such file or directory

If the source is under /home/username/somename qmake generates relative paths for include dirs:

-I../../../sysroots/fremantle-arm-sysroot-2.2009-51-1-qt453/usr/include/qt4/QtCore

and everything compiles fine.

How does qmake decide whether to generate relative or absolute paths? I guess if it had QT_INSTALL_HEADERS builtin set to
/d/prog/MADDE/0.6.14/sysroots/fremantle-arm-sysroot-2.2009-51-1-qt453/usr/include/qt4
instead of
d:/prog/MADDE/0.6.14/sysroots/fremantle-arm-sysroot-2.2009-51-1-qt453/usr/include/qt4
everything would work regardless of where the sources are located.

Does anyone have any suggestions how to solve this problem?

too 2010-02-19 07:46

Re: Technology Preview: MADDE
 
nochnoy:

Absolute paths should work. We'll investigate the issue.

calvin_42 2010-02-19 08:17

Re: Technology Preview: MADDE
 
Till then, a temporary solution would to create a symbolic link using the mklink command on Windows :

/home/username/project <--> D:\Work\dev\maemo\project

Open dos command :

- goto the home repertory where you install MADDE
- run the mklink command, it will create a new directory for you linking to your target (eq ls -s on Unix)
- you can now put your files in your target rep

Ex :

Code:

cd C:\Logiciels\MADDE\0.6.14\home\Calvin
mklink /J project D:\Work\dev\maemo\project


too 2010-02-19 08:26

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by pta0007 (Post 535064)
I got some problems when trying to use GTK+ in Qt/MADDE. First, I created the project with Qt Creator, where Gtk+ is used. In order to inform qmake the project is using GTK..., I added
unix {
CONFIG += link_pkgconfig
PKGCONFIG += gtk+-2.0 hildon-1 gstreamer-0.10
}
to the .pro file.
Then I tried to build the project with MADDE, using mad qmake. I got
'pkg-config' is not recognized as an internal or external command,
operable program or batch file.

I have asked the question at Nokia forum, but it seems I still can't get the solution. Any one help?

Cheers.

I think I know what is the problem (making solution may take some time)

In windows, most of the madde commands are run inside MSYS environment, but for tools not compiled for MSYS the environment is lost. qmake is such a tool.

MADDE pkg-config is perl program; outside MSYS the system does not regognize it as such (and if did, would not have the expected environment set up).

The solution is to make wrappers for commands that should
be accessible outside MSYS. Currently we have 2 of these:
mad.cmd and mad-admin.cmd.

FIrst try could be as follows:

Copy MADDE/0.6.14/wbin/mad.cmd as MADDE/0.6.14/madbin/pkg-config.cmd and edit it to run pkg-config perl program in MSYS environment. I'll try this.

For more robust and efficient implementations (or ideas of those)
are gladly accepted :)

EDIT: pta0007: you could try editing MADDE\0.6.14\sysroots\fremantle-arm-sysroot-2.2009-51-1-qt453\usr\share\qt4\mkspecs/features/link_pkgconfig.prf and add 'mad' in front of 'pkg-config' command and see what happens. Naturally, this voids your warranty as we do not like hassling inside sysroot ;(

rontti 2010-02-19 12:46

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by pta0007 (Post 535692)
Here is my .pro file
Code:

TARGET = MadCamera
TEMPLATE = app
SOURCES += main.cpp \
    mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
unix {
    CONFIG += link_pkgconfig
    PKGCONFIG += gtk+-2.0 hildon-1 gstreamer-0.10
}


Another workaround. Change you .pro file like this

Code:

TARGET = MadCamera
TEMPLATE = app
SOURCES += main.cpp \
    mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
unix {
QMAKE_CXXFLAGS += $$system(mad pkg-config --cflags gtk+-2.0 hildon-1 gstreamer-0.10)
QMAKE_CFLAGS  += $$system(mad pkg-config --cflags gtk+-2.0 hildon-1 gstreamer-0.10)
LIBS  += $$system(mad pkg-config --libs gtk+-2.0 hildon-1 gstreamer-0.10)
}


nochnoy 2010-02-19 16:57

Re: Technology Preview: MADDE
 
Thanks. mklink helps. Just a note, replacing d:/prog with /d/prog in qmake generated makefile doesn't solve the problem, so it wouldn't help if QT_INSTALL_HEADERS builtin were set to /d/prog/MADDE/0.6.14/sysroots/... as I thought it might help. Absolute paths are problematic for gcc/g++ either way

too 2010-02-19 19:26

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by nochnoy (Post 536022)
I installed madde on windows 7. If the directory with project sources is not under /home/<username> qmake generates absolute paths for include dirs, like this:

-Id:/prog/MADDE/0.6.14/sysroots/fremantle-arm-sysroot-2.2009-51-1-qt453/usr/include/qt4/QtCore

then g++ doesn't find the header files:

error: QApplication: No such file or directory

Verified. This needs to be fixed soon (by me). Thanks.

too 2010-02-19 19:29

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by nochnoy (Post 536857)
Thanks. mklink helps. Just a note, replacing d:/prog with /d/prog in qmake generated makefile doesn't solve the problem, so it wouldn't help if QT_INSTALL_HEADERS builtin were set to /d/prog/MADDE/0.6.14/sysroots/... as I thought it might help. Absolute paths are problematic for gcc/g++ either way

D:Prog/MADDE/... might work... ;)

(i.e. without the first slash) (some chars capitalized to avoid smiley conversion)

nochnoy 2010-02-20 03:24

Re: Technology Preview: MADDE
 
Another question: I mount host filesystem to N900 runtime, then I

mad remote -r n900 shell

and I can see the host files fine. Then I sudo to root as I need to run my app as root. However, root doesn't see the mounted filesystem. Is there a proper way to overcome this limitation?..

rontti 2010-02-20 07:30

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by nochnoy (Post 537768)
Another question: I mount host filesystem to N900 runtime, then I

mad remote -r n900 shell

and I can see the host files fine. Then I sudo to root as I need to run my app as root. However, root doesn't see the mounted filesystem. Is there a proper way to overcome this limitation?..

Please, try devrootsh (mad-developer package will install that) instead to being a root user.
devrootsh yourprog <args>

I couldn't test that, because I'm home, but I have feeling that this should work.

too 2010-02-20 11:05

Re: Technology Preview: MADDE
 
I'd guess devrootsh has the same problem...

there is fuse mount option which allows others to see the filesystem;
maybe we'll tune those options on...

-o allow_root to the end of .../utfs-client ... -command line on /home/developer/bin/remote-wrapper on N900 should do the job
(then umount and remount)

too 2010-02-20 11:15

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by nochnoy (Post 536022)
I installed madde on windows 7. If the directory with project sources is not under /home/<username> qmake generates absolute paths for include dirs, like this:

-Id:/prog/MADDE/0.6.14/sysroots/fremantle-arm-sysroot-2.2009-51-1-qt453/usr/include/qt4/QtCore

then g++ doesn't find the header files:

error: QApplication: No such file or directory

Try on windows madde terminal:

Code:

cd /templates
mv toolwrapper.exe toolwrapper0.exe
mad curl -o toolwrapper.exe --location http://www.iki.fi/too/toolwrapper-0.6.19.exe
mad-admin remove -f fremantle-qt-0951
mad-admin create -s fremantle-qt-0951

md5sum of replaced toolwrapper.exe should be aa338a11d0798fa423c9eefe65c29609

Now the absolute paths to MADDE sysroots should work. This
is such a bug that needs to be tested early, so please anyone
having the same problem test this.

EDIT: unfortunate line split after 'www.iki.fi' above, combine by hand.

jmclaren 2010-02-20 13:36

Re: Technology Preview: MADDE
 
When I run it on my windows 7 64bit laptop I get an application error on sh.exe. The application was unable to start correctly (0xc0000142).

magnuslu 2010-02-20 15:29

Re: Technology Preview: MADDE
 
Ok, I've got my MADDE to work. I can compile and package my first Qt application, and I'm even able to install it on my N900 by just running the .deb file. So far so good. I have a couple of issues though:

1. The application always gets the name 'Mad Qt example' in the list of applications on my device. In App. Manager, it shows up with the correct 'package' name. Where can I change this name? I've done a search in the whole MADDE directory, but I can't seem to find this 'Mad Qt example' anywhere for me to change it...

2. I can't get my icons to show. I have the following in my .pro file and I can see that the icons do appear in the folder indicated by the .path lines on my device, but still no icons to be seen in App. Manager or in the list of apps.

Code:

INSTALLS    += icon64
icon64.path  = /usr/share/icons/hicolor/64x64/apps
icon64.files  = data/64x64/myapp.png

INSTALLS    += icon48
icon48.path  = /usr/share/icons/hicolor/48x48/apps
icon48.files  = data/48x48/myapp.png

In some example I saw

Code:

icon48.path  = /usr/local/share/icons/hicolor/48x48/apps
but I don't want to try this as there is no such directory on the device already.

calvin_42 2010-02-20 15:54

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by magnuslu (Post 538552)
1. The application always gets the name 'Mad Qt example' in the list of applications on my device. In App. Manager, it shows up with the correct 'package' name. Where can I change this name? I've done a search in the whole MADDE directory, but I can't seem to find this 'Mad Qt example' anywhere for me to change it...

In your debian/control files you have to set this field:

XSBC-Maemo-Display-Name: <APP_DISPLAY_NAME>

Quote:

Originally Posted by magnuslu (Post 538552)
2. but still no icons to be seen in App. Manager or in the list of apps.

In your debian/control files you have to set this field:

XB-Maemo-Icon-26:
Put a base64 encoded 48x48px image here.
This means "uuencode -m icon.png icon.png > icon.png.en", then paste the
output here, but do not forget to put a white space at the beginning of each line containing the icon-encoded text.

(See http://wiki.maemo.org/User:Jebba/Package_Building_HOWTO)

Cheers!

too 2010-02-20 16:07

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by calvin_42 (Post 538582)
In your debian/control files you have to set this field:

XSBC-Maemo-Display-Name: <APP_DISPLAY_NAME>



In your debian/control files you have to set this field:

XB-Maemo-Icon-26:
Put a base64 encoded 48x48px image here.
This means "uuencode -m icon.png icon.png > icon.png.en", then paste the
output here, but do not forget to put a white space at the beginning of each line containing the icon-encoded text.

(See http://wiki.maemo.org/User:Jebba/Package_Building_HOWTO)

Cheers!

with MADDE you can use the command line

Code:

mad base64 icon.png | sed 's/^/ /' > icon.png.en

too 2010-02-20 16:11

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by jmclaren (Post 538413)
When I run it on my windows 7 64bit laptop I get an application error on sh.exe. The application was unable to start correctly (0xc0000142).

This has happened to other people too and there is bug report
of this in bugzilla.

I also have windows 7 64bit laptop available (just writing this text
on in) and MADDE works fine.... This is home premium, what do you
have ?

Anyway, you can try right-click 'MADDE Terminal' icon and
remove '-rxvt' from the command line in 'properties' window.

too 2010-02-20 16:30

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by magnuslu (Post 538552)
2. I can't get my icons to show. I have the following in my .pro file and I can see that the icons do appear in the folder indicated by the .path lines on my device, but still no icons to be seen in App. Manager or in the list of apps.

Code:

INSTALLS    += icon64
icon64.path  = /usr/share/icons/hicolor/64x64/apps
icon64.files  = data/64x64/myapp.png

INSTALLS    += icon48
icon48.path  = /usr/share/icons/hicolor/48x48/apps
icon48.files  = data/48x48/myapp.png

In some example I saw

I presume you used 'mad pscreate -t qt_simple myapp'

Just entering this and then 'mad dpkg-buildpackage'
should do a debian package which makes an icon visible
in application list. However, If you see just a blue box then
reboot might be required (I am not sure what is the current
situation; I did one program which has blue icon but I screwed
my icon install path...)

If you run 'dpkg-deb -c myapp...deb' you should see the
following files:

Code:

...
usr/share/applications/hildon/myapp.desktop
...
usr/share/dbus-1/services/myapp.service
...
usr/share/icons/hicolor/64x64/apps/myapp.png

And the .desktop file should look something like (if created by mad pscreate)
Code:

[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Name=Mad Qt example
Exec=/usr/bin/myapp
Icon=myapp
X-HildonDesk-ShowInToolbar=true
X-Window-Icon=myapp
X-Window-Icon-Dimmed=myapp
X-Osso-Type=application/x-executable
X-Osso-Service=com.nokia.myapp

With these the there should be application in application list,
wit real icon, or with blue box.

nochnoy 2010-02-20 17:29

Re: Technology Preview: MADDE
 
too,

Yes, the include files absolute path problem fixed. Thank you!

nochnoy 2010-02-20 17:39

Re: Technology Preview: MADDE
 
Appending -o allow_root to utfs_client command does help. Thank you again!

too 2010-02-20 20:16

Re: Technology Preview: MADDE
 
About qmake and pkg-config on windows.

The following oneliner written to /madbin/pkg-config.cmd will do the trick:

Code:

@env.exe PERL5LIB=/madlib/perl5 /madbin/pkg-config %*

magnuslu 2010-02-20 23:03

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by too (Post 538618)
Just entering this and then 'mad dpkg-buildpackage'
should do a debian package which makes an icon visible
in application list. However, If you see just a blue box then
reboot might be required (I am not sure what is the current
situation; I did one program which has blue icon but I screwed
my icon install path...)

Indeed. I did have a blue icon. After rebooting, I got my own icon in the list of applications. It's still not correct in the App. Manager, but I can live with that.

And the following fixed my issue with the application name:

Code:

XSBC-Maemo-Display-Name: <APP_DISPLAY_NAME>
Thanks!

magnuslu 2010-02-22 15:31

Re: Technology Preview: MADDE
 
Hi,

I'm having a problem when installing my Qt app built and packaged with MADDE with a dependency to Phonon. I saw this post with the following solution.

Quote:

Originally Posted by too (Post 457127)
Edit to debian/control file, and append the package requirement to the Depends: line, like:

Depends: libqt4-phonon (>= 4.5)

I've tried it, but it doesn't solve my problem.
My debian/control file now looks like this:

Code:

Depends: libqt4-phonon (>= 4.5), ${shlibs:Depends}, ${misc:Depends}
I'm not sure if I really need the last two, but they were there for some reason and I don't dare remove them.

I've also tried without the (>= 4.5) but the result is the same.

The message I get when I click the .deb file on the device is:

Code:

Application details
  Problems
    Application packages missing: libqt4-phonon (>= 4.5.3~git20090723)

I understand that I could install the package manually, but that's not very 'user friendly' for non-developers.

Thanks for any pointers!

calvin_42 2010-02-22 16:02

Re: Technology Preview: MADDE
 
When it will be installed on the device with the app manager (in catalog extra-devel for example), the depending packages will be installed automatically.

dpkg -i doesn't do that.

magnuslu 2010-02-22 16:12

Re: Technology Preview: MADDE
 
I have manually copied the .deb file to my device and click on it in the File Manager. This launches the Application Manager, and that's where I have the issue. Sorry that I was not clear about that.

After reading about installing packages, I've now got Phonon installed and workng in my app, thanks.

I realize that the missing package does not get installed if I just launch the .deb, it has to come from a repository.

Figa 2010-02-24 01:02

Re: Technology Preview: MADDE
 
Hi, firstly I have to say thank you. Madde is good app. Now to my question. Is there any way how install qr4.6 to madde? I founded this http://labs.trolltech.com/blogs/2010...-os-x-take-ii/, but there are bad links.THX for your replies.

danielwilms 2010-02-24 07:03

Re: Technology Preview: MADDE
 
Quote:

Originally Posted by Figa (Post 543595)
Hi, firstly I have to say thank you. Madde is good app. Now to my question. Is there any way how install qr4.6 to madde? I founded this http://labs.trolltech.com/blogs/2010...-os-x-take-ii/, but there are bad links.THX for your replies.

There is a post, which is more up-to-date and which contains a link to the right place. Check these out.

Daniel

mailwl 2010-02-25 00:42

Re: Technology Preview: MADDE
 
i can't read 20 pages in english, maybe my question was ask by someone, but tell me please, now to change font size in Madde-terminal on Windows? on my FullHD 18.4'' notebook screen the letters looks like a child ants


All times are GMT. The time now is 11:43.

vBulletin® Version 3.8.8