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

  • 新手必看的30种淘宝网店推广方法(新手适合看的书)

    新手必看的30种淘宝网店推广方法(新手适合看的书)

  • 截图快捷键电脑win10(截图快捷键)(屏幕截图快捷键电脑)

    截图快捷键电脑win10(截图快捷键)(屏幕截图快捷键电脑)

  • 人气票算主播音浪收入吗(主播人气值是什么意思)

    人气票算主播音浪收入吗(主播人气值是什么意思)

  • 安卓typec是通用的吗

    安卓typec是通用的吗

  • 苹果x为什么突然掉电厉害(苹果x为什么突然没有声音了)

    苹果x为什么突然掉电厉害(苹果x为什么突然没有声音了)

  • 怎么删除幻灯片母版中的日期区(怎么删除幻灯片的备注文字信息)

    怎么删除幻灯片母版中的日期区(怎么删除幻灯片的备注文字信息)

  • 华为海思芯片有哪些(华为海思芯片有哪些型号)

    华为海思芯片有哪些(华为海思芯片有哪些型号)

  • 微博被限流怎么解除(微博被限流怎么办 如何解决微博限流_游戏狗手机版)

    微博被限流怎么解除(微博被限流怎么办 如何解决微博限流_游戏狗手机版)

  • 拉黑再删除对方还能加好友吗(拉黑再删除对方还能看到聊天记录吗)

    拉黑再删除对方还能加好友吗(拉黑再删除对方还能看到聊天记录吗)

  • 京东个人空间在哪里(京东个人空间总共消费准确吗)

    京东个人空间在哪里(京东个人空间总共消费准确吗)

  • 注销apple id账号(注销apple id账号后,微信还能用吗)

    注销apple id账号(注销apple id账号后,微信还能用吗)

  • 聊天记录备份与迁移是什么意思(聊天记录备份与迁移在哪里)

    聊天记录备份与迁移是什么意思(聊天记录备份与迁移在哪里)

  • 支付宝买票怎么取票(支付宝买票怎么看检票口)

    支付宝买票怎么取票(支付宝买票怎么看检票口)

  • vivoz1i可以控制空调吗(vivo手机能控制vivo手机吗)

    vivoz1i可以控制空调吗(vivo手机能控制vivo手机吗)

  • 手机系统怎么回退(手机系统怎么回退到前一个版本)

    手机系统怎么回退(手机系统怎么回退到前一个版本)

  • 趣步怎么解绑实名认证(趣步怎么注销)

    趣步怎么解绑实名认证(趣步怎么注销)

  • 天猫魔盒怎么投影(天猫魔盒怎么投屏不了)

    天猫魔盒怎么投影(天猫魔盒怎么投屏不了)

  • 拼多多删sku会降权吗(拼多多删掉sku有没有影响)

    拼多多删sku会降权吗(拼多多删掉sku有没有影响)

  • 快手伴侣支持obs直播吗(快手pc伴侣)

    快手伴侣支持obs直播吗(快手pc伴侣)

  • 芒果tv会员在哪取消(芒果tv会员在哪里可以兑换)

    芒果tv会员在哪取消(芒果tv会员在哪里可以兑换)

  • 剪映怎么使用自己的音乐(剪映怎么使用自己下载的音乐)

    剪映怎么使用自己的音乐(剪映怎么使用自己下载的音乐)

  • 华为畅享max上市时间(华为畅享max是什么型号)

    华为畅享max上市时间(华为畅享max是什么型号)

  • 抖音怎么做38张照片卡节拍(抖音怎么做38张图片)

    抖音怎么做38张照片卡节拍(抖音怎么做38张图片)

  • 魅蓝5s恢复出厂设置在哪里(魅蓝5s恢复出厂设置密码)

    魅蓝5s恢复出厂设置在哪里(魅蓝5s恢复出厂设置密码)

  • realmex是什么牌子手机(realme是什么牌子rmx3121)

    realmex是什么牌子手机(realme是什么牌子rmx3121)

  • 华为p30pro广角怎么用(华为p30pro 广角)

    华为p30pro广角怎么用(华为p30pro 广角)

  • python如何实现事务机制

    python如何实现事务机制

  • 小微企业所得税费用怎么算
  • 企业变更股东需要本人到场吗
  • 增值税和个人所得税都要交吗
  • 报销是否需要发票
  • 19年高速公路免费时间
  • 调整跨期收入是否调增值税
  • 企业收到跨年度的政府补贴款,是否计入当年企业所得税
  • 发票上的税额和报税的数不一样,按照哪个报
  • 奖金用现金发放违法吗
  • 一般纳税人开具房屋租赁费税率
  • 纳税人必须关注的10个涉税风险点
  • 公司法人变更账务需要重新建立吗
  • 空白发票丢失怎么写说明
  • 企业支付短期借款利息1000元
  • 企业收到红字发票,应该如何申报报表?
  • 电信网费普通发票税率为什么是0
  • 隐藏资源管理器里的cd驱动器
  • 其他应付款冲回计入哪个科目
  • 银行贷款需要走第三方账户,第三方需要提供身份证
  • Windows11更新后无法联网
  • 消防工程改造需要什么资质
  • php上传大文件失败
  • 出租商品计入什么科目
  • widows11预览版
  • 小程序在线反编译网页版
  • 融资租赁印花税怎么缴纳
  • 发票备注栏可以写详见清单吗
  • 开发产品完工结转
  • PHP:mcrypt_get_iv_size()的用法_Mcrypt函数
  • 资产负债所有者权益损益类会计科目
  • 努沙杜瓦酒店
  • 天猫提现不走对公2023
  • php的foreach循环语句
  • html用语
  • echarts中国地图代码
  • 资产减值损失为什么要调增
  • 免税农产品包括30万元吗
  • 拖欠工程款利息的司法解释
  • 什么叫资本退出
  • java 访问者模式
  • 织梦安装详细教程
  • 中小企业发展专项资金亮点 免申即享
  • 企业享受政府补贴的具体方式
  • 小规模增值税税率表2023年最新版
  • 代扣和代缴的区别
  • 包装物租金如何界定
  • 营改增试点行业顺序
  • 注销时其他应付款怎么冲平
  • 广告费收入如何填写增值税申报表
  • 农产品免税收入需要缴纳所得税吗
  • 如何填写社会保障卡信息
  • 销售佣金的会计科目
  • 多余备用金记账会计分录
  • 个体工商户个税2023最新政策
  • 私营企业归谁管
  • mysql安装配置教程5.7.26
  • sql server 数据库日志不可用
  • 使用筷子就餐会不会传染乙肝病毒
  • ubuntu server gui
  • win8系统界面切换成win7
  • freebsd安装到u盘
  • uzqkst.exe - uzqkst是什么进程
  • w10英雄联盟老是崩溃
  • win10 1607更新失败
  • 虚拟机安装苹果电脑
  • xp系统禁止程序联网
  • 虚拟机下安装操作软件
  • windows8的word在哪里
  • win7组合键失效
  • win10预览文件怎么显示内容
  • 举例说明如何为教学搭建支架
  • shell 字符串trim
  • unit uniform
  • jQuery插件安装教程
  • unity技术分享
  • vue轮播图插件有哪些
  • unityhub安装unity出错
  • 房产税从价计征的计税依据
  • 国土局和地税局的区别
  • 营业费用指哪些
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设