Skip to content

edvakf/RBat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Authors

edvakf (twitter.com/edvakf/)

Version

0.1

Copyright

Copyright © edvakf, 2011. All rights reserved

License

Distributed under the same license as Ruby

RBat makes distribution of ruby script to windows easier.

RBat copies Ruby and all dependensies under current directory, and creates a batch file that executes a script.

In theory, the directory should be standalone, ie. running the batch file should run the ruby script on the Ruby under this directory.

RBat is inspired a lot by Exerb.

  • Write your ruby script on Windows

  • Download rbat.rb on the directory of your script

  • Ruby your script with mswin or mingw Ruby (not cygwin) requiring rbat.rb as follows

> /path/to/ruby -r./rbat ./your-script.rb

  • This will create a directory called ‘ruby-dist’ and copy ruby executable etc. It also creates your-script.bat in the current directory.

Scripts that require rbconfig might not work properly.

At the moment, rbat copies ALL *.dll files in the same directory as Ruby executable, even unused ones. This is because there is no easy way to tell which dll is loaded by Ruby.

However, I created another library called dll.rb which is still not well tested at all, and might not work in other than my environment, but can lists all .dll and .so files that are loaded by the current Ruby program.

> /path/to/ruby -r./dll ./your-script.rb

The dlls which are in the same folder as Ruby itself are the ones that are used. Those that are not listed are the ones unused. If there are dlls that are in ruby-dist directory and are not listed here, then you can probably remove them.

About

creates a standalone ruby directory from a ruby script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages