Some time ago I was working on a project for Symbian OS. Qt framework was used as the base. Unfortunately, the deployment time was very big, approximately 10 minutes to copy and install the 10MB app on a Symbian device. Doing that every time you change something and want to test it is a complete waste of time. Therefore, a hack had to be invented.
My hack consists of three parts:
In the project’s .pro file there is the
DEPLOYMENTFOLDERS variable that specifies which files from your project need to be included in the final .sis package. You need to comment it out so that the package will become much lighter. In my case, the size dropped from 10 MB to 1 MB, which significantly sped up the deployment time to about a minute.
So, no more resources in the package. But how is the app supposed to work with them then? Firstly, copy the required resources to the memory card via a file manager. Let’s assume they are in
Secondly, I’ve created a dedicated file for one important function that abstracts the rest of the program from where the resources actually are. Here’s the source:
1 2 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
And the last part, whenever the program needs to work with a resource file use the
resPath() function. Say, to open a database:
To sum up, having done all the steps, to turn on the hack: 1. comment the
DEPLOYMENTFOLDERS directive in the .pro file; and 2. uncomment the line after the
// NB! comment in
respath.cpp. You’re all set.
It’s now much more comfortable and faster to test the app on a device. If you know any simpler or just different solution, please let me know.