mirror of
https://github.com/frida/frida-go.git
synced 2026-11-07 09:36:02 -10:00
feat: support for Windows (using MinGW)
This commit is contained in:
3 files changed
+18
-5
No files matched your search
@@ -18,7 +18,7 @@ Supported OS:
|
||||
- [x] MacOS
|
||||
- [x] Linux
|
||||
- [x] Android
|
||||
- [ ] Windows
|
||||
- [x] Windows
|
||||
|
||||
# Small example
|
||||
```golang
|
||||
|
||||
+4
-1
@@ -7,8 +7,11 @@
|
||||
package frida
|
||||
|
||||
/*
|
||||
#cgo LDFLAGS: -lfrida-core -lm -ldl
|
||||
#cgo LDFLAGS: -lfrida-core -lm
|
||||
#cgo !windows LDFLAGS: -ldl
|
||||
#cgo windows LDFLAGS: -lws2_32 -lgdi32 -lole32 -liphlpapi -lsetupapi -lpsapi -lshell32 -lshlwapi -ldnsapi -lcrypt32 -luuid -lshfolder
|
||||
#cgo CFLAGS: -I/usr/local/include/ -w
|
||||
#cgo windows CFLAGS: -Wno-error=incompatible-pointer-types
|
||||
#cgo darwin LDFLAGS: -lbsm -framework IOKit -framework Foundation -framework AppKit -framework Security -lpthread
|
||||
#cgo darwin CFLAGS: -Wno-error=incompatible-function-pointer-types
|
||||
#cgo android LDFLAGS: -llog
|
||||
|
||||
+13
-3
@@ -1,10 +1,20 @@
|
||||
package frida
|
||||
|
||||
/*
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#pragma comment(lib, "Ws2_32.lib")
|
||||
typedef unsigned short in_port_t;
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include <frida-core.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
static char * get_gvalue_gtype(GValue * val) {
|
||||
return (char*)(G_VALUE_TYPE_NAME(val));
|
||||
|
||||
Reference in new issue
Block a user