Qt的程序部署到多个平台上,怎么样? [英] Qt Program deploy to multi platform, how?

查看:237
本文介绍了Qt的程序部署到多个平台上,怎么样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Qt编程是新,我想发展我想在Windows和Linux(Ubuntu的),和Mac上运行的程序。

Am new in Qt Programming and i would like to develop a program which i want to run in Windows, Linux(ubuntu), and Mac.

我听说的Qt支持辑阵平台应用开发,

I heard that Qt support mutli-platform application development,

但我的问题是,

but my Question is that,

将任何Qt库需要运行在Ubuntu这些appilication后,我部署或编译的?

推荐答案

如果您部署在Ubuntu上,因此使用.d​​eb软件包,那么你的工作是容易的,因为你只需要QT要求作为一个依赖,容易将自动根据需要安装。

If you deploy on Ubuntu, and therefore use a .deb package, then your job is easy since you just have to require qt as a dependency and apt will automatically install it as needed.

Windows和Mac却没有任何好的软件管理层,所以你没有选择,只能使用必需的Qt的DLL与二进制或编译一个静态的。在Windows上,你只需要确保DLL是在同一目录下的程序。然而,苹果需要一些重新链接工作要做。这是一个很大的痛苦,但幸运的是Qt提供了名为 macdeployqt 一个工具,它可以实现这个要求。

Windows and Mac however do not have any "good" software management layer, so you have no choice but include the required Qt DLLs with your binary or compile a static one. On Windows you just have to make sure the DLLs are in the same directory as your program. Mac however requires some relinking to be done. This is a big pain, but fortunately Qt comes with a tool named macdeployqt which does this for you.

所以,根据我的经验,Linux是部署到最简单的平台,随后由Windows和Mac是一个很好的最后一次。

So according to my experience, Linux is the easiest platform to deploy to, followed by Windows, and Mac is a good last.

上面给出了Qt部署文档的链接是一个很好的起点。如果你需要一个例子,我已经写了几个剧本打造我的一个程序的Windows二进制的。你可以看看这些上手。

The link to the Qt deployment doc given above is a good starting point. If you need an example, I have written a couple of scripts to build the Windows binaries of a program of mine. You can have a look at these to get started.

Windows安装:结果
<一href=\"http://gitorious.org/tagaini-jisho/tagaini-jisho/blobs/master/pack/win32-cross/buildwin32releases.sh\" rel=\"nofollow\">http://gitorious.org/tagaini-jisho/tagaini-jisho/blobs/master/pack/win32-cross/buildwin32releases.sh

<一href=\"http://gitorious.org/tagaini-jisho/tagaini-jisho/blobs/master/pack/win32-cross/tagainijisho.nsi\" rel=\"nofollow\">http://gitorious.org/tagaini-jisho/tagaini-jisho/blobs/master/pack/win32-cross/tagainijisho.nsi

Windows installer:
http://gitorious.org/tagaini-jisho/tagaini-jisho/blobs/master/pack/win32-cross/buildwin32releases.sh
http://gitorious.org/tagaini-jisho/tagaini-jisho/blobs/master/pack/win32-cross/tagainijisho.nsi

这篇关于Qt的程序部署到多个平台上,怎么样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆