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

  • 苹果手机怎么把5g网络改成4g网络(苹果手机怎么把隐藏的app恢复到桌面)

    苹果手机怎么把5g网络改成4g网络(苹果手机怎么把隐藏的app恢复到桌面)

  • 荣耀20青春版对比华为畅享9s(荣耀20青春版对比华为nova3)

    荣耀20青春版对比华为畅享9s(荣耀20青春版对比华为nova3)

  • 笔记本能加几个内存条(笔记本配置怎么选配置)

    笔记本能加几个内存条(笔记本配置怎么选配置)

  • 拼多多卸载后重新下载,里面内容会丟失吗(拼多多卸载后重新下载)

    拼多多卸载后重新下载,里面内容会丟失吗(拼多多卸载后重新下载)

  • vivox27照片怎么带日期时间(vivox27照片怎么关闭时间)

    vivox27照片怎么带日期时间(vivox27照片怎么关闭时间)

  • kindle需要贴膜吗(kindle需不需要贴膜)

    kindle需要贴膜吗(kindle需不需要贴膜)

  • 华为手机变黑白没有彩色了怎么办(华为手机变黑白屏怎么改回彩色屏幕)

    华为手机变黑白没有彩色了怎么办(华为手机变黑白屏怎么改回彩色屏幕)

  • 手机录屏怎么截取一部分(手机录屏怎么截屏)

    手机录屏怎么截取一部分(手机录屏怎么截屏)

  • OTG为什么连不上

    OTG为什么连不上

  • 红米手机经常自动静音(红米手机经常自动重启)

    红米手机经常自动静音(红米手机经常自动重启)

  • 全景声和5.1声道有什么区别(全景声和5.1声道哪个好听)

    全景声和5.1声道有什么区别(全景声和5.1声道哪个好听)

  • 华为荣耀9x返回键怎么设置(华为荣耀9x返回键怎么弄出来)

    华为荣耀9x返回键怎么设置(华为荣耀9x返回键怎么弄出来)

  • 路由器服务器无响应怎么办(路由器服务器无响应解决办法(服务器无响应解决方案))

    路由器服务器无响应怎么办(路由器服务器无响应解决办法(服务器无响应解决方案))

  • 无主题短信是怎么回事(无主题短信怎么删除不了)

    无主题短信是怎么回事(无主题短信怎么删除不了)

  • 华为mete20pro有指纹吗(华为mate20pro有指纹解锁)

    华为mete20pro有指纹吗(华为mate20pro有指纹解锁)

  • ps怎么改变图片形状(ps怎么改变图片背景颜色)

    ps怎么改变图片形状(ps怎么改变图片背景颜色)

  • iphone11怎么更新系统(iphone11怎么更新ios16)

    iphone11怎么更新系统(iphone11怎么更新ios16)

  • 华为手机热点资讯怎么取消(华为手机热点资讯弹窗怎么彻底删除)

    华为手机热点资讯怎么取消(华为手机热点资讯弹窗怎么彻底删除)

  • pcam10是oppo什么型号(pcam10是oppo什么型号128级)

    pcam10是oppo什么型号(pcam10是oppo什么型号128级)

  • excel矩阵图怎么做(excel中矩阵图怎么做)

    excel矩阵图怎么做(excel中矩阵图怎么做)

  • 白条支付有风险吗(白条支付有风险什么意思怎么办)

    白条支付有风险吗(白条支付有风险什么意思怎么办)

  • 苹果耳机怎么兼容安卓(苹果耳机怎么兼容蓝牙)

    苹果耳机怎么兼容安卓(苹果耳机怎么兼容蓝牙)

  • a1674是ipad几(a1674是ipad几代那年款)

    a1674是ipad几(a1674是ipad几代那年款)

  • c0000218蓝屏解救方法(蓝屏c0000218代码是什么情况)

    c0000218蓝屏解救方法(蓝屏c0000218代码是什么情况)

  • 讯飞输入法如何复制(讯飞输入法如何关闭键盘声音)

    讯飞输入法如何复制(讯飞输入法如何关闭键盘声音)

  • 贝希特斯加登县拉姆绍小镇上结冰的Hintersee湖和滑冰者,德国巴伐利亚 (© Jana Mänz/Westend61/Offset)(贝特希金斯)

    贝希特斯加登县拉姆绍小镇上结冰的Hintersee湖和滑冰者,德国巴伐利亚 (© Jana Mänz/Westend61/Offset)(贝特希金斯)

  • 积分兑换开始啦
  • 已经作为损失的资产以后纳税年度收回的会计处理
  • 公司开办期间的装修费怎么会计处理
  • 非专利技术转让计入什么科目
  • 出纳单据交接表怎么填写
  • 已勾选未认证什么意思
  • 事业单位预收账款属于什么科目
  • 企业所得税公益捐赠扣除限额
  • 退休后兼职收入需要交税吗
  • 食堂收支情况
  • 施工企业已完工程成本如何结转
  • 利润的计算方法数学
  • 用土地出资需要交税吗
  • 代账报税软件哪个好
  • 一张报关单可以分批退税吗
  • 增值税失控发票什么意思
  • 营利性医院如何开办对外药房业务
  • 其他业务收入是什么意思
  • 销售方如何开具红字增值税专票 对方未抵扣
  • 销售已作进项税转出的固定资产怎样缴税?
  • 银行转账备用金是什么意思
  • 股份有限公司发行的股票溢价
  • 设计费计入成本
  • 每月的话费到下个月会扣吗
  • 免费WiFi万能钥匙
  • 设备计提折旧的方法
  • bios设置u盘启动的步骤
  • php编写登陆界面
  • php数组函数 菜鸟
  • 公司并购的税务处理办法
  • php随机函数是什么
  • 利用的拼音
  • 表格uplook
  • Yii中CArrayDataProvider和CActiveDataProvider区别实例分析
  • 企业应收票据贴现 哪个部门负责
  • php中数组的常用函数及用法
  • python读书笔记
  • rmt命令 远端磁带传输协议模块
  • 重复上次命令
  • 单位收到投标保证金会计分录
  • 所得税汇算清缴时间期限
  • 销售旧货和销售使用过的物品税率
  • 一年内到期的非流动资产包括
  • 帝国cms怎么用
  • phpcms使用教程
  • mysql线程数配置
  • 员工实际工资
  • 哪些收据可入账科目
  • 定额发票已验旧怎么办
  • 政府扶持资金使用要求
  • 固定资产大修理和更新改造的区别
  • 接受土地使用权的会计分录
  • 企业转让专利需要交什么税
  • 高新技术企业奖励政策
  • 坏账准备确认坏账
  • 出差开会总结怎么写
  • 社区养老服务平台
  • ubuntu通讯软件
  • win7登录不了系统界面
  • arm和x86性能差多少
  • xp系统几位操作系统
  • win10正式版多少钱
  • jquery 属性
  • jquery插件怎么写
  • java中遍历数组的方法
  • 需要牢记的号码
  • 利用职务之便谋取私利是什么罪
  • python闭包的条件
  • node 操作mysql
  • macos moja
  • jQuery与Ajax以及序列化
  • python3.8基础教程
  • python 脚本编写
  • Android之ContentProvider
  • 简单谈谈你对中国国防建设的认识
  • 用JObj实现的渐变效果
  • 用js实现类的方法
  • 商标注册图形查询
  • 江苏税务缴费小程序
  • 非居民企业机构场所核定征收
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设