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

  • 5个神秘数字,让你立刻明白营销的这些定律!(最神秘的数字组合)

    5个神秘数字,让你立刻明白营销的这些定律!(最神秘的数字组合)

  • 淘宝学生认证在哪里(淘宝学生认证在哪里?淘宝怎么进行学生认证)

    淘宝学生认证在哪里(淘宝学生认证在哪里?淘宝怎么进行学生认证)

  • airpods pro怎么注销原来的主人(airpods pro怎么注销)

    airpods pro怎么注销原来的主人(airpods pro怎么注销)

  • 苹果xrapp下载怎么设置面容

    苹果xrapp下载怎么设置面容

  • ppt怎么加项目符号(ppt中怎样添加项目符号)

    ppt怎么加项目符号(ppt中怎样添加项目符号)

  • 4.4.2系统的手机还能用微信吗(手机4.2.2)

    4.4.2系统的手机还能用微信吗(手机4.2.2)

  • 手机wifi图标点不亮(手机wifi图标点了没反应)

    手机wifi图标点不亮(手机wifi图标点了没反应)

  • 苹果8plus录屏在哪里设置(苹果8plus录制屏幕)

    苹果8plus录屏在哪里设置(苹果8plus录制屏幕)

  • 笔记本硬盘接口有几种(神舟笔记本硬盘接口)

    笔记本硬盘接口有几种(神舟笔记本硬盘接口)

  • 微信怎么加已过期的人(微信怎么加过期的好友申请)

    微信怎么加已过期的人(微信怎么加过期的好友申请)

  • airpods第二代发布时间(airpods二代首发价格)

    airpods第二代发布时间(airpods二代首发价格)

  • 怎么下载抖音app软件(海信电视怎么下载抖音app)

    怎么下载抖音app软件(海信电视怎么下载抖音app)

  • 华为mate30短信通知栏不显示(华为mate30短信通知不提醒了)

    华为mate30短信通知栏不显示(华为mate30短信通知不提醒了)

  • ps提示暂存盘已满什么意思(ps上显示暂存盘已经满什么意思)

    ps提示暂存盘已满什么意思(ps上显示暂存盘已经满什么意思)

  • 三星a70s安兔兔跑分(三星tab a7安兔兔)

    三星a70s安兔兔跑分(三星tab a7安兔兔)

  • 在微信里面买的电影票可以退吗(在微信里面买的电影票怎么退)

    在微信里面买的电影票可以退吗(在微信里面买的电影票怎么退)

  • excel自动套用格式在哪(excel自动套用格式怎么弄)

    excel自动套用格式在哪(excel自动套用格式怎么弄)

  • 微信运动怎么显示路线(微信运动怎么显示手表健身记录)

    微信运动怎么显示路线(微信运动怎么显示手表健身记录)

  • 抖音怎么制作相片视频(抖音怎么制作相册视频教程)

    抖音怎么制作相片视频(抖音怎么制作相册视频教程)

  • 小米8电池容量(小米8电池容量检测)

    小米8电池容量(小米8电池容量检测)

  • 小米cc9e有nfc吗(小米cc9e有门禁卡功能吗)

    小米cc9e有nfc吗(小米cc9e有门禁卡功能吗)

  • 抖音的橱窗在哪里看(抖音在哪里开橱窗)

    抖音的橱窗在哪里看(抖音在哪里开橱窗)

  • 安卓怎么把视频做成动态壁纸(安卓怎么把视频做成动态锁屏)

    安卓怎么把视频做成动态壁纸(安卓怎么把视频做成动态锁屏)

  • Mac桌面整理技巧教你如何一键收纳多个文件到一个文件夹(mac桌面怎么整理)

    Mac桌面整理技巧教你如何一键收纳多个文件到一个文件夹(mac桌面怎么整理)

  • 怎么安装win7系统(二)?(怎么安装win7系统步骤)

    怎么安装win7系统(二)?(怎么安装win7系统步骤)

  • win10电脑记事本乱码怎么办(win10电脑记事本在哪)

    win10电脑记事本乱码怎么办(win10电脑记事本在哪)

  • python shell怎样在Windows打开?(python 3.4.3 shell)

    python shell怎样在Windows打开?(python 3.4.3 shell)

  • 纳税人离线开票时间的文件
  • 其他应收款是负数怎么报税
  • 公司垫付生育津贴凭证
  • 增值税的视同销售行为有哪些?
  • 劳务公司收到劳务费怎么做账
  • 可转债如何不转换的财务处理
  • 开户以后不用要钱吗
  • 减免增值税申报表
  • 事业单位补发以后的工资
  • 学生是纳税人吗为什么
  • 现金日记账根据哪些凭证登记
  • 增值税发票的票面金额
  • 平行式明细账
  • 一般纳税人抵扣小规模期间的专票怎么解决
  • 公司对公银行账户可以注销吗
  • 销售货物并提供安装服务
  • 注册资本印花税计入哪个科目
  • 咨询费可以入账吗
  • 2018年终奖个人所得税计算器公式
  • 个税返还怎样申请退税
  • 按月预缴企业所得税的企业有哪些
  • 进口货物内销的增值税处理
  • powershell不显示用户名
  • windows 清空剪贴板
  • macbook无法调节音量
  • php获取远程文件扩展名
  • kwservice.exe是什么
  • launcheflc.exe什么意思
  • uni app面试题
  • 在建工程账务处理管理制度
  • 企业应收票据贴现 哪个部门负责
  • random_state=123
  • 待抵扣进项税在贷方什么意思
  • 2023年中国会有什么重大事件
  • 子公司借钱给母公司使用
  • erphpdown插件安装教程
  • 公司账号能给个人打款吗
  • phpcms多站点
  • 固定资产已提完折旧报废后如何处理
  • 绩效奖个人所得税是多少
  • 房地产项目转让流程
  • 受托加工物资如何开票
  • 提取维简费分录
  • 商贸企业发出商品怎么确认收入
  • 分期收款销售商品,收到本期贷款50万元
  • 不是销售性质的工作
  • ukey要交服务费吗
  • 交通补贴属于工资薪金所得吗
  • 外经证的办理流程
  • 外经证适用范围
  • 为什么要缴纳残保金
  • 企业建帐的基本要求
  • windows2003文件服务器
  • 强化系统设计
  • 怎么检测u盘是否扩容
  • win10h2版本
  • win7系统宽带连接错误651
  • win10预览体验计划不显示
  • windows tcp
  • cocos2d android 游戏开发学习——CCAction(二)
  • unity mrt
  • js过滤filter
  • javascript 操作css
  • JavaScript中的this
  • javascript scrollLeft,scrollWidth,clientWidth,offsetWidth 完全详解
  • 现在的微信怎么用脚本登陆了
  • 电子税务局更改密码怎么改
  • 废旧物资税务风险评估
  • 外经证可以不交企业所得税吗
  • 中粮副总裁是什么级别
  • 企业年报通怎么注销
  • 发票机怎么测试打印
  • 青岛电子税务局电话人工客服电话
  • 登录上海电子税务局单位社保查询不到当月未交的
  • 进口小麦关税税率是多少
  • 小规模纳税人在电子税务局怎么报税
  • 广东省哪里地方考中控证好
  • 资源税税率表一览表
  • 保税区社会车辆能进吗
  • 税务绩效工作存在的问题
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设