Switch Docker to Alpine and build kge.
Update build environment to Alpine, enable GUI support, and refine developer guide - Migrated Dockerfile base image from Ubuntu 22.04 to Alpine 3.19 for a smaller and faster container. - Added dependencies for GUI support (SDL2, OpenGL/Mesa, Freetype, etc.) and updated CMake options. - Enhanced `DEVELOPER_GUIDE.md` with new instructions for GUI builds, updated dependencies, and simplified custom build workflows. - Addressed Alpine-specific ncurses library path issues in CMake configuration.
This commit is contained in:
@@ -68,15 +68,17 @@ if (BUILD_GUI)
|
||||
endif ()
|
||||
|
||||
# NCurses for terminal mode
|
||||
set(CURSES_NEED_NCURSES)
|
||||
set(CURSES_NEED_WIDE)
|
||||
set(CURSES_NEED_NCURSES TRUE)
|
||||
set(CURSES_NEED_WIDE TRUE)
|
||||
find_package(Curses REQUIRED)
|
||||
include_directories(${CURSES_INCLUDE_DIR})
|
||||
|
||||
# On Linux, explicitly link ncursesw for wide-character support
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
find_library(NCURSESW_LIBRARY NAMES ncursesw REQUIRED)
|
||||
set(CURSES_LIBRARIES ${NCURSESW_LIBRARY})
|
||||
# On Alpine Linux, CMake's FindCurses looks in wrong paths
|
||||
# Manually find the correct ncurses library
|
||||
if (EXISTS "/etc/alpine-release")
|
||||
find_library(NCURSESW_LIB NAMES ncursesw PATHS /usr/lib /lib REQUIRED)
|
||||
set(CURSES_LIBRARIES ${NCURSESW_LIB})
|
||||
message(STATUS "Alpine Linux detected, using ncurses at: ${NCURSESW_LIB}")
|
||||
endif ()
|
||||
|
||||
set(SYNTAX_SOURCES
|
||||
|
||||
Reference in New Issue
Block a user