From ca10280a053006dda1279b00010fa48d5b5721d8 Mon Sep 17 00:00:00 2001 From: Christopher Homberger Date: Fri, 19 Jan 2024 20:55:01 +0100 Subject: [PATCH 01/12] add sdl3 --- .gitmodules | 3 +++ CMakeLists.txt | 2 ++ ext/sdl3.cmake | 11 +++++++++++ game-window | 2 +- sdl3 | 1 + 5 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 ext/sdl3.cmake create mode 160000 sdl3 diff --git a/.gitmodules b/.gitmodules index 2a28807e..55c9bbd5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -79,3 +79,6 @@ [submodule "mcpelauncher-errorwindow"] path = mcpelauncher-errorwindow url = https://github.com/minecraft-linux/mcpelauncher-errorwindow.git +[submodule "sdl3"] + path = sdl3 + url = https://github.com/libsdl-org/SDL diff --git a/CMakeLists.txt b/CMakeLists.txt index 96413e6c..8ad852c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,6 +95,8 @@ if (BUILD_CLIENT) add_subdirectory(linux-gamepad) elseif (GAMEWINDOW_SYSTEM STREQUAL "GLFW") include(ext/glfw.cmake) + elseif (GAMEWINDOW_SYSTEM STREQUAL "SDL3") + include(ext/sdl3.cmake) endif() endif() diff --git a/ext/sdl3.cmake b/ext/sdl3.cmake new file mode 100644 index 00000000..246f18b9 --- /dev/null +++ b/ext/sdl3.cmake @@ -0,0 +1,11 @@ +# Create an option to switch between a system sdl library and a vendored SDL library +option(SDL3_VENDORED "Use vendored libraries" OFF) + +if(SDL3_VENDORED) + add_subdirectory(sdl3 EXCLUDE_FROM_ALL) +else() + # 1. Look for a SDL3 package, + # 2. look for the SDL3-shared component, and + # 3. fail if the shared component cannot be found. + find_package(SDL3 REQUIRED CONFIG REQUIRED COMPONENTS SDL3-shared) +endif() \ No newline at end of file diff --git a/game-window b/game-window index 68b03c16..bdf1bb71 160000 --- a/game-window +++ b/game-window @@ -1 +1 @@ -Subproject commit 68b03c163d2a0c5cd854cd678a63087bb7b804da +Subproject commit bdf1bb712f9cbd360a11759bc9c11c3999e806e5 diff --git a/sdl3 b/sdl3 new file mode 160000 index 00000000..bd5d4d61 --- /dev/null +++ b/sdl3 @@ -0,0 +1 @@ +Subproject commit bd5d4d61edc95f1f003ec91597418fc416ff8315 From c7037a906994bb183d2641ae39f96c58ec21b2c8 Mon Sep 17 00:00:00 2001 From: Christopher Homberger Date: Fri, 19 Jan 2024 21:41:29 +0100 Subject: [PATCH 02/12] sdl3 textinput --- game-window | 2 +- mcpelauncher-client | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/game-window b/game-window index bdf1bb71..6427efe6 160000 --- a/game-window +++ b/game-window @@ -1 +1 @@ -Subproject commit bdf1bb712f9cbd360a11759bc9c11c3999e806e5 +Subproject commit 6427efe6fe23432f8de9ae86f698d54c110e13bb diff --git a/mcpelauncher-client b/mcpelauncher-client index cb4fb39c..98355fb5 160000 --- a/mcpelauncher-client +++ b/mcpelauncher-client @@ -1 +1 @@ -Subproject commit cb4fb39c3dc9dcc1aa5404b6738c393d7eca10c5 +Subproject commit 98355fb53cdf8a3ef41e9af34309f7dc50eaf6b4 From 65e06aa423c61b9d8b54f59ee9067cdbc4fc4185 Mon Sep 17 00:00:00 2001 From: Christopher Homberger Date: Sat, 20 Jan 2024 12:33:44 +0100 Subject: [PATCH 03/12] update sdl3 port --- game-window | 2 +- mcpelauncher-client | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/game-window b/game-window index 6427efe6..b14a8c0f 160000 --- a/game-window +++ b/game-window @@ -1 +1 @@ -Subproject commit 6427efe6fe23432f8de9ae86f698d54c110e13bb +Subproject commit b14a8c0f74ba598fc0b596685d0b5f69ca033823 diff --git a/mcpelauncher-client b/mcpelauncher-client index 98355fb5..ec3e86b8 160000 --- a/mcpelauncher-client +++ b/mcpelauncher-client @@ -1 +1 @@ -Subproject commit 98355fb53cdf8a3ef41e9af34309f7dc50eaf6b4 +Subproject commit ec3e86b846e439f3a157e78dc1cb7e9a0c27d1b3 From a164e7cdceaff80b1825d2e519167a94289b5f9a Mon Sep 17 00:00:00 2001 From: Christopher Homberger Date: Sat, 20 Jan 2024 16:37:11 +0100 Subject: [PATCH 04/12] force sdl3 in test build --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ad852c3..8cdf9ffe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,6 +90,7 @@ if (BUILD_CLIENT) endif() include(game-window/BuildSettings.cmake) + set(GAMEWINDOW_SYSTEM "SDL3" CACHE STRING "" FORCE) if (GAMEWINDOW_SYSTEM STREQUAL "EGLUT") add_subdirectory(eglut) add_subdirectory(linux-gamepad) From d7a50eb72e55703485a21b4ed36f1d7c9c3f0d65 Mon Sep 17 00:00:00 2001 From: Christopher Homberger Date: Sat, 20 Jan 2024 16:50:57 +0100 Subject: [PATCH 05/12] force correct version --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7db9ab6d..8cce454d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,5 +7,9 @@ on: jobs: linux: uses: ChristopherHX/linux-packaging-scripts/.github/workflows/main.yml@main + with: + mcpelauncher-ref: ${{ github.sha }} macOS: - uses: ChristopherHX/osx-packaging-scripts/.github/workflows/main.yml@main \ No newline at end of file + uses: ChristopherHX/osx-packaging-scripts/.github/workflows/main.yml@main + with: + mcpelauncher-ref: ${{ github.sha }} \ No newline at end of file From bc41faef91bbdc83798f414ff9940ae363059395 Mon Sep 17 00:00:00 2001 From: Christopher Homberger Date: Sat, 20 Jan 2024 16:57:06 +0100 Subject: [PATCH 06/12] fix it --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8cdf9ffe..c739961e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,6 +91,7 @@ if (BUILD_CLIENT) include(game-window/BuildSettings.cmake) set(GAMEWINDOW_SYSTEM "SDL3" CACHE STRING "" FORCE) + set(SDL3_VENDORED ON CACHE BOOL "" FORCE) if (GAMEWINDOW_SYSTEM STREQUAL "EGLUT") add_subdirectory(eglut) add_subdirectory(linux-gamepad) From 64cdab2c787674848ad8941dbdb20b6d902012fe Mon Sep 17 00:00:00 2001 From: Christopher Homberger Date: Sat, 20 Jan 2024 17:12:22 +0100 Subject: [PATCH 07/12] . --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c739961e..6034c6b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,6 +92,8 @@ if (BUILD_CLIENT) include(game-window/BuildSettings.cmake) set(GAMEWINDOW_SYSTEM "SDL3" CACHE STRING "" FORCE) set(SDL3_VENDORED ON CACHE BOOL "" FORCE) + set(SDL_SHARED OFF CACHE BOOL "" FORCE) + set(SDL_STATIC ON CACHE BOOL "" FORCE) if (GAMEWINDOW_SYSTEM STREQUAL "EGLUT") add_subdirectory(eglut) add_subdirectory(linux-gamepad) From a4f288e283c624b088b1e83030b8e43e1958d478 Mon Sep 17 00:00:00 2001 From: Christopher Homberger Date: Sun, 10 Mar 2024 22:08:46 +0100 Subject: [PATCH 08/12] Enable imgui for testing --- .gitmodules | 3 +++ imgui | 1 + 2 files changed, 4 insertions(+) create mode 160000 imgui diff --git a/.gitmodules b/.gitmodules index 55c9bbd5..65981595 100644 --- a/.gitmodules +++ b/.gitmodules @@ -82,3 +82,6 @@ [submodule "sdl3"] path = sdl3 url = https://github.com/libsdl-org/SDL +[submodule "imgui"] + path = imgui + url = https://github.com/ocornut/imgui diff --git a/imgui b/imgui new file mode 160000 index 00000000..278cf1a7 --- /dev/null +++ b/imgui @@ -0,0 +1 @@ +Subproject commit 278cf1a7bc38d8fc4a371ffc21191e154a05b118 From 6213ff9efe89f00c1b5978ff94010dac6f67909a Mon Sep 17 00:00:00 2001 From: Christopher Homberger Date: Sun, 10 Mar 2024 22:25:18 +0100 Subject: [PATCH 09/12] Fix sdl3 gamewindow include --- game-window | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game-window b/game-window index 3fde9bed..7a3b160b 160000 --- a/game-window +++ b/game-window @@ -1 +1 @@ -Subproject commit 3fde9bed84a3189f5b91c73ceba31b9ec17057f2 +Subproject commit 7a3b160b87fb0654945ac12b9da8b22ec5393b82 From f893420fca7c86f56ef33d5c217a0ce3553c7db3 Mon Sep 17 00:00:00 2001 From: ChristopherHX Date: Sun, 30 Jun 2024 09:19:48 +0000 Subject: [PATCH 10/12] Fix sdl version --- sdl3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdl3 b/sdl3 index bd5d4d61..ede44834 160000 --- a/sdl3 +++ b/sdl3 @@ -1 +1 @@ -Subproject commit bd5d4d61edc95f1f003ec91597418fc416ff8315 +Subproject commit ede44834203dae67ba5883db742b5bc46e089514 From ee78197c182dd4180700f0c3ef3677fc93a7a0c4 Mon Sep 17 00:00:00 2001 From: ChristopherHX Date: Sun, 30 Jun 2024 09:59:30 +0000 Subject: [PATCH 11/12] disable some subsystems due to macOS problems --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6034c6b3..af677738 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,6 +94,8 @@ if (BUILD_CLIENT) set(SDL3_VENDORED ON CACHE BOOL "" FORCE) set(SDL_SHARED OFF CACHE BOOL "" FORCE) set(SDL_STATIC ON CACHE BOOL "" FORCE) + set(SDL_CAMERA OFF CACHE BOOL "" FORCE) + set(SDL_RENDER OFF CACHE BOOL "" FORCE) if (GAMEWINDOW_SYSTEM STREQUAL "EGLUT") add_subdirectory(eglut) add_subdirectory(linux-gamepad) From ac00f0f69ce7a15741aa53f30dff8a461718a9db Mon Sep 17 00:00:00 2001 From: ChristopherHX Date: Sun, 30 Jun 2024 11:12:07 +0000 Subject: [PATCH 12/12] disable sdl3 features --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index af677738..bc2d80d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,6 +96,8 @@ if (BUILD_CLIENT) set(SDL_STATIC ON CACHE BOOL "" FORCE) set(SDL_CAMERA OFF CACHE BOOL "" FORCE) set(SDL_RENDER OFF CACHE BOOL "" FORCE) + set(SDL_DIALOG OFF CACHE BOOL "" FORCE) + set(SDL_SENSOR OFF CACHE BOOL "" FORCE) if (GAMEWINDOW_SYSTEM STREQUAL "EGLUT") add_subdirectory(eglut) add_subdirectory(linux-gamepad)