LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 6736|回复: 49

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

[复制链接]
发表于 2008-10-21 21:29:40 | 显示全部楼层 |阅读模式
eGear 是我在空闲时间开发的一个小项目,用到的库有curl, qt4,
现在已经基本实现下载软件的一些基本功能,如, http 和 ftp 的多线程下载等
[color="Red"]目前版本: 0.1.0
0.1.0 版说明:
1、去除了dbus依赖,使用socket实现单运行实例。dbus对可移植性有一定影响。
2、增加 python 蜘蛛脚本支持,附带一个 auto-index 网页的抓取脚本。(使用时注意过多任务会占用过多资源)
3、增加了几个必需的配置选项,包括代理等。

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

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

以下是 0.0.1 的 ebuild:
  1. $ cat net-misc/egear/egear-0.0.1.ebuild
  2. # Copyright 1999-2008 Gentoo Foundation                                   
  3. # Distributed under the terms of the GNU General Public License v2        
  4. # $Header: $                                                              
  5. inherit qt4
  6. DESCRIPTION="eGear, a download tool written in QT4"
  7. HOMEPAGE="egear.googlecode.com"                    
  8. SRC_URI="http://egear.googlecode.com/files/${P}.tar.gz"
  9. LICENSE="GPL-3"
  10. SLOT="0"      
  11. KEYWORDS=""   
  12. IUSE="doc"     
  13. DEPEND="dev-libs/openssl
  14.         net-misc/curl
  15.         || ( ( x11-libs/qt-gui )
  16.                 ( >=x11-libs/qt-4.3 ) )"
  17. RDEPEND="${DEPEND}"
  18. RESTRICT="primaryuri"
  19. src_compile() {
  20.         eqmake4
  21.         emake || die "emake fail"
  22. }
  23. src_install() {
  24.         insinto /usr/share/pixmaps
  25.         doins res/egear.png
  26.         insinto /usr/share/applications
  27.         doins misc/egear.desktop
  28.         dobin ${PN}
  29. }
复制代码
以下是 9999 (svn) 版的 ebuild:
  1. $ cat net-misc/egear/egear-9999.ebuild
  2. # Copyright 1999-2008 Gentoo Foundation                                 
  3. # Distributed under the terms of the GNU General Public License v2      
  4. # $Header: $                                                            
  5. inherit qt4 subversion
  6. DESCRIPTION="eGear, a download tool written in QT4"
  7. HOMEPAGE="egear.googlecode.com"                    
  8. SRC_URI=""                                         
  9. ESVN_REPO_URI="http://egear.googlecode.com/svn/trunk/"
  10. LICENSE="GPL-3"
  11. SLOT="0"      
  12. KEYWORDS=""   
  13. IUSE="doc"     
  14. DEPEND="dev-libs/openssl
  15.         net-misc/curl
  16.         || ( ( x11-libs/qt-gui )
  17.                 ( >=x11-libs/qt-4.3 ) )"
  18. RDEPEND="${DEPEND}"
  19. RESTRICT="primaryuri"
  20. src_compile() {
  21.         eqmake4
  22.         emake || die "emake fail"
  23. }
  24. src_install() {
  25.         insinto /usr/share/pixmaps
  26.         doins res/egear.png
  27.         insinto /usr/share/applications
  28.         doins misc/egear.desktop
  29.         dobin ${PN}
  30. }
复制代码

要手动编译的同学,请下载 http://egear.googlecode.com/files/egear-0.0.3.tar.gz (有更新版本时,请自己更改链接)
解压后进入目录执行 qmake && make, 然后执行 ./egear 启动

下面来几张截图:




[color="Red"]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.
发表于 2008-10-21 21:35:08 | 显示全部楼层
太好了,虽然有个multiget但是是wx的,不是很喜欢,宁愿要qt的。

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

试试看

#############################################
Arch用户的PKGBUILD已经上传到AUR。
回复 支持 反对

使用道具 举报

发表于 2008-10-21 21:44:49 | 显示全部楼层
wget用户,纯支持,哈哈哈哈
回复 支持 反对

使用道具 举报

发表于 2008-10-21 21:45:23 | 显示全部楼层
额,怎么编译,我的是arch,得自己写pkgbuild。

0.0.1版本。-----------------------
qmake提示
  1. cat: VERSION: 没有那个文件或目录
  2. RCC: Error in 'res/escal.qrc': Cannot find file 'delete_data.png'
  3. RCC: Error in 'res/escal.qrc': Cannot find file 'exit.png'
  4. RCC: Error in 'res/escal.qrc': Cannot find file 'preferences.png'
  5. RCC: Error in 'res/escal.qrc': Cannot find file 'cancel.png'
  6. RCC: Error in 'res/escal.qrc': Cannot find file 'cut-down.png'
  7. RCC: Error in 'res/escal.qrc': Cannot find file 'increase.png'
  8. RCC: Error in 'res/escal.qrc': Cannot find file 'new.png'
  9. RCC: Error in 'res/escal.qrc': Cannot find file 'pause.png'
  10. RCC: Error in 'res/escal.qrc': Cannot find file 'start.png'
  11. RCC: Error in 'res/escal.qrc': Cannot find file 'stop.png'
  12. RCC: Error in 'res/escal.qrc': Cannot find file 'help-about.png'
复制代码

然后make
  1. In file included from src/escal_gui.h:8,
  2.                  from src/main.cpp:10:
  3. src/task_model.h:37: 警告:未使用的参数‘task’
  4. src/task_model.h:37: 警告:未使用的参数‘column’

  5. In file included from src/escal_gui.h:8,
  6.                  from src/escal_gui.cpp:8:
  7. src/task_model.h:37: 警告:未使用的参数‘task’
  8. src/task_model.h:37: 警告:未使用的参数‘column’

  9. src/file_manager.cpp:6: 警告:未使用的参数‘parent’
  10. src/file_manager.cpp:91: 警告:未使用的参数‘pieceIndex’
  11. src/file_manager.cpp:91: 警告:未使用的参数‘offset’
  12. src/file_manager.cpp:91: 警告:未使用的参数‘length’
  13. src/file_manager.cpp:171: 警告:未使用的参数‘pieceIndex’
  14. src/file_manager.cpp:171: 警告:未使用的参数‘offset’
  15. src/file_manager.cpp:171: 警告:未使用的参数‘length’

  16. src/task_model.cpp:126: 错误:对‘long’类型而言整数常量太大
  17. src/task_model.cpp:177: 错误:对‘long’类型而言整数常量太大
  18. In file included from src/task_model.cpp:9:
  19. src/task_model.h:37: 警告:未使用的参数‘task’
  20. src/task_model.h:37: 警告:未使用的参数‘column’
  21. src/task_model.cpp:23: 警告:未使用的参数‘parent’
  22. src/task_model.cpp:60: 警告:未使用的参数‘index’
  23. src/task_model.cpp:251: 警告:未使用的参数‘index’
  24. src/task_model.cpp:254: 警告:未使用的参数‘index’
  25. src/task_model.cpp:257: 警告:未使用的参数‘index’
  26. make: *** [task_model.o] 错误 1
复制代码


svn版本-------------------------------------
qmake没有问题
make后依然有类似上面的问题。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-21 22:11:00 | 显示全部楼层
二楼所提到的功能现在还没有,我会在以后的版本中加入

至于这个编译错误... 看来是我的错...
修正后的源码已上传,请重新 digest
回复 支持 反对

使用道具 举报

发表于 2008-10-21 22:30:39 | 显示全部楼层
可是我用svn版本的也是一样的通不过编译,错误如上,也试过重新上传的包。
回复 支持 反对

使用道具 举报

发表于 2008-10-21 22:43:56 | 显示全部楼层
axel纯用户,但支持您!(我最近一直在看那不到二百KB的axel源码,人太笨,有时真是……)

log功能很重要……
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-21 23:03:32 | 显示全部楼层
我估计 6 楼的CPU位数不一样的关系,已经重新修改并上传。谢谢帮忙测试

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

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


PS:目前数据结构还不稳定,升级后,原来任务列表的数据可能丢失,请有下载任务时尽量不要更新,见谅。
回复 支持 反对

使用道具 举报

发表于 2008-10-21 23:36:03 | 显示全部楼层
Post by flyinflash;1897260
axel纯用户,但支持您!(我最近一直在看那不到二百KB的axel源码,人太笨,有时真是……)

log功能很重要……


axel貌似用在portage-2.2_rc12上似乎有点问题?有人用这个配合portage么?
回复 支持 反对

使用道具 举报

发表于 2008-10-21 23:38:47 | 显示全部楼层
那个preferences还没实现吗?顶起来。 ;=)

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

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表