PAR and Win32::Exe

旧时模样 提交于 2020-01-15 07:03:22

问题


I am running Strawberry Perl on Windows 7, 32-bit. I am also using Par::Packer to create standalone executables. The problem is that PAR::Packer uses a camel icon, and I want to replace it with a different icon. To do that I am using Win32::Exe.

After running Win32::Exe's update script I can change the icon, however now the executable no longer functions. After disabling the GUI flag, and enabling the console, I now get the following output:

Usage: foo.exe [ -Alib.par ] [ -Idir ] [ -Mmodule ] [ src.par ] [ program.pl ]
       foo.exe [ -B|-b ] [-Ooutfile] src.par

回答1:


The --icon option has been removed from PAR::Packer. Using Win32::Exe directly is the right solution. If the bundled exe_update script corrupts your exe, try issuing the actual Perl code on the command line - see my answer on a similar question.




回答2:


Have you tried the --icon option to pp?

 pp --icon hello.ico -o out.exe hello

This came from the pp doc:

perldoc pp

PerlMonks thread covers the proper way to create the icon.



来源:https://stackoverflow.com/questions/21891564/par-and-win32exe

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!