Hi,

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]
> On Behalf Of Vladimir Minenko
> Sent: 24 January 2014 12:26
> To: [email protected]
> Subject: [Development] Does Qt need a unified, cross-platform app
> deployment for devices and desktops?
> 
> Hello all,
> 
> I just wanted to bring up for a discussion an enhancement which concerns
> not only BlackBerry 10 as a platform, but also other platforms Qt runs on as
> well.
> 
> We recently submitted the change https://codereview.qt-
> project.org/#change,75441 (still WIP) which allows a Qt developer on BB10
> just to do "make deploy" on a random .pro file to get that project packaged
> and deployed in a BB10 device without any additional typing. BB10 has
> already a full integration for these steps Qt Creator. The above change
> targets to significantly simply steps required on the command line. This is 
> not
> only for those who (still) use the command line, but also for a CI system
> which would be able to automatically create and deploy test apps and unit
> tests in a cross platform manner and without "insider hacks".
> 
*snip*
> 
> So the question is if owners/maintainers of all platform see this need and we
> can agree targeting some unification done in a future Qt release.
> 
> [1]:
*snip*
> Win desktop:
> http://qt-project.org/forums/viewthread/25714
> Win RT:
> http://blog.qt.digia.com/blog/2013/06/14/introduction-to-windows-rt-
> frameworks/

I can try to lay out the basic principles on WinRT/Windows Phone (and to a 
lesser extent, Desktop Windows). I don't claim to know anything about 
deployment on other platforms, but hopefully others will speak up on how they 
see an alignment of these command-line "APIs".  I've separated the terminology 
of "deployment" into several (possibly separate) steps, which could potentially 
be stated as independent make targets. In a unified make API, we hopefully can 
come to an agreement on what names to give those steps which do the essentially 
the same thing on each platform.

1. Collection of Qt libraries and plugins with the executable (make collect)
On Desktop Windows, this is what we call "deployment", because simply copying 
the DLLs, plugins, translations, etc. with the app is normally enough to get it 
the app to run. We use the tool windeployqt to do this; perhaps Friedemann can 
state if he has any plans to meld this with the other "deployqt"s out there.
On WinRT/WinPhone, this "collect" step is also required. My proposal for this 
task (currently called "make windeployqt") is here: 
https://codereview.qt-project.org/#change,74461
Currently, make install (which copies files defined by the user in the .pro 
file) is not part of this operation, but probably should be.

2. Packaging (make package)
On Desktop Windows, it might be enough to zip up the collected Qt files and 
build artifacts and send it off. Or, generating an msi or installer package 
might be needed. I don't believe we have any API for this apart from the 
Installer Framework to do this, but I don't see anything preventing such a 
qmake feature from existing.
On WinRT/WinPhone, packaging is generally required, but is an optional step for 
deployment-time apps on WinRT. We don't currently have a make step for this, 
but probably should. Packaging can be done by our runner tool (winrtrunner, 
https://codereview.qt-project.org/#change,75071) or via the native tools that 
come with the SDK (or Visual Studio, of course). In any case, it appears that 
BB10 also uses a "package" step and would benefit from a unified make target 
API here.

3. Installation (make deploy)
This step could probably be called make install, but calling it that would 
likely require changes to the current behavior of make install. It also implies 
a "make undeploy" step which uninstalls the package.
It's likely valuable to be able to (possibly remotely) install a Desktop 
Windows package, so that's what this would do there.
On WinRT/WinPhone, the generated package is installed to the device with the 
runner tool mentioned above. In our case and likely others, it probably 
involves some arguments in the makefile or environment to actually tell which 
device to install it to and where.

4. Run (make run)
This step is likely outside the scope of deployment, but I'd thought I'd 
mention it in case we want to define a unified API for that too. Steps like run 
(or start, stop, suspend, debug, kill, etc.) might also make sense to define 
cross-platform.

So, depending on the target, make deploy would invoke a series of deployment 
subtargets before finishing up installed (ready to use or debug) on the target 
device. In some cases (e.g. local debugging on Mac with Qt installed as a 
framework), this may be a no-op. However, we should still be able to agree on 
what each step does and how to come up a definition of these steps which can 
work in a cross-platform way.

-Andrew


_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to