免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 20609 | 回复: 14
打印 上一主题 下一主题

将perl打包成exe的简易工具Cava Packager [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-04-09 21:17 |只看该作者 |倒序浏览
本帖最后由 aef25u 于 2010-04-09 21:30 编辑

今天发现个图形界面的将perl代码打包成exe的工具,使用很简单,叫Cava Packager,适用于windows平台,下载网址http://www.cava.co.uk,点第一个链接"Download Setup Executable"可下载Cava Packager的exe版安装程序。
在论坛搜了一下,原来早就有人用过了......

论坛徽章:
0
2 [报告]
发表于 2010-04-10 00:03 |只看该作者
打包后一般占多少空间?

以下是我用过的(10k左右代码):
PAR: 2.5~3 M
perl2exe: 1.8~2.5M
PDK: 80k (比较理想,可惜要$)

论坛徽章:
0
3 [报告]
发表于 2010-04-10 14:30 |只看该作者
打包后一般占多少空间?

以下是我用过的(10k左右代码):
PAR: 2.5~3 M
perl2exe: 1.8~2.5M
PDK: 80k  ...
kzled 发表于 2010-04-10 00:03



我的结果跟LZ的不太一样,一般情况下,PERL2EXE生成的EXE比PDK小一些(我是指完全独立模式),但很多程序用PERL2EXE无法打包,PDK很好很强大。

论坛徽章:
0
4 [报告]
发表于 2010-04-13 10:01 |只看该作者
刚才简单试了下,我在Windows7 64位下打出来的包不能运行。。。
之前有找过几个打包的工具,在这个环境下都不能正确打包。

perl是5.10的

论坛徽章:
0
5 [报告]
发表于 2011-03-15 19:10 |只看该作者
Cava Packager 打包确实很方便。
下载:
http://www.cava.co.uk/download.html

个人测试用注意,安装后选择:tools-->Non-Commercial Subscription

论坛徽章:
0
6 [报告]
发表于 2011-03-18 21:55 |只看该作者
打包后一般占多少空间?

以下是我用过的(10k左右代码):
PAR: 2.5~3 M
perl2exe: 1.8~2.5M
PDK: 80k  ...
kzled 发表于 2010-04-10 00:03



    这个 80 K 肯定不是可独立执行的, 就 perl.dll 这么一个文件就好几百k了,没这个绝对跑不起来

论坛徽章:
1
2015年迎新春徽章
日期:2015-03-04 09:56:11
7 [报告]
发表于 2011-03-19 17:59 |只看该作者
稍后试验下,看看.

论坛徽章:
0
8 [报告]
发表于 2011-04-17 11:57 |只看该作者
今天打包了一个程序有问题,发现是可能使用BrowseEntry引起的,为次专门拿cava打包了一个perl可以正常运行的BrowseEntry的程序,结果打包后的程序果然无法运行,昨天找了一天也理不清楚是cava的问题还是Tk代码的问题,请各位大侠帮忙!
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use Tk;
  5. use Tk::BrowseEntry;
  6. my $mw = new MainWindow;
  7. $mw->title('hello');
  8. my $tn;
  9. $mw->BrowseEntry(
  10.                 -variable        => \$tn,
  11. )->pack(-side => 'top');
  12. MainLoop;
复制代码
上面是实验的代码。

下面是调试的结果:
CAVA VERBOSE 2992 : Starting Cava Verbose output to STDOUT for PID 2992
CAVA VERBOSE 2992 : Application Script Checked OK
CAVA VERBOSE 2992 : Perl Version Is 5.12.3
CAVA VERBOSE 2992 : Custom Module Loader Loaded
CAVA VERBOSE 2992 : Current Working Directory: D:\Program Files\Cava Packager\bi
n
CAVA VERBOSE 2992 : $^X Path: D:\pack_perl\be\release\MyApp\bin\browseentry.exe
CAVA VERBOSE 2992 : Base Temporary Directory : C:\Users\kk\AppData\Local\Temp/cv
pk2-kk
CAVA VERBOSE 2992 : Product Temporary Directory : C:\Users\kk\AppData\Local\Temp
/cvpk2-kk/afa89d9e542e0d085126da5e9c97d0f5
CAVA VERBOSE 2992 : Virtual Extract Directory C:\Users\kk\AppData\Local\Temp\cvp
k2-kk\afa89d9e542e0d085126da5e9c97d0f5
CAVA VERBOSE 2992 : Opening extract id file : C:\Users\kk\AppData\Local\Temp\cvp
k2-kk\afa89d9e542e0d085126da5e9c97d0f5\extractid
CAVA VERBOSE 2992 : Extracted Virtual Extract Version String = 1.0.0.1
CAVA VERBOSE 2992 : Embedded  Virtual Extract Version String = 1.0.0.1
CAVA VERBOSE 2992 : Update Virtual Extract Required
CAVA VERBOSE 2992 : Processing Virtual Extract .... ....
CAVA VERBOSE 2992 : Packaged Executable browseentry.exe
CAVA VERBOSE 2992 : Executable Path D:/pack_perl/be/release/MyApp/bin/browseentr
y.exe
CAVA VERBOSE 2992 : Bin Path : D:/pack_perl/be/release/MyApp/bin
CAVA VERBOSE 2992 : Standard Path : C:/Users/kk/AppData/Local/Temp/cvpk2-kk/afa8
9d9e542e0d085126da5e9c97d0f5/lib/std
CAVA VERBOSE 2992 : Virtual Path : C:/Users/kk/AppData/Local/Temp/cvpk2-kk/afa89
d9e542e0d085126da5e9c97d0f5/lib/vrt
CAVA VERBOSE 2992 : Resource Path C:/Users/kk/AppData/Local/Temp/cvpk2-kk/afa89d
9e542e0d085126da5e9c97d0f5/res
CAVA VERBOSE 2992 : User Folder Path D:/pack_perl/be/release/MyApp/user
CAVA VERBOSE 2992 : Standard Script Path C:/Users/kk/AppData/Local/Temp/cvpk2-kk
/afa89d9e542e0d085126da5e9c97d0f5/lib/vrt
CAVA VERBOSE 2992 : Virtual Script Path C:/Users/kk/AppData/Local/Temp/cvpk2-kk/
afa89d9e542e0d085126da5e9c97d0f5/lib/vrt
CAVA VERBOSE 2992 : Library Path : D:/pack_perl/be/release/MyApp/dll
CAVA VERBOSE 2992 : Testing Path : C:/Users/kk/AppData/Local/Temp/cvpk2-kk/afa89
d9e542e0d085126da5e9c97d0f5/lib/tst
CAVA VERBOSE 2992 : Application Root : D:/pack_perl/be/release/MyApp
CAVA VERBOSE 2992 : $0 Runtime Value: D:/pack_perl/be/release/MyApp/bin/browseen
try.exe
CAVA VERBOSE 2992 : Cava Packager Package Stub parsed
CAVA VERBOSE 2992 : MS Windows Initialisation
CAVA VERBOSE 2992 : User Data Root Path Loaded: C:/Users/kk/AppData/Local
CAVA VERBOSE 2992 : Common Data Root Path Loaded: C:/ProgramData
CAVA VERBOSE 2992 : Doc Directory Loaded: C:/Users/kk/Documents
CAVA VERBOSE 2992 : Cava Packager Application Initialisation complete
CAVA VERBOSE 2992 : Pre-loading virtual content
CAVA VERBOSE 2992 : Virtual content load complete
CAVA VERBOSE 2992 : Running Virtual Map Loader
CAVA VERBOSE 2992 : Virtual Map Loader Complete
CAVA VERBOSE 2992 : Pre-loading required implicit modules
CAVA VERBOSE 2992 : Loading Module : PerlIO.pm
CAVA VERBOSE 2992 : Loading Module : PerlIO/scalar.pm
CAVA VERBOSE 2992 : Cava Virtual Library Load : auto/PerlIO/scalar/scalar.dll
CAVA VERBOSE 2992 : Loading Module : File/Glob.pm
CAVA VERBOSE 2992 : Cava Virtual Library Load : auto/File/Glob/Glob.dll
CAVA VERBOSE 2992 : Loading Module : base.pm
CAVA VERBOSE 2992 : Temporary instance root : C:\Users\kk\AppData\Local\Temp/cvp
k2temp-kk
CAVA VERBOSE 2992 : Running Executable Script browseentry.pl
CAVA VERBOSE 2992 : Loading Module : cavaexecscript/browseentry.pl
CAVA VERBOSE 2992 : Loading Module : Tk.pm
CAVA VERBOSE 2992 : Loading Module : Tk/Event.pm
CAVA VERBOSE 2992 : Cava Virtual Library Load : auto/Tk/Event/Event.dll
CAVA VERBOSE 2992 : Loading Module : Tk/Event/IO.pm
CAVA VERBOSE 2992 : Loading Module : Symbol.pm
CAVA VERBOSE 2992 : Loading Module : Cwd.pm
CAVA VERBOSE 2992 : Cava Virtual Library Load : auto/Cwd/Cwd.dll
CAVA VERBOSE 2992 : Loading Module : File/Spec.pm
CAVA VERBOSE 2992 : Loading Module : File/Spec/Win32.pm
CAVA VERBOSE 2992 : Loading Module : File/Spec/Unix.pm
CAVA VERBOSE 2992 : Loading Module : Encode.pm
CAVA VERBOSE 2992 : Loading Module : Encode/Alias.pm
CAVA VERBOSE 2992 : Loading Module : bytes.pm
CAVA VERBOSE 2992 : Cava Virtual Library Load : auto/Encode/Encode.dll
CAVA VERBOSE 2992 : Loading Module : Encode/Config.pm
CAVA VERBOSE 2992 : Missing module required : Encode/ConfigLocal.pm : is not pac
kaged
CAVA VERBOSE 2992 : Loading Module : Encode/Encoding.pm
CAVA VERBOSE 2992 : Loading Module : Tk/Submethods.pm
CAVA VERBOSE 2992 : Cava Virtual Library Load : auto/Tk/Tk.dll
CAVA VERBOSE 2992 : Loading Module : Encode/Unicode.pm
CAVA VERBOSE 2992 : Cava Virtual Library Load : auto/Encode/Unicode/Unicode.dll
CAVA VERBOSE 2992 : Loading Module : Encode/CN.pm
CAVA VERBOSE 2992 : Loading Module : Encode/CN/HZ.pm
CAVA VERBOSE 2992 : Loading Module : utf8.pm
CAVA VERBOSE 2992 : Cava Virtual Library Load : auto/Encode/CN/CN.dll
CAVA VERBOSE 2992 : Loading Module : Tk/Widget.pm
CAVA VERBOSE 2992 : Loading Module : auto/Tk/Widget/autosplit.ix
CAVA VERBOSE 2992 : Loading Module : Tk/After.pm
CAVA VERBOSE 2992 : Loading Module : Tk/Image.pm
CAVA VERBOSE 2992 : Loading Module : Tk/MainWindow.pm
CAVA VERBOSE 2992 : Loading Module : Tk/Toplevel.pm
CAVA VERBOSE 2992 : Loading Module : auto/Tk/Toplevel/autosplit.ix
CAVA VERBOSE 2992 : Loading Module : Tk/Wm.pm
CAVA VERBOSE 2992 : Loading Module : auto/Tk/Wm/autosplit.ix
CAVA VERBOSE 2992 : Loading Module : Tk/Frame.pm
CAVA VERBOSE 2992 : Loading Module : auto/Tk/Frame/autosplit.ix
CAVA VERBOSE 2992 : Loading Module : Tk/Derived.pm
CAVA VERBOSE 2992 : Loading Module : Tk/Configure.pm
CAVA VERBOSE 2992 : Loading Module : Tk/CmdLine.pm
CAVA VERBOSE 2992 : Loading Module : Config.pm
CAVA VERBOSE 2992 : Loading Module : Tk/BrowseEntry.pm
CAVA VERBOSE 2992 : Loading Module : Tk/LabEntry.pm
CAVA VERBOSE 2992 : Loading Module : Tk/widgets.pm
CAVA VERBOSE 2992 : Loading Module : Tk/Label.pm
CAVA VERBOSE 2992 : Loading Module : Tk/Entry.pm
CAVA VERBOSE 2992 : Loading Module : Tk/Clipboard.pm
CAVA VERBOSE 2992 : Loading Module : auto/Tk/Clipboard/autosplit.ix
CAVA VERBOSE 2992 : Cava Virtual Library Load : auto/Tk/Entry/Entry.dll
CAVA VERBOSE 2992 : Missing module required : auto/Tk/Widget/Button.al : is not
packaged
CAVA VERBOSE 2992 : Loading Module : Tk/Button.pm
CAVA VERBOSE 2992 : Purging Directory C:/Users/kk/AppData/Local/Temp/cvpk2temp-k
k/1RYqWutp
couldn't read bitmap file "": No such file or directoryerror reading bitmap file
"" at <Packaged Modules>/Tk::Widget line 205.
at <Packaged Modules>/Tk::Widget line 203

CAVA VERBOSE 2992 : Application has ended.

死在红色字体部分

论坛徽章:
0
9 [报告]
发表于 2011-04-17 12:02 |只看该作者
补充一下:
运行环境:win7
perl : ActivePerl-5.12
cava:v2.0

请大家帮忙测试下是否会是我电脑的问题呢...不胜感激!

论坛徽章:
0
10 [报告]
发表于 2011-05-03 19:28 |只看该作者
Cava Packager 2.0.45 +

Menu->Tools->Check For Rule Updates
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP