Results 1 to 20 of 21

Thread: About Creating .sis for Nokia

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2010
    Posts
    23
    Thanks
    10
    Qt products
    Qt/Embedded
    Platforms
    MacOS X Windows

    Default Re: About Creating .sis for Nokia

    Thx for your answer, i still have some question...

    the path for the "addFiles.sources = levels/*.tmx" and "addFiles.path = levels" is taken from the .pro directory or from C://qt/project/levels? do i just write the code like that or i have to add some included?

    and how to make sure that i have already deployed the extra file at .sis because i don't have nokia device?

    thx a lot dear tsp

  2. #2
    Join Date
    Sep 2009
    Location
    Finland
    Posts
    63
    Thanks
    1
    Thanked 22 Times in 19 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: About Creating .sis for Nokia

    I have all source files (including pro-file) under "game" -folder (the absolute path is actually c:\temp\game) and the level files are in "game\levels" -folder and then in the pro-file there is the deployment part.

    When you build your code to Symbian target you can check from the generated pkg-file what files are in the sis-file to ensure that all files that should be there are there, in my case generated game_template.pkg -file contains line:

    Qt Code:
    1. ; DEPLOYMENT
    2. "/NokiaQtSDK/Symbian/SDK/epoc32/data/z/private/ee097ed6/levels/board.tmx" - "!:\private\ee097ed6\levels\board.tmx"
    To copy to clipboard, switch view to plain text mode 
    and based on that line I know that board.tmx file is in the sis package as well as the executable itself.

  3. The following user says thank you to tsp for this useful post:

    ardisaz (1st December 2010)

  4. #3
    Join Date
    Nov 2010
    Posts
    23
    Thanks
    10
    Qt products
    Qt/Embedded
    Platforms
    MacOS X Windows

    Default Re: About Creating .sis for Nokia

    Wow,, it works!!
    Thank you very much tsp...

  5. #4
    Join Date
    Nov 2010
    Posts
    23
    Thanks
    10
    Qt products
    Qt/Embedded
    Platforms
    MacOS X Windows

    Default Re: About Creating .sis for Nokia

    Im sorry, i can find my file at template.pkg using that deployment technique but the file doesn't included at device (using nokia 5800). Same as friends with other project using database, the database didn't show up.

  6. #5

    Default Re: About Creating .sis for Nokia

    Hi,

    I think You first need to create a .pkg file with directives for creating the sis file. Then you create the sis file using the makesis utility form the SDK.

  7. #6
    Join Date
    Nov 2010
    Posts
    23
    Thanks
    10
    Qt products
    Qt/Embedded
    Platforms
    MacOS X Windows

    Default Re: About Creating .sis for Nokia

    Hi seowebmarketing,

    i'm sorry, but could you please help me explain about create a .pkg file with directives for creating the sis file? thank you very much,,,

  8. #7
    Join Date
    Sep 2009
    Location
    Finland
    Posts
    63
    Thanks
    1
    Thanked 22 Times in 19 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: About Creating .sis for Nokia

    file doesn't included at device
    What do you mean by that? If you create the SIS with the DEPLOYMENT keyword and without it, is the size of the SIS file different?

    If you define the file with DEPLOYMENT keyword and the location is not correct i.e. file cannot be found then you are not able to create SIS file instead error message is shown that the file cannot be found.

    Maybe there are some problems in the way you access the file?

  9. #8
    Join Date
    Nov 2010
    Posts
    23
    Thanks
    10
    Qt products
    Qt/Embedded
    Platforms
    MacOS X Windows

    Default Re: About Creating .sis for Nokia

    Tsp, im sorry if i did't ask my problem clearly enough.

    I guess i had the DEPLOYMENT Stuff inside the .sis package well. Like your code, i got my external files at something like "!:\private\ee097ed6\levels\board.tmx" with this code at mh .pro

    Qt Code:
    1. CONFIG += mobility
    2. MOBILITY =
    3.  
    4. symbian {
    5. TARGET.UID3 = 0xe091ff94
    6. # TARGET.CAPABILITY +=
    7. TARGET.EPOCSTACKSIZE = 0x14000
    8. TARGET.EPOCHEAPSIZE = 0x020000 0x800000
    9.  
    10. mysound.sources = sound\*
    11. mysound.path = \sound
    12. bonang.sources = sound\bonang\*
    13. bonang.path= \sound\bonang
    14. gong.sources = sound\gong\*
    15. gong.path=\sound\gong
    16. jengglong.sources = sound\jengglong\*
    17. jengglong.path= \sound\jengglong
    18. kempul.sources = sound\kempul\*
    19. kempul.path = \sound\kempul
    20. kendang.sources = sound\kendang\*
    21. kendang.path = \sound\kendang
    22. saron.sources = sound\saron\*
    23. saron.path = \sound\saron
    24. gambang.sources = sound\gambang\*
    25. gambang.path = \sound\gambang
    26. DEPLOYMENT += mysound bonang gong jengglong kempul kendang saron gambang
    27. }
    To copy to clipboard, switch view to plain text mode 

    And i guess my mistake is the way i access the file. I used QCoreApplication::ApplicationDirPath() to try access the root of my application so i can added string like ("\levels\board.tmx") to access the file. The complete code is

    Qt Code:
    1. alamat = QCoreApplication::applicationDirPath();
    2. gamelan =
    3. Phonon::createPlayer(Phonon::MusicCategory,
    4. Phonon::MediaSource(alamat+"/sound/gamelan.mp3"));
    To copy to clipboard, switch view to plain text mode 
    is there any mistakes i made?

  10. #9
    Join Date
    Sep 2009
    Location
    Finland
    Posts
    63
    Thanks
    1
    Thanked 22 Times in 19 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: About Creating .sis for Nokia

    I think the problem is in the way you have defined those extra files in the pro-file. You currently define those files as:

    Qt Code:
    1. mysound.sources = sound\*
    2. mysound.path = \sound
    3. :
    To copy to clipboard, switch view to plain text mode 
    That definition means that the path to where the files are deployed in actual device is under the root folder (i.e. !:\sound\...), so instead of that you should define the files as (remove the backslash from path definition):

    Qt Code:
    1. mysound.sources = sound\*
    2. mysound.path = sound
    3. :
    To copy to clipboard, switch view to plain text mode 
    Then those files should be located in the !:\private\<uid>\sound folder and then you should be able to access those files in the way you currently access those.

  11. #10
    Join Date
    Dec 2010
    Posts
    4
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Symbian S60

    Default Re: About Creating .sis for Nokia

    Hi guys, i'm having same problem with ardisaz, the difference is i am using database instead of sound, but I have corrected my code like tsp suggested.
    but my apps still can't access the database. So I tried to make sure the database is in the right place, and it is. The problem came up when I want to open the database

    Here is the code when deploy and accessing the database :

    Qt Code:
    1. database.sources = databases/*.db
    2.   database.path = databases
    3.   DEPLOYMENT += database
    To copy to clipboard, switch view to plain text mode 


    Qt Code:
    1. mDB = QSqlDatabase::addDatabase("QSQLITE");
    2. QString dbName = QCoreApplication::applicationDirPath();
    3. qDebug() << dbName;
    4. mDB.setDatabaseName(dbName+"/databases/juicemania.db");
    5.  
    6. QString test = mDB.databaseName();
    7. QByteArray bb = test.toLatin1();
    8. const char *name2 = bb.data();
    9.  
    10. if (!mDB.open()) {
    11. QMessageBox::critical(0, qApp->tr("Cannot open database"),
    12. qApp->tr(name2), QMessageBox::Cancel);
    13.  
    14. return false;
    15. }
    16. return true;
    To copy to clipboard, switch view to plain text mode 

    Does anyone know what's wrong with my code?

    Really appreciate any help, thx guys

  12. #11
    Join Date
    Sep 2009
    Location
    Finland
    Posts
    63
    Thanks
    1
    Thanked 22 Times in 19 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: About Creating .sis for Nokia

    First, add few checks to your implementation (if you do not have those already)

    Qt Code:
    1. // Ensure QSQLITE driver is supported
    2. if (!QSqlDatabase::drivers().contains("QSQLITE")) { // Print something ... }
    To copy to clipboard, switch view to plain text mode 
    And then you could try next way to access DB file:
    Qt Code:
    1. mDB.setDatabaseName("databases/juicemania.db");
    To copy to clipboard, switch view to plain text mode 
    Because the default folder is your private folder there is no need to access your files via applicationDirPath -method. And last thing is that after failing to open DB, print information about the error using QSqlDatabase::lastError maybe that will reveal more about what is the problem with the open.

    Also in your case return value from
    Qt Code:
    1. QFile::exists("databases/juicemania.db")
    To copy to clipboard, switch view to plain text mode 
    should be true if the file is in the correct location.

  13. The following user says thank you to tsp for this useful post:

    axel07 (8th December 2010)

  14. #12
    Join Date
    Dec 2010
    Posts
    4
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Symbian S60

    Default Re: About Creating .sis for Nokia

    Wow thank you very much tsp

    So I've tried all of your suggestion, and it looks like the problem is with the open, when I printed lastError, it said "unable to open database file, error opening database", do you know what the problem is or maybe you can direct me to any link that I can read, since maybe it start out of topic

    Again, thank you very much

Similar Threads

  1. Apple vs Nokia
    By high_flyer in forum General Discussion
    Replies: 2
    Last Post: 30th November 2010, 04:35
  2. Qt installation on Nokia N78
    By Alteros in forum Installation and Deployment
    Replies: 3
    Last Post: 8th November 2010, 13:21
  3. Nokia to cut 1,800 jobs
    By TorAn in forum General Discussion
    Replies: 2
    Last Post: 25th October 2010, 21:16
  4. Nokia Open C++ Download
    By Granty in forum Newbie
    Replies: 6
    Last Post: 19th October 2010, 21:33
  5. Nokia N810
    By QTInfinity in forum Installation and Deployment
    Replies: 1
    Last Post: 6th March 2009, 12:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.