From 54fe2904c152d0d0e494b349e6dbb2631c0b2060 Mon Sep 17 00:00:00 2001 From: unexploredtest Date: Wed, 24 Dec 2025 19:16:08 +0330 Subject: [PATCH 1/6] Add build ci workflows --- .github/workflows/build-linux.yml | 97 +++++++++++++++++++++++++++++++ .github/workflows/build-mac.yml | 52 +++++++++++++++++ .github/workflows/build-win.yml | 30 ++++++++++ 3 files changed, 179 insertions(+) create mode 100644 .github/workflows/build-linux.yml create mode 100644 .github/workflows/build-mac.yml create mode 100644 .github/workflows/build-win.yml diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml new file mode 100644 index 000000000000..56378ff919de --- /dev/null +++ b/.github/workflows/build-linux.yml @@ -0,0 +1,97 @@ +name: Build Linux Dolphin + +on: [push, workflow_dispatch] + +jobs: + build: + runs-on: ubuntu-24.04 + + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + submodules: 'recursive' + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.13 + + - name: Install dependencies + run: | + sudo apt update && sudo apt upgrade + sudo apt install libxi-dev + sudo apt install libegl1-mesa-dev + sudo apt install ffmpeg + sudo apt install libudev-dev + sudo apt install libevdev-dev + sudo apt install build-essential + sudo apt install cmake + sudo apt install git + sudo apt install qt6-base-dev qt6-tools-dev libqt6svg6-dev + sudo apt install libavcodec-dev + sudo apt install libavformat-dev + sudo apt install libcurl4-openssl-dev + sudo apt install libdbus-1-dev + sudo apt install libglew-dev + sudo apt install libgtk-3-dev + sudo apt install libopenal-dev + sudo apt install libreadline-dev + sudo apt install libxrandr-dev + sudo apt install libxi-dev + sudo apt install libxinerama-dev + sudo apt install libx11-dev + sudo apt install libasound2-dev + sudo apt install libpulse-dev + sudo apt install libfreetype6-dev + sudo apt install libfontconfig1-dev + sudo apt install libpng-dev + sudo apt install libjpeg-dev + sudo apt install libz-dev + sudo apt install libxext-dev + sudo apt install libxrender-dev + sudo apt install libglu1-mesa-dev + sudo apt install libgtkglext1-dev + sudo apt install libgtest-dev + sudo apt install libgmp-dev + sudo apt install liblz4-dev + sudo apt install liblzma-dev + sudo apt install libsnappy-dev + sudo apt install libtinyxml2-dev + sudo apt install libxi-dev + sudo apt install libxrandr-dev + sudo apt install libxinerama-dev + sudo apt install libx11-xcb-dev + sudo apt install libxcb-glx0-dev + sudo apt install libxcb1-dev + sudo apt install libxcb-dri3-dev + sudo apt install libxcb-dri2-0-dev + sudo apt install libxcb-xfixes0-dev + sudo apt install libxcb-randr0-dev + sudo apt install libxcb-keysyms1-dev + sudo apt install libxcb-image0-dev + sudo apt install libxcb-shape0-dev + sudo apt install libxcb-xinerama0-dev + sudo apt install libxcb-util-dev + sudo apt install libxcb-icccm4-dev + sudo apt install libxcb-keysyms1-dev + sudo apt install libxcb-xkb-dev + sudo apt install libxkbcommon-dev + sudo apt install libxkbcommon-x11-dev + + - name: Build Dolphin + run: | + # On Ubuntu some include files are missing for Qt6, we copy those manually + # Hacky, but it works anyways + sudo cp -r Externals/Qt/Qt6.5.1/x64/include/QtGui/6.5.1/QtGui/qpa/ /usr/include/ + cmake -Bbuild . -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DUSE_SYSTEM_LIBS=OFF -DCMAKE_BUILD_TYPE=Release + cd build + make -j$(nproc) + cp -r ../Data/Sys/ Binaries/ + tar -czf dolphin_linux.tar.gz Binaries/ + + - name: Upload Build + uses: actions/upload-artifact@v4 + with: + name: DolphinLinux + path: build/dolphin_linux.tar.gz \ No newline at end of file diff --git a/.github/workflows/build-mac.yml b/.github/workflows/build-mac.yml new file mode 100644 index 000000000000..d4f237c56019 --- /dev/null +++ b/.github/workflows/build-mac.yml @@ -0,0 +1,52 @@ +name: Build Mac OS Dolphin + +on: [push, workflow_dispatch] + +jobs: + build: + name: "${{ matrix.runs-on }} • ${{ matrix.arch }}" + defaults: + run: + shell: bash + strategy: + matrix: + include: + - runs-on: macos-latest + arch: arm64 + runs-on: ${{ matrix.runs-on }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + submodules: 'recursive' + + - name: Install Qt + run: | + brew update + brew install qt + + - name: Configure Dolphin + run: | + mkdir build + cd build + cmake .. -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DENABLE_AUTOUPDATE=OFF + tar -czf dolphin_mac.tar.gz Binaries/ + + - name: Try Building Dolphin + run: | + cd build + make -j$(sysctl -n hw.logicalcpu) + continue-on-error: true + + - name: Try Building Dolphin Again + run: | + cd build + make -j$(sysctl -n hw.logicalcpu) + tar -czf dolphin_mac.tar.gz Binaries/ + + - name: Upload Build + uses: actions/upload-artifact@v4 + with: + name: DolphinMac-${{ matrix.arch }} + path: build/dolphin_mac.tar.gz \ No newline at end of file diff --git a/.github/workflows/build-win.yml b/.github/workflows/build-win.yml new file mode 100644 index 000000000000..89e0f587c9a0 --- /dev/null +++ b/.github/workflows/build-win.yml @@ -0,0 +1,30 @@ +name: Build Win Dolphin + +on: [push, workflow_dispatch] + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + submodules: 'recursive' + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.13 + + - name: Build Dolphin + run: | + cmake -Bbuild . -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release + cmake --build build --config Release -- /m + ls + + - name: Upload Build + uses: actions/upload-artifact@v4 + with: + name: DolphinWin + path: Binary \ No newline at end of file From 55a01dae49a305d38c2bf8a1cb8893fc36328beb Mon Sep 17 00:00:00 2001 From: unexploredtest Date: Wed, 24 Dec 2025 19:17:14 +0330 Subject: [PATCH 2/6] Scripting: Change the method name Gui::DrawText to Gui::DrawText2 --- Source/Core/Core/API/Gui.cpp | 3 ++- Source/Core/Core/API/Gui.h | 2 +- Source/Core/Scripting/Python/Modules/guimodule.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/API/Gui.cpp b/Source/Core/Core/API/Gui.cpp index 08ccfec36e72..c3ac5b67ee82 100644 --- a/Source/Core/Core/API/Gui.cpp +++ b/Source/Core/Core/API/Gui.cpp @@ -94,7 +94,8 @@ void Gui::DrawCircleFilled(const Vec2f center, float radius, u32 color, int num_ GUI_DRAW_DEFERRED(AddCircleFilled(center, radius, ARGBToABGR(color), num_segments)); } -void Gui::DrawText(const Vec2f pos, u32 color, std::string text) +// lol +void Gui::DrawText2(const Vec2f pos, u32 color, std::string text) { GUI_DRAW_DEFERRED(AddText(pos, ARGBToABGR(color), text.c_str())); } diff --git a/Source/Core/Core/API/Gui.h b/Source/Core/Core/API/Gui.h index 0e0fc2ac1b2a..664e8d3c669a 100644 --- a/Source/Core/Core/API/Gui.h +++ b/Source/Core/Core/API/Gui.h @@ -36,7 +36,7 @@ class Gui void DrawTriangleFilled(const Vec2f a, const Vec2f b, const Vec2f c, u32 color); void DrawCircle(const Vec2f center, float radius, u32 color, int num_segments = 12, float thickness = 1.0f); void DrawCircleFilled(const Vec2f center, float radius, u32 color, int num_segments = 12); - void DrawText(const Vec2f pos, u32 color, std::string text); + void DrawText2(const Vec2f pos, u32 color, std::string text); void DrawPolyline(const std::vector points, u32 color, bool closed, float thickness); void DrawConvexPolyFilled(const std::vector points, u32 color); diff --git a/Source/Core/Scripting/Python/Modules/guimodule.cpp b/Source/Core/Scripting/Python/Modules/guimodule.cpp index c04c77bb11b5..190b2b713902 100644 --- a/Source/Core/Scripting/Python/Modules/guimodule.cpp +++ b/Source/Core/Scripting/Python/Modules/guimodule.cpp @@ -101,7 +101,7 @@ static void draw_circle_filled(PyObject* self, float centerX, float centerY, flo static void draw_text(PyObject* self, float posX, float posY, u32 color, const char* text) { GuiModuleState* state = Py::GetState(self); - state->gui->DrawText({posX, posY}, color, std::string(text)); + state->gui->DrawText2({posX, posY}, color, std::string(text)); } static PyObject* draw_polyline(PyObject* self, PyObject* args) From 2a64b3847845ad74d360d7acefe96eba01b0bf4e Mon Sep 17 00:00:00 2001 From: unexploredtest Date: Wed, 24 Dec 2025 23:48:39 +0330 Subject: [PATCH 3/6] CMake: Make windows use the external python --- Source/Core/Scripting/CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/Core/Scripting/CMakeLists.txt b/Source/Core/Scripting/CMakeLists.txt index b35a94edcaf9..3ff71d552024 100644 --- a/Source/Core/Scripting/CMakeLists.txt +++ b/Source/Core/Scripting/CMakeLists.txt @@ -30,7 +30,17 @@ add_library(scripting Python/Utils/object_wrapper.h ) -find_package(Python3 REQUIRED COMPONENTS Development) +if(WIN32) + set(Python3_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/Externals/python/x64/include") + set(Python3_LIBRARIES + "${CMAKE_SOURCE_DIR}/Externals/python/x64/libs/python3.lib" + "${CMAKE_SOURCE_DIR}/Externals/python/x64/libs/python3_d.lib" + "${CMAKE_SOURCE_DIR}/Externals/python/x64/libs/python312.lib" + "${CMAKE_SOURCE_DIR}/Externals/python/x64/libs/python312_d.lib" + ) +else() + find_package(Python3 REQUIRED COMPONENTS Development) +endif() include_directories(${Python3_INCLUDE_DIRS}) # TODO imgui shouldn't be here target_link_libraries(scripting PRIVATE ${Python3_LIBRARIES} imgui core) From d0fa4b50254fa909be988e8ca349f9a93eb00eb4 Mon Sep 17 00:00:00 2001 From: unexploredtest Date: Wed, 24 Dec 2025 23:49:56 +0330 Subject: [PATCH 4/6] Workflows: Remove Python setup for Windows --- .github/workflows/build-win.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/build-win.yml b/.github/workflows/build-win.yml index 89e0f587c9a0..04c230c4ce4f 100644 --- a/.github/workflows/build-win.yml +++ b/.github/workflows/build-win.yml @@ -12,11 +12,6 @@ jobs: with: submodules: 'recursive' - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.13 - - name: Build Dolphin run: | cmake -Bbuild . -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release From 3706c95274e31b83c0e3028a2f156fb3689f88e0 Mon Sep 17 00:00:00 2001 From: unexploredtest Date: Wed, 24 Dec 2025 23:54:30 +0330 Subject: [PATCH 5/6] Workflow: Change the condition on which the workflows trigger --- .github/workflows/build-linux.yml | 9 ++++++++- .github/workflows/build-mac.yml | 9 ++++++++- .github/workflows/build-win.yml | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 56378ff919de..859873e11392 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -1,6 +1,13 @@ name: Build Linux Dolphin -on: [push, workflow_dispatch] +on: + push: + branches: + - master + pull_request: + branches: + - master + workflow_dispatch: jobs: build: diff --git a/.github/workflows/build-mac.yml b/.github/workflows/build-mac.yml index d4f237c56019..c71f795ee364 100644 --- a/.github/workflows/build-mac.yml +++ b/.github/workflows/build-mac.yml @@ -1,6 +1,13 @@ name: Build Mac OS Dolphin -on: [push, workflow_dispatch] +on: + push: + branches: + - master + pull_request: + branches: + - master + workflow_dispatch: jobs: build: diff --git a/.github/workflows/build-win.yml b/.github/workflows/build-win.yml index 04c230c4ce4f..34bf93237321 100644 --- a/.github/workflows/build-win.yml +++ b/.github/workflows/build-win.yml @@ -1,6 +1,13 @@ name: Build Win Dolphin -on: [push, workflow_dispatch] +on: + push: + branches: + - master + pull_request: + branches: + - master + workflow_dispatch: jobs: build: From 09b4d3a60e2af5baab0a1ca559d250136f0b2e6b Mon Sep 17 00:00:00 2001 From: unexploredtest Date: Thu, 25 Dec 2025 00:49:10 +0330 Subject: [PATCH 6/6] Remove unnecessary comment --- Source/Core/Core/API/Gui.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Source/Core/Core/API/Gui.cpp b/Source/Core/Core/API/Gui.cpp index c3ac5b67ee82..a3f64db9aac2 100644 --- a/Source/Core/Core/API/Gui.cpp +++ b/Source/Core/Core/API/Gui.cpp @@ -94,7 +94,6 @@ void Gui::DrawCircleFilled(const Vec2f center, float radius, u32 color, int num_ GUI_DRAW_DEFERRED(AddCircleFilled(center, radius, ARGBToABGR(color), num_segments)); } -// lol void Gui::DrawText2(const Vec2f pos, u32 color, std::string text) { GUI_DRAW_DEFERRED(AddText(pos, ARGBToABGR(color), text.c_str()));