Rubyのスクリプトを、WindowsのExeに変換するTool

exerb

という記事を発見。
早速試してみよう。


ということで、
Downlodは、
http://exerb.sourceforge.jp/
こちらから、取得してみた


exerb-4.8.0.zip

ファイルを取得できたので、
とりあえず、解凍してみる。


解凍すると
README.ja.html
というのがあるので、開いたら、Install方法が書いてあったので
とりあえず、それ通りに試す。
(いやぁー日本語で書いてあると、助かりますねぇ(^^;;)


やり方は…

ruby setup.rb

だけ。簡単ですね

試しに exerb と入力すると

>exerb
Exerb 4.8.0

Usage: exerb [options] {script-file|recipe-file}

Options:
-c --corename specifies exerb-core by defined name.
-C --corefile specifies exerb-core by path.
-o --outfile specifies output file.
-k --kcode specifies character code-set. (none/euc/sjis/utf8)
-a --archive create an archive only.
-v --verbose enable verbose mode.
-e --execute execute an executable file after creation.
-i --config display config information.
-V --version display version number.
-h --help display this information.

と表示されたので、うまくSetupは出来たみたいですね


ということで、
昨日のhello.rbを変換してみる


1.まずは動作確認
>ruby hello.rb
Hello world

2.変換してみる
>exerb hello.rb

3.出来たかな?
>dir
hello.exe

4.動かしてみる
>hello.exe
Hello world


いやぁー簡単ですね。

まだ文字しか出ない点は、
せっかくのWindowsなのに寂しいところはありますが、
まあ、はじめだから仕方ないよね。