The 2D game library "DXRuby" for Ruby for Windows has been upgraded to 1.4.7, and now supports the latest Ruby 3.0.0, and finally the 64-bit version of Ruby. However, when using it on Windows 10, I got an error and was impatient, so make a note of the notes.
→ Previous article Notes on using DXRuby 1.4.6 on Windows 10 and how to install it
Since it uses DirectX on Windows, it does not work on macOS and Linux. Other than the Windows environment, there are libraries such as "DXOpal" and "Nyle-canvas" that can be operated with almost the same code as DXRuby (however, they are not completely compatible).
"RubyInstaller for Windows" is convenient for installing Ruby. From DXRuby 1.4.7, it supports 64-bit version Ruby (version written as " x64 "
).
DXRuby doesn't have to be with Devkit (MSYS2).
→ ・ [DXRuby 1.4.7] Error in Sound.new on 64bit · Issue # 4 · mirichi/dxruby
Due to this, I installed DXRuby, but when I ran it, I got an error and was impatient.
DXRuby uses the Windows DirectX 9
library. (So it doesn't work except on Windows.)
From Window10, DirectX 9
is no longer included, so you need to add it yourself.
reference) → ・ On Windows 10, d3dx9_40.dll is required to run DXRuby · Issue # 3 · mirichi/dxruby
It is safe to download d3dx9_40.dll
from the official Microsoft site.
Download DirectX End-User Runtimes (June 2010)
.
https://www.microsoft.com/en-us/download/details.aspx?id=8109
Double-click the downloaded directx_Jun2010_redist.exe
.
Specify an appropriate folder and unzip it.
All you need is d3dx9_40.dll
, so search the unzipped folder for the necessary files according to Ruby's 64bit/32bit.
・ 64bit version
Ruby (x64); Nov2008_d3dx9_40_x64.cab
・ 32bit version
Ruby (x86, i386); Nov2008_d3dx9_40_x86.cab
Double-click Nov2008_d3dx9_40_x64.cab
or Nov2008_d3dx9_40_x86.cab
.
Double-click d3dx9_40.dll
inside, specify an appropriate folder, and unzip it.
d3dx9_40.dll
is created in the unzipped folder.
Copy the resulting d3dx9_40.dll
to your Windows folder.
There are two ways to do it.
a) Copy it to the bin folder in the installed Ruby folder.
C: \ Ruby30-x64 \ bin
etc.
b) Copy to the Windows program folder.
-In the case of 64bit version
d3dx9_40.dll;
C: \ Windows \ System32
folder (this is theprogram folder for
64bit)
-For 32bit version
d3dx9_40.dll;
C: \ Windows \ SysWOW64
folder (this is theprogram folder for
32bit)
"Access to the target folder is denied Administrator privileges are required to copy to this folder. "
And the panel will appear,
Continue
button
Press to copy.
You can install DXRuby 1.4.7 from RubyGems.
> gem install dxruby
> irb
irb(main):001:0> require 'dxruby'
=> true
irb(main):002:0> exit
If it says true
, it's OK!
Recommended Posts