Open Speak2Erase opened 4 years ago
please tell me how to include it by hand
Use --dll ruby_builtin_dlls\libssp-0.dll
thank you it worked
I also had this problem, and Speak2Erase's work around worked for me as well.
Same problem here, thanks for your help !
Hi! Even when I use the workaround mentioned above, the executable doesn't run, but it also doesn't show any error messages... :/ I'm building with the --windows argument, if that's relevant. The code is from this repository: https://github.com/victords/super-bombinhas. More specifically, for reproduction purposes, I run "ruby bundle.rb", which generates the file "sb.rb", and then:
ocra --windows --output super-bombinhas-1.2.2.exe --dll ruby_builtin_dlls\libssp-0.dll sb.rb data/*/
Can somebody help? Thanks!
You might want to try moving some of the flags around until after all the command arguments, or swapping the output and dll flags.
Hey, thanks for the quick response. I tried these but the result was the same: ocra --windows --dll ... --output ... sb.rb data/*/ ocra sb.rb data*\ --windows --dll ... --output ...
Np!
Try making the paths to sb.rb and data absolute paths? You might not be pointing to them properly. You may also want to disable dependency running, by adding the flag --no-dep-run, as it might be trying to run the ruby file to check for dependencies, but can't, or it is able to run the file and your ruby file doesn't output to console at all.
Hi, I think none of these things you pointed out are the problems... It indeed launches the script and detects the dependencies correctly. I was able to build the executable for this same game before I updated Ruby to 2.7... The problem is that I updated Ruby, possibly ocra itself and also the Gosu gem, so not sure what was the change that broke anything. I'll try building with the older version of the code and Gosu to see what happens.
Here's the output of the previous tries, by the way: === Loading script to check dependencies === Detected gem did_you_mean-1.4.0 (loaded, files) === 0 files, 0 bytes === Detected gem ocra-1.3.11 (loaded, files) === 5 files, 271800 bytes === Detected gem uri-0.10.0 (loaded, files) === 0 files, 0 bytes === Detected gem gosu-1.1.0 (loaded, files) === 311 files, 18454741 bytes === Detected gem minigl-2.3.5 (loaded, files) === 7 files, 153140 bytes === Detected gem fileutils-1.4.1 (loaded, files) === 0 files, 0 bytes === Including 61 encoding support files (3642880 bytes, use --no-enc to exclude) === Building super-bombinhas-1.2.2.exe === Adding user-supplied source files === Adding ruby executable rubyw.exe === Adding detected DLL C:/Ruby27-x64/bin/ruby_builtin_dlls/libgmp-10.dll === Adding detected DLL C:/Ruby27-x64/bin/ruby_builtin_dlls/libffi-7.dll === Adding detected DLL C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/gosu-1.1.0/lib64/OpenAL32.dll === Adding detected DLL C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/gosu-1.1.0/lib64/SDL2.dll === Adding external manifest C:/Ruby27-x64/bin/ruby_builtin_dlls/ruby_builtin_dlls.manifest === Adding supplied DLL ruby_builtin_dlls\libssp-0.dll === Adding library files === Compressing 110576600 bytes
LZMA 19.00 (x86) : Igor Pavlov : Public domain : 2019-02-21
Input size: 110576600 (105 MiB) Output size: 76151068 (72 MiB) === Finished building super-bombinhas-1.2.2.exe (76200240 bytes)
Yeah, seems to be related to the version of Gosu... With previous Gosu version it worked fine :/
Ah, alright then!
I have a project using Gosu ; to make it work, I had to include a few other DLLs : -dll ruby_builtin_dlls\libssp-0.dll -dll ruby_builtin_dlls\libgcc_s_seh-1.dll --dll ruby_builtin_dlls\libwinpthread-1.dll Maybe you could try.
Hey, I got it working by following this page: https://github.com/gosu/gosu/wiki/Ruby-Packaging-on-Windows Sorry for not commenting here before. Thanks!
@victords @fredlacave Are you using Ruby 3.0? Just wondering.
No, I'm using Ruby 2.7.
Hm, that's weird, I'm using 2.7 as well and only have to include libssp.
Using Ruby 3.0.2 on Windows 10, I found Ocra to generate the exe and run the exe with no errors in console mode, but also didn't work at all. Indeed, the link above (https://github.com/gosu/gosu/wiki/Ruby-Packaging-on-Windows) has the fix. For clarity and to capture the information here, the fix is to add the following (at a minimum and for console or windows mode) to the ocra command to create a working exe:
--dll ruby_builtin_dlls\libssp-0.dll --dll ruby_builtin_dlls\libgmp-10.dll --dll ruby_builtin_dlls\libgcc_s_seh-1.dll --dll ruby_builtin_dlls\libwinpthread-1.dll
For the record, a test of the following ruby file failed to run with any error or output, so this is a fundamental issue of Ocra not bundling required dlls:
puts "What the heck is wrong with ocra"
I don't know that every dll above is required for a console program, but I do know the very basic concolse program above was not working until I added these.
From what I can tell libssp-0.dll is a new required DLL for the ruby runtime and should be included in the executable, but ocra fails to recognize and include it by default which can be pretty annoying. Including it by hand works just fine, though.