diff --git a/.hgignore b/.hgignore index b180d9200349eb5cb3f63baa0126d399860bf30a..06d31e2f88e50432ec36364a94c6cf66081e7b6b 100644 --- a/.hgignore +++ b/.hgignore @@ -50,6 +50,11 @@ indra/web/doc/asset-upload/plugins/verify-texture installed.xml libraries tarfile_tmp +debian/secondlife-viewer* +debian/secondlife-appearance-utility* +debian/files +build-stamp +configure-stamp ^indra/lib/python/mulib.* ^web/locale.* ^web/secondlife.com.* diff --git a/debian/changelog b/debian/changelog index ce54b54c6f107de19d88453456b9a243b6559ed4..b3df2fcab397b36352407dc33bf5439ad8c57e3d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +secondlife-viewer (0.4) unstable; urgency=low + + * Adding appearance utility package + + -- Don Kjer <don@lindenlab.com> Thu, 06 Sep 2012 19:32:55 +0000 + secondlife-viewer (0.3) unstable; urgency=low * Initial debian configuration diff --git a/debian/control b/debian/control index 50b9ed9a264abf7dbf48dc789484056635f36753..9ebd71df656d389482f1fc62e8dca174612b09d2 100644 --- a/debian/control +++ b/debian/control @@ -14,3 +14,11 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, Description: Second Life Viewer Second Life is an online virtual world developed by Linden Lab. +Package: secondlife-appearance-utility +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, + ia32-libs, + ia32-libs-gtk +Description: Second Life Appearance Utility + Utility for manipulating Second Life avatar appearance. + diff --git a/debian/rules b/debian/rules index c41f02d4fbd8a7c939766102ae96f8425ca4c5c6..10301bf7d3233ae72d9687be42b02d3188323e33 100755 --- a/debian/rules +++ b/debian/rules @@ -9,11 +9,19 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -SRCDIR=build-linux-i686/newview/packaged -DESTDIR=$(CURDIR)/debian/secondlife-viewer -BASEDIR=opt/linden/viewer +BASEDIR=opt/linden + +VIEWER_PKG=secondlife-viewer +VIEWER_PACKAGEDIR=build-linux-i686/newview/packaged +VIEWER_DESTDIR=$(CURDIR)/debian/$(VIEWER_PKG) VIEWER_VERSION:=$(shell dpkg-parsechangelog | grep ^Version | sed 's/^Version: //') -INSTALLDIR:=$(BASEDIR)/SecondLife-i686-$(VIEWER_VERSION) +VIEWER_INSTALLDIR:=$(BASEDIR)/viewer/SecondLife-i686-$(VIEWER_VERSION) + +UTILITY_PKG=secondlife-appearance-utility +UTILITY_SRCDIR=indra/appearance_utility +UTILITY_PACKAGEDIR=build-linux-i686/appearance_utility +UTILITY_DESTDIR=$(CURDIR)/debian/$(UTILITY_PKG) +UTILITY_INSTALLDIR:=$(BASEDIR)/utilities configure: configure-stamp configure-stamp: @@ -50,24 +58,61 @@ install: build dh_installdirs # Add here commands to install the package into debian/secondlife-viewer. - for file in $$(find $(SRCDIR) -type f -o -type l | sed 's~$(SRCDIR)/~~'); do \ + for file in $$(find $(VIEWER_PACKAGEDIR) -type f -o -type l | sed 's~$(VIEWER_PACKAGEDIR)/~~'); do \ + # create containing directory \ + install -v -m 755 -o root -g root -d "$$(dirname "$(VIEWER_DESTDIR)/$(VIEWER_INSTALLDIR)/$$file")"; \ + PERM=644; \ + if [ -x "$(VIEWER_PACKAGEDIR)/$$file" ]; then \ + PERM=755; \ + fi; \ + if [ -L "$(VIEWER_PACKAGEDIR)/$$file" ]; then \ + REAL="$$( readlink -f $(VIEWER_PACKAGEDIR)/$$file )"; \ + RELATIVE="$$( echo $$REAL | sed 's~$(CURDIR)/$(VIEWER_PACKAGEDIR)/~~' )"; \ + echo dh_link -p $(VIEWER_PKG) "$(VIEWER_INSTALLDIR)/$$RELATIVE" "$(VIEWER_INSTALLDIR)/$$file" ; \ + dh_link -p $(VIEWER_PKG) "$(VIEWER_INSTALLDIR)/$$RELATIVE" "$(VIEWER_INSTALLDIR)/$$file" ; \ + else \ + install -v -m $$PERM -o root -g root "$(VIEWER_PACKAGEDIR)/$$file" "$(VIEWER_DESTDIR)/$(VIEWER_INSTALLDIR)/$$file"; \ + fi; \ + done + dh_link -p $(VIEWER_PKG) /$(VIEWER_INSTALLDIR)/secondlife /usr/bin/secondlife + dh_link -p $(VIEWER_PKG) $(BASEDIR)/viewer/SecondLife-i686-$(VIEWER_VERSION) $(BASEDIR)/viewer/SecondLife + + # Add here commands to install the package into debian/secondlife-appearance-utility + # create containing directory + install -v -m 755 -o root -g root -d "$(UTILITY_DESTDIR)/$(UTILITY_INSTALLDIR)" + # install utility wrapper + install -v -m 755 -o root -g root "$(UTILITY_SRCDIR)/wrapper.sh" "$(UTILITY_DESTDIR)/$(UTILITY_INSTALLDIR)/wrapper.sh" + # install appearance-utility + install -v -m 755 -o root -g root "$(UTILITY_PACKAGEDIR)/appearance-utility-bin" "$(UTILITY_DESTDIR)/$(UTILITY_INSTALLDIR)/appearance-utility-bin" + dh_link -p $(UTILITY_PKG) $(UTILITY_INSTALLDIR)/wrapper.sh $(UTILITY_INSTALLDIR)/appearance-utility + # install xml/image resources from viewer package + for file in $$(find $(VIEWER_PACKAGEDIR)/character -name "avatar_*.xml" -o -name "*.tga" | sed 's~$(VIEWER_PACKAGEDIR)/~~'); do \ + # create containing directory \ + install -v -m 755 -o root -g root -d "$$(dirname "$(UTILITY_DESTDIR)/$(UTILITY_INSTALLDIR)/$$file")"; \ + PERM=644; \ + if [ -x "$(VIEWER_PACKAGEDIR)/$$file" ]; then \ + PERM=755; \ + fi; \ + install -v -m $$PERM -o root -g root "$(VIEWER_PACKAGEDIR)/$$file" "$(UTILITY_DESTDIR)/$(UTILITY_INSTALLDIR)/$$file"; \ + done + # install viewer libraries + for file in $$(find $(VIEWER_PACKAGEDIR)/lib -type f -o -type l | sed 's~$(VIEWER_PACKAGEDIR)/~~'); do \ # create containing directory \ - install -v -m 755 -o root -g root -d "$$(dirname "$(DESTDIR)/$(INSTALLDIR)/$$file")"; \ + install -v -m 755 -o root -g root -d "$$(dirname "$(UTILITY_DESTDIR)/$(UTILITY_INSTALLDIR)/$$file")"; \ PERM=644; \ - if [ -x "$(SRCDIR)/$$file" ]; then \ + if [ -x "$(VIEWER_PACKAGEDIR)/$$file" ]; then \ PERM=755; \ fi; \ - if [ -L "$(SRCDIR)/$$file" ]; then \ - REAL="$$( readlink -f $(SRCDIR)/$$file )"; \ - RELATIVE="$$( echo $$REAL | sed 's~$(CURDIR)/$(SRCDIR)/~~' )"; \ - echo dh_link "$(INSTALLDIR)/$$RELATIVE" "$(INSTALLDIR)/$$file" ; \ - dh_link "$(INSTALLDIR)/$$RELATIVE" "$(INSTALLDIR)/$$file" ; \ + if [ -L "$(VIEWER_PACKAGEDIR)/$$file" ]; then \ + REAL="$$( readlink -f $(VIEWER_PACKAGEDIR)/$$file )"; \ + RELATIVE="$$( echo $$REAL | sed 's~$(CURDIR)/$(VIEWER_PACKAGEDIR)/~~' )"; \ + echo dh_link -p $(UTILITY_PKG) "$(UTILITY_INSTALLDIR)/$$RELATIVE" "$(UTILITY_INSTALLDIR)/$$file" ; \ + dh_link -p $(UTILITY_PKG) "$(UTILITY_INSTALLDIR)/$$RELATIVE" "$(UTILITY_INSTALLDIR)/$$file" ; \ else \ - install -v -m $$PERM -o root -g root "$(SRCDIR)/$$file" "$(DESTDIR)/$(INSTALLDIR)/$$file"; \ + install -v -m $$PERM -o root -g root "$(VIEWER_PACKAGEDIR)/$$file" "$(UTILITY_DESTDIR)/$(UTILITY_INSTALLDIR)/$$file"; \ fi; \ done - dh_link /$(INSTALLDIR)/secondlife /usr/bin/secondlife - dh_link $(BASEDIR)/SecondLife-i686-$(VIEWER_VERSION) $(BASEDIR)/SecondLife + dh_link -p $(UTILITY_PKG) /$(UTILITY_INSTALLDIR)/appearance-utility /usr/bin/appearance-utility # Build architecture-independent files here. diff --git a/debian/secondlife-appearance-utility.substvars b/debian/secondlife-appearance-utility.substvars new file mode 100644 index 0000000000000000000000000000000000000000..abd3ebebc30de133ecc51d80b32908bd4a077b9a --- /dev/null +++ b/debian/secondlife-appearance-utility.substvars @@ -0,0 +1 @@ +misc:Depends= diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 078b17bf53ffd74fc97bed475aa465260f962213..4e209ff75af5208c1935bd5901ee708fd26036e6 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 0000000000000000000000000000000000000000..c38f811b44ad6947cc2993887dce07a2f6d1d339 --- /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 0000000000000000000000000000000000000000..62b1cfd23750431df9e240d00999d44405dc76c5 --- /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 0000000000000000000000000000000000000000..87d2179a1376f41638d78a2cfa7112b4c0ab3b71 --- /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 $?