View Single Post
Copernicus's Avatar
Posts: 1,986 | Thanked: 7,698 times | Joined on Dec 2010 @ Dayton, Ohio
#10
Originally Posted by incrys View Post
But the /tmp/ directory is created on source directory (or in the build directory) by wizard and after is remove?
Yeah, exactly; what Michael's script does is attempt to make the "rules" file executable over and over and over and over again. He starts running the script in a shell, before the file is created, so it ends up failing to even find the file over and over and over, and while that is going on, he then starts the wizard running. At some point, the wizard actually creates the /tmp/qtc_packaging directory and copies the files over to it, at which point Michael's script can now find the file and makes it executable over and over and over and over again. After a while, the wizard gets around to running the rules script, creates the debian package, and deletes the directory. And after that, Michael's script once again fails to find the rules file over and over and over and over again. After that, he kills the script.

It's a brute-force kind of method, but it works.


What I'm doing is I'm trying to mimic what the wizard does by hand:

Step one: I build my app and use the SDK's "Build Debian Package and Install to Maemo5 Device" option to install it onto my phone.

Step two: I make a copy of my source directory.

Step three: I put a copy of the "debian" directory that was created in step one (which I find in "projectname-build-maemo-Qt_for_Fremantle_PR1_3_Devices__Qt_SDK__Release") into my copied source directory.

Step four: I make the two changes to the debian/rules file that Marxian described above (uncommenting qmake and $(MAKE) under the "build-stamp:" target, and commenting out the $(MAKE) clean line under the "clean:" target).

Step five: I use the technique described in this web page to have the Qt SDK set up a call to "dpkg-buildpackage" against my copied source directory. (The web page runs dpkg-buildpackage directly against the build directory, but that didn't work for me -- I put the name of my copied source directory in where he's using "$BUILDDIR".)

Step six: I have Qt do another build of my project, including the new custom step.

And poof, the desired debian package emerges!

Ok, yeah, that's not an easy process at all, and probably isn't the most efficient way to do it, but it works for now. Ultimately, the Qt guys should eventually fix this bug, and the wizard will go back to making life easier for everybody.
 

The Following User Says Thank You to Copernicus For This Useful Post: