peter
glass****@yahoo*****
Mon Feb 11 12:29:49 JST 2008
hi thanks for your reply yes the first step have produced the file butn.exy but the butn.exe produced from the second step have issued a message: tk.rb:891: no such file to load -- tk/event (LoadError) even tk.rb exist somewhere in the ruby directory. i have tried another utility rubyscript2exe, and as in its documentation in http://www.erikveen.dds.nl/rubyscript2exe/index.html i put the rubyscript2exe.rb within the same directory as butn.rb and in the dos prompt: ruby rubyscript2exe.rb butn.rb --rubyscript2exe-tk so it will make butn.exe, it is a successful exe but have a big size of about 3 MB, regards John Whitley <whitl****@acm*****> wrote: Peter wrote: > hi > i am trying to make the following code to an exe > Hi Peter, If your code require's any other ruby code or externals (eg. the 'tk' lib), you need to use the two-step process with exerb. This means: 1) use the mkexy module to create a butn.exy "recipe" file like so: ruby -rexerb/mkexy butn.rb # creates butn.exy The recipe file is a YAML file that records the dependencies of your script during the mkexy session. This includes both Ruby code and required Ruby external modules. A one-step 'exerb' run assumes that the script is simple and entirely self-contained; the two-step process is necessary for any really interesting Ruby code. For convenience, exerb has a 'mkexy' script that does the same as the above: mkexy butn.rb 2) Run exerb on the .exy recipe file produced by step 1: exerb butn.exy # creates butn.exe with the dependencies built-in Give that a try; I'd like to hear how it works for you. -- John --------------------------------- Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. -------------- next part -------------- An HTML attachment was scrubbed... ダウンロード