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

feat: support for Windows (using MinGW) #53

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pk5ls20
Copy link

@pk5ls20 pk5ls20 commented Dec 7, 2024

  1. This is a very preliminary attempt. I successfully built it using GCC version 14.2.0 (Rev1, Built by the MSYS2 project), and it works on my machine.
  2. Currently, On Windows, cgo only supports MinGW, and support for MSVC is still in progress (ref: cmd/link: support msvc object files golang/go#20982), so we have to use MinGW.
  3. Although the upstream project (https://github.com/frida/frida-core) has a build action workflow for Windows-MinGW, there is no frida-core-devkit for Windows-MinGW in the releases at https://github.com/frida/frida/releases. This means users need to manually build the frida-core-devkit for Windows-MinGW from source code. (Note: I’m not sure why this is the case.)
  4. Noticing that CI/CD includes testing, based on point 3, it seems challenging to integrate testing for the Windows platform into CI/CD (due to the absence of a frida-core-devkit for Windows-MinGW in https://github.com/frida/frida/releases).
  5. Clearly, most of the examples in the documentation are designed specifically for Unix systems. If needed, I can provide alternative examples for the Windows platform.

@NSEcho
Copy link
Member

NSEcho commented Dec 17, 2024

@pk5ls20 thank you for this PR. I just have a couple of questions:

  • Could you please update README.md to reflect the GCC version you tested this on and that MSYS2 is used.
  • Isn't frida-core.lib built for mingw inside of frida-core-devkit
  • Windows usage example would be awesome for other folks.

@pk5ls20
Copy link
Author

pk5ls20 commented Dec 17, 2024

  • Could you please update README.md to reflect the GCC version you tested this on and that MSYS2 is used.

Sure, I will update the README to include this information.

  • Isn't frida-core.lib built for mingw inside of frida-core-devkit

Yes, frida-core.lib is built inside the frida-core-devkit. However, the official Frida release (https://github.com/frida/frida/releases/) does not provide a pre-built frida-core-devkit for the Windows MinGW target. This means users need to manually build the frida-core-devkit for the Windows MinGW target from the source.

  • Windows usage example would be awesome for other folks.

Got it! I will add some example code tailored for the Windows platform in the EXAMPLES.md file.

I will set the PR to draft for now. Once I have time to complete the first and third points and it's ready to be merged, I will mark it as ready for review

@pk5ls20 pk5ls20 marked this pull request as draft December 17, 2024 18:30
@NSEcho
Copy link
Member

NSEcho commented Dec 17, 2024

Looking forward to it.

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

Successfully merging this pull request may close these issues.

2 participants