jarmo / RAutomation

RAutomation
MIT License
100 stars 33 forks source link

x64-mingw-ucrt #139

Open ls5302 opened 8 months ago

ls5302 commented 8 months ago

Hi,

I'm porting some existing code to 64-bit on Windows (Ruby 3.1.4) and when I try to install rautomation 2.0 I am told it cannot be found in any repository.

The installed Ruby appears to be x64-mingw-ucrt, and only x86-mingw32 and x64-mingw32 are available.

Is there a way to make it work?

Many thanks.

jarmo commented 8 months ago

Unfortunately have not had any experience with x64-mingw-ucrt, but I guess you could build RAutomation locally and see if it actually works and if it does (or does not) then prepare a PR so that this platform would be supported too.

bensandland commented 7 months ago

When using Ruby 3.x on Windows the platform is x86-mingw-ucrt or x64-mingw-ucrt depending on architecture.

To build the gem you would need to compile the projects for the desired architecture, in this case x64 After doing this a rake build command invoked from a Ruby 3.x x64 installation will build the gem.

@ls5302 I have built the gem for the x64-mingw-ucrt platform. The specs are passing, expect for a few - it looks like they need to be updated since the Notepad application has changed on Windows 11. I have included the gem for you to install locally. rautomation-2.0.1-x64-mingw-ucrt.zip

@jarmo Maybe we should update the build task? To handle these different platforms for future releases. As it stands right now you would need to call the rake build task multiple times for each platform, and releasing new versions quickly becomes tedious when we have x86 + x64, as well as the -ucrt variation now.

jarmo commented 7 months ago

@bensandland thanks for chiming in :) If I remember correctly then we already need to build this gem multiple times for each platform. Could we do something similar for ucrt too or do we need to start building using different Rubies while doing that? In that case it will get pretty quickly quite tedious indeed. How are other similar gems handling that, do we know of any?

I myself am not that involved with Ruby nor Ruby on Windows nowadays so probably will not have time to do that (nor update specs for Notepad). PS! Are you sure that Notepad itself has changed? In the past Notepad-specific specs have not been passing when Notepad++ (or some other application with a similar name) has been open while specs have been running.

bensandland commented 7 months ago

@bensandland thanks for chiming in :) If I remember correctly then we already need to build this gem multiple times for each platform. Could we do something similar for ucrt too or do we need to start building using different Rubies while doing that? In that case it will get pretty quickly quite tedious indeed. How are other similar gems handling that, do we know of any?

I myself am not that involved with Ruby nor Ruby on Windows nowadays so probably will not have time to do that (nor update specs for Notepad). PS! Are you sure that Notepad itself has changed? In the past Notepad-specific specs have not been passing when Notepad++ (or some other application with a similar name) has been open while specs have been running.

Yes. Other gems handle this with their pipelines, either building it for specific platforms within a container or using the --platform parameter. I think we should we handle this using a Rake task with the platform param, since we're building strictly for Windows. I have been working on a solution for this on a fork and will probably create a merge request soon. This will also simplify the gemspec, but at the same time make it more of a requirement to utilize Rake to build the gem from scratch.