summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2012-09-06 22:08:33 +0000
committerDon Kjer <don@lindenlab.com>2012-09-06 22:08:33 +0000
commit3990180c5951e68a1ecabc538be1560e0eeffaec (patch)
tree0e2205335d15e4ccc0fc6eda4ed9b5ff22768093 /indra
parent2e933100bb6bf27c0307dc6831142dcc0860fb7b (diff)
Adding appearance utility package
Diffstat (limited to 'indra')
-rw-r--r--indra/CMakeLists.txt1
-rw-r--r--indra/appearance_utility/CMakeLists.txt54
-rw-r--r--indra/appearance_utility/appearance_utility.cpp37
-rwxr-xr-xindra/appearance_utility/wrapper.sh25
4 files changed, 117 insertions, 0 deletions
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index 078b17bf53..4e209ff75a 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -83,6 +83,7 @@ if (VIEWER)
if (LINUX)
add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
add_subdirectory(${VIEWER_PREFIX}linux_updater)
+ add_subdirectory(${VIEWER_PREFIX}appearance_utility)
add_dependencies(viewer linux-crash-logger-strip-target linux-updater)
elseif (DARWIN)
add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
diff --git a/indra/appearance_utility/CMakeLists.txt b/indra/appearance_utility/CMakeLists.txt
new file mode 100644
index 0000000000..c38f811b44
--- /dev/null
+++ b/indra/appearance_utility/CMakeLists.txt
@@ -0,0 +1,54 @@
+# -*- cmake -*-
+
+project(appearance_utility)
+
+include(00-Common)
+include(CURL)
+include(CARes)
+include(OpenSSL)
+include(UI)
+include(LLAppearance)
+include(LLCommon)
+include(LLVFS)
+include(LLXML)
+include(LLUI)
+include(Linking)
+
+include_directories(
+ ${LLCOMMON_INCLUDE_DIRS}
+ ${LLVFS_INCLUDE_DIRS}
+ ${LLXML_INCLUDE_DIRS}
+ ${LLUI_INCLUDE_DIRS}
+ ${CURL_INCLUDE_DIRS}
+ ${CARES_INCLUDE_DIRS}
+ ${OPENSSL_INCLUDE_DIRS}
+ ${UI_INCLUDE_DIRS}
+ ${LLAPPEARANCE_INCLUDE_DIRS}
+ )
+
+set(appearance_utility_SOURCE_FILES appearance_utility.cpp)
+
+set(appearance_utility_HEADER_FILES CMakeLists.txt)
+
+set_source_files_properties(${appearance_utility_HEADER_FILES}
+ PROPERTIES HEADER_FILES_ONLY TRUE)
+
+list(APPEND appearance_utility_SOURCE_FILES ${appearance_utility_HEADER_FILES})
+
+add_executable(appearance-utility-bin ${appearance_utility_SOURCE_FILES})
+
+target_link_libraries(appearance-utility-bin
+ ${CURL_LIBRARIES}
+ ${CARES_LIBRARIES}
+ ${OPENSSL_LIBRARIES}
+ ${CRYPTO_LIBRARIES}
+ ${UI_LIBRARIES}
+ ${LLAPPEARANCE_LIBRARIES}
+ ${LLXML_LIBRARIES}
+ ${LLUI_LIBRARIES}
+ ${LLVFS_LIBRARIES}
+ ${LLCOMMON_LIBRARIES}
+ )
+
+add_custom_target(appearance-utility-bin-target ALL
+ DEPENDS appearance-utility-bin)
diff --git a/indra/appearance_utility/appearance_utility.cpp b/indra/appearance_utility/appearance_utility.cpp
new file mode 100644
index 0000000000..62b1cfd237
--- /dev/null
+++ b/indra/appearance_utility/appearance_utility.cpp
@@ -0,0 +1,37 @@
+/**
+ * @file appearance_utility.cpp
+ * @author Don Kjer <don@lindenlab.com>, Nyx Linden
+ * @brief Utility for processing avatar appearance without a full viewer implementation.
+ *
+ * $LicenseInfo:firstyear=2012&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2012, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+#include "llerrorcontrol.h"
+
+int main(int argc, char** argv)
+{
+ printf("Test app\n");
+ return 0;
+}
+
+
diff --git a/indra/appearance_utility/wrapper.sh b/indra/appearance_utility/wrapper.sh
new file mode 100755
index 0000000000..87d2179a13
--- /dev/null
+++ b/indra/appearance_utility/wrapper.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Simple wrapper for secondlife utilities.
+
+## - Avoids an often-buggy X feature that doesn't really benefit us anyway.
+export SDL_VIDEO_X11_DGAMOUSE=0
+
+## - Works around a problem with misconfigured 64-bit systems not finding GL
+export LIBGL_DRIVERS_PATH="${LIBGL_DRIVERS_PATH}":/usr/lib64/dri:/usr/lib32/dri:/usr/lib/dri
+
+## - The 'scim' GTK IM module widely crashes the viewer. Avoid it.
+if [ "$GTK_IM_MODULE" = "scim" ]; then
+ export GTK_IM_MODULE=xim
+fi
+
+EXECUTABLE="$(basename "$0")-bin"
+SCRIPTSRC="$(readlink -f "$0" || echo "$0")"
+RUN_PATH="$(dirname "${SCRIPTSRC}" || echo .)"
+cd "${RUN_PATH}"
+
+export LD_LIBRARY_PATH="$PWD/lib:${LD_LIBRARY_PATH}"
+
+# Run the program.
+"./$EXECUTABLE" "$@"
+exit $?