diff options
-rw-r--r-- | Gemfile | 14 | ||||
-rw-r--r-- | appveyor.yml | 1 | ||||
-rw-r--r-- | distro/ruby_bin_folder/Chef.PowerShell.Wrapper.dll (renamed from distro/powershell/chef/Chef.PowerShell.Wrapper.dll) | bin | 123904 -> 123904 bytes | |||
-rw-r--r-- | distro/ruby_bin_folder/Chef.PowerShell.dll (renamed from distro/powershell/chef/Chef.PowerShell.dll) | bin | 6656 -> 6656 bytes | |||
-rw-r--r-- | distro/ruby_bin_folder/Newtonsoft.Json.dll (renamed from distro/powershell/chef/Newtonsoft.Json.dll) | bin | 664576 -> 664576 bytes |
5 files changed, 14 insertions, 1 deletions
@@ -65,3 +65,17 @@ instance_eval(ENV["GEMFILE_MOD"]) if ENV["GEMFILE_MOD"] # If you want to load debugging tools into the bundle exec sandbox, # add these additional dependencies into Gemfile.local eval_gemfile(__FILE__ + ".local") if File.exist?(__FILE__ + ".local") + +# These lines added for Windows development only. +# For FFI to call into PowerShell we need the binaries and assemblies located +# in the Ruby bindir. +# +# We copy (and overwrite) these files every time "bundle <exec|install>" is +# executed, just in case they have changed. +if RUBY_PLATFORM =~ /mswin|mingw|windows/ + instance_eval do + ruby_exe_dir = RbConfig::CONFIG["bindir"] + assemblies = Dir.glob(File.expand_path("distro/ruby_bin_folder", Dir.pwd) + "/*.dll") + FileUtils.cp_r assemblies, ruby_exe_dir + end +end diff --git a/appveyor.yml b/appveyor.yml index 5b57881269..c75a2be12b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -25,7 +25,6 @@ install: - winrm quickconfig -q - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - echo %PATH% - - copy c:\projects\chef\distro\powershell\chef\*.dll C:\Ruby%ruby_version%\bin /y - appveyor DownloadFile http://curl.haxx.se/ca/cacert.pem -FileName C:\cacert.pem - set SSL_CERT_FILE=C:\cacert.pem - SET BUNDLE_WITHOUT=server:docgen:maintenance:pry:travis:integration:ci diff --git a/distro/powershell/chef/Chef.PowerShell.Wrapper.dll b/distro/ruby_bin_folder/Chef.PowerShell.Wrapper.dll Binary files differindex bdf9ef4125..bdf9ef4125 100644 --- a/distro/powershell/chef/Chef.PowerShell.Wrapper.dll +++ b/distro/ruby_bin_folder/Chef.PowerShell.Wrapper.dll diff --git a/distro/powershell/chef/Chef.PowerShell.dll b/distro/ruby_bin_folder/Chef.PowerShell.dll Binary files differindex 568f9f43cd..568f9f43cd 100644 --- a/distro/powershell/chef/Chef.PowerShell.dll +++ b/distro/ruby_bin_folder/Chef.PowerShell.dll diff --git a/distro/powershell/chef/Newtonsoft.Json.dll b/distro/ruby_bin_folder/Newtonsoft.Json.dll Binary files differindex 1971a35679..1971a35679 100644 --- a/distro/powershell/chef/Newtonsoft.Json.dll +++ b/distro/ruby_bin_folder/Newtonsoft.Json.dll |