summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--appveyor.yml13
-rw-r--r--lib/ruby2d.rb9
2 files changed, 21 insertions, 1 deletions
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..f5ef121
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,13 @@
+install:
+ - set PATH=C:\ruby24-x64\bin;C:\msys64\usr\bin;C:\msys64\usr\local\bin;%PATH%
+ - set MSYSTEM=MINGW64
+ - bash --version
+ - wget https://raw.githubusercontent.com/simple2d/simple2d/master/bin/simple2d.sh
+ - bash simple2d.sh install -y
+ - git submodule update --init --recursive
+build: off
+before_test:
+ - ruby -v
+test_script:
+ - bundle install
+ - rake
diff --git a/lib/ruby2d.rb b/lib/ruby2d.rb
index fa1ce40..02aba95 100644
--- a/lib/ruby2d.rb
+++ b/lib/ruby2d.rb
@@ -18,7 +18,14 @@ require 'ruby2d/sound'
require 'ruby2d/music'
if RUBY_PLATFORM =~ /mingw/
- RubyInstaller::Runtime.add_dll_directory(File.expand_path('~/../../usr/local/bin'))
+ # When using the Windows CI AppVeyor
+ if ENV['APPVEYOR']
+ s2d_dll_path = 'C:\msys64\usr\local\bin'
+ # When in a standard MinGW shell
+ else
+ s2d_dll_path = '~/../../usr/local/bin'
+ end
+ RubyInstaller::Runtime.add_dll_directory(File.expand_path(s2d_dll_path))
end
require 'ruby2d/ruby2d' # load native extension