Skip to content

Commit

Permalink
Update MinGW CI to Ubuntu 20.04 (LMMS#7259)
Browse files Browse the repository at this point in the history
Update MinGW CI to Ubuntu 20.04
* Use ghcr.io/lmms/linux.mingw:20.04
* Fix deprecation in ClipView.cpp
* Fix ccache and simplify git configuration
* Apply patch by @DomClark for MinGW's SDL2 target
* Update excludelist-win
  • Loading branch information
messmerd authored May 23, 2024
1 parent e9848db commit 2e65453
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
arch: ['32', '64']
name: mingw${{ matrix.arch }}
runs-on: ubuntu-latest
container: lmmsci/linux.mingw${{ matrix.arch }}:18.04
container: ghcr.io/lmms/linux.mingw:20.04
env:
CMAKE_OPTS: >-
-DUSE_WERROR=ON
Expand All @@ -163,12 +163,8 @@ jobs:
CCACHE_NOCOMPRESS: 1
MAKEFLAGS: -j2
steps:
- name: Update and configure Git
run: |
add-apt-repository ppa:git-core/ppa
apt-get update
apt-get --yes install git
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Configure git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Check out
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -201,7 +197,7 @@ jobs:
run: |
ccache --cleanup
echo "[ccache config]"
ccache --print-config
ccache --show-config
echo "[ccache stats]"
ccache --show-stats
env:
Expand Down
4 changes: 4 additions & 0 deletions cmake/install/excludelist-win
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@
ADVAPI32.dll
COMCTL32.dll
comdlg32.dll
d3d11.dll
dwmapi.dll
dxgi.dll
GDI32.dll
IMM32.dll
KERNEL32.dll
MPR.DLL
msvcrt.dll
netapi32.dll
ole32.dll
OLEAUT32.dll
OPENGL32.DLL
SHELL32.dll
USER32.dll
userenv.dll
UxTheme.dll
VERSION.dll
WINMM.DLL
Expand Down
12 changes: 12 additions & 0 deletions cmake/modules/FindSDL2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@
find_package(SDL2 CONFIG QUIET)

if(TARGET SDL2::SDL2)
# SDL2::SDL2 under MinGW is an interface target for reasons, so we can't get
# the library location from it. Print minimal information and return early.
get_target_property(sdl2_target_type SDL2::SDL2 TYPE)
if(sdl2_target_type STREQUAL "INTERFACE_LIBRARY")
unset(sdl2_target_type)
if(NOT SDL2_FIND_QUIETLY)
message(STATUS "Found SDL2 (found version \"${SDL2_VERSION}\")")
endif()
return()
endif()
unset(sdl2_target_type)

# Extract details for find_package_handle_standard_args
get_target_property(SDL2_LIBRARY SDL2::SDL2 LOCATION)
get_target_property(SDL2_INCLUDE_DIR SDL2::SDL2 INTERFACE_INCLUDE_DIRECTORIES)
Expand Down
2 changes: 1 addition & 1 deletion src/gui/clips/ClipView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ void ClipView::selectColor()
// Get a color from the user
const auto newColor = ColorChooser{this}
.withPalette(ColorChooser::Palette::Track)
->getColor(m_clip->color().value_or(palette().background().color()));
->getColor(m_clip->color().value_or(palette().window().color()));
if (newColor.isValid()) { setColor(newColor); }
}

Expand Down

0 comments on commit 2e65453

Please sign in to comment.