cosmo0920 / win32-api

A different, better variant of the Win32API Ruby library
61 stars 10 forks source link

Support precompiled binaries for Ruby 2.3 #16

Closed cosmo0920 closed 8 years ago

cosmo0920 commented 8 years ago

Now, RubyInstaller for Ruby 2.3 has been shipped.

Could you provide fat gem which includes precompiled binaries for Ruby 2.3 (x86/x64)?

survili commented 8 years ago

+1

djberg96 commented 8 years ago

@cosmo0920 I don't suppose you would be interested in taking over this project, would you?

cosmo0920 commented 8 years ago

I don't suppose you would be interested in taking over this project, would you?

I will put this off for a while, sorry. 🙇

I think that we can support Ruby 2.3 with the following patch:

diff --git a/Rakefile b/Rakefile
index a88350b..0597549 100644
--- a/Rakefile
+++ b/Rakefile
@@ -60,7 +60,7 @@ namespace 'gem' do
   end

   desc 'Build a binary gem'
-  task :binary, :ruby18, :ruby19, :ruby2_32, :ruby2_64, :ruby21, :ruby21_64, :ruby22, :ruby22_64 do |task, args|
+  task :binary, :ruby18, :ruby19, :ruby2_32, :ruby2_64, :ruby21, :ruby21_64, :ruby22, :ruby22_64, :ruby23_32, :ruby23_64 do |task, args|
     require 'devkit' if RbConfig::CONFIG['host_os'] =~ /mingw|cygwn/i

     # These are just what's on my system at the moment. Adjust as needed.
@@ -72,7 +72,9 @@ namespace 'gem' do
       :ruby21_32 => "c:/ruby21/bin/ruby",
       :ruby21_64 => "c:/ruby21-x64/bin/ruby",
       :ruby22_32 => "c:/ruby22/bin/ruby",
-      :ruby22_64 => "c:/ruby22-x64/bin/ruby"
+      :ruby22_64 => "c:/ruby22-x64/bin/ruby",
+      :ruby23_32 => "c:/ruby23/bin/ruby",
+      :ruby23_64 => "c:/ruby23-x64/bin/ruby"
     )

     Rake::Task[:clobber].invoke
@@ -129,11 +131,19 @@ case RbConfig::CONFIG['MAJOR']
         require File.join(File.dirname(__FILE__), 'ruby22_32/win32/api')
       end
     end
+
+    if RbConfig::CONFIG['MINOR'] == '3'
+      if RbConfig::CONFIG['arch'] =~ /x64/i
+        require File.join(File.dirname(__FILE__), 'ruby23_64/win32/api')
+      else
+        require File.join(File.dirname(__FILE__), 'ruby23_32/win32/api')
+      end
+    end
 end
 HERE

If this project were migrated with rake-compiler-dock based build system, I would like to help to build gem. (I'm mainly using GNU/Linux and OS X)

cosmo0920 commented 8 years ago

I've got success to create universal gem against Ruby 2.0-2.3 (x86/x64) with above patch and dropping Ruby 1.8.7 and 1.9.3 support. Does anyone want support Ruby 1.8.7 and 1.9.3? If there is not, I'll send a pull request including these patches.

I don't suppose you would be interested in taking over this project, would you?

What do you want to do for me? Just building universal gem? Or, entirely taking over this project?

djberg96 commented 8 years ago

@cosmo0920 Completely taking over project. But, unless you plan on making any code changes, it would effectively just be gem building.

cosmo0920 commented 8 years ago

Sorry for the late response.

I decided that your suggestion is acceptable for me except for a several reasons. Because it seems that I can maintain this gem with some refactoring and introducing AppVeyor CI.

For now, there are a several very hard issues to prepare gem cross building environment, which is very tightened your environment, and AppVeyor CI task in this repository (to be modern project!).

If you want me to maintain this gem, please invite github and rubygems (account name is same as github) collaborator.

Or, completely transfer ownership this project?

djberg96 commented 8 years ago

@cosmo0920 I think it's best if I transfer the project.

Would you also be interested in taking over the windows-api gem? It's basically just (pure Ruby) enhancements for this gem.

djberg96 commented 8 years ago

@cosmo0920 You'll have to delete your fork for me to transfer the repo.

cosmo0920 commented 8 years ago

@djberg96 I deleted my fork repository.

djberg96 commented 8 years ago

@cosmo0920 Ok, I'll transfer the repo over to you shortly. Please accept the transfer request when you receive it.

cosmo0920 commented 8 years ago

@djberg96 Thanks, I've received and accepted the transfer request!

cosmo0920 commented 8 years ago

@djberg96 Could you add rubygems win32-api gem owners? My rubygems email address is cosmo0920.oucc [at] gmail.com

djberg96 commented 8 years ago

@cosmo0920 Added.

djberg96 commented 8 years ago

@cosmo0920 Well, it said it added successfully, but when I run gem owner win32-api it's showing a blank line for the first entry:

Owners for gem: win32-api
- 
- djberg96@gmail.com
- sdate@everestkc.net
- phasis@gmail.com

I wonder if it's having a problem with the "." in your email address. I'll have to take a look at the source. Let me know if you aren't able to push a gem.

Also, you can remove "sdate@everestkc.net". That's Shashank Date, but he hasn't been a contributor for a very, very long time.

cosmo0920 commented 8 years ago

Well, it said it added successfully, but when I run gem owner win32-api it's showing a blank line for the first entry:

Oh, no! :scream: I've confirmed that win32-api gem appears in my profile:

rubygems_profiles
djberg96 commented 8 years ago

@cosmo0920 Well, it could just be a bug in the gem command itself. I'll report it.

cosmo0920 commented 8 years ago

@djberg96 Thanks! I didn't notice about this bug. :/

djberg96 commented 8 years ago

@cosmo0920 I suppose the real test will be what happens when you try to gem push. If it works for you, then we know it's just a bug in the gem command. If it doesn't work, there's a larger issue.

cosmo0920 commented 8 years ago

@djberg96 gem push works for me. I'd pushed rroonga gem for the several times but I'd not ever seen gem push not working.

djberg96 commented 8 years ago

@cosmo0920 I mean, when you try to push the next win32-api gem. :)

djberg96 commented 8 years ago

@cosmo0920 Nevermind, it's all good. I was using an older version of rubygems, and that has since been fixed:

Owners for gem: win32-api
- cosmo0920
- djberg96@gmail.com
- sdate@everestkc.net
- phasis@gmail.com
cosmo0920 commented 8 years ago

@djberg96 Thanks for investigating the rubygems problem. Yes, I'd marked as private my email address. It's the expected behavior.

djberg96 commented 8 years ago

@cosmo0920 I guess you can close this one since you created the other one.

cosmo0920 commented 8 years ago

I close this Issue because #18 is already merged into master. Remaining issues for releasing 1.6.0 should be treated in #19.

cosmo0920 commented 8 years ago

Would you also be interested in taking over the windows-api gem? It's basically just (pure Ruby) enhancements for this gem.

I have a little interest in maintaining windows-api gem. I'm currently working to maintain Fluentd Windows functionality Ruby 2.3 or later. And I found that windows-api gem has a problem which is not easy to run tests with bundler and not using CI service(s). If you want me to maintain windows-api gem, please let me know about it.