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

  • 钉钉怎么注册新账号(钉钉公司怎么注册使用)

    钉钉怎么注册新账号(钉钉公司怎么注册使用)

  • ios怎么扫相册里的二维码(iphone怎么扫相册二维码)

    ios怎么扫相册里的二维码(iphone怎么扫相册二维码)

  • 电饭煲显示e3是什么原因(电饭煲显示e3是什么意思)

    电饭煲显示e3是什么原因(电饭煲显示e3是什么意思)

  • vsco为什么安卓不能用(vsco为什么安卓下载不了)

    vsco为什么安卓不能用(vsco为什么安卓下载不了)

  • 淘宝上的视频怎么下载(淘宝上的视频怎么保存到相册)

    淘宝上的视频怎么下载(淘宝上的视频怎么保存到相册)

  • 华为p10录屏不见了(华为p10屏幕录制不见了)

    华为p10录屏不见了(华为p10屏幕录制不见了)

  • 电话卡可以换身份证吗(电话卡可以换身份证实名吗)

    电话卡可以换身份证吗(电话卡可以换身份证实名吗)

  • 所有来电都显示同一个号码(所有来电都显示私密号码怎么办)

    所有来电都显示同一个号码(所有来电都显示私密号码怎么办)

  • 文档正在转码是什么意思(文件转码中请稍后重试)

    文档正在转码是什么意思(文件转码中请稍后重试)

  • 美国的域名叫什么?(美国在域名中的国家代码是)

    美国的域名叫什么?(美国在域名中的国家代码是)

  • 掌上电脑和平板电脑的区别(掌上电脑和平板电脑一样吗)

    掌上电脑和平板电脑的区别(掌上电脑和平板电脑一样吗)

  • 怎么设置qq电脑登录不用验证(怎么设置QQ电脑手机同步)

    怎么设置qq电脑登录不用验证(怎么设置QQ电脑手机同步)

  • excel下拉求和不正确(表格下拉求和不对)

    excel下拉求和不正确(表格下拉求和不对)

  • hbase是什么类型数据库(hbase是一种)

    hbase是什么类型数据库(hbase是一种)

  • 微信朋友圈设置仅聊天是什么意思(微信朋友圈设置权限在哪里)

    微信朋友圈设置仅聊天是什么意思(微信朋友圈设置权限在哪里)

  • 微信被永久封,怎么注销身份信息(微信被永久封禁)

    微信被永久封,怎么注销身份信息(微信被永久封禁)

  • oppoa11x有没有呼吸灯 (oppo有没有呼叫功能)

    oppoa11x有没有呼吸灯 (oppo有没有呼叫功能)

  • 华为mate30怎么切换上网卡(华为mate30怎么切换卡1卡2拨号)

    华为mate30怎么切换上网卡(华为mate30怎么切换卡1卡2拨号)

  • 抖音合拍怎么做到的(抖音合拍怎么做到无缝)

    抖音合拍怎么做到的(抖音合拍怎么做到无缝)

  • 抖音需要实名认证吗(抖音需要实名认证怎么跳过)

    抖音需要实名认证吗(抖音需要实名认证怎么跳过)

  • 华为手机允许安装未知软件的设置在哪(华为手机允许安装未知应用权限在哪里设置)

    华为手机允许安装未知软件的设置在哪(华为手机允许安装未知应用权限在哪里设置)

  • 蓝牙耳机怎么重置数据(蓝牙耳机怎么重置恢复出厂)

    蓝牙耳机怎么重置数据(蓝牙耳机怎么重置恢复出厂)

  • vivo手机没有信号是什么原因(vivo手机没有信号是哪里出现了问题)

    vivo手机没有信号是什么原因(vivo手机没有信号是哪里出现了问题)

  • 如何在网页上修改YY昵称(如何在网页上修改图片)

    如何在网页上修改YY昵称(如何在网页上修改图片)

  • 美团满减技巧(美团怎么做满减最划算)

    美团满减技巧(美团怎么做满减最划算)

  • 关于VMware12 下安装与配置CentOS 6.5 64位 的方法图文教程(vmware download)

    关于VMware12 下安装与配置CentOS 6.5 64位 的方法图文教程(vmware download)

  • JavaScript变量与基本数据类型(js中的变量)

    JavaScript变量与基本数据类型(js中的变量)

  • 非盈利组织免税资格文件
  • 关税纳税申报时间
  • 鸡蛋普通发票能不能抵扣增值税呢
  • 劳务费发票可以抵扣进项税吗
  • 个体工商户营业执照年检网上申报
  • 装修收入如何填报增值税表
  • 退税发票误勾选确认
  • 营改增后企业所得税怎么算
  • 未过户的车辆对车辆影响
  • 资本金利息收入算业务收入吗
  • 银行承兑逾期证明怎么写
  • 出口货物退回需要进口税吗
  • 使用空头支票被银行冻结
  • 免抵退税额账务处理流程
  • 收到报废车款要交什么税
  • 房屋购买安装电梯可以抵扣吗?
  • 汇总缴纳增值税附加税如何缴纳
  • 应征增值税不含税销售额是什么意思
  • 普通机打发票可以抵税吗
  • 直接计入所有者权益的利得是
  • 抄报不了是怎么回事?
  • 债券回购的含义和种类
  • 员工高温补贴奖励怎么写
  • 农村合作社补贴政策
  • windows11开始菜单点击没反应
  • dir852迅雷路由器
  • macos big sur将安装在macintosh hd
  • 浏览器显示英语怎么设置成中文
  • php代码生成器
  • php中的header函数
  • 苹果系统的声音
  • php简单实例
  • assoc .exe=exefile是什么
  • 发财树怎么修剪枝叶视频教程
  • 密歇根湖怎么读
  • 河马是站在睡觉吗
  • 供热企业享受增值税吗
  • 车辆保养费可以计入交通费吗
  • html的网址
  • dns configuration
  • 工资直接计入管理费用了怎么办
  • 企业销售旧固定资产税票开票
  • 其他应付款个人在贷方表示什么
  • 推广服务费可以抵扣吗
  • 浅谈建筑地基基础加固施工技术亲
  • 自然人独资企业需要交企业所得税吗
  • 异地多缴纳预缴税怎么退
  • 建设工程的材料质量检测由谁负责
  • sql优化方式
  • sql server 2008语句大全
  • 临时工和正式工工资不一样违法吗
  • 金税盘 申报
  • 非货币性资产含义
  • 预收租金会计分录科目
  • 认证后的进项税额留抵退税
  • 办公用水电费计入什么科目
  • 政府机关有纳税人吗
  • 加大固定资产投资
  • sql,join
  • win7系统怎么用
  • rhel配置网卡文件和图形界面
  • windows的批处理是如何实现的
  • unity协程yield
  • Nodejs Express4.x开发框架随手笔记
  • 批处理命令是什么语言
  • 批处理文件用的什么语言
  • python科学绘图
  • javascript的
  • shell脚本实现自动化巡检报警发送邮箱
  • python的threading模块详解
  • node.js操作mssql
  • python中zip函数的用法
  • JQuery解析XML的方法小结
  • jquery做下拉
  • javascript基于什么的语言
  • 广州市地方税务局规费服务中心
  • 开票后怎么报税呢
  • 辽宁省地方税务局公告2014年第10号
  • 什么是私人帐户
  • 江苏省高中教师资格证考试科目
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设