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

  • 工业厂房房产税税率
  • 企业计提增值税 附加税
  • 增值税加计扣除怎么做账
  • 特殊性税务处理弥补亏损限额
  • 印花税的计提
  • 机票行程单改成发票可以报销吗
  • 房地产企业对外投资案例
  • 收到进度款开票如何做账务处理合适呢?
  • 所得税汇算清缴账务处理
  • 公司从基本户转钱到一般户走流程?
  • 出售旧机器设备,发生净收益会计分录
  • 工程发票备注怎么写
  • 股息率超过10%的公司
  • 商标是按年交费的吗
  • 服务费的发票
  • 个税退税手续费税率
  • 公户没有开票进账了可以吗
  • 成本费用总额包括信用减值损失吗
  • 企业之间的无偿借贷行为,作为借款方需要缴纳哪些税
  • 对外支付代扣代缴增值税如何申报
  • 事业单位财政拨款是什么意思
  • 物流公司油卡怎么抵税的
  • 劳务报酬的申报流程
  • 多交增值税可以退吗
  • 预提开发成本超过10%部分计算的销售成本转回
  • 高新技术企业研发费占比
  • 小企业会计准则没有以前年度损益调整科目
  • 安装win7系统的硬件要求
  • html前端技术
  • elf.exe是什么程序
  • 企业重组并购条件
  • 无花果的功效与作用对女人的好处
  • 在windows操作
  • 广告费发票内容是什么
  • 高新技术企业产品是什么意思
  • laypage分页
  • 前端gui
  • 金融服务企业按照是否办理存款业务
  • 黑暗的树荫
  • 房地产企业以房产对外投资需要交什么税
  • 编译安装php7.2
  • java多线程线程数控制在多少
  • node 文件
  • gpt3 模型大小
  • 材料发票和工程发票的区别
  • 如何用python绘制
  • 发票纳税识别号和名称打印出来不齐怎么回事
  • 电汇跟支票的区别
  • 宝塔面板在哪
  • 纸质承兑上的印花是什么
  • 工程用车折旧年限
  • 施工企业增值税账务处理
  • 大货车怎样申请报废
  • 无偿划转资产需要挂其他应收款吗
  • 土地使用权入账务处理
  • 期初固定资产算收入吗
  • 住宿费记入成本会计分录
  • 进项税的发票
  • 租房买的中央空调怎么用
  • 债务重组的方式主要包括哪些
  • mysql orch
  • Windows设置启动引导
  • centos安装完成后重启进不去
  • 在windows七中
  • 老毛桃U盘装系统综合教程
  • linux 详解
  • win10系统如何开启远程桌面连接
  • win7如何设置休眠不断网
  • Win7开机黑屏只有鼠标,进入安全模式也是黑屏
  • win10创建系统还原点有什么用
  • unity3d怎么删除模型
  • node 内存泄漏
  • cmd更改文件属性
  • unity4.5.3f3 和 Android的通信
  • jquery 表格 排序
  • jquery全局方法
  • jquery确认取消对话框
  • 河南税务报到
  • 福建省地方amc
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设