diff options
| author | Erik Kundiman <erik@megapahit.org> | 2026-06-22 08:34:39 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2026-06-22 11:25:21 +0800 |
| commit | ee87dd9f21e0dcd5a2f3a78586e5ae5d2ba592d5 (patch) | |
| tree | 93ca93a3da687423f09218477fd2ede4c82f0fcb /indra/media_plugins | |
| parent | 341ae1a286c722f24066b2cb2a3755d19c3a9866 (diff) | |
Flatpak support
Still uses prebuilt GLU, could be improved by using the glu shared
module.
Still uses prebuilt OpenAL, could be improved by separating the
ALUT dependency (which isn't available on the runtime) from it,
so we could use runtime's OpenAL.
Still uses prebuilt LibXML2, could be improved by separating the
Minizip & ColladaDOM from it (which aren't available on the
runtime) from it, so we could use runtime's LibXML2 but have
ColladaDOM built against it (and a still non-runtime Minizip).
Still uses FLTK 1.3, when I tried using 1.4, it still had linking
errors (might need to just add Cairo libraries to the
target_link_libraries).
VLC plugins are installed in vlc/plugins path relative to the vlc
& vlccore libraries, the way they are in the distro I got the
binaries from (Debian), cause I think it's the libraries that are
compiled with that path.
Still uses prebuilt dependencies in general, could be improved by
having them as modules to be built.
_FORTIFY_SOURCE needs to be skipped to avoid redefinition cause
Flatpak build system already defines it.
The conditionals for deciding installation paths need to be
reorganised to accomodate installation that doesn't require an
encapsulating namespace (because the installed files are already
encapsulated in the app sandbox).
The library directory naming scheme used here is lib64.
The libGLESv2.so & libvulkan.so.1 installed are still copies, not
links yet, because I'm still not familiar yet with the runtime
hierarchies (they might reside just in /usr/lib/x86_64-linux-gnu).
Diffstat (limited to 'indra/media_plugins')
| -rw-r--r-- | indra/media_plugins/cef/CMakeLists.txt | 57 | ||||
| -rw-r--r-- | indra/media_plugins/libvlc/CMakeLists.txt | 16 |
2 files changed, 57 insertions, 16 deletions
diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 4736eef420..a3d36d0ed7 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -52,7 +52,10 @@ if (LINUX) list(APPEND media_plugin_cef_SOURCE_FILES ${LINUX_VOLUME_CATCHER}) set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--build-id") if (${LINUX_DISTRO} MATCHES arch OR (${LINUX_DISTRO} MATCHES fedora)) - set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH};${INSTALL_PREFIX}/${_LIB}/cef) + if (${LINUX_DISTRO} MATCHES fedora) + set(LIB_SUFFIX ${ADDRESS_SIZE}) + endif () + set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH};${INSTALL_PREFIX}/lib${LIB_SUFFIX}/cef) endif () list(APPEND media_plugin_cef_LINK_LIBRARIES llwindow ) elseif (DARWIN) @@ -147,14 +150,23 @@ if (INSTALL) DESTINATION ${_LIB} ) elseif (LINUX) - if (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu)) + if (USE_FLATPAK) + set(_LIB lib${ADDRESS_SIZE}) + elseif (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu)) set(_LIB lib/${ARCH}-linux-gnu/${VIEWER_BINARY_NAME}) elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR (${LINUX_DISTRO} MATCHES gentoo)) set(_LIB lib${ADDRESS_SIZE}/${VIEWER_BINARY_NAME}) else () set(_LIB lib/${VIEWER_BINARY_NAME}) endif () - if (${LINUX_DISTRO} MATCHES arch) + if (USE_FLATPAK) + install( + PROGRAMS + ${AUTOBUILD_INSTALL_DIR}/bin/release/chrome-sandbox + ${AUTOBUILD_INSTALL_DIR}/bin/release/dullahan_host + DESTINATION libexec + ) + elseif (${LINUX_DISTRO} MATCHES arch) install( PROGRAMS ${AUTOBUILD_INSTALL_DIR}/bin/release/dullahan_host DESTINATION lib/${VIEWER_BINARY_NAME} @@ -173,17 +185,6 @@ if (INSTALL) ) endif () if (NOT (${LINUX_DISTRO} MATCHES arch OR (${LINUX_DISTRO} MATCHES fedora))) - file(MAKE_DIRECTORY ${AUTOBUILD_INSTALL_DIR}/lib/release/${VIEWER_BINARY_NAME}) - file(CREATE_LINK - "../libGLESv2.so" - "${AUTOBUILD_INSTALL_DIR}/lib/release/${VIEWER_BINARY_NAME}/libGLESv2.so" - SYMBOLIC - ) - file(CREATE_LINK - "../libvulkan.so.1" - "${AUTOBUILD_INSTALL_DIR}/lib/release/${VIEWER_BINARY_NAME}/libvulkan.so.1" - SYMBOLIC - ) install( FILES ${ARCH_PREBUILT_DIRS_RELEASE}/libcef.so @@ -191,8 +192,6 @@ if (INSTALL) ${ARCH_PREBUILT_DIRS_RELEASE}/libEGL.so ${ARCH_PREBUILT_DIRS_RELEASE}/v8_context_snapshot.bin ${ARCH_PREBUILT_DIRS_RELEASE}/vk_swiftshader_icd.json - ${ARCH_PREBUILT_DIRS_RELEASE}/${VIEWER_BINARY_NAME}/libGLESv2.so - ${ARCH_PREBUILT_DIRS_RELEASE}/${VIEWER_BINARY_NAME}/libvulkan.so.1 ${AUTOBUILD_INSTALL_DIR}/resources/chrome_100_percent.pak ${AUTOBUILD_INSTALL_DIR}/resources/chrome_200_percent.pak ${AUTOBUILD_INSTALL_DIR}/resources/icudtl.dat @@ -203,6 +202,32 @@ if (INSTALL) DIRECTORY ${AUTOBUILD_INSTALL_DIR}/resources/locales DESTINATION ${_LIB} ) + if (USE_FLATPAK) + install( + FILES + ${ARCH_PREBUILT_DIRS_RELEASE}/libGLESv2.so + ${ARCH_PREBUILT_DIRS_RELEASE}/libvulkan.so.1 + DESTINATION ${_LIB} + ) + else () + file(MAKE_DIRECTORY ${AUTOBUILD_INSTALL_DIR}/lib/release/${VIEWER_BINARY_NAME}) + file(CREATE_LINK + "../libGLESv2.so" + "${AUTOBUILD_INSTALL_DIR}/lib/release/${VIEWER_BINARY_NAME}/libGLESv2.so" + SYMBOLIC + ) + file(CREATE_LINK + "../libvulkan.so.1" + "${AUTOBUILD_INSTALL_DIR}/lib/release/${VIEWER_BINARY_NAME}/libvulkan.so.1" + SYMBOLIC + ) + install( + FILES + ${ARCH_PREBUILT_DIRS_RELEASE}/${VIEWER_BINARY_NAME}/libGLESv2.so + ${ARCH_PREBUILT_DIRS_RELEASE}/${VIEWER_BINARY_NAME}/libvulkan.so.1 + DESTINATION ${_LIB} + ) + endif () endif () elseif (WINDOWS) set(_LIB llplugin) diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt index 96790a8037..3177b3298d 100644 --- a/indra/media_plugins/libvlc/CMakeLists.txt +++ b/indra/media_plugins/libvlc/CMakeLists.txt @@ -87,6 +87,22 @@ if (INSTALL) /Volumes/VLC\ media\ player/VLC.app/Contents/MacOS/lib/libvlccore.dylib DESTINATION ${_LIB}/plugins ) + elseif (USE_FLATPAK) + set(_LIB lib${ADDRESS_SIZE}) + install( + DIRECTORY ${ARCH_PREBUILT_DIRS_RELEASE}/vlc + DESTINATION ${_LIB} + ) + install( + FILES + ${ARCH_PREBUILT_DIRS_RELEASE}/libvlc.so + ${ARCH_PREBUILT_DIRS_RELEASE}/libvlc.so.5 + ${ARCH_PREBUILT_DIRS_RELEASE}/libvlc.so.5.6.1 + ${ARCH_PREBUILT_DIRS_RELEASE}/libvlccore.so + ${ARCH_PREBUILT_DIRS_RELEASE}/libvlccore.so.9 + ${ARCH_PREBUILT_DIRS_RELEASE}/libvlccore.so.9.0.1 + DESTINATION ${_LIB} + ) elseif (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu)) set(_LIB lib/${ARCH}-linux-gnu/${VIEWER_BINARY_NAME}) elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR (${LINUX_DISTRO} MATCHES gentoo)) |
