Take our short survey. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Compile ruby script into exe? Ask Question. Asked 9 years, 9 months ago. Active 4 years, 7 months ago. Viewed 28k times. So, how does someone build a. For example: mkexy -rrubygems test.
Jonathan Jeffus. Jonathan Jeffus Jonathan Jeffus 1 1 gold badge 1 1 silver badge 6 6 bronze badges. Perhaps you can try this: johnallen.
Did you see a console spawned by Ocra? If you compiled a. I actually didn't see anything, no window, nothing. Maybe it popped up the error message mentioned in the johnallen. I'll experiment more with ocra tomorrow and update this question. Quick update: I tried ocra for 1. Also it seems like bizarre things are happening with it. Like, for example, I changed the code to load " google.
Distributions 5. License 5. License of RubyScript2Exe 5. License of your Application 6. Download 6. Mac OS X Darwin 7. Known Issues. You can look at it as a "compiler". Not in the sense of a source-code-to-byte-code compiler, but as a "collector", for it collects all necessary files to run your application on an other machine: the Ruby application, the Ruby interpreter and the Ruby runtime library stripped down for your application.
Anyway, the result is the same: a standalone executable application. And that's what we want! Because of the gathering of files from your own Ruby installation, RubyScript2Exe creates an executable for the platform it's being run on. No cross compile. But the generated exe under Cygwin is very, very big , because its exe 's are very big static? There is one more advantage: Because there might be some incompatibilities between the different Ruby versions, you have to test your application with every single version.
Unless you distribute your version of Ruby with your application RubyScript2Exe can handle simple scripts, but it can handle complete directories as well. Usually, an application is more than just a program or a script.
It consists of libraries, documentation, help files, configuration files, images, licenses, readmes, and so on. You can embed all of them in one single executable.
You can use allinoneruby. It's about how I build, pack and distribute my Ruby applications. Theory and practice. I'm working on full support of RubyGems. I've tested just a couple of gems, not all of them.
If you've troubles with a specific gem, please let me know. RubyScript2Exe monitors the execution of your application. This is done by running your application with a special library. After your application has finished, this special library returns all information about your application to RubyScript2Exe.
RubyScript2Exe then gathers all program files and requirements ruby. All these files, your application and an extracting program are combined into one single, compressed executable. Call it a "just-in-time and temporary installation of Ruby" Well, I just had to give it a name EEE is the little Pascal program that packs and compresses all necessary files.
It had to be written in a language that could be compiled and linked into an exe -file. Ruby wasn't an option. I use FreePascal 1. EEE has two modes: packing and unpacking. When it detects an attached archive, it jumps into unpacking mode; into packing mode otherwise. After creating the temporary directory and unpacking all files, EEE spawns the Ruby interpreter for your application.
At that point, EEE releases control to Ruby itself. After Ruby has finished, EEE regains control and starts cleaning up. The difference between eee. I've given EEE a page of its own, with more information then this section provides. It's annoying in the test period No puts and p anymore Only use it for distributing your application.
See Logging. In case you want to compile a complete directory, the entry point of you application has to be init. All parameters starting with --rubyscript2exe- will be deleted before the execution of application. If the extension is "rb", a DOS box will pop up. If the extension is "rbw", no DOS box will pop up. Unless it is overwritten by a parameter.
It is possible to change the icon of the generated executable manually, with a resource editor like Resource Hacker. I used Resource Hacker 3. Parameter Description --eee-list Just list the contents of the executable. Doesn't work in combination with rubyw. Be my guest, feedbacks are always welcome! They are stand-alone and work on any computer with recent Windows versions. My experience in this matter tells me , most of these software work good with small projects.
But what about big projects? I create a simple project to do this : PHPPy. This is not complete way for create stand alone executable file for running php projects but helps you to do this. The current PHP Nightrain 4. Tags: php , windows. December 15, Php Leave a comment. Questions: I am using Views Data Export library to generate excel data based on result from the view. I have Questions: i am using an html form with php to upload data to mysql.
Add menu. Is it possible to run PHP exec but hide params from the process list?
0コメント