Chinaunix

标题: 将perl打包成exe的简易工具Cava Packager [打印本页]

作者: aef25u    时间: 2010-04-09 21:17
标题: 将perl打包成exe的简易工具Cava Packager
本帖最后由 aef25u 于 2010-04-09 21:30 编辑

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

以下是我用过的(10k左右代码):
PAR: 2.5~3 M
perl2exe: 1.8~2.5M
PDK: 80k (比较理想,可惜要$)
作者: iamlimeng    时间: 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很好很强大。
作者: sithui    时间: 2010-04-13 10:01
刚才简单试了下,我在Windows7 64位下打出来的包不能运行。。。
之前有找过几个打包的工具,在这个环境下都不能正确打包。

perl是5.10的
作者: xuebao_zx    时间: 2011-03-15 19:10
Cava Packager 打包确实很方便。
下载:
http://www.cava.co.uk/download.html

个人测试用注意,安装后选择:tools-->Non-Commercial Subscription
作者: socyno    时间: 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了,没这个绝对跑不起来
作者: nizvoo    时间: 2011-03-19 17:59
稍后试验下,看看.
作者: kk861123    时间: 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.

死在红色字体部分
作者: kk861123    时间: 2011-04-17 12:02
补充一下:
运行环境:win7
perl : ActivePerl-5.12
cava:v2.0

请大家帮忙测试下是否会是我电脑的问题呢...不胜感激!
作者: cavapack    时间: 2011-05-03 19:28
Cava Packager 2.0.45 +

Menu->Tools->Check For Rule Updates
作者: 654013    时间: 2012-12-17 11:43
请问打包问题解决了吗?
我正急需一个打包工具。大家能推荐一个吗?
最新的5。16strawberry.

作者: qjgwhlfpt    时间: 2013-08-20 00:17
这么好的贴子。。。。   我的小伙伴们都惊呆了。。。。
作者: wsxedcer    时间: 2014-01-05 14:19
回复 1# aef25u


    这玩意儿怎么使用?
作者: numen610    时间: 2014-11-06 19:57
我发现要和那个目录一起拷贝出来,单独exe拷贝出来是打不开的

回复 4# sithui


   
作者: substr函数    时间: 2014-11-11 22:42
回复 14# numen610

请问怎么使用?
   




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2