位置: 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实现站内消息推送)

  • 小规模水利基金优惠政策2023
  • 小规模减免增值税
  • 税收减免的定义
  • 购进货物用于建造厂房可以抵扣增值税吗
  • 发货就要开票吗是真的吗
  • 去年科目记错如何调账
  • 电梯合同属于什么合同
  • 政府性搬迁补偿收入的税务处理
  • 小规模纳税人开票税率
  • 公司代垫个税会计分录
  • 怎么分清复利和年金
  • 服务行业主营业务成本包括哪些内容
  • 外币账户收款如何做账务处理呢?
  • 设备租赁公司是干嘛的
  • 残保金超比例奖励
  • 运输营改增
  • 报销发票财务一旦作废报销人可以收回吗?
  • 税收编码选错了,发票已经开出去几个月了,还有影响吗
  • 进项发票和销项发票金额相同还需要交税金吗
  • 个税手续费需要开具发票吗
  • 外购无形资产的成本包括进口关税吗
  • 分红转增股本什么意思
  • 政府补贴收入账户是什么
  • 小规模所得税申报表填写样本
  • 政府采购 汽车
  • 工会基金是扣个人还是扣企业的
  • 企业滞纳金属于什么会计科目
  • 公司发工资了
  • 总分公司合并缴纳个税
  • mac安装windows不能用键盘
  • 技术开发合同收入包括哪些
  • 审计完结凭证要盖公章吗
  • win7系统如何设置热点
  • 物流货损怎样处理
  • linux zen3
  • windows 7如何
  • 装win7ahci
  • 航天信息维护费300元能全额抵扣吗
  • 没有组策略权限
  • 混合债务工具
  • 实际收到的货款怎么做账
  • 公证处会计分录
  • linux查看ssh服务开启
  • 挖机出租给公司
  • 小型企业资产负债表
  • 智慧工厂协同管控下载
  • thinkphp跨域
  • 免费学电脑的网站
  • 结存成本怎么计算先进先出法
  • 企业利润表列报项目有哪些
  • python id 函数
  • ubuntu中安装opencv
  • 缴纳社保费出现异常
  • 平台收取佣金开什么发票
  • 工资薪金可以抵扣增值税吗
  • 行政事业单位职工工伤有哪些待遇
  • MSSQL 2008 自动备份数据库的设置方法
  • 建筑业的人工费是什么
  • 项目对公司的战略意义
  • 合伙企业有限合伙
  • 企业会计核算中,对账的内容主要包括
  • 借主营业务成本贷应付账款
  • 预付账款借方如何结转
  • 新产品的研发费用扣除例题
  • 哪些住宿费不属于差旅费
  • 冲销以前年度费用会计分录
  • sql数据分类
  • 表空间 数据库
  • win10添加闹钟
  • 文件视图分为哪几种
  • java的gui框架
  • 纯css实现轮播图
  • python如何将矩阵转为图像
  • linux触控
  • pythoni脚本
  • jquery动态添加html代码
  • 如何解决android兼容问题
  • jquery往对象添加元素
  • 江苏国税增值税退税怎么操作
  • 如何查询有没有交医保费用
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设