土曜日, 10月 07, 2006

ActivePerlでEXEを作成

こちらを参考にActivePerlでwindows用のexeを作ってみた.

参考ページと少し異なったのでメモ

ActivePerlがv5.8.8-819だったので(GUIになった)ppmから,

  • PARとWin32-EXEモジュールを追加インストール
  • pp.exeはC:\perl\site\bin以下に入るのでPATHを追加
これくらいでpp.exeが動き,本当に普通にexeが出来た.素晴らしい.

仕組みとしてperl.dllとスクリプトを一本の圧縮ファイルにしておいて,
(Perlのインストール無くとも)実行できるだけ.

だからさすがに出来たファイルのサイズも大きい(Perlで50行程度の
ものなのに,,1.3Mでした).

D:\>pp -V
Set up gcc environment - 3.2.3 (mingw special 20030504-1)
Perl Packager, version 0.12 (PAR version 0.90)
Copyright 2002, 2003, 2004, 2005 by Autrijus Tang

Neither this program nor the associated "parl" program impose any
licensing restrictions on files generated by their execution, in
accordance with the 8th article of the Artistic License:

"Aggregation of this Package with a commercial distribution is
always permitted provided that the use of this Package is embedded;
that is, when no overt attempt is made to make this Package's
interfaces visible to the end user of the commercial distribution.
Such use shall not be construed as a distribution of this Package."

Therefore, you are absolutely free to place any license on the resulting
executable, as long as the packed 3rd-party libraries are also available
under the Artistic License.

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself. There is NO warranty; not even for
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


D:\>

ちなみに,PARのバグレポートはココ

0 コメント:

Twitter Updates

 
.