windows的aria2的懒人用法

 一键打开aria2

首先给出下载链接 https://pan.baidu.com/s/1qIS5ikDAHkeuZKOAIt3h2g 密码:2gzg

使用方法

解压之后双击aria2.exe就可以(一般将html的默认打开方式不要设置为IE,IE打开网页会有问题)

期间会有一个骆驼图标的窗口出现,在下载过程中不要关闭,下载完成之后关闭它

aria2网页版使用方法

百度搜索有说明

============================================================

下面来说一下制作方法,其实很简单

制作方法

首先下载aria2的GUI的界面文件

https://d11.baidupcs.com/file/5a71023ab47208bc3d4a032ee6a4f6c2?bkt=p3-14005a71023ab47208bc3d4a032ee6a4f6c215fd9149000000314056&xcode=d7869251647a734b30803db6abfdaaf3fa25400e34f4d0430b2977702d3e6764&fid=959626391-250528-33526906811456&time=1528389553&sign=FDTAXGERLQBHSK-DCb740ccc5511e5e8fedcff06b081203-vL4m1%2BsrvWniG8NA6dV7TtDekyA%3D&to=d11&size=3227734&sta_dx=3227734&sta_cs=10016&sta_ft=zip&sta_ct=7&sta_mt=7&fm2=MH%2CYangquan%2CAnywhere%2C%2Cjiangsu%2Ccmnet&vuk=355670066&iv=0&newver=1&newfm=1&secfm=1&flow_ver=3&pkey=14005a71023ab47208bc3d4a032ee6a4f6c215fd9149000000314056&sl=76480590&expires=8h&rt=sh&r=374718374&mlogid=3664005705283044271&vbdid=1369998454&fin=aria2%E7%BD%91%E9%A1%B5%E7%89%88.zip&fn=aria2%E7%BD%91%E9%A1%B5%E7%89%88.zip&rtype=1&dp-logid=3664005705283044271&dp-callid=0.1.1&hps=1&tsl=80&csl=80&csign=o4f9aBv%2B3yyHB4DOTgN1lD5ykKY%3D&so=0&ut=6&uter=4&serv=0&uc=1870718655&ic=3658896197&ti=26fa64dbec288224d605cde65dfb4774d0247095b187e3a0305a5e1275657320&by=themis

然后下载主程序文件

https://d11.baidupcs.com/file/73ddf7f2f60a7ec20922bba251a06726?bkt=p3-140073ddf7f2f60a7ec20922bba251a0672689bef63a00000020e4ef&xcode=d7869251647a734bc4692e908619d2ce0d4ebb529fd96d3e0b2977702d3e6764&fid=1679854806-250528-67879811957453&time=1528389578&sign=FDTAXGERLQBHSK-DCb740ccc5511e5e8fedcff06b081203-3VOjwNyelnNBjqhIrsbm0CIGCxo%3D&to=d11&size=2155759&sta_dx=2155759&sta_cs=24619&sta_ft=zip&sta_ct=6&sta_mt=6&fm2=MH%2CYangquan%2CAnywhere%2C%2Cjiangsu%2Ccmnet&vuk=355670066&iv=0&newver=1&newfm=1&secfm=1&flow_ver=3&pkey=140073ddf7f2f60a7ec20922bba251a0672689bef63a00000020e4ef&sl=76480590&expires=8h&rt=sh&r=764364568&mlogid=3663657588686540918&vbdid=1369998454&fin=aria2.zip&fn=aria2.zip&rtype=1&dp-logid=3663657588686540918&dp-callid=0.1.1&hps=1&tsl=80&csl=80&csign=o4f9aBv%2B3yyHB4DOTgN1lD5ykKY%3D&so=0&ut=6&uter=4&serv=0&uc=1870718655&ic=3658896197&ti=26fa64dbec2882248a58c0244578265fb76a2607c5c7a281305a5e1275657320&by=themis

通过别人制作的VBS懒人文件,

CreateObject("WScript.Shell").Run "aria2c.exe --conf-path=config.conf",0 

可以看到就是对主文件进行命令行的运行,并且对其隐藏

所以利用同样的思路,我在perl脚本中实现了同样的自动过程

use Cwd;


my $path = Cwd::getcwd();
open FILE,">","./aria2/aria2run.bat";
print FILE "cd $path/aria2\n";
print FILE "CHCP 65001\n";
print FILE '.\webui-aria2-master\index.html',"\n";
print FILE "aria2c.exe --conf-path=config.conf\n";
close FIle;
system ".\\aria2\\aria2run.bat";


if(exit){
    system '.\aria2\aria2close.bat';
}

我其实就是根据当前使用路径使用perl来生成一个文件,之后执行aria2c命令行的执行,当关闭perl的运行窗口时,就会将aria2c的后台进程给杀掉。

之后将GUI界面的文件夹放在aria2下面,之后再将perl用PAR打包成exe文件就可以了。

参考:

https://www.baidu.com/link?url=8vZuBBbBjw-3jubvL62ljOrSRal06qTsbDu-5eSwSuE9foFTFvSLzo8fBxtea1EP_TCxRvSF-gIcgy4BFVNdaK&wd=&eqid=d0c6fc0400027294000000035b195f72

还有网页版的下载链接的参考地址不知道是哪个网站了,以后补充

你可能感兴趣的:(perl,编程,aria2c)