[SOLVED] Single instance applications on N950
-
hi senu188,
following the wiki page the described method includes also the suggestion of matrixx.
What I see in your code is that in line 7 of the post above there is the repetition of Exec= that is an error. Please try again correcting this bug and let me know if it works.Cheers.
-
@Alicemirror
I believe someone has been modifying the wiki page, cause the "rules hack" is not there. -
[quote author="Alicemirror" date="1313055734"]hi senu188,
following the wiki page the described method includes also the suggestion of matrixx.
What I see in your code is that in line 7 of the post above there is the repetition of Exec= that is an error. Please try again correcting this bug and let me know if it works.Cheers.[/quote]
I immediately removed one 'Exec' as mentioned in my similar post posted separately[http://developer.qt.nokia.com/forums/viewthread/8687 ]. I am now trying to change the 'rule' file but I seem to have broken the build. I am trying again. The wiki page doesn't have anything about 'rule' I guess someone edited it off. Thanks will try and report -
Mistery solved !!!
Please take a look to this post: "Wiki pages edited without control":http://developer.qt.nokia.com/forums/viewthread/8699/
Now the page is complete again. Please senu188, check if it works fine.
Thank you.
-
I did the following in 'insulincal.desktop' - insulincal is my app name
@[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Name=insulincal
Exec=invoker --single-instance --type=e /opt/usr/bin/insulincal
Icon=/usr/share/icons/hicolor/64x64/apps/insulincal.png
X-Window-Icon=
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable@The deb is built but still multi-instance so
I added a space after $(MAKE) in 'rules' file
@
$(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/insulincal installI get packaging error
Packaging Error: Command 'c:/qtsdk/madde/bin/mad dpkg-buildpackage -nc -uc -us' failed.Exit code: 2
@
I tried in 2 ways to add space-- I just add a space using spacebar in rules file inside Qt creator
- I copy the rules file and paste it in Notepad, add a space and again paste that in Qt creator and rebuild
In both cases I get error. Is there any other way to add space so build will be proper. Thanks for help
-
Sure you get error.
The problem is just there: the rules file includes special characters i.e. tabs starting on every line and - I think - linefeeds instead of cr/lf at the end of line. The fact is that you should edit anyway this file with a binary editor else when you save it some essential character is lost.
I use Mac with a binary editor, but I am sure that you can find some opensource editor in windows. Wincommander for example has a hex editor and binary editor and other files too. you can try to send me this file (those original working) and I edit it for you. When we are sure that this is the only problem, you search for an adequate program.
-
Sorry, I read again your post.
If you open the rules file in the editor then try in any other way - correct or wrong - you loose the original formatting so the file remain fake at all :)
Please send it to me so I try with one of mine that is working recovery the special characters.
-
This is interesting, I have not trusted in Qt creator. If it is sufficient to set how to manage the tabs I'll use next time I need. Thanks.
-
[quote author="Alicemirror" date="1312095237"]Later I will try with different operating systems than Mac, What platform do you used ? Mac or Win?[/quote]
Hi Enrico,
Please excuse me for the delay in my answer. I am using Qt SDK on Win XP.
Cheers,
Leon -
Hi, Leon.
Does the method works now ?
As a matter of fact, if after the rules file edit you have errors this means that edit went wrong. This is a thing I am almost sure.
-
[quote author="Alicemirror" date="1313226303"]Hi, Leon.
Does the method works now ?
As a matter of fact, if after the rules file edit you have errors this means that edit went wrong. This is a thing I am almost sure.[/quote]
Yes, following the advises that I found in your discussion with matrixx I have managed to publish my app "location2sms":http://store.ovi.com/content/168861 for MeeGo Harmattan in Nokia Ovi Store. Thanks again :)
-
Well, I am happy for this. Now the wiki page is restored to its original content.
-
I've read thru all of these pages, and also the wiki, and changed my app but I cant seem to make it run!
This is the line in the rules file
$(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/emirates247 installin the .desktop file this is the content
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Name=Emirates 24|7
Exec=invoker --single-instance --type=d /opt/emirates247/bin/emirates247
Icon=/usr/share/icons/hicolor/64x64/apps/emirates247.png
X-Window-Icon=
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executableNow this make the app's icon shows correctly, but when clicking on it, it only opens a black screen and it remains black.
any suggestions?
Thanks -
Hello,
sorry for the delay, I have read only in this moment the mail. Tomorrow morning I'll check you example with mine and see what It can be wrongl
-
@yazwas: Hi, I have done a thought on your problem. As you have pasted the piece of code without the code tag (using '@' character at the start and end of the paragraph in the wiki, I mean) it is impossible to see exactly what you have done: please do it again in a post or edit the previous.
When I experience that something goes wrong on N9 or symbian devices (inside the code at runtime I mean) I see a blank screen only as you describe. But it is a problem of the application, not the packaging instructions as I know.So we should separate the steps. Is it possible that while you have changed the files for single-insance settings you have also done something of unwanted on the rest of the code?
Please, repost the pieces you have changed as they are and not only the rules file, also the .desktop and anything else that you have changed. Then if you see already the same problem (black screen at startup) I am reasonably sure that this is a problem independent by the changes you have made for single-instnace mode. So be sure that the files thet you have changed have not missed lines, unwanted characters etc. I am aware that this is annoying operation, but this is debug... :)
If the problem occours again we should isolate two overlapping different problems. Put in your main.qml only a "hello world" instruction. It should run in single instance with your changes as your complete application will do. Then add your code seeing what is wrong. You can also add useful printout console.log() instructions in the QML docs or Qdebug() in C++ file to see where the program stops before showing the blank black screen that you notice.
If I can give you an advice, before start the changes for single-instance the best practice is to do a commit (svn or git it is the same) on a stable running application. Then do the changes and if somethings is wrong that you can't focus you should step-back and try again. This is what I have done before find a decent method reasonably sure to have the wanted results.
Let me know what's happen. Thank you.
-
@Alicemirror
Thanks very much for the help, I've gone thru all you said, and still did not work outWhat I did eventually was trying to build on a different machine and for some ODD reason, it works perfectly!!!!
it seems the problem was with the development station I've used originally (I dont know if that makes sense or not)
but when tryed on different machine, just compiled the same code and ran it on N9 and N950, and Yeaaaay :)Thanks for your help!
-
Ok! I am happy too. Because this strange "alchemy" I think MUST solve the problem but has also sense. Or at least I think I have understood the reasons for the changes that should be done.
Cheers.
-
I tried the workaround. I modified the .desktop file, main.cpp and the rules file. It does not break the build, but it opens only with QT creator. It does not open with the invoker command on terminal. THe booster gives an error saying "Cannot dymanically load application". Could you please me with this?