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

  • 几种可行性网站推广方法分析(网站的可行性研究包括)

    几种可行性网站推广方法分析(网站的可行性研究包括)

  • dcim是什么文件夹(DCIM是什么文件如何恢复)

    dcim是什么文件夹(DCIM是什么文件如何恢复)

  • 小红书可以看直播回放吗(小红书可以看直播历史记录吗)

    小红书可以看直播回放吗(小红书可以看直播历史记录吗)

  • 荣耀30青春版怎么显示网速(荣耀30青春版怎么看电池健康)

    荣耀30青春版怎么显示网速(荣耀30青春版怎么看电池健康)

  • vivo x27微信视频美颜怎么设置(vivox27微信视频美颜)

    vivo x27微信视频美颜怎么设置(vivox27微信视频美颜)

  • 组网技术的问题包括哪些(组网解决方案)

    组网技术的问题包括哪些(组网解决方案)

  • 什么手机内存是128G(什么手机内存是1024g)

    什么手机内存是128G(什么手机内存是1024g)

  • 在拼多多上买的东西质量有问题怎么办(在拼多多上买的鞋子质量有问题怎么办)

    在拼多多上买的东西质量有问题怎么办(在拼多多上买的鞋子质量有问题怎么办)

  • 14寸电脑具体尺寸(14寸 电脑 尺寸)

    14寸电脑具体尺寸(14寸 电脑 尺寸)

  • 苹果手机微博一直闪退(苹果手机微博一张图分成9张图片怎么弄)

    苹果手机微博一直闪退(苹果手机微博一张图分成9张图片怎么弄)

  • 抖音直播如何关闭聊天字幕(抖音直播如何关闭同城不让同城人看到)

    抖音直播如何关闭聊天字幕(抖音直播如何关闭同城不让同城人看到)

  • 电视连着wifi却不能看网络电视怎么办(电视连着wifi却说网络连接异常)

    电视连着wifi却不能看网络电视怎么办(电视连着wifi却说网络连接异常)

  • 一加8与一加8pro的区别(一加8与一加8t的区别)

    一加8与一加8pro的区别(一加8与一加8t的区别)

  • word中的替换在那里(word里的替换在哪儿)

    word中的替换在那里(word里的替换在哪儿)

  • 苹果xr如何重启(苹果xr如何强制关机重启)

    苹果xr如何重启(苹果xr如何强制关机重启)

  • 手机不贴膜会花吗(手机不贴膜会出现划痕吗)

    手机不贴膜会花吗(手机不贴膜会出现划痕吗)

  • nova5pro充电器多大(nova5 pro充电器参数)

    nova5pro充电器多大(nova5 pro充电器参数)

  • 华为手机怎么sos求救(华为手机如何解锁)

    华为手机怎么sos求救(华为手机如何解锁)

  • 拼多多月卡咋取消(拼多多月卡取消自动续费的界面)

    拼多多月卡咋取消(拼多多月卡取消自动续费的界面)

  • 手机sn码代表什么意思(手机sn码是)

    手机sn码代表什么意思(手机sn码是)

  • 位置是先行还是先列(位置与方向是先行还是先列)

    位置是先行还是先列(位置与方向是先行还是先列)

  • 2015051是红米几(红米2015052是什么型号和版本)

    2015051是红米几(红米2015052是什么型号和版本)

  • 微信怎么设置bundleid(微信怎么设置不能加好友)

    微信怎么设置bundleid(微信怎么设置不能加好友)

  • 主机电源怎么选(主机电源怎么选多少瓦)

    主机电源怎么选(主机电源怎么选多少瓦)

  • 网络适配器不见了恢复教程(网络适配器不见了win7.上不了网了)

    网络适配器不见了恢复教程(网络适配器不见了win7.上不了网了)

  • 城市公交算国企吗
  • 应纳税额减征额包括哪些内容
  • 内部交易和内部往来是什么意思
  • 税收的优惠性政策包括哪些
  • 购买的固定资产什么时候折旧
  • 跨年多计提社保个人部分怎么调整
  • 股东补亏资金
  • 境外企业分红个税怎么交
  • 土地租赁需要交土地使用税吗
  • 非增值税应税项目有哪些2023
  • 实缴年月正常补收
  • 企业注销后资产如何处置
  • 加油票不打公司会怎么样
  • 2019水利基金税率是多少
  • 代扣代缴个人所得税现金流计入哪里
  • 如何申报固定资产投资
  • 两年前的发票能开红字发票吗
  • 进项税额抵扣欠税后怎么申报
  • 自有房屋的装修费计入长期待摊
  • 外协加工费会计分录
  • 增值税发票总金额是含税金额吗
  • 销售应税产品分录
  • linux中压缩
  • macbook怎么压缩视频大小
  • 往年多交的税能退吗
  • 招待费如何列支
  • 企业开发产品转为自用的,不得在税前扣除折旧费用
  • 公司logo设计费是业务宣传费吗
  • win10系统修改密码
  • 境外佣金支付所需要征收的税
  • 艾叶泡脚的功效与作用及禁忌
  • 吃鸡显卡推荐配置1060 5g
  • android上传图片到服务器
  • 生产企业的成本有哪些
  • 费用报销单怎样粘贴
  • php验证码扭曲效果怎么做
  • 使用session的步骤
  • 升级nodejs到最新版本
  • 三维点云识别
  • 纳税人有什么义务
  • 小型微利企业的认定标准2023年
  • 息税前利润为什么不减利息
  • 填写发票票种核实怎么填
  • 电汇跟支票的区别
  • 培训费发票开具的要求有?
  • 公司滞纳金员工承担怎么做账
  • 工程项目该如何分类
  • 新政府会计制度从什么时候开始实施
  • 应收应付票据包括什么
  • 企业弥补以前年度亏损要怎么填表
  • 平销返利是销售折扣吗
  • 工程造价不能超出多少预算
  • 管理费用多计提了怎么冲
  • 房地产企业内部控制的现状
  • 进口货物的价格组成有哪些
  • 材料报废处理
  • 应付账款不需要付情况说明
  • sql经常用的语句
  • win10系统怎么手机投屏到电脑
  • 从几个方面论述
  • 苹果电脑mac系统键盘无法找到
  • 电脑win7在哪
  • xp系统部分乱码解决
  • win8 u盘启动
  • win7蓝屏是因为哪个补丁
  • win7系统的电脑
  • 水下摄影技巧
  • python accdb
  • Java反射机制和动态代理机制
  • cmd命令基础
  • 注释标签的内容会显示在浏览器窗口中
  • 用js获取地址栏url参数的方法
  • 单页图片和文字怎么设置
  • jQuery中ajax的load()与post()方法实例详解
  • angular const
  • bootstraprow布局
  • [置顶] 转载自官方-unity5.0正式发布了,看看带来哪些重要的新特性!
  • python怎么在网上赚钱
  • 新沂恩华大药房会员日
  • 关于小规模纳税人的说法正确的有
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设