Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
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@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
59 changes: 59 additions & 0 deletions .github/workflows/build-mac.yml
Original file line number Diff line number Diff line change
@@ -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-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
32 changes: 32 additions & 0 deletions .github/workflows/build-win.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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@v2
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
ls

- name: Upload Build
uses: actions/upload-artifact@v4
with:
name: DolphinWin
path: Binary
2 changes: 1 addition & 1 deletion Source/Core/Core/API/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/API/Gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<Vec2f> points, u32 color, bool closed, float thickness);
void DrawConvexPolyFilled(const std::vector<Vec2f> points, u32 color);

Expand Down
12 changes: 11 additions & 1 deletion Source/Core/Scripting/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion Source/Core/Scripting/Python/Modules/guimodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<GuiModuleState>(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)
Expand Down