From 5c34a90bea4506ac965817596378a97ae5895a64 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Mon, 12 Aug 2024 14:02:36 +0800 Subject: Download VLC dmg automatically and building only for one architecture at a time is the one supported now. --- README.md | 2 +- indra/cmake/LibVLCPlugin.cmake | 31 ++++++++++++++++++++++++------- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 76685d76b4..481349cc07 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ $ cd viewer $ sudo port install cmake pkgconfig autoconf automake apr-util +universal boost +universal collada-dom +universal hunspell +universal freetype +universal jsoncpp +universal openjpeg +universal openssl11 +universal uriparser +universal libvorbis +universal xxhashlib $ mkdir -p build/universal-apple-darwin`uname -r`/packages $ cd ~/Downloads -$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -OL https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 -OL https://github.com/secondlife/3p-libndofdev/releases/download/v0.1.8e9edc7/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst -OL https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-universal.dmg -OL https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2 +$ curl -OL https://github.com/secondlife/3p-curl/releases/download/v7.54.1-513145c/curl-7.54.1-513145c-darwin64-513145c.tar.zst -OL https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/115452/994130/nanosvg-2022.09.27-darwin64-580364.tar.bz2 -OL https://github.com/secondlife/3p-libndofdev/releases/download/v0.1.8e9edc7/libndofdev-0.1.8e9edc7-darwin64-8e9edc7.tar.zst -OL https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst -OL https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2 $ cd - $ cd .. $ tar xf ~/Downloads/xmlrpc-epi-0.54.2.tar.bz2 diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake index e2ecb8b248..c6f1423322 100644 --- a/indra/cmake/LibVLCPlugin.cmake +++ b/indra/cmake/LibVLCPlugin.cmake @@ -6,15 +6,34 @@ include_guard() add_library( ll::libvlc INTERFACE IMPORTED ) if (USESYSTEMLIBS) - if (DARWIN) if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) + execute_process(COMMAND curl + -L + https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-arm64.dmg + -o + $ENV{HOME}/Downloads/vlc-3.0.21-arm64.dmg + WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + RESULT_VARIABLE vlc_installed + ) + file(WRITE ${PREBUILD_TRACKING_DIR}/vlc_installed "${vlc_installed}") + endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) execute_process(COMMAND hdiutil attach -noverify $ENV{HOME}/Downloads/vlc-3.0.21-arm64.dmg) - elseif (CMAKE_OSX_ARCHITECTURES MATCHES x86_64) + else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) + execute_process(COMMAND curl + -L + https://get.videolan.org/vlc/3.0.21/macosx/vlc-3.0.21-intel64.dmg + -o + $ENV{HOME}/Downloads/vlc-3.0.21-intel64.dmg + WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR} + RESULT_VARIABLE vlc_installed + ) + file(WRITE ${PREBUILD_TRACKING_DIR}/vlc_installed "${vlc_installed}") + endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/vlc_installed OR NOT ${vlc_installed} EQUAL 0) execute_process(COMMAND hdiutil attach -noverify $ENV{HOME}/Downloads/vlc-3.0.21-intel64.dmg) - else () - execute_process(COMMAND hdiutil attach -noverify $ENV{HOME}/Downloads/vlc-3.0.21-universal.dmg) - endif () + endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) target_include_directories( ll::libvlc SYSTEM INTERFACE /Volumes/VLC\ media\ player/VLC.app/Contents/MacOS/include) target_link_directories( ll::libvlc INTERFACE /Volumes/VLC\ media\ player/VLC.app/Contents/MacOS/lib) target_link_libraries( ll::libvlc INTERFACE vlc vlccore ) @@ -28,13 +47,11 @@ if (USESYSTEMLIBS) set(LIBVLCPLUGIN ON CACHE BOOL "LIBVLCPLUGIN support for the llplugin/llmedia test apps.") return() - else (USESYSTEMLIBS) use_prebuilt_binary(vlc-bin) set(LIBVLCPLUGIN ON CACHE BOOL "LIBVLCPLUGIN support for the llplugin/llmedia test apps.") - endif (USESYSTEMLIBS) if (WINDOWS) -- cgit v1.2.3