diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index ead4d5dcc..7eafa3d12 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -15,8 +15,8 @@ on: - "!**/CMakeLists.txt" jobs: - build: - name: MSYS2 Makefile build ${{ matrix.build.name }} ${{ matrix.dynarec.name }} build (${{ matrix.environment.msystem }}) + msys2: + name: MSYS2 Makefile (Win32 GUI, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, ${{ matrix.environment.msystem }}) runs-on: windows-latest diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index ed4bf39ed..534d268b7 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -25,7 +25,7 @@ on: jobs: msys2: - name: MSYS2 ${{ matrix.build.name }} ${{ matrix.dynarec.name }} build (${{ matrix.environment.msystem }}) + name: MSYS2 (Win32 GUI, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, ${{ matrix.environment.msystem }}) runs-on: windows-2022 @@ -95,6 +95,79 @@ jobs: name: '86Box${{ matrix.dynarec.slug }}${{ matrix.build.slug }}-Windows-${{ matrix.environment.msystem }}-gha${{ github.run_number }}' path: build/artifacts/** + msys2-qt: + name: MSYS2 (Qt GUI, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, ${{ matrix.environment.msystem }}) + + runs-on: windows-2022 + + defaults: + run: + shell: msys2 {0} + + strategy: + fail-fast: true + matrix: + build: + - name: Debug + preset: debug + slug: -Debug + - name: Dev + preset: experimental + slug: -Dev + dynarec: + - name: ODR + new: off + slug: -ODR + - name: NDR + new: on + slug: -NDR + environment: + - msystem: MINGW32 + prefix: mingw-w64-i686 + toolchain: ./cmake/flags-gcc-i686.cmake + - msystem: MINGW64 + prefix: mingw-w64-x86_64 + toolchain: ./cmake/flags-gcc-x86_64.cmake + - msystem: UCRT64 + prefix: mingw-w64-ucrt-x86_64 + toolchain: ./cmake/flags-gcc-x86_64.cmake + + steps: + - uses: msys2/setup-msys2@v2 + with: + path-type: inherit + update: true + msystem: ${{ matrix.environment.msystem }} + install: >- + ${{ matrix.environment.prefix }}-ninja + ${{ matrix.environment.prefix }}-cc + ${{ matrix.environment.prefix }}-pkg-config + ${{ matrix.environment.prefix }}-freetype + ${{ matrix.environment.prefix }}-SDL2 + ${{ matrix.environment.prefix }}-zlib + ${{ matrix.environment.prefix }}-libpng + ${{ matrix.environment.prefix }}-libvncserver + ${{ matrix.environment.prefix }}-openal + ${{ matrix.environment.prefix }}-rtmidi + ${{ matrix.environment.prefix }}-qt5-base + ${{ matrix.environment.prefix }}-qt5-tools + - uses: actions/checkout@v3 + - name: Configure CMake + run: >- + cmake -G Ninja -S . -B build --preset ${{ matrix.build.preset }} + --toolchain ${{ matrix.environment.toolchain }} + -D NEW_DYNAREC=${{ matrix.dynarec.new }} + -D CMAKE_INSTALL_PREFIX=./build/artifacts + -D QT=ON + - name: Build + run: cmake --build build + - name: Generate package + run: cmake --install build + - uses: actions/upload-artifact@v3 + with: + name: '86Box-Qt${{ matrix.dynarec.slug }}${{ matrix.build.slug }}-Windows-${{ matrix.environment.msystem }}-gha${{ github.run_number }}' + path: build/artifacts/** + llvm-windows: name: "Windows vcpkg/LLVM (${{ matrix.ui.name }}, ${{ matrix.build.name }}, ${{ matrix.dynarec.name }}, ${{ matrix.target.name }})" @@ -123,8 +196,8 @@ jobs: ui: - name: Win32 GUI qt: off - - name: Qt GUI - qt: on +# - name: Qt GUI +# qt: on slug: -Qt target: - name: x86 diff --git a/src/minitrace/minitrace.c b/src/minitrace/minitrace.c index d8f0e97a9..df68e7d79 100644 --- a/src/minitrace/minitrace.c +++ b/src/minitrace/minitrace.c @@ -95,16 +95,16 @@ void mtr_flush_with_state(int); // pthread basics #ifdef _WIN32 -static int get_cur_thread_id() { +static int get_cur_thread_id(void) { return (int)GetCurrentThreadId(); } -static int get_cur_process_id() { +static int get_cur_process_id(void) { return (int)GetCurrentProcessId(); } static uint64_t _frequency = 0; static uint64_t _starttime = 0; -double mtr_time_s() { +double mtr_time_s(void) { if (_frequency == 0) { QueryPerformanceFrequency((LARGE_INTEGER*)&_frequency); QueryPerformanceCounter((LARGE_INTEGER*)&_starttime); @@ -124,7 +124,7 @@ static BOOL WINAPI CtrlHandler(DWORD fdwCtrlType) { ExitProcess(1); } -void mtr_register_sigint_handler() { +void mtr_register_sigint_handler(void) { // For console apps: SetConsoleCtrlHandler(&CtrlHandler, TRUE); } @@ -154,10 +154,10 @@ static void join_flushing_thread(void) { #else -static inline int get_cur_thread_id() { +static inline int get_cur_thread_id(void) { return (int)(intptr_t)pthread_self(); } -static inline int get_cur_process_id() { +static inline int get_cur_process_id(void) { return (int)getpid(); } @@ -193,7 +193,7 @@ double mtr_time_s() { return time.tv_sec + time.tv_nsec / 1.0e9; } #else -double mtr_time_s() { +double mtr_time_s(void) { static time_t start; struct timeval tv; gettimeofday(&tv, NULL); @@ -217,7 +217,7 @@ static void termination_handler(int signum) { exit(1); } -void mtr_register_sigint_handler() { +void mtr_register_sigint_handler(void) { #ifndef MTR_ENABLED return; #endif @@ -251,7 +251,7 @@ void mtr_init(const char *json_file) { mtr_init_from_stream(fopen(json_file, "wb")); } -void mtr_shutdown() { +void mtr_shutdown(void) { int i; #ifndef MTR_ENABLED return; @@ -289,7 +289,7 @@ const char *mtr_pool_string(const char *str) { return "string pool full"; } -void mtr_start() { +void mtr_start(void) { #ifndef MTR_ENABLED return; #endif @@ -304,7 +304,7 @@ void mtr_start() { init_flushing_thread(); } -void mtr_stop() { +void mtr_stop(void) { #ifndef MTR_ENABLED return; #endif @@ -435,7 +435,7 @@ void mtr_flush_with_state(int is_last) { pthread_mutex_unlock(&mutex); } -void mtr_flush() { +void mtr_flush(void) { mtr_flush_with_state(FALSE); } diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index dfe1cec59..e5ace7bcb 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -200,6 +200,9 @@ endif ifndef RTMIDI RTMIDI := y endif +ifndef MINITRACE + MINITRACE := n +endif ifeq ($(DYNAREC), y) ifeq ($(ARM), y) ifeq ($(NEW_DYNAREC), n)