我刚刚尝试使用 Par::Packer 从 Perl 脚本生成 *.exe 文件,该工具按预期工作正常。
现在的情况是我想将基于 Perl 的应用程序作为一组实用程序(exe 文件)进行分发,每个实用程序都有一个相应的 Perl 脚本,并且它们几乎共享一些通用模块(包括 Perl 内容)。这导致每个生成的 *exe 文件都因相似的代码而变得臃肿。
我尝试在pp中附加--dependency选项,这在一定程度上减少了大小,虽然只是将perl.dll从打包文件中移出,但公共模块仍然存在。我认为应该有其他一些方法来解决这个问题。
有什么建议吗?先感谢您。
I've just tried to generate *.exe files from Perl scripts by using Par::Packer, the tool works fine as expected.
The situation now is I would like to distribute my Perl based application as a group of utilities (exe files), for each of them there is a corresponding Perl scripts, and they are sharing some common modules (including Perl stuff) pretty much. This results in each of the generated *exe files are bloated by similar codes.
I tried to attach --dependency option to pp, which reduce the size in some extent, while it just move the perl.dll out of the packaged file, the common modules are still there. I think there should be some other approaches to resolve this.
Any suggestions? Thank you in advance.
发布评论
评论(1)
http://cava.co.uk/ 提供开箱即用的功能,允许您轻松创建 . msi 风格的安装程序,无论您想要多少脚本都可以作为 .exe 文件使用(所有模块和其他所需的一切都是共享的)
您也可以打包 Par::WebStart 的
perlws
,并使用其make_par
打包每个应用程序,然后使用appshortcut 调用每个应用程序。 lnk
或appshortcut.bat
或appshortcut.exe
,它只是执行system "perlws.exe appshortcut.pnlp"
或者你可以把你所有的实用程序到模块中(无论如何你都应该这样做),然后将它们全部用
pp
打包到一个 .exe 中,然后创建foo.exe bar.exe baz.exe ...
只是做system "mybigexe.exe foo.exe"
更改图标...
exe_update< /代码>(来自cpan)
http://cava.co.uk/ provides that out of the box, allows you to easily create a .msi style installer, with however many scripts you want available as .exe files (and all modules and everything else required is shared)
You could also pack Par::WebStart's
perlws
, and pack each app using itsmake_par
, then invoke each app usingappshortcut.lnk
orappshortcut.bat
, orappshortcut.exe
which just doessystem "perlws.exe appshortcut.pnlp"
or you could turn all your utilities into modules (you should do that anyway), and then pack them all with
pp
into a single single .exe, then createfoo.exe bar.exe baz.exe ...
which just dosystem "mybigexe.exe foo.exe"
change the icons... with
exe_update
(from cpan)