diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml new file mode 100644 index 000000000000..6b9e5a60c4da --- /dev/null +++ b/.github/workflows/build-linux.yml @@ -0,0 +1,101 @@ +name: Build Linux Dolphin + +on: + push: + branches: + - master + pull_request: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-24.04 + + steps: + - name: Checkout code + uses: actions/checkout@v6 + 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 \ + libegl1-mesa-dev \ + ffmpeg \ + libudev-dev \ + libevdev-dev \ + build-essential \ + cmake \ + qt6-base-dev \ + qt6-tools-dev \ + libqt6svg6-dev \ + libavcodec-dev \ + libavformat-dev \ + libcurl4-openssl-dev \ + libdbus-1-dev \ + libglew-dev \ + libgtk-3-dev \ + libopenal-dev \ + libreadline-dev \ + libxrandr-dev \ + libx11-dev \ + libasound2-dev \ + libpulse-dev \ + libfreetype6-dev \ + libfontconfig1-dev \ + libpng-dev \ + libjpeg-dev \ + libz-dev \ + libxext-dev \ + libxrender-dev \ + libglu1-mesa-dev \ + libgtkglext1-dev \ + libgtest-dev \ + libgmp-dev \ + liblz4-dev \ + liblzma-dev \ + libsnappy-dev \ + libtinyxml2-dev \ + libxi-dev \ + libxinerama-dev \ + libx11-xcb-dev \ + libxcb-glx0-dev \ + libxcb1-dev \ + libxcb-dri3-dev \ + libxcb-dri2-0-dev \ + libxcb-xfixes0-dev \ + libxcb-randr0-dev \ + libxcb-keysyms1-dev \ + libxcb-image0-dev \ + libxcb-shape0-dev \ + libxcb-xinerama0-dev \ + libxcb-util-dev \ + libxcb-icccm4-dev \ + libxcb-keysyms1-dev \ + libxcb-xkb-dev \ + libxkbcommon-dev \ + 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 -DLINUX_LOCAL_DEV=true -DUSE_SYSTEM_LIBS=OFF -DCMAKE_BUILD_TYPE=Release + cd build + make -j$(nproc) + cp -r ../Data/Sys/ Binaries/ + + - name: Upload Build + uses: actions/upload-artifact@v6 + with: + name: DolphinLinux + path: build/Binaries diff --git a/.github/workflows/build-mac.yml b/.github/workflows/build-mac.yml new file mode 100644 index 000000000000..1856c610a363 --- /dev/null +++ b/.github/workflows/build-mac.yml @@ -0,0 +1,59 @@ +name: Build Mac OS Dolphin + +on: + push: + branches: + - master + pull_request: + branches: + - master + workflow_dispatch: + +jobs: + build: + name: "${{ matrix.runs-on }} • ${{ matrix.arch }}" + defaults: + run: + shell: bash + strategy: + matrix: + include: + - runs-on: macos-15 + arch: arm64 + runs-on: ${{ matrix.runs-on }} + + steps: + - name: Checkout code + uses: actions/checkout@v6 + 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@v6 + 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..3b8162bb488b --- /dev/null +++ b/.github/workflows/build-win.yml @@ -0,0 +1,31 @@ +name: Build Win Dolphin + +on: + push: + branches: + - master + pull_request: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v6 + with: + submodules: 'recursive' + + - name: Build Dolphin + run: | + cmake -Bbuild . -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release + cmake --build build --config Release -- /m + + - name: Upload Build + uses: actions/upload-artifact@v6 + with: + name: DolphinWin + path: Binary \ No newline at end of file diff --git a/Source/Core/Core/API/Gui.cpp b/Source/Core/Core/API/Gui.cpp index 08ccfec36e72..a3f64db9aac2 100644 --- a/Source/Core/Core/API/Gui.cpp +++ b/Source/Core/Core/API/Gui.cpp @@ -94,7 +94,7 @@ 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) +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/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) 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)