Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x64-mingw-ucrt #139

Open
ls5302 opened this issue Mar 20, 2024 · 4 comments
Open

x64-mingw-ucrt #139

ls5302 opened this issue Mar 20, 2024 · 4 comments

Comments

@ls5302
Copy link

ls5302 commented Mar 20, 2024

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
Copy link
Owner

jarmo commented Mar 21, 2024

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
Copy link

bensandland commented Apr 10, 2024

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
Copy link
Owner

jarmo commented Apr 13, 2024

@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
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants