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

  • 微信群视频最多可以多少人(微信群视频最多能开多少人)

    微信群视频最多可以多少人(微信群视频最多能开多少人)

  • 耳机跳电什么意思(耳机 跳电)

    耳机跳电什么意思(耳机 跳电)

  • 快剪辑免费吗(快剪辑是免费的还是收费的)

    快剪辑免费吗(快剪辑是免费的还是收费的)

  • 数据线怎么分辨快充(数据线怎么分辨好坏)

    数据线怎么分辨快充(数据线怎么分辨好坏)

  • 手机点开又自动返回是怎么回事啊(手机点开又自动锁屏)

    手机点开又自动返回是怎么回事啊(手机点开又自动锁屏)

  • 购买电脑怎么看内存插槽数目(购买电脑怎么看配置参数)

    购买电脑怎么看内存插槽数目(购买电脑怎么看配置参数)

  • 安卓微信手动删除的聊天记录可以恢复吗(安卓微信手动删除聊天)

    安卓微信手动删除的聊天记录可以恢复吗(安卓微信手动删除聊天)

  • 投影仪侧投是什么意思(投影仪侧投会影响画质吗)

    投影仪侧投是什么意思(投影仪侧投会影响画质吗)

  • 苹果手机有私密空间吗(苹果手机有私密文件吗)

    苹果手机有私密空间吗(苹果手机有私密文件吗)

  • 腾讯大王卡怎么退订(腾讯大王卡怎么领取腾讯视频vip)

    腾讯大王卡怎么退订(腾讯大王卡怎么领取腾讯视频vip)

  • 手机网络接入点wap和net区别(手机网络接入点在哪里设置)

    手机网络接入点wap和net区别(手机网络接入点在哪里设置)

  • iphone8的默认铃声是什么(iphone8p默认铃声)

    iphone8的默认铃声是什么(iphone8p默认铃声)

  • 如何开通华为pay(如何开通华为小艺)

    如何开通华为pay(如何开通华为小艺)

  • 联想笔记本end键在哪(联想笔记本键盘f1到f9功能怎么关闭)

    联想笔记本end键在哪(联想笔记本键盘f1到f9功能怎么关闭)

  • 怎么退出学习强国

    怎么退出学习强国

  • 苹果蓝牙耳机如何调节音量(苹果蓝牙耳机如何重新配对)

    苹果蓝牙耳机如何调节音量(苹果蓝牙耳机如何重新配对)

  • iphonex定时开关机设置(iphone x定时关机设置)

    iphonex定时开关机设置(iphone x定时关机设置)

  • 红米k20发热严重吗(红米k20por发热严重)

    红米k20发热严重吗(红米k20por发热严重)

  • 荣耀手环4标准版和nfc区别(荣耀手环4标准版 游泳)

    荣耀手环4标准版和nfc区别(荣耀手环4标准版 游泳)

  • iPhoneX有哪些优点和缺点(iphonex的优势在哪里)

    iPhoneX有哪些优点和缺点(iphonex的优势在哪里)

  • p30pro有没有录屏(p30 pro手机录屏设置)

    p30pro有没有录屏(p30 pro手机录屏设置)

  • 手机实景图怎么用(手机实景地图功能)

    手机实景图怎么用(手机实景地图功能)

  • Win11如何设置快捷键关机 Win11设置快捷键关机的方法(Win11如何设置快捷键调音量)

    Win11如何设置快捷键关机 Win11设置快捷键关机的方法(Win11如何设置快捷键调音量)

  • gain_trickler_3202.exe 进程查询 gain_trickler_3202进程是什么文件

    gain_trickler_3202.exe 进程查询 gain_trickler_3202进程是什么文件

  • 最高薪的IT公司CEO是谁(it最高工资)

    最高薪的IT公司CEO是谁(it最高工资)

  • domainname命令  显示和设置系统的NIS域名(domain codomain range)

    domainname命令 显示和设置系统的NIS域名(domain codomain range)

  • 公司租的库房应该计入什么科目
  • 一般纳税人认定书
  • 课税为什么叫课税
  • 企业所得税视同销售的会计处理
  • 小规模纳税人季度多少免税
  • 个税返还需要缴纳所得税吗
  • 小规模季报财报申报错误怎么办
  • 无形资产使用费计入什么科目
  • 成本法长期股权投资账务处理
  • 当月作废的采购发票已认证账务如何处理?
  • 企业收入进私户怎么做账
  • 工资不到3500用交个税吗
  • 增值税专用发票有效期是多长时间
  • 如何查询企业开票记录
  • 普通合伙企业分配利润
  • 出售二手车税率3%减按2%征收的政策
  • 计提养老保险会计分录怎么做
  • 收到社保补助不发放
  • 企业支付水电费属于什么费用
  • 公司付电费发票怎么做账
  • 投资预算的编制方法
  • b4纸张尺寸
  • 新版edge浏览器兼容ie
  • 跨年的费用冲回会计分录
  • 广告公司广告费收入交增值税吗
  • 软件开发公司账务怎么做
  • 贸易公司成本怎么计算
  • php登录注册
  • 怎么用winpe安装系统
  • 所得税季度预缴怎么算
  • 来料加工方式中,料件和加工后
  • win11系统怎么删除账户
  • php教程 ftp 函数
  • PHP:curl_pause()的用法_cURL函数
  • php数组函数题目
  • 滞纳金和罚金计入哪个会计科目
  • 存货正常报废账务处理
  • 【安装 】
  • php远程命令执行
  • 会计核算的方法主要有
  • 原材料明细账有记税吗
  • 增值税如何形成欠税
  • 母公司收取子公司管理费用比例
  • 文化体育用品批发城有哪些
  • speedtest教程
  • 命令行 压缩
  • tailf命令 查看100行
  • 煤炭企业所得税税率新疆
  • 所有者权益变动表反映的是什么
  • 理财产品的分类
  • sql server索引怎么用
  • 企业享受政府补贴的具体方式
  • 个人所得税10月份申报期
  • 印花税实际缴纳时计入
  • 冲回多提的坏账准备会计分录
  • 固定资产清理的金额怎么算
  • 个税异地缴纳后果
  • 增资扩股影响原股东的利益吗
  • 什么是批发零售市场
  • 滞纳金在年报的营业外支出的哪一项?
  • 设备维保费如何计算
  • 债务抵消的构成要件
  • 出口的样品如何销售
  • 出纳的现金日记账表格怎么做
  • alpine安装apt
  • win7怎么设置禁止安装软件
  • win10系统怎么关闭病毒防护
  • linux操作系统的基本操作
  • win8怎么进入桌面系统
  • cocos2d游戏源码
  • 作用
  • 教你用十行node.js代码读取docx的文本
  • Python中time模块中的方法
  • 初识大学主题征文
  • scrollview嵌套flatlist
  • 安卓手机管家app
  • 注销税控机流程
  • 增值税进项发票勾选时间
  • 地方税务局属于地市级还是副省级
  • 幼儿掌握概念的名称容易真正掌握概念的内涵也很容易
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设