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

  • windows7安装方法(windows7安装方法)(windows7安装视频教程)

    windows7安装方法(windows7安装方法)(windows7安装视频教程)

  • 小米平板5pro怎么双击亮屏(小米平板5pro怎么开机)

    小米平板5pro怎么双击亮屏(小米平板5pro怎么开机)

  • 华为手机的返回键在哪设置(华为手机的返回键怎么设置在屏幕上)

    华为手机的返回键在哪设置(华为手机的返回键怎么设置在屏幕上)

  • 苹果7p信号弱怎么回事(苹果7p信号弱怎么能变强)

    苹果7p信号弱怎么回事(苹果7p信号弱怎么能变强)

  • 苹果接力要不要开启

    苹果接力要不要开启

  • 京东闪电退款在哪儿看(京东 闪电退款)

    京东闪电退款在哪儿看(京东 闪电退款)

  • ipad怎么连pencil(Ipad怎么连pencil)

    ipad怎么连pencil(Ipad怎么连pencil)

  • 华为怎么关闭健康使用手机模式(华为怎么关闭健康系统)

    华为怎么关闭健康使用手机模式(华为怎么关闭健康系统)

  • 广域网通信中什么不是包交换机的任务(广域网以什么通信为主要目的)

    广域网通信中什么不是包交换机的任务(广域网以什么通信为主要目的)

  • 迅雷是干什么(迅雷干什么用的软件)

    迅雷是干什么(迅雷干什么用的软件)

  • 微博的草稿箱在哪(微博的草稿箱在哪里看)

    微博的草稿箱在哪(微博的草稿箱在哪里看)

  • 什么手机可以投屏到墙上(什么手机可以投影)

    什么手机可以投屏到墙上(什么手机可以投影)

  • oppo手机的录屏功能在哪里可以找到(oppo手机的录屏怎么关闭)

    oppo手机的录屏功能在哪里可以找到(oppo手机的录屏怎么关闭)

  • 华为mate30录音在哪里(华为mate30录音在哪里录)

    华为mate30录音在哪里(华为mate30录音在哪里录)

  • ps怎么羽化人物边缘(ps羽化人物边缘怎么用)

    ps怎么羽化人物边缘(ps羽化人物边缘怎么用)

  • 手机qq怎么设置加群(手机qq怎么设置隐身)

    手机qq怎么设置加群(手机qq怎么设置隐身)

  • 荣耀20i怎么设置分屏(荣耀20i怎么设置动态锁屏)

    荣耀20i怎么设置分屏(荣耀20i怎么设置动态锁屏)

  • 快手直播伴侣登录闪退(快手直播伴侣登录和自己直接登录的区别)

    快手直播伴侣登录闪退(快手直播伴侣登录和自己直接登录的区别)

  • 抖音号怎么快速注销(抖音号怎么快速起号)

    抖音号怎么快速注销(抖音号怎么快速起号)

  • 抬头纸一般用什么纸(抬头纸和普通纸的区别)

    抬头纸一般用什么纸(抬头纸和普通纸的区别)

  • 雨课堂签到会定位吗(雨课堂签到会有定位吗)

    雨课堂签到会定位吗(雨课堂签到会有定位吗)

  • 华为的duallens是哪款(duallens华为手机图片价格)

    华为的duallens是哪款(duallens华为手机图片价格)

  • 淘宝司法拍卖在哪里进入(淘宝司法拍卖收费标准)

    淘宝司法拍卖在哪里进入(淘宝司法拍卖收费标准)

  • 苏明玉用的是什么手机(苏明玉用的是什么武器)

    苏明玉用的是什么手机(苏明玉用的是什么武器)

  • 矩阵键盘原理(矩阵键盘原理fpga)

    矩阵键盘原理(矩阵键盘原理fpga)

  • 绿轴和青轴什么区别(绿轴和青轴什么意思区别)

    绿轴和青轴什么区别(绿轴和青轴什么意思区别)

  • 湖南个税申报系统app
  • 纳税人享受的权利有哪些
  • 计提企业所得税分录
  • 城建税少申报了怎样罚款
  • 人力资源公司开办条件
  • 账户认证操作
  • 备用金与其他应收款的记账规则
  • 将自产产品用于投资
  • 收到小额贷款怎么做账
  • 资产拍卖税费谁承担
  • 税控盘全额抵扣分录
  • 有产权车位转让需要什么手续和费用
  • 速达财务软件使用说明
  • 非全日制员工个税扣除标准
  • 对公账户管理费怎么收
  • 增值税预缴税款表项目编号是什么
  • 财务费用错记制造费用
  • 企业所得税为15%的企业
  • 持有至到期投资账务处理
  • 长期待摊费用期末在借方还是贷方
  • qqprotect.exe是什么进程?qqprotect.exe怎么禁止自动启动?
  • 总分公司分税
  • 房东不开发票违法吗
  • 宽带连接错误651是什么意思
  • 固定资产属于金融负债吗
  • PHP:oci_set_action()的用法_Oracle函数
  • ipssvc.exe - ipssvc是什么进程 有什么作用
  • 360devm.sys是什么文件
  • 外企借款投资利息高吗
  • hhcol.exe
  • 合伙企业分配股票给合伙人
  • php合并数组的方法
  • php array search
  • discuzq是个做什么
  • 账面价值是历史价值吗
  • 项目建设期算不算折旧
  • 营业外收入怎么结转到本年利润
  • 代销货物如何进账
  • 劳务派遣工资的发放单位
  • 第一季度利润表年初余额
  • 差额征税好吗
  • 合并会计报表合并范围
  • 保税仓库税收政策
  • 固定资产一次性折旧政策2023
  • 职工教育经费可以冲回吗
  • 个人所得额哪些要交税
  • 已执行新金融准则 本期金额
  • 应收账款期初余额在借方还是贷方
  • 车辆购置税完税证明图片
  • 小规模餐饮业会计如何做账
  • 公摊水电费计入什么科目
  • 财务费用在贷方表示增加还是减少
  • 贷款应提准备的资料包括
  • 劳务分包企业收入怎么算
  • 会计的职务是什么意思
  • Centos下Mysql安装图文教程
  • mysql5.7慢查询
  • win8 preparing automatic repair
  • linux 详解
  • centos安装位置选择
  • freebsd11.3安装教程
  • creative cloud怎么用
  • centos文件备份
  • win7系统莫名其妙占用个D盘
  • win10ldac怎么开启
  • 快速掌握阅读题的技巧
  • linux shell $1
  • Formatting Long Lines 格式化多行字符的shell脚本
  • android 生成图片
  • 用wasfile.zip智能批量删除文件
  • python进行aes解密
  • js实现计数
  • jquery点击切换背景颜色
  • js自动切换图片效果
  • javascript数据类型有哪些
  • jquery和dom对象之间怎么转换
  • javascriptfor循环嵌套
  • 如何彻底删除android
  • 企业所得税的改革与完善
  • 控件未安装或控件版本过低
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设