Packaging extra folder and files in Qt for symbian?
-
Thanks for ur reply. I think "PrjRes.sources" is the path where the files to be packaged?
Please let me know how do I add folder?
I have following folder and file hierarchy to be packaged
@
[Package] // -- folder
[data1] // -- folder
file1.txt // file
conf1.txt // file
icon1.png // file
icon2.png // file
[data2] // -- folder
file2.txt // file
conf2.txt // file
logo.png // file
image.png // file
@--If DEPLOYMENT has bug then what is the alternative to. I have read about "INSTALLS" but unfortunately "INSTALLS" didn't work.
thanks in advance.
-
To elaborate:
@
samplefiles.sources = path/in/build/machine/to/file.ext
samplefiles.path = dir/in/the/device/to/place/file/
DEPLOYMENT += samplefiles
@It's a little easier in Qt Creator 2.1, where Qt Creator adds a DEPLOYMENTFOLDERS variable in the pro file when it creates the project ("QTCREATORBUG-3203":http://bugreports.qt.nokia.com/browse/QTCREATORBUG-3203 has some details), like:
@
DEPLOYMENTFOLDERS = # file1 dir1
@which you can edit to
@
file1.source = relative/path/in/build/machine/to/file.ext
dir1.source = relative/path/in/build/machine/to/dir/
DEPLOYMENTFOLDERS = file1 dir1
@ -
[quote author="smotiwala" date="1292588523"]
If DEPLOYMENT has bug then what is the alternative to.
thanks in advance.[/quote]
Please do verify if the bug is valid in your case. Say if you are targeting for Qt 4.7 then the bug is probably solved in that version.
If you still face problems. One way out is to try modify the .pkg file and build the sis. This is not recommended, so didn't mention it - but you can try this if other options don't work.
-
@smotiwala The DEPLOYMENT part of my answer (just elaborating what @alexander and @qtk said) does not need Qt Creator 2.1. Maybe you could try that and let us know if that helped or not.
-
The code i use
@file1.path = Image // folder where i want to copy splash_image.jpg
file1.source = splash_image.jpg // image file to be copied which is placed in root folder where .pro file resides
DEPLOYMENTFOLDERS += file1@please help me what is the problem.
Thanks
-
[quote author="smotiwala" date="1293092742"]The code i use
@file1.path = Image // folder where i want to copy splash_image.jpg
file1.source = splash_image.jpg // image file to be copied which is placed in root folder where .pro file resides
DEPLOYMENTFOLDERS += file1@please help me what is the problem.
Thanks[/quote]
If your source is a file it should be DEPLOYMENT. If its folder it should be DEPLOYMENTFOLDERS.
So use it like this
@file1.source = Image // Folder name
DEPLOYMENTFOLDERS += file1
@ -
I tried following but no luck
@folder1.source = NewImage // Folder name to be created on destination
DEPLOYMENTFOLDERS += folder1imagenew.source = Splash.PNG // image file to be copied which is placed in root folder where .pro file resides
DEPLOYMENT += imagenew@No "NewImage" folder will created nor "Splash.PNG" copied.
Size of the .sis file remains same
-
Maybe you can try the makesis approach (described "here":http://wiki.forum.nokia.com/index.php/Using_Qt_Creator_With_Symbian#Packaging_Application_as_SIS_File_and_Deploying_to_Symbian_Device) by adding your additional files to the pkg file
-
Hey there,
i also have problems with files in symbian.
I'm using QtCreator 2.1.
When i use this:
@file1.source = db.sqlite
DEPLOYMENTFOLDERS = file1@
it works with simulator, but not on device (Nokia N8)
error: unable to open database, file Error opening databaseso i tried this:
@file1.source = db.sqlite
DEPLOYMENT = file1@
and its not working too ("general related OS-error" while compiling)please help me! thanks
-
ok, i found out that the error i posted above is not occuring with the following code:
@file1.source = db.sqlite
file1.path = C:\Users\user\project
DEPLOYMENT += file1@
but now i'm getting another error again:
"unable to open database file error opening database"
but i have no idea how to solve this problem. please help! -
[quote author="Matze5590" date="1303839482"]ok, i found out that the error i posted above is not occuring with the following code:
@file1.source = db.sqlite
file1.path = C:\Users\user\project
DEPLOYMENT += file1@
but now i'm getting another error again:
"unable to open database file error opening database"
but i have no idea how to solve this problem. please help![/quote]I'm pretty sure people find this page using google and last question is still not answered. The one possible reason why error "unable to open database file.." is shown are separator symbols. Multiplatform fix requires function QDir::toNativeSeparators to be used. E.g.:
@ QString db_path(QApplication::applicationDirPath() );
db_path += "/data/dict.db";
QString db_path_symbian(QDir::toNativeSeparators(db_path));db.setDatabaseName(db_path_symbian);@