Skip to content

Commit

Permalink
Support msys2 and add CI jobs ##build
Browse files Browse the repository at this point in the history
  • Loading branch information
Kreijstal authored Nov 29, 2024
1 parent ce04bb2 commit 988ddeb
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 4 deletions.
30 changes: 29 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,35 @@ jobs:
path: |
radare2-${{ steps.r2v.outputs.branch }}-w64.zip
# radare2-win-installer\Output\radare2.exe

msys2-w64-meson:
strategy:
fail-fast: false
matrix:
sys: [MINGW64, UCRT64]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: base-devel git
pacboy: >-
cc:p
meson:p
ninja:p
- name: Configure Build
shell: msys2 {0}
run: |
prefix=$(case "${{ matrix.sys }}" in
MINGW64) echo /mingw64 ;;
UCRT64) echo /ucrt64 ;;
esac)
meson setup build --prefix=$prefix
- name: Compile Project
shell: msys2 {0}
run: meson compile -C build

# FreeBSD
# freebsd:
Expand Down
2 changes: 1 addition & 1 deletion libr/debug/p/debug_windbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static RDebugReasonType exception_to_reason(DWORD ExceptionCode) {
}
}

static int windbg_stop(RDebug *dbg) {
static bool windbg_stop(RDebug *dbg) {
DbgEngContext *idbg = dbg->user;
R_RETURN_VAL_IF_FAIL (idbg && idbg->initialized, 0);
return SUCCEEDED (ITHISCALL (dbgCtrl, SetInterrupt, DEBUG_INTERRUPT_ACTIVE));
Expand Down
1 change: 1 addition & 0 deletions libr/include/r_th.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "r_types.h"
#include "r_userconf.h"
#include <r_list.h>
#include <r_util/r_w32.h>

#include <stdio.h>
#include <stdlib.h>
Expand Down
3 changes: 3 additions & 0 deletions libr/include/r_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@

#if __MINGW32__
#include <sys/time.h>
#include <unistd.h>
#define PFMT64x "I64x"
#define PFMT64x PRIx64
#endif


Expand Down
2 changes: 1 addition & 1 deletion libr/include/r_util/r_w32.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
extern "C" {
#endif

#if R2__WINDOWS__
#if R2__WINDOWS__ || __MINGW32__
#include <windows.h> // CreateToolhelp32Snapshot
#include <tlhelp32.h> // CreateToolhelp32Snapshot
#include <psapi.h> // GetModuleFileNameEx, GetProcessImageFileName
Expand Down
2 changes: 1 addition & 1 deletion libr/util/w32.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <r_userconf.h>
#include <r_util.h>

#if R2__WINDOWS__
#if R2__WINDOWS__ || __MINGW32__
#include <windows.h>

#if 1
Expand Down

0 comments on commit 988ddeb

Please sign in to comment.