amule-dlp 开发动态(aMule-2.3.1 测试版本可用)

上网、浏览、聊天、下载等
回复
achen.han
帖子: 442
注册时间: 2010-09-08 23:33

Re: amule-dlp 开发动态(amulecmd$ reload antileech 已经添加,等php高手帮忙)

#151

帖子 achen.han » 2011-03-17 20:55

帖一下hg tip

cat@cat-VirtualBox:~/amule-dlp$ hg tip
修改集: 32:843fb768b972
分支: dynamic-load
标签: tip
父亲: 31:aa30fb1c8dea
父亲: 16:fe3841b2f937
用户: Bill Lee <[email protected]>
日期: Thu Mar 10 21:46:16 2011 +0800
摘要: Merge branch 'cleanup' to 'dynamic-load'


cat@cat-VirtualBox:~/amule-dlp$ grep 'EC_OP_ANTILEECH_RELOAD' src/libs/ec/cpp/ECCodes.h
EC_OP_ANTILEECH_RELOAD = 0x80 /* Dynamic Leech Protect - Bill Lee */
Bill Lee
帖子: 598
注册时间: 2009-09-19 20:50

Re: amule-dlp 开发动态(amulecmd$ reload antileech 已经添加,等php高手帮忙)

#152

帖子 Bill Lee » 2011-03-17 21:27

achen.han, 这个问题就实在诡异了。
根据 log, Google Code 上的状态树,RSS, 和你在 84 行的时候执行 hg tip, 你最后取到的是843fb768b972, 这个是我的机器上正在跑的版本,这个版本是在 10号就推到 Google Code,之后就再也没有推送了,除了今晚我刚推了几个更新(没错,很遗憾的告诉你,刚编译的又过时了)。而你在 16 号时取出 dyanmic-load 分支无法编译成功,我觉得就只有两个可能:一是在取回版本库的时候发生了错误,不过 hg 应该有校验机制的,出错应该会提示,并且你多次取回了版本库,这个可能性不大。第二就是编译环境的问题,不过如果你执行 apt-get 的时候没有出错,那么编译环境就应该是正常的。
确实有一些中间的版本没有测试,但所有推到 Google Code 的 heads 都是测试过的。如果你没有显示的指定取出某个中间版本,是不会遇到这些未经测试的版本的。
不过你出问题的那个版本库已经删了,问题的原因就找不到了。

另外如果没有什么大问题,是没必要执行 make clean 的。自从版本控制系统换成 hg 后,我就再也没有在我的主要开发 clone 中执行过这个命令了。
aMule 2.3.1 is coming...
真正动态的 amule-dlp is coming...
本人帐号在2011年1月被盗,在2011年1月3日17:19到2010年1月6日13:34之间本帐号发的一切帖子、短信等与本人无关!
amule-dlp 开发动态
amule-dlp on Google Code
WebArchiver - 基于 wget 的网页归档工具(PyQt4 GUI 前端)
Linux 2.6.34 编译笔记
achen.han
帖子: 442
注册时间: 2010-09-08 23:33

Re: amule-dlp 开发动态(amulecmd$ reload antileech 已经添加,等php高手帮忙)

#153

帖子 achen.han » 2011-03-17 23:49

bill,问题确实诡异。取回版本库和安装编译环境都没有问题。我想了想,如果版本库在我今天取回前没更新,可能是昨天安装编译环境后没有重启系统导致的细微差别,这是今天和昨天唯一的区别。

( linux更新内核模块都不需要重启动,安个软件还要重启?上面只是我瞎猜。)

一会再编译一下新的更新版本,没有遗憾,生命在于折腾。:-)

make clean问题再次感谢bill的指点。又学习了。
achen.han
帖子: 442
注册时间: 2010-09-08 23:33

Re: amule-dlp 开发动态(amulecmd$ reload antileech 已经添加,等php高手帮忙)

#154

帖子 achen.han » 2011-03-18 1:04

最新版本编译成功,没 make clean 后只编译更新的代码文件,编译过程飞快呀。

我用一下step更新:

1 关闭amule-dlp
2 cd ~/amule-dlp
3 sudo make uninstall
4 sudo make install
5 sudo rm -f /usr/lib/antiLeech.so
6 sudo cp ~/amule-dlp/antiLeech/antiLeech.so /usr/lib/

不知不卸载直接 sudo make install 成不成?

安装后测试情况:

程序正常运行,log 中显示成功加载antileech,DLP log有不少渣雷的影子。

在主界面没找到动态加载按钮,就到设置窗口DLP下找,居然没找到 。其它设置选项找了个遍都没找到。又回到DLP设置窗口下,看到顶部的reload antileech了。原想着是个小按钮,没想到看成标题栏了,惯性思维害死人。点了reload antileech,弹出提示装载成功小窗口,log中也有显示。

感谢bill和其他开发amule-dlp的大牛们。
Bill Lee
帖子: 598
注册时间: 2009-09-19 20:50

Re: amule-dlp 开发动态(amulecmd$ reload antileech 已经添加,等php高手帮忙)

#155

帖子 Bill Lee » 2011-03-18 10:25

achen.han, 实际上还是 make 再 sudo make install, 要不你编译目录下生成的那些文件也变成 root 的,到时要删除又要 root 权限。
不经过 make uninstall 直接 make install 没试过,不知道它内部是怎样操作的,根据 Makefile 它应该是调用了 /usr/bin/install 来复制文件,但 install 的 man page 里没说它是 rm & cp 还是直接覆盖。
另外你的编译步骤实际上没有编译 antiLeech.so, 你必须进入 antiLeech 目录下手动 make. 不过这次 antiLeech 没有实质的更新。

那个按钮我也觉得很丑,可是我根本没有系统的了解过 wxWidgets 的,添加那个按钮之前我就看过一个 Quick Start. aMule 的 UI 本来是用设计器自动生成的,但后来的修改都是手动写的代码,以前 greensea 写的就很好,但我写的就不行了。
aMule 2.3.1 is coming...
真正动态的 amule-dlp is coming...
本人帐号在2011年1月被盗,在2011年1月3日17:19到2010年1月6日13:34之间本帐号发的一切帖子、短信等与本人无关!
amule-dlp 开发动态
amule-dlp on Google Code
WebArchiver - 基于 wget 的网页归档工具(PyQt4 GUI 前端)
Linux 2.6.34 编译笔记
achen.han
帖子: 442
注册时间: 2010-09-08 23:33

Re: amule-dlp 开发动态(amulecmd$ reload antileech 已经添加,等php高手帮忙)

#156

帖子 achen.han » 2011-03-19 1:11

按布局看一点都不丑,我感觉只是位置有点不好,打开DLP选项后,我的注意力在窗口中间靠上点的位置,一堆选项的下面部分,最上面用余光扫了一下,没仔细看加上惯性思维就当成标题栏了。我觉得按钮放在选项组下面用小按钮后面配上文本说明更协调一些。萝卜白菜各有所爱,每个人审美不一样,仅是个人的看法。

现在做的已经挺好了,界面的东西,尤其是设置界面能露脸的机会太少太少,不必追求完美无暇,关键是DLP的核心程序。
persmule
帖子: 8
注册时间: 2011-02-12 17:40

Re: amule-dlp 开发动态(amulecmd$ reload antileech 已经添加,等php高手帮忙)

#157

帖子 persmule » 2011-03-27 12:41

违反最小权限原则。如果要让 amule-dlp 修改位于 /usr/lib 的文件,就必须有 root 权限。而一个网络服务工作进程是绝对不应该持有 root 权限的。
我看把仅为amule-dlp所调用antileech放在/usr/lib才叫违反最小权限原则呢。
头像
Lavande
论坛版主
帖子: 5353
注册时间: 2008-12-21 15:27
来自: TARDIS

Re: amule-dlp 开发动态(amulecmd$ reload antileech 已经添加,等php高手帮忙)

#158

帖子 Lavande » 2011-04-03 17:07

不太了解,问几个问题……
1、antileech可以放在其他文件夹么?amule会不会自动找到?
2、hg弄回来的源码,第一次编译安装之后,等到下次有新版本了,是不是可以在原来的目录上直接更新源码,然后直接在那个目录重新编译?
头像
Lavande
论坛版主
帖子: 5353
注册时间: 2008-12-21 15:27
来自: TARDIS

Re: amule-dlp 开发动态(amulecmd$ reload antileech 已经添加,等php高手帮忙)

#159

帖子 Lavande » 2011-04-03 17:15

按照google code的wiki编译的,make之后,开始还正常,然后到这里突然就出错了:

代码: 全选

In file included from /usr/include/upnp/upnp.h:505,
                 from UPnPCompatibility.h:31,
                 from UPnPBase.h:37,
                 from amule.cpp:86:
/usr/include/upnp/upnpdebug.h:130: warning: unused parameter ‘log_level’
/usr/include/upnp/upnpdebug.h:169: warning: unused parameter ‘ErrFileName’
/usr/include/upnp/upnpdebug.h:169: warning: unused parameter ‘InfoFileName’
/usr/include/upnp/upnpdebug.h:194: warning: unused parameter ‘level’
/usr/include/upnp/upnpdebug.h:194: warning: unused parameter ‘module’
/usr/include/upnp/upnpdebug.h:221: warning: unused parameter ‘DLevel’
/usr/include/upnp/upnpdebug.h:221: warning: unused parameter ‘Module’
/usr/include/upnp/upnpdebug.h:262: warning: unused parameter ‘DLevel’
/usr/include/upnp/upnpdebug.h:262: warning: unused parameter ‘Module’
/usr/include/upnp/upnpdebug.h:262: warning: unused parameter ‘DbgFileName’
/usr/include/upnp/upnpdebug.h:262: warning: unused parameter ‘DbgLineNo’
/usr/include/upnp/upnpdebug.h:262: warning: unused parameter ‘FmtStr’
/usr/include/upnp/upnpdebug.h:293: warning: unused parameter ‘fd’
/usr/include/upnp/upnpdebug.h:293: warning: unused parameter ‘lines’
/usr/include/upnp/upnpdebug.h:293: warning: unused parameter ‘size’
/usr/include/upnp/upnpdebug.h:293: warning: unused parameter ‘starlength’
/usr/include/upnp/upnpdebug.h:321: warning: unused parameter ‘fd’
/usr/include/upnp/upnpdebug.h:321: warning: unused parameter ‘DbgFileName’
/usr/include/upnp/upnpdebug.h:321: warning: unused parameter ‘DbgLineNo’
In file included from kademlia/kademlia/../routing/Contact.h:43,
                 from kademlia/kademlia/UDPFirewallTester.h:30,
                 from BaseClient.cpp:78:
kademlia/kademlia/../routing/../utils/KadUDPKey.h:38: warning: unused parameter ‘zero’
kademlia/kademlia/../routing/../utils/KadUDPKey.h:42: warning: unused parameter ‘zero’
In file included from kademlia/kademlia/UDPFirewallTester.h:30,
                 from BaseClient.cpp:78:
kademlia/kademlia/../routing/Contact.h: In member function ‘void Kademlia::CContact::DecUse()’:
kademlia/kademlia/../routing/Contact.h:84: warning: suggest braces around empty body in an ‘else’ statement
Compiling ClientList.cpp
Compiling ClientCreditsList.cpp
In file included from kademlia/kademlia/../routing/Contact.h:43,
                 from kademlia/kademlia/UDPFirewallTester.h:30,
                 from ClientList.cpp:50:
kademlia/kademlia/../routing/../utils/KadUDPKey.h:38: warning: unused parameter ‘zero’
kademlia/kademlia/../routing/../utils/KadUDPKey.h:42: warning: unused parameter ‘zero’
In file included from kademlia/kademlia/UDPFirewallTester.h:30,
                 from ClientList.cpp:50:
kademlia/kademlia/../routing/Contact.h: In member function ‘void Kademlia::CContact::DecUse()’:
kademlia/kademlia/../routing/Contact.h:84: warning: suggest braces around empty body in an ‘else’ statement
ClientList.cpp: In member function ‘void CClientList::CleanUpClientList()’:
ClientList.cpp:1022: warning: suggest parentheses around ‘&&’ within ‘||’
ClientList.cpp:1032: warning: suggest parentheses around ‘&&’ within ‘||’
Compiling ClientTCPSocket.cpp
Compiling ClientUDPSocket.cpp
ClientTCPSocket.cpp: In member function ‘bool CClientTCPSocket::ProcessED2Kv2Packet(const uint8_t*, uint32, uint8)’:
ClientTCPSocket.cpp:1867: warning: unused variable ‘numtags’
In file included from ClientUDPSocket.cpp:50:
kademlia/utils/KadUDPKey.h:38: warning: unused parameter ‘zero’
kademlia/utils/KadUDPKey.h:42: warning: unused parameter ‘zero’
Compiling DownloadClient.cpp
Compiling DownloadQueue.cpp
Compiling ECSpecialCoreTags.cpp
Compiling EMSocket.cpp
Compiling EncryptedStreamSocket.cpp
EMSocket.cpp: In member function ‘virtual SocketSentBytes CEMSocket::Send(uint32, uint32, bool)’:
EMSocket.cpp:554: warning: suggest parentheses around ‘&&’ within ‘||’
EMSocket.cpp:555: warning: suggest parentheses around ‘&&’ within ‘||’
EMSocket.cpp:556: warning: suggest parentheses around ‘&&’ within ‘||’
EMSocket.cpp:557: warning: suggest parentheses around ‘&&’ within ‘||’
EMSocket.cpp:607: warning: suggest parentheses around ‘&&’ within ‘||’
EMSocket.cpp:687: warning: suggest parentheses around ‘&&’ within ‘||’
Compiling EncryptedDatagramSocket.cpp
EncryptedStreamSocket.cpp: In member function ‘int CEncryptedStreamSocket::Read(void*, wxUint32)’:
EncryptedStreamSocket.cpp:221: warning: comparison between signed and unsigned integer expressions
EncryptedStreamSocket.cpp:251: warning: comparison between signed and unsigned integer expressions
EncryptedStreamSocket.cpp:304: warning: comparison between signed and unsigned integer expressions
Compiling ExternalConn.cpp
Compiling Friend.cpp
ExternalConn.cpp: In static member function ‘static CECPacket* ExternalConn::ProcessRequest2(const CECPacket*, CPartFile_Encoder_Map&, CKnownFile_Encoder_Map&, CObjTagMap&)’:
ExternalConn.cpp:1231: error: ‘EC_OP_ANTILEECH_RELOAD’ was not declared in this scope
Compiling FriendList.cpp
make[3]: *** [amule-ExternalConn.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
achen.han
帖子: 442
注册时间: 2010-09-08 23:33

Re: amule-dlp 开发动态(amulecmd$ reload antileech 已经添加,等php高手帮忙)

#160

帖子 achen.han » 2011-04-04 15:28

Lavande 写了:不太了解,问几个问题……
1、antileech可以放在其他文件夹么?amule会不会自动找到?
2、hg弄回来的源码,第一次编译安装之后,等到下次有新版本了,是不是可以在原来的目录上直接更新源码,然后直接在那个目录重新编译?
第一个问题:

根据 linux 动态库的装载原理,antileech 放 /lib 和 /usr/lib 可被amule自动找到。

放其它位置有两种方法解决:
1 配置/etc/ld.so.conf 将库路径加入该文件,用ldconfig命令生成装载库缓冲。
2 设置LD_LIBRARY_PATH环境变量,如 $ LD_LIBRARY_PATH = /home/dir_name amule-dlp

第二个问题:

有新的版本后,要在原来的目录下更新。首先进入原来目录,更新源码,再升级需要的版本到工作目录后,之后才可以编译。

例如目录为amule-dlp
1 cd amule-dlp
2 hg pull
3 update v0.0.3
4 make
头像
Lavande
论坛版主
帖子: 5353
注册时间: 2008-12-21 15:27
来自: TARDIS

Re: amule-dlp 开发动态(amulecmd$ reload antileech 已经添加,等php高手帮忙)

#161

帖子 Lavande » 2011-04-04 16:10

:em11 多谢,回答真详细
不过那个编译出问题能看出是怎么回事吗? :em06
achen.han
帖子: 442
注册时间: 2010-09-08 23:33

Re: amule-dlp 开发动态(amulecmd$ reload antileech 已经添加,等php高手帮忙)

#162

帖子 achen.han » 2011-04-04 19:45

跟我碰上的问题一样,第二天重新做就好了。很诡异。见上面的一些讨论。
achen.han
帖子: 442
注册时间: 2010-09-08 23:33

Re: amule-dlp 开发动态(amulecmd$ reload antileech 已经添加,等php高手帮忙)

#163

帖子 achen.han » 2011-04-04 19:53

Lavande,147楼开始。
achen.han
帖子: 442
注册时间: 2010-09-08 23:33

Re: amule-dlp 开发动态(amulecmd$ reload antileech 已经添加,等php高手帮忙)

#164

帖子 achen.han » 2011-04-04 20:01

Lavande,要不你现把这个有问题的目录备份一下,不知Bill Lee忙不忙,让他分析一下。
Bill Lee
帖子: 598
注册时间: 2009-09-19 20:50

Re: amule-dlp 开发动态(amulecmd$ reload antileech 已经添加,等php高手帮忙)

#165

帖子 Bill Lee » 2011-04-04 23:04

Lavande, hg pull 是把Google Code上的版本库中的更新同步到你本地的版本库,而 hg update 就是更新当前的工作目录。
hg update 可带参数, hg update 版本号, hg update 分支名, hg update 标签名 这三种方式可以分别取出指定版本;而不带参数的 hg update 就是把当前工作目录下的分支更新到最新。另外还有几个有用的命令:
  • hg tags 列出所有标签
  • hg branches 列出所有分支
  • hg heads 列出所有头(即未合并的分支,代表了开发的分岔)
  • hg log 列出日志
  • hg tip 列出版本库中最新的修改
aMule 2.3.1 is coming...
真正动态的 amule-dlp is coming...
本人帐号在2011年1月被盗,在2011年1月3日17:19到2010年1月6日13:34之间本帐号发的一切帖子、短信等与本人无关!
amule-dlp 开发动态
amule-dlp on Google Code
WebArchiver - 基于 wget 的网页归档工具(PyQt4 GUI 前端)
Linux 2.6.34 编译笔记
回复