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

  • 发放福利视同销售进项税要转出吗?
  • 法人购买车险发票怎么开
  • 企业所得税季度申报表A类
  • 用进项税冲抵当月增值税的会计分录
  • 公司实行注册资本认缴制
  • 年终奖社保怎么算
  • 补计提去年的折旧该怎么做账
  • 银行询证函回函是什么意思
  • 某企业月末由仓库转来发料凭证汇总表
  • 出口退税和企业所得税
  • 免税企业土地税怎么交
  • 面条适用的增值税率是
  • 公司注销的流程和费用
  • 食堂非税收入怎么申报
  • 什么是销售利润率和成本利润率
  • 抄报是不是在申报之后才能成功?
  • 出口退税的计算题
  • 本月销项大于进项
  • 修改远程桌面端
  • win10提示病毒防护已过期
  • linux网络设置在哪里
  • 预付加油充值卡可以报销吗
  • 建筑业一般纳税人可以开普票吗
  • php 7 8
  • linux sar文件
  • 分配结转本月发出材料成本会计分录
  • shwicon.exe - shwicon是什么进程 有什么用
  • 龙骨花的养殖方法移植
  • 白鹤芋的养殖方法和注意事项
  • vue 右键菜单
  • 资产负债表根据明细账余额填列的项目
  • 因质量问题收取停工通知
  • 布拉塞龙图片
  • vue创建项目后开始写的步骤
  • javascript动画教程
  • js fetch api
  • vue3 hooks实现
  • js删除对象的方法
  • css+html
  • css3的模块结构和应用
  • 怎么搭建本地ota
  • win11设置项改中文
  • es命令行
  • 基于thinkphp开发的框架
  • 农民专业合作组织
  • 以固定资产增资流程是怎样操作
  • 专家劳务费能否抵扣个税
  • 技术服务收入属于什么收入
  • 投资公司投资收益要交增值税吗
  • 什么是销项税额转出
  • 资产负债表是怎么核对的
  • 内账会计的岗位职责
  • 国外客户怎么付款给我们公司
  • 消费税会计分录处理
  • 事业单位有奖励吗
  • 长期股权投资全部亏损汇算清缴怎么填
  • 股权变更需要做账吗
  • 租金是含税价还是含税金
  • 税控盘会计分录怎么做
  • 待处理财产损益的账务处理
  • 小规模季度没超过45万怎么纳税增值税
  • 租入办公楼装修费按几年摊销
  • 房地产企业什么时候停止预缴增值税
  • 交易性金融资产公允价值变动计入
  • 使用sql server
  • win10移动版官网
  • macbook imessage
  • win10系统如何关闭杀毒软件和防火墙
  • linux服务器的mac地址怎么查
  • linux必知必会
  • Windows 7+Fedora 16启动项问题讲解
  • win7系统如何隐藏盘符
  • 安卓域名重定向
  • javascript基础笔记
  • unity动画animator
  • python基于django的项目
  • 济宁税务局王燕利
  • 税务评估风险等级是什么
  • 皇家税务与海关署
  • 税务稽查工作底稿属于什么证据
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设