summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/LLPhysicsExtensions.cmake9
-rw-r--r--indra/newview/CMakeLists.txt12
-rw-r--r--indra/newview/llviewermenufile.cpp18
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml19
4 files changed, 55 insertions, 3 deletions
diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake
index 80d243d9f8..6112621b5a 100644
--- a/indra/cmake/LLPhysicsExtensions.cmake
+++ b/indra/cmake/LLPhysicsExtensions.cmake
@@ -22,7 +22,14 @@ if (HAVOK)
include(Havok)
use_prebuilt_binary(llphysicsextensions_source)
set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/src)
- target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions)
+ if(DARWIN)
+ set(LLPHYSICSEXTENSIONS_STUB_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/stub)
+ # can't set these library dependencies per-arch here, need to do it using XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=*] in newview/CMakeLists.txt
+ #target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions)
+ #target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensionsstub)
+ else()
+ target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions)
+ endif()
elseif (HAVOK_TPV)
use_prebuilt_binary(llphysicsextensions_tpv)
target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions_tpv)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 1443a6ccc6..e033fd57bf 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -67,6 +67,11 @@ if (NOT HAVOK_TPV)
# which means we need to duct tape this togther ...
add_subdirectory(${LLPHYSICSEXTENSIONS_SRC_DIR} llphysicsextensions)
+ if (NOT "${LLPHYSICSEXTENSIONS_STUB_DIR}" STREQUAL "")
+ # for darwin universal builds we need both real llphysicsextensions and the stub for aarch64 fallback
+ # this will only be set when HAVOK is ON, otherwise the normal stub fallback will be in effect
+ add_subdirectory(${LLPHYSICSEXTENSIONS_STUB_DIR} llphysicsextensionsstub)
+ endif()
# Another hack that works with newer cmake versions:
cmake_policy( SET CMP0079 NEW)
@@ -2087,8 +2092,13 @@ elseif (DARWIN)
set_target_properties(${VIEWER_BINARY_NAME}
PROPERTIES
RESOURCE SecondLife.xib
- #LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Xlinker -dead_strip -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP"
LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Xlinker -dead_strip"
+ # arch specific flags for universal builds: https://stackoverflow.com/a/77942065
+ XCODE_ATTRIBUTE_OTHER_CFLAGS[arch=x86_64] "$(inherited) -DLLPHYSICSEXTENSIONS_USE_FULL"
+ XCODE_ATTRIBUTE_OTHER_CFLAGS[arch=arm64] "$(inherited) -DLLPHYSICSEXTENSIONS_USE_STUB"
+ # only generate the .MAP file for llphysicsextensions_tpv on x86_64
+ XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=x86_64] "$(inherited) -L${CMAKE_CURRENT_BINARY_DIR}/llphysicsextensions/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensions -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP"
+ XCODE_ATTRIBUTE_OTHER_LDFLAGS[arch=arm64] "$(inherited) -L${CMAKE_CURRENT_BINARY_DIR}/llphysicsextensionsstub/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_CFG_INTDIR}>/ -lllphysicsextensionsstub"
)
else (WINDOWS)
# Linux
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 3695478061..801ff3c212 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -912,7 +912,23 @@ class LLFileUploadModel : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- LLFloaterModelPreview::showModelPreview();
+ if (LLConvexDecomposition::isFunctional())
+ {
+ LLFloaterModelPreview::showModelPreview();
+ }
+ else
+ {
+ if (gGLManager.mIsApple)
+ {
+ LLNotificationsUtil::add("ModelUploaderMissingPhysicsApple");
+ }
+ else
+ {
+ // TPV?
+ LLNotificationsUtil::add("ModelUploaderMissingPhysics");
+ LLFloaterModelPreview::showModelPreview();
+ }
+ }
return true;
}
};
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index f188ede456..be40ca2f1f 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -2239,6 +2239,25 @@ Couldn&apos;t open uploaded sound file for reading:
<notification
icon="alertmodal.tga"
+ name="ModelUploaderMissingPhysicsApple"
+ type="alertmodal">
+Model upload is not yet available on Apple Silicon, but will be supported in an upcoming release.
+
+Workaround: Right-click the Second Life app in Finder, select
+"Get Info", then check "Open using Rosetta"
+ <tag>fail</tag>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="ModelUploaderMissingPhysics"
+ type="alertmodal">
+Physics library is not present, some of the model uploader's functionality might not work or might not work correctly.
+ <tag>fail</tag>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
name="SoundFileNotRIFF"
type="alertmodal">
File does not appear to be a RIFF WAVE file: