How to get an ocra application to be accepted by antiviruses - ruby

Alright, so judging by the title (if you practice Ruby), you should know what Ocra is. If you don't, here's a brief explanation:Ocra is a command added to the command prompt in order to convert ruby programs to executable. So .rb to .exe.
In order for one to convert a ruby program to executable, they would type in the command prompt:
cd <locationOfFile>
ocra rubyProgram.rb
and then ocra would run the program and when that's done, it runs some scripts which completes the program. Then afterwards the executable version of the program would be in the same directory as the original ruby version and the same name. So recently I noticed that my antiviruses are removing the program from my computer telling me it's a bloodhound. It's getting really annoying and I'm getting tired of having to use ocra over and over again just to remake a program. I have two antiviruses: McAffee and Symnatec; so that means double the security. What can I change so that my antiviruses ignore the program?

Tell them to ignore/exclude the directory that the .exe is being built into.

Related

How to launch exe from PyCharm Terminal?

I'm trying to launch Blender directly from PyCharm Terminal on Windows. I first use cd 'C:\Program Files\Blender Foundation\Blender 3.1\' to get into the directory containing the executable I need, and this works okay. Then I call blender.exe and expect it to launch Blender executable from the directory I am currently in. But for some reason it launches the older (2.93) version from another folder. The same steps work just right when I do all the same in the Windows cmd.exe. I've thought that the problem could be with the Python interpreter, but I use Python interpreter that goes with Blender 3.1 in the PyCharm project settings. What am I doing wrong and how can I run the exact executable I need?
P.S. I know that I can write a simple script in Python, use subprocess module, and get almost the same result, but anyway I'd like to use the launch from the Terminal if it is possible.

How to hide the cmd windows when running external executables that are called through an OCRA Ruby executable?

I have a ruby script that runs many external executables (.exe). I run these executables in two different ways.
sytem(program)
IO.popen(program), in this case I need the PID since later on I monitor this process.
My UI is designed with FX ruby. When I run the program through my cmd console (ruby MyScript.rb) everything works fine and I don't see any pop-up.
Then, I generate an exe with the OCRA gem by using the following syntax:
ocra MyScript.rb --gem-all --windows
The exe is generated correctly; however, when I run any external program, through system or popen, there is a cmd window popping up during the time the exe is running.
Is there a way to hide these cmd windows?

How can I run Clozure CL in the Windows command line?

I'm trying to install Clozure CL using their guide, and it wants me to add the files ccl and ccl64 to my path, but they have no file extension and Windows doesn't know how to run them.
I eventually looked in the file and it was headed by #!/bin/sh. As far as I know, I would need external software to get these files to run.
I want to know if there is some other workaround for setting up Clozure CL more easily, and if there isn't, what would I need to be able to run these files directly from the command line?
It appears that all the scripts do is run the file wx86cl64.exe in the main ccl directory as long as you're on Windows. So, all one needs to do is add the ccl directory to their path to achieve success.

Ruby : my program creates .exe but can't without ocra installed in another computer

Ocra is a ruby gem "transforming" ruby files source code to a .exe file, so any user without ruby installed can launch the program with that generated file.
I'm creating a game editor, so I need a way to create an executable when the user wants to.
I have ocra installed on my computer
An user don't have ruby or ocra installed on their computer
I created a .exe with "ocra program.rbw" command for my program .exe
But in my source code, I got the line exec("ocra game.rbw") that can't work in the user's computer because he doesn't have ocra gem installed. Exept that line, all is working well.
Well, here is my question, how can I use ocra command without telling the user to install that gem ? A kind of require (require 'ocra' is not working), or another way to create an executable.
Thanks to Raffael's answer, it's working like that :
Forget the idea of using exec("ocra game.rbw") into the program. With my computer with ocra installed, I created a basic game.exe with game.rbw that will be interpreted differently thanks to eval. The idea is that instead of creating a new .exe for each different project, we will set it thanks to source code interpretation.
If you had something like that into game.rbw :
Dir.entries("SourceCode").each do |code|
require_relative "SourceCode/" + code if code.include?(".rb")
end
Replace it by :
Dir.entries("SourceCode").each do |code|
eval(File.open("SourceCode/" + code, "r:UTF-8").readlines.join("\n")) if code.include?(".rb")
end
If you set a part of your source code, next time launching your game.exe would be interpreted differently.

Opening an app and a .shy work, but a packaged app gives a window with only button?

I coded a Shoes app that works flawlessly when opening the .rb file through Shoes or packaging it into a .shy file, but when I package it into a Windows executable whether using my cached Win32 binaries or redownloading them the .exe just brings up this window:
Any way to fix this or to compile it differently as an executable?
Running Ruby 1.9.3 and Shoes 3.2 on Windows 7
The thing is that .shy executable only packages a script, not the whole directory, you can bypass such problem by creating environment variables in which you can save your directory path and access it from .shy to run your app properly. I'm not sure will this help you as it took so long for anybody to answer. If you don't know how to set up environment variables let me know so I'll post my solution.

Resources