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

  • 职工福利费的税额
  • 代收的水资源税收入是否计入企业所得税
  • 计提企业所得税会计科目
  • 合同不交印花税合法吗
  • 公司举办年会的要求有哪些
  • 自建厂房的进项税额能一次性抵扣吗
  • 税务局代开发需要盖章吗
  • 季度申报利润表本月数怎么填
  • 电子申报率较差的原因
  • 逾期缴纳车辆购置税后情况说明怎么写
  • 安全费用提取使用管理办法2022 136
  • 政府投资计入什么科目
  • 公司新售楼总部房产税怎样算?
  • 信用贷的基本准入要求
  • 注册资金未缴齐什么意思
  • 6%的增值税专用发票怎么开
  • 购买固定资产未收到发票怎么办
  • 建筑公司不需要预缴增值税的有
  • 建筑行业增值税是多少
  • 进项税额及存货减值
  • 月末一次加权平均法是什么意思
  • 企业在运行过程中会遇到哪些法律问题
  • 总资产净利率和权益乘数之间的关系
  • mac菜单栏如何调整位置
  • 餐饮发票可以计入什么费用
  • 微软windows11正式版下载
  • 退货发票会作废吗
  • 公司一直是亏损怎么赔偿
  • 入库材料未付款属于什么会计科目
  • 网线插上还是显示红叉
  • 工程竣工的条件是什么
  • 即征即退增值税账务处理
  • 工伤补贴由谁发放
  • PHP:imagecolorclosesthwb()的用法_GD库图像处理函数
  • yolov1网络结构图详解
  • torch.save用法
  • 企业的民间借贷怎么处理
  • php时间戳转换中国标准时间
  • 批发商和零售商属于
  • php制作日历代码
  • wordpress怎么删除文章
  • sql serverjdbc
  • phpcms 生成首页
  • 党建工作经费使用流程
  • 企业申请进出口权经营范围
  • 年末财务报表是什么
  • 建筑公司可以开3个点的专票吗
  • 直接计入所有者权益的利得和损失,影响当期损益
  • 处理废旧材料会计分录
  • 经营性现金净流量公式
  • 专用发票和普通发票 报销
  • 两处以上取得工资如何申报个税
  • 高新企业必须做加计扣除吗
  • 接受投资的固定资产按什么入账
  • 自产商品对外赠送
  • 关于预付账款的说法正确的有
  • 医院药品进销差价会计核算
  • 公司收入和开支比例
  • 个人挂靠公司承接工程如何做会计处理?
  • 管家婆记账可以都有凭证做吗?
  • 接受非货币性资产捐赠入账价值
  • 什么情况下应选用基轴制配合
  • mysql和c
  • windows2000自动登陆
  • window service2008r2激活
  • win7系统的设置在哪里设置
  • 进程aissca.exe
  • centos 环境变量
  • linux cp的用法
  • linux系统中限定系统口令的长度
  • 简述opengl的编程步骤
  • 测试Qt Quick在各个平台上的3D渲染性能
  • java script和java区别
  • EditText 点击事件小问题
  • 容易混淆的词汇
  • 广州地税局官网办事点
  • 中国税务局河北省税务局官网
  • 税务部门督查内审部门监督检查的内容
  • 日本各界
  • 宜昌市西陵区国税局局长
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设