位置: IT常识 - 正文

Packaging a Qt application

编辑:rootadmin
Packaging a Qt application - maemo.org wiki Packaging a Qt application Main article: Packaging Packa Packaging a Qt application

推荐整理分享Packaging a Qt application,希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!

Main article: Packaging

Packaging a Qt application for Maemo is very similar to packaging any other application, so this document only contains information on Qt-specific packaging issues.

1 Creating a Maemo package from a qmake project 2 Editing the rules file 3 Editing the control file 4 Example 5 Useful Links

[edit] Creating a Maemo package from a qmake project

In order to create a new package for Maemo, from a qmake project, you will need to:

Rename the source directory to Package-Version (for example myapp-0.1 for an application ‘myapp’ with a version of ‘0.1’) Create a ‘src’ directory in Package-Version/ Copy all the files to the src/ directory Rename src/appname.pro to src/src.pro

Please make sure that the directory name is <package-version> format and in small case letters.

$mv myapp myapp-0.1 $cd myapp-0.1 $mkdir src $cp * src $mv src/appname.pro src/src.pro

Append the following chunk to end of your src/src.pro. The chunk adds an install section to your qmakefile

unix { #VARIABLES isEmpty(PREFIX) { PREFIX = /usr } BINDIR = $PREFIX/bin DATADIR =$PREFIX/share

DEFINES += DATADIR=\\\"$DATADIR\\\" PKGDATADIR=\\\"$PKGDATADIR\\\"

#MAKE INSTALL

INSTALLS += target desktop service iconxpm icon26 icon48 icon64

target.path =$BINDIR

desktop.path = $DATADIR/applications/hildon desktop.files += ${TARGET}.desktop

service.path = $DATADIR/dbus-1/services service.files += ${TARGET}.service

icon64.path = $DATADIR/icons/hicolor/64x64/apps icon64.files += ../data/64x64/${TARGET}.png }

Create a myapp-0.1/myapp.pro file like this:

QMAKEVERSION = $[QMAKE_VERSION] ISQT4 = $find(QMAKEVERSION, ^[2-9]) isEmpty( ISQT4 ) { error("Use the qmake include with Qt4.4 or greater, on Debian that is qmake-qt4"); }

TEMPLATE = subdirs SUBDIRS = src

Packaging a Qt application

Run dh_make to debianize the source archive, it creates:

An archive with the unchanged upstream source (orig.tar.gz) Some basic files in the debian directory Some example files (*.EX *.ex)

export DEBFULLNAME="maintainer first name and last name" dh_make --createorig --single -e maintainer@email.org -c gpl

[edit] Editing the rules file

The rules file generated by dh_make, found in debian/rules will be modified in order to look like this one. We are using qmake, so there is no configure script to run. If you copy and paste the following file, notice the empty space at the beginning of the lines these are TAB characters, they are not multiple space characters. If you copy and paste the following chunk, you most propably get space's instead of tabs if this is true then the file will not work.

#!/usr/bin/make -f APPNAME := my_app_name builddir: mkdir -p builddir

builddir/Makefile: builddir cd builddir && qmake-qt4 PREFIX=/usr ../$(APPNAME).pro

build: build-stamp

build-stamp: builddir/Makefile dh_testdir # Add here commands to compile the package. cd builddir && $(MAKE) touch $@

clean: dh_testdir dh_testroot rm -f build-stamp # Add here commands to clean up after the build process. rm -rf builddir dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs

# Add here commands to install the package into debian/your_appname cd builddir && $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/$(APPNAME) install # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default.

# Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installdocs dh_installexamples dh_installman dh_link dh_strip --dbg-package=my-application-dbg dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb

binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure

[edit] Editing the control file

The control file generated by dh_make, found in debian/control will be modified substantially. Please refer to the general packaging guide for Maemo for details.

For Qt applications you need to make sure to add libqt4-dev as an additional entry in the field Build-Depends.

[edit] Example

You can download the source package of qt-maemo-example from the extras-devel repository as follows, if you have source packages enabled in your /etc/apt/sources.list file:

apt-get source qt-maemo-example

This command will download the:

unmodified source (.orig.tar.gz) debian dsc file (.dsc) diff file (.diff)

and will then automatically launch dpkg -x file.dsc in order to decompress the orig.tar.gz and apply the changes.

[edit] Useful Links

Packaging Qt Creator Apps for Maemo Extras Qt for Maemo Packaging guide for Maemo Deploying your Maemo 5 Qt application Qt documentation

本文链接地址:https://www.jiuchutong.com/zhishi/310436.html 转载请保留说明!

上一篇:python中重写与调用方法是什么(python中重写构造方法)

下一篇:phpcms推送失败怎么办(php实现站内消息推送)

  • 工会刻章费用计入什么支出
  • 运输业月末进销项税怎么结转
  • 租入住房用于职工福利,进项转出吗?
  • 行政单位的财务报告包括财务报表和财务情况说明书
  • 建筑企业增值税纳税义务发生时间如何确定
  • 房地产开发商转型
  • 人力资源外包服务费计入什么科目
  • 房地产行业预缴税款
  • 预付账款余额怎么算
  • 代发工资的手续费是多少
  • 中国银行结算包括哪些内容?怎么做会计分录?
  • 印花税申报表如何填写
  • 股票投资收益需要缴纳增值税吗
  • 增值税计税依据包含消费税吗
  • 个体户办营业执照需要什么证件和材料
  • 预缴增值税怎么填表
  • 起征点是什么意思举例子说明
  • 有关增值税期末留抵税额的会计分录
  • 个体工商户的税收优惠政策有哪些
  • 对外投资亏损可以记股权投资减少吗
  • 管理费用怎么记忆
  • 怎么辨别是非
  • 其他业务收入怎么填纳税申报表
  • 租房合同开发票的金额要和合同一致吗
  • 社保缴费基数是什么意思,退休能拿多少
  • 收到非税收入一般缴款书开发票吗
  • 什么情况下增值税不能抵扣
  • 在win7系统中安装win10
  • php干啥用
  • 没有一般纳税人证明怎么办
  • linux命令用法
  • php mb_convert_encoding
  • 期间损益的科目
  • 赡养老人支出如果有四个子女都要填吗
  • 消费税的计算过程
  • 一般纳税人筹建期不用交税吗
  • 仓库盘点单模板
  • 所得税费用科目的贷方登记
  • python 二值化
  • 研发支出属于什么类
  • 出售长期股权投资
  • sql server 2008使用
  • SQLite Delete详解及实例代码
  • 资本公积含义
  • 双分录怎么做记账凭证
  • 税务机关如何对个人股东股权财务报表审核
  • 什么是年化收益和绝对利率
  • 公司冲账发票做账流程
  • 土地承包经营权上的房屋
  • 开票确定收入分录
  • 产品销售费用是什么科目
  • 空档期太长是不是很难找工作
  • 建筑工地塔吊租赁会计分录
  • 服务费税额部分计算公式
  • 企业一般用什么系统
  • excel日记账系统的设置
  • 配置是什么意思
  • win10账户要求必须设置pin什么意思
  • win10怎么用xp经典主题
  • win10预览在哪里
  • 你能可能
  • winpsd.exe - winpsd是什么进程
  • xp开机chkdsk
  • linux里vim常用命令
  • 微软补丁发布时间
  • 技术故事是什么意思
  • bootstrap要学吗
  • Node.js中的事件循环是什么
  • 谈谈关于中华文明的五个突出特性
  • python中的\r
  • shell脚本spool
  • node.js 配置
  • activity的作用和生命周期
  • javascript instanceof 与typeof使用说明
  • [置顶] 安卓手机连接IP100蓝牙打印机实现打印功能
  • JavaScript中Textarea滚动条不能拖动的解决方法
  • jquery22插件网
  • 印花税计征周期
  • 建筑施工劳务资质
  • 开展志愿服务关爱活动
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设