Checking for Windows support
Hi,
I'm using SimpleProgressbar in an Windows Environment. Therefor I'm checking whether 'win32console' gem was installed, because otherwise the console output will be kind of strange ;-)

Regards
Thanks for this!
Can you add the windows gem into the dependencies of the Gemspec? Maybe something like this will work:
spec.add_dependency 'eventmachine-win32', '0.12.10' if spec.platform.to_s == 'x86-mswin32'
please try it before pushing, I don't have a windows machine and this is just a wild guess :wink:
Ok, I'll try to have a look at it next weekend.
Regards
Perfect. Thanks again!
Just a quick note: I am moving to Berlin in the next few days. Maybe I won't be able to answer as quickly as I usually do. But I am really looking forward to this patch.
Finally I found the time to add Windows specific reference gems to jeweler task in Rakefile. I tried the resulting gem on Ubuntu12.04 and Win7. On Windows win32console gem was installed, whereas on Ubuntu it was left out. I had no chance to test any Mac environments, but I think it should work there too.
Regards
Have you tried the version I mentioned in my comment? Did you have problems with that?
No problem with your version, but it will result in two different gems: one windows specific and one for all other environments. That is because 'spec.add_dependency' will be evaluated at gem build time and in order to make it work you need to set 'spec.platform' to a value different than Gem::Platform::Ruby, which will result in a special gem version for this particular 'platform' string (http://docs.rubygems.org/read/chapter/20#platform). By using the native extensions mechanism you can still keep one single gem file for all platforms. Therefor I chose this approach.
Regards
Does your approach work with bundler? Do you see the win32console in the Gemfile.lock of projects using that gem? Sorry for all the questions, but my gut has problems with your solution.
No problem ;-) I'll try it next weekend.
@vermluh have you found time to test the bundler gemfile?
I'm sorry, but I totally missed it due to lots of other projects going on. I'll try to test bundler on windows and Linux next weekend.
Apologizing once more vermluh
No worries.
You were right. Bundler somehow seems to ignore gem extensions, whereas using simple gem install... will install the defined extensions on windows and leave them out on other systems.
I will revert the changes regarding mkrf_conf.rb
Regards