LinuxSir.Org  
| 网站首页 | 注册账号 | 论坛帮助 |

欢迎来到LinuxSir.Org!
您还未登录,请登录后查看论坛,或者点击论坛上方的注册链接注册新账号。


发表新主题 回复
精华主题  
主题工具
旧 08-10-21, 21:29 第 1 帖
夕角
 
夕角 的头像
 
 
注册会员  
  注册日期: May 2006
  帖子: 747
  精华: 7
 

标题: 发布一个基于QT4的下载软件: eGear


eGear 是我在空闲时间开发的一个小项目,用到的库有curl, qt4,
现在已经基本实现下载软件的一些基本功能,如, http 和 ftp 的多线程下载等
目前版本: 0.1.0
0.1.0 版说明:
1、去除了dbus依赖,使用socket实现单运行实例。dbus对可移植性有一定影响。
2、增加 python 蜘蛛脚本支持,附带一个 auto-index 网页的抓取脚本。(使用时注意过多任务会占用过多资源)
3、增加了几个必需的配置选项,包括**等。

要添加以下的 ebuild 需要创建本地的 overlay, 详情请看: http://www.gentoo.org/doc/zh_cn/hand...ok_part3_chap5

本软件安装需要 curl 和 qt-gui

以下是 0.0.1 的 ebuild:
代码:
$ cat net-misc/egear/egear-0.0.1.ebuild # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit qt4 DESCRIPTION="eGear, a download tool written in QT4" HOMEPAGE="egear.googlecode.com" SRC_URI="http://egear.googlecode.com/files/${P}.tar.gz" LICENSE="GPL-3" SLOT="0" KEYWORDS="" IUSE="doc" DEPEND="dev-libs/openssl net-misc/curl || ( ( x11-libs/qt-gui ) ( >=x11-libs/qt-4.3 ) )" RDEPEND="${DEPEND}" RESTRICT="primaryuri" src_compile() { eqmake4 emake || die "emake fail" } src_install() { insinto /usr/share/pixmaps doins res/egear.png insinto /usr/share/applications doins misc/egear.desktop dobin ${PN} }
以下是 9999 (svn) 版的 ebuild:
代码:
$ cat net-misc/egear/egear-9999.ebuild # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit qt4 subversion DESCRIPTION="eGear, a download tool written in QT4" HOMEPAGE="egear.googlecode.com" SRC_URI="" ESVN_REPO_URI="http://egear.googlecode.com/svn/trunk/" LICENSE="GPL-3" SLOT="0" KEYWORDS="" IUSE="doc" DEPEND="dev-libs/openssl net-misc/curl || ( ( x11-libs/qt-gui ) ( >=x11-libs/qt-4.3 ) )" RDEPEND="${DEPEND}" RESTRICT="primaryuri" src_compile() { eqmake4 emake || die "emake fail" } src_install() { insinto /usr/share/pixmaps doins res/egear.png insinto /usr/share/applications doins misc/egear.desktop dobin ${PN} }
要手动编译的同学,请下载 http://egear.googlecode.com/files/egear-0.0.3.tar.gz (有更新版本时,请自己更改链接)
解压后进入目录执行 qmake && make, 然后执行 ./egear 启动

下面来几张截图:




0.0.3 版截图:




10 月 22 日: eGear-0.0.2 已上传,改一下 ebuild 的版本号就可以了, 主要添加 监视剪切板 的功能
10 月 22 日: ebuild 已进入 gentoo-china overlay.
10 月 25 日: eGear-0.0.3 已上传,请自行更改 ebuild 版本号更新 gentoo-china.







__________________
Linux群:19163127
我的blog: xijiao.wordpress.com.cn
-------------------------------------------------------------------------------------------------------------------------
个人观点: 要装gentoo前一定要对整个系统有一定的了解,比如:自己配置和编译过内核;可以不看文档写出完整的mount命令;熟悉grub.conf的写法等等。

此帖于 08-11-23 19:31 被 夕角 编辑.
  夕角 当前离线   回复时引用此帖
旧 08-10-21, 21:35 第 2 帖
jarryson 帅哥
 
jarryson 的头像
 
 
注册会员  
  注册日期: Jul 2004
  我的住址: 湖北武汉
  帖子: 5,659
  精华: 3
 

太好了,虽然有个multiget但是是wx的,不是很喜欢,宁愿要qt的。

不知道能不能传递参数运行?因为可能通过opera菜单调用,可能会用到。就像d4x那样的,d4x -a就出现一个添加下载文件的对话框。或者只要能监视剪切板也差不多拉。

试试看

#############################################
Arch用户的PKGBUILD已经上传到AUR。







__________________
AMD Turion MT-34 1.8G,1G+256M ddr333,VIA,AMD-ATI X700 128M,160G IDE,15.4宽...

Archlinux -- 最新,最快,最方便

此帖于 08-10-22 12:49 被 jarryson 编辑.
  jarryson 当前离线   回复时引用此帖
旧 08-10-21, 21:44 第 3 帖
druggo 帅哥
 
druggo 的头像
 
 
注册会员  
  注册日期: Mar 2003
  我的住址: 北京
  帖子: 1,485
  精华: 0
 

wget用户,纯支持,哈哈哈哈







__________________
HighWayToHell (blog)
http://blog.druggo.org

Gentoo(~x86)/5200+/4G/M2N68/9500GT/120G+500G
  druggo 当前离线   回复时引用此帖
旧 08-10-21, 21:45 第 4 帖
jarryson 帅哥
 
jarryson 的头像
 
 
注册会员  
  注册日期: Jul 2004
  我的住址: 湖北武汉
  帖子: 5,659
  精华: 3
 

额,怎么编译,我的是arch,得自己写pkgbuild。

0.0.1版本。-----------------------
qmake提示
代码:
cat: VERSION: 没有那个文件或目录 RCC: Error in 'res/escal.qrc': Cannot find file 'delete_data.png' RCC: Error in 'res/escal.qrc': Cannot find file 'exit.png' RCC: Error in 'res/escal.qrc': Cannot find file 'preferences.png' RCC: Error in 'res/escal.qrc': Cannot find file 'cancel.png' RCC: Error in 'res/escal.qrc': Cannot find file 'cut-down.png' RCC: Error in 'res/escal.qrc': Cannot find file 'increase.png' RCC: Error in 'res/escal.qrc': Cannot find file 'new.png' RCC: Error in 'res/escal.qrc': Cannot find file 'pause.png' RCC: Error in 'res/escal.qrc': Cannot find file 'start.png' RCC: Error in 'res/escal.qrc': Cannot find file 'stop.png' RCC: Error in 'res/escal.qrc': Cannot find file 'help-about.png'
然后make
代码:
In file included from src/escal_gui.h:8, from src/main.cpp:10: src/task_model.h:37: 警告:未使用的参数‘task’ src/task_model.h:37: 警告:未使用的参数‘column’ In file included from src/escal_gui.h:8, from src/escal_gui.cpp:8: src/task_model.h:37: 警告:未使用的参数‘task’ src/task_model.h:37: 警告:未使用的参数‘column’ src/file_manager.cpp:6: 警告:未使用的参数‘parent’ src/file_manager.cpp:91: 警告:未使用的参数‘pieceIndex’ src/file_manager.cpp:91: 警告:未使用的参数‘offset’ src/file_manager.cpp:91: 警告:未使用的参数‘length’ src/file_manager.cpp:171: 警告:未使用的参数‘pieceIndex’ src/file_manager.cpp:171: 警告:未使用的参数‘offset’ src/file_manager.cpp:171: 警告:未使用的参数‘length’ src/task_model.cpp:126: 错误:对‘long’类型而言整数常量太大 src/task_model.cpp:177: 错误:对‘long’类型而言整数常量太大 In file included from src/task_model.cpp:9: src/task_model.h:37: 警告:未使用的参数‘task’ src/task_model.h:37: 警告:未使用的参数‘column’ src/task_model.cpp:23: 警告:未使用的参数‘parent’ src/task_model.cpp:60: 警告:未使用的参数‘index’ src/task_model.cpp:251: 警告:未使用的参数‘index’ src/task_model.cpp:254: 警告:未使用的参数‘index’ src/task_model.cpp:257: 警告:未使用的参数‘index’ make: *** [task_model.o] 错误 1
svn版本-------------------------------------
qmake没有问题
make后依然有类似上面的问题。

此帖于 08-10-21 21:50 被 jarryson 编辑.
  jarryson 当前离线   回复时引用此帖
旧 08-10-21, 22:11 第 5 帖
夕角
 
夕角 的头像
 
 
注册会员  
  注册日期: May 2006
  帖子: 747
  精华: 7
 

二楼所提到的功能现在还没有,我会在以后的版本中加入

至于这个编译错误... 看来是我的错...
修正后的源码已上传,请重新 digest
  夕角 当前离线   回复时引用此帖
旧 08-10-21, 22:30 第 6 帖
jarryson 帅哥
 
jarryson 的头像
 
 
注册会员  
  注册日期: Jul 2004
  我的住址: 湖北武汉
  帖子: 5,659
  精华: 3
 

可是我用svn版本的也是一样的通不过编译,错误如上,也试过重新上传的包。
  jarryson 当前离线   回复时引用此帖
旧 08-10-21, 22:43 第 7 帖
flyinflash
 
flyinflash 的头像
 
 
注册会员  
  注册日期: Sep 2006
  我的住址: 自由同盟 | 广州
  帖子: 713
  精华: 0
 

axel纯用户,但支持您!(我最近一直在看那不到二百KB的axel源码,人太笨,有时真是……)

log功能很重要……







__________________
Shuge Lee | Lee Li | 李蠡

http://lee.youxu.info/
http://shuge-lab.org
  flyinflash 当前离线   回复时引用此帖
旧 08-10-21, 23:03 第 8 帖
夕角
 
夕角 的头像
 
 
注册会员  
  注册日期: May 2006
  帖子: 747
  精华: 7
 

我估计 6 楼的CPU位数不一样的关系,已经重新修改并上传。谢谢帮忙测试

收到7楼的建议,不过实现难度大一点,努力在以后的版本中加上....

欢迎大家汇报bug或下载错误的链接,可以直接发我邮箱,或在这回贴....


PS:目前数据结构还不稳定,升级后,原来任务列表的数据可能丢失,请有下载任务时尽量不要更新,见谅。
  夕角 当前离线   回复时引用此帖
旧 08-10-21, 23:36 第 9 帖
zxuan
 
zxuan 的头像
 
 
注册会员  
  注册日期: Dec 2003
  帖子: 268
  精华: 0
 

引用:
作者: flyinflash
axel纯用户,但支持您!(我最近一直在看那不到二百KB的axel源码,人太笨,有时真是……)

log功能很重要……
axel貌似用在portage-2.2_rc12上似乎有点问题?有人用这个配合portage么?
  zxuan 当前离线   回复时引用此帖
旧 08-10-21, 23:38 第 10 帖
Blahster
 
Blahster 的头像
 
 
注册会员  
  注册日期: Nov 2004
  帖子: 650
  精华: 0
 

那个preferences还没实现吗?顶起来。 ;=)

另:doc的IUSE干吗用的,另外portage里依赖似乎都是这样的|| ( ( x11-libs/qt-gui x11-libs/qt-core ) (>=x11-libs/qt-4.3) )







__________________
Thinkpad R60 9460LR1
Exherbo Linux

此帖于 08-10-21 23:46 被 Blahster 编辑.
  Blahster 当前离线   回复时引用此帖
旧 08-10-22, 01:15 第 11 帖
flyinflash
 
flyinflash 的头像
 
 
注册会员  
  注册日期: Sep 2006
  我的住址: 自由同盟 | 广州
  帖子: 713
  精华: 0
 

引用:
作者: zxuan
axel貌似用在portage-2.2_rc12上似乎有点问题?有人用这个配合portage么?
代码:
[i] sys-apps/portage Available versions: [P]2.0.51.22-r3 [P]2.1.1-r2 2.1.4.4 2.1.4.5 (~)2.1.5.6 (~)2.2_rc11 (~)2.2_rc12 {build doc elibc_FreeBSD elibc_glibc elibc_uclibc epydoc linguas_pl selinux userland_GNU} Installed versions: 2.2_rc12(01:22:59 AM 10/12/2008)(-build -doc -epydoc -linguas_pl -selinux) Homepage: http://www.gentoo.org/proj/en/portage/index.xml Description: Portage is the package management and distribution system for Gentoo Found 5 matches. shuge ~ # eix axel [i] net-misc/axel Available versions: 1.0b 1.0b-r1 1.0b-r2 1.1 {debug nls} Installed versions: 1.1(07:43:35 PM 10/20/2008)(nls -debug) Homepage: http://axel.alioth.debian.org/ Description: light Unix download accelerator shuge ~ #
please set `-n <=2` in /etc/axelrc or ~/.axelrc

you will be banned while connect some ftp/http server through much multiple connection

in fact, use wget better than axel in /etc/make.conf
  flyinflash 当前离线   回复时引用此帖
旧 08-10-22, 01:19 第 12 帖
flyinflash
 
flyinflash 的头像
 
 
注册会员  
  注册日期: Sep 2006
  我的住址: 自由同盟 | 广州
  帖子: 713
  精华: 0
 

I can't find `Makefile` in ./egear-0.0.1/src

!-_- !-_- !-_-
  flyinflash 当前离线   回复时引用此帖
旧 08-10-22, 10:09 第 13 帖
axlrose
 
 
 
注册会员  
  注册日期: Feb 2006
  我的住址: 四川成都
  帖子: 1,273
  精华: 2
 

cool ,好东东,回去试试







__________________
gentoo archlinux debian freebsd amd3600+ T61
GunsNRose

我的百度BLOG: http://hi.baidu.com/3444542
  axlrose 当前离线   回复时引用此帖
旧 08-10-22, 10:31 第 14 帖
夕角
 
夕角 的头像
 
 
注册会员  
  注册日期: May 2006
  帖子: 747
  精华: 7
 

引用:
作者: flyinflash
I can't find `Makefile` in ./egear-0.0.1/src

!-_- !-_- !-_-
请在 egear-0.0.1 下执行 qmake && make
然后 ./egear 就可以执行了


另,doc 的USE现在还没用... 配置页面也还没写...
  夕角 当前离线   回复时引用此帖
旧 08-10-22, 12:40 第 15 帖
jarryson 帅哥
 
jarryson 的头像
 
 
注册会员  
  注册日期: Jul 2004
  我的住址: 湖北武汉
  帖子: 5,659
  精华: 3
 

是不是就一个可执行文件?那么编译以后还依赖qt4不?

成功编译,设置还不可用是把?

建议把配置文件修改到$XDG_CONFIG_HOME目录下去。
  jarryson 当前离线   回复时引用此帖
发表新主题 回复


主题工具

发帖规则
您 [不可以] 发表新主题
您 [不可以] 回复主题
您 [不可以] 上传附件
您 [不可以] 编辑您的帖子

已 [启用] BB 代码
已 [启用] 表情符号
已 [启用] IMG 代码
已 [禁用] HTML 代码
[论坛跳转…]


所有时间均为[北京时间]。现在的时间是 14:24


Powered by vBulletin 版本 3.6.8
版权所有 ©2000 - 2010, Jelsoft Enterprises Ltd.
官方中文技术支持: vBulletin 中文
版权所有 ©2002 - 2009, LinuxSir.Org