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

  • ipad小红书怎么改为横屏模式(ipad小红书怎么设置全屏)

    ipad小红书怎么改为横屏模式(ipad小红书怎么设置全屏)

  • office2019和365的区别(office2019和365的EXCEL区别)

    office2019和365的区别(office2019和365的EXCEL区别)

  • airpods2有杂音(airpods2 有杂音)

    airpods2有杂音(airpods2 有杂音)

  • QQ怎么让别人看不到自己的情侣空间(qq怎么让别人看不到我的好友)

    QQ怎么让别人看不到自己的情侣空间(qq怎么让别人看不到我的好友)

  • 支付宝怎么点外卖(支付宝怎么点外卖自提)

    支付宝怎么点外卖(支付宝怎么点外卖自提)

  • 群公告和群待办有什么区别(群公告和群待办是一个东西吗)

    群公告和群待办有什么区别(群公告和群待办是一个东西吗)

  • p30是什么意思

    p30是什么意思

  • 苹果ipad2代哪年出的(苹果平板2代ipad2哪年出的)

    苹果ipad2代哪年出的(苹果平板2代ipad2哪年出的)

  • 按住什么键可以选择多张不连续的幻灯片(按住什么键可以绘制正方形)

    按住什么键可以选择多张不连续的幻灯片(按住什么键可以绘制正方形)

  • 小白pe维护系统什么意思(小白pe下载)

    小白pe维护系统什么意思(小白pe下载)

  • nova6可以无线充电吗(nova6能否无线充电)

    nova6可以无线充电吗(nova6能否无线充电)

  • reset键盘哪个位置(reset健在哪个位置)

    reset键盘哪个位置(reset健在哪个位置)

  • ps怎么取消切片(ps怎么取消切片模式)

    ps怎么取消切片(ps怎么取消切片模式)

  • ipad怎么关闭系统更新(ipad2019怎么关闭系统更新)

    ipad怎么关闭系统更新(ipad2019怎么关闭系统更新)

  • 手机qq壁纸怎么弄(qq手机壁纸在哪里设置)

    手机qq壁纸怎么弄(qq手机壁纸在哪里设置)

  • 手机刷不了抖音是什么情况(手机刷不了抖音和快手怎么回事)

    手机刷不了抖音是什么情况(手机刷不了抖音和快手怎么回事)

  • 苹果11为什么发烫(苹果11为什么发烫这么严重)

    苹果11为什么发烫(苹果11为什么发烫这么严重)

  • 苹果11pro怎么插双卡(苹果11pro怎么插耳机)

    苹果11pro怎么插双卡(苹果11pro怎么插耳机)

  • 华为4手环上市时间(华为手环上市时间)

    华为4手环上市时间(华为手环上市时间)

  • 怎么查看优酷会员到期(怎么查看优酷会员登录几个设备)

    怎么查看优酷会员到期(怎么查看优酷会员登录几个设备)

  • 京东id在哪里查看(京东id账号在哪里看)

    京东id在哪里查看(京东id账号在哪里看)

  • p30跑马灯设置(华为p30pro跑马灯视频)

    p30跑马灯设置(华为p30pro跑马灯视频)

  • QQ邮箱怎么看草稿箱文件(qq邮箱怎么查看草稿箱)

    QQ邮箱怎么看草稿箱文件(qq邮箱怎么查看草稿箱)

  • OK源码中国2022年首发宝塔企业破解版本,宝塔企业版最新7.9.4完整破解版本-OK源码中国破解(okhttp源码解读)

    OK源码中国2022年首发宝塔企业破解版本,宝塔企业版最新7.9.4完整破解版本-OK源码中国破解(okhttp源码解读)

  • 房产税计入哪个科目 新会计准则
  • 个人所得税应纳税额怎么计算
  • 减免税款最终转到哪个科目?
  • 房产税的计税依据包含增值税吗
  • 经营范围变更银行不变更有影响吗
  • 股东分红按利润表的净利润计算
  • 季末资产总额的计算
  • 税控盘怎么注销需要带什么东西
  • 资产减值损失结转到哪个科目
  • 企业未按规定取得发票如何处理
  • 生产车间的修理计入什么科目
  • 宾馆收入应按什么计算
  • 保险没有合同能退保吗
  • 170平方的房子装修费用
  • 结转库存什么意思
  • 批发零售企业用什么软件好
  • 预收账款增值税和消费税纳税时间
  • 物业管理的差额怎么算
  • 单位报销的发票
  • 企业管理服务公司是中介吗
  • 自营出口与委托代理哪个划算
  • 营改增后还要交营业税吗
  • 股东分红是看未交税吗
  • 房地产开发资质查询
  • php中字符串函数
  • 税款缴纳期初未缴税额
  • msoobe.exe是什么
  • 外汇收入情况说明
  • 财务新手要注意哪些事项
  • php7 数组
  • php session存储方式
  • 用java写一个helloworld
  • 手撕发票怎样盖章子
  • 增值税的纳税时间是多久
  • php 进程间通信
  • 【Vue】踩坑日记:Scoped下动画无效,曾经以为百利而无一害的Scoped,也有自己的限制
  • dhcp命令行
  • Spring Boot 3.0 正式发布,王炸!!
  • python的pillow库如何安装
  • 劳动法节假日加班工资
  • 公账发工资如何开票
  • php安装不了
  • phpcms怎么用
  • 怎么从营业执照判断是一般纳税人
  • 进项税都有什么
  • 房屋租赁需要计提印花税吗
  • 更改Mysql root用户密码
  • mysql字符串字段数据类型
  • 最新版税控盘怎么设置打印机
  • 个人独资企业购入设备可以一次性计提吗
  • 息税前利润变动率的计算公式
  • 增值税预缴的计税依据
  • 劳务费用如何做账
  • 混合销售举例说明
  • 餐饮行业购入农产品
  • 一般纳税人支出都要交税吗
  • 支付上个月运费
  • 土地出让金进项税怎么算
  • 劳务费无发票怎么处理
  • 工程物资是
  • 自产产品用于职工食堂,确认收入吗
  • 私营企业归谁管
  • mysql缓冲区
  • explore是什么进程
  • win10打开软件提示允许此应用对你设备进行更改
  • datadraveler
  • 怎么查显卡信息
  • windows恶意软件删除工具怎么安装
  • windows xp开始菜单桌面图标消失
  • suse linux 12 sp5
  • es6字符串模版
  • javascript中的数字型可以用来保存整数或浮点数(小数)
  • 深入理解ffmpeg pdf
  • 输出中断
  • android中的线程
  • 黑龙江省国家税务局通用定额发票
  • 青岛契税优惠
  • 北京中关村海淀医院属于北京几环?
  • 契税补贴网上申请
  • 近亲房屋赠与免税费
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设