From 197f915816579a14e102075cf25a26127dfc1d32 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Thu, 23 Sep 2010 20:30:12 +0200 Subject: linux* kill imprudence gstreamer, use system gstreamer instead. who ever builds a release with that needs to consider to install some really old gstreamer at /usr/local/lib - lenny has 0.10.19 --- linden/indra/cmake/GStreamer.cmake | 114 -- linden/indra/cmake/GStreamer010Plugin.cmake | 20 +- linden/indra/llmedia/llmediaimplgstreamer.cpp | 928 --------------- .../gstreamer010/media_plugin_gstreamer010.cpp~ | 1219 -------------------- linden/indra/newview/linux_tools/getvoice.sh | 5 +- linden/indra/newview/linux_tools/wrapper.sh | 8 +- linden/indra/newview/viewer_manifest.py | 248 ++-- linden/indra/newview/viewer_manifest.py~ | 1176 ------------------- linden/install.xml | 14 - 9 files changed, 143 insertions(+), 3589 deletions(-) delete mode 100644 linden/indra/cmake/GStreamer.cmake delete mode 100644 linden/indra/llmedia/llmediaimplgstreamer.cpp delete mode 100755 linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp~ delete mode 100755 linden/indra/newview/viewer_manifest.py~ (limited to 'linden') diff --git a/linden/indra/cmake/GStreamer.cmake b/linden/indra/cmake/GStreamer.cmake deleted file mode 100644 index f5f9c03..0000000 --- a/linden/indra/cmake/GStreamer.cmake +++ /dev/null @@ -1,114 +0,0 @@ -# -*- cmake -*- -include(Prebuilt) - - # Maybe libxml and glib should have their own .cmake files - use_prebuilt_binary(libxml) - use_prebuilt_binary(glib) - - set(GSTREAMER_FOUND ON FORCE BOOL) - set(GSTREAMER_PLUGINS_BASE_FOUND ON FORCE BOOL) - - use_prebuilt_binary(gstreamer) - use_prebuilt_binary(gstreamer-plugins) - -if (WINDOWS) - - use_prebuilt_binary(iconv) - set(GSTREAMER_FOUND ON FORCE BOOL) - set(GSTREAMER_INCLUDE_DIRS - ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib - ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gio - ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gobject - ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/libxml2 - ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/iconv - ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gst - ) - - set(GSTREAMER_LIBRARIES - glib-2.0 - gio-2.0 - gmodule-2.0 - gobject-2.0 - gthread-2.0 - libgstvideo.lib - libgsttag.lib - libgstsdp.lib - libgstrtsp.lib - libgstrtp.lib - libgstriff.lib - libgstreamer-0.10.lib - libgstpbutils.lib - libgstnetbuffer.lib - libgstnet-0.10.lib - libgstinterfaces.lib - libgstdshow.lib - libgstdataprotocol-0.10.lib - libgstcontroller-0.10.lib - libgstbase-0.10.lib - libgstaudio.lib - libgstapp.lib - libxml2 - libxml2_a - libxml2_a_dll - iconv - iconv_a - ) - -else (WINDOWS) - - set(GSTREAMER_INCLUDE_DIRS - ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/gstreamer-0.10 - ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0 - ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0/glib - ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0/gobject - ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/libxml2 - ) - - if (DARWIN) # Mac - - use_prebuilt_binary(flac) - use_prebuilt_binary(liboil) - use_prebuilt_binary(neon) - use_prebuilt_binary(theora) - - set(GSTREAMER_LIBRARIES - gstvideo-0.10 - gstaudio-0.10 - gstbase-0.10 - gstreamer-0.10 - gobject-2.0 - gmodule-2.0 - gthread-2.0 - glib-2.0 - xml2.2 - ) - - else (DARWIN) # Linux - - use_prebuilt_binary(liboil) - use_prebuilt_binary(theora) - - set(GSTREAMER_LIBRARIES - gstvideo-0.10 - gstaudio-0.10 - gstbase-0.10 - gstreamer-0.10 - gobject-2.0 - gmodule-2.0 - dl - gthread-2.0 - rt - glib-2.0 - ) - - endif (DARWIN) - -endif (WINDOWS) - -if (GSTREAMER_FOUND AND GSTREAMER_PLUGINS_BASE_FOUND) - set(GSTREAMER ON CACHE BOOL "Build with GStreamer streaming media support.") -endif (GSTREAMER_FOUND AND GSTREAMER_PLUGINS_BASE_FOUND) - -if (GSTREAMER) - add_definitions(-DLL_GSTREAMER_ENABLED=1) -endif (GSTREAMER) diff --git a/linden/indra/cmake/GStreamer010Plugin.cmake b/linden/indra/cmake/GStreamer010Plugin.cmake index 0d33483..78ffd94 100644 --- a/linden/indra/cmake/GStreamer010Plugin.cmake +++ b/linden/indra/cmake/GStreamer010Plugin.cmake @@ -19,14 +19,18 @@ elseif (LINUX) ) # We don't need to explicitly link against gstreamer itself, because # LLMediaImplGStreamer probes for the system's copy at runtime. - set(GSTREAMER010_LIBRARIES - gobject-2.0 - gmodule-2.0 - dl - gthread-2.0 - rt - glib-2.0 - ) + set(GSTREAMER010_LIBRARIES + gstvideo-0.10 + gstaudio-0.10 + gstbase-0.10 + gstreamer-0.10 + gobject-2.0 + gmodule-2.0 + dl + gthread-2.0 + rt + glib-2.0 + ) endif (STANDALONE) if (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND) diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp deleted file mode 100644 index 7af9c9a..0000000 --- a/linden/indra/llmedia/llmediaimplgstreamer.cpp +++ /dev/null @@ -1,928 +0,0 @@ -/** - * @file llmediaimplgstreamer.cpp - * @author Tofu Linden - * @brief implementation that supports various media through GStreamer. - * - * $LicenseInfo:firstyear=2007&license=viewergpl$ - * - * Copyright (c) 2007-2009, Linden Research, Inc. - * - * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - */ - -///#if LL_GSTREAMER_ENABLED - -#if LL_WINDOWS - // GStreamer 0.10.22 - gstutils.h - conversion from 'guint64' to 'guint8'. - // This was an intentional change to make GStreamer more threadsafe, and - // is okay. Delete this bit if GStreamer ever gets more VS-friendly -- McCabe - #pragma warning(disable : 4244) -#endif - -#include "linden_common.h" -#include "llmediaimplgstreamer.h" - -extern "C" { -#include -#include -} - -#if LL_WINDOWS - #pragma warning(default : 4244) -#include -#include -#endif - -#include "llmediamanager.h" -#include "llmediaimplregister.h" - -#include "llmediaimplgstreamervidplug.h" -#include "llgstplaythread.h" - - -#if LL_DARWIN -#include // For CF functions used in set_gst_plugin_path -#endif - -// register this impl with media manager factory -static LLMediaImplRegister sLLMediaImplGStreamerReg( "LLMediaImplGStreamer", new LLMediaImplGStreamerMaker() ); - -LLMediaImplGStreamerMaker::LLMediaImplGStreamerMaker() -{ - // Register to handle the scheme - mSchema.push_back( "rtsp" ); - mSchema.push_back( "rtmp" ); - - // Register to handle the category - mMimeTypeCategories.push_back( "video" ); - mMimeTypeCategories.push_back( "audio" ); -} - -/////////////////////////////////////////////////////////////////////////////// -// -LLMediaImplGStreamer:: -LLMediaImplGStreamer () : - mediaData ( NULL ), - mMediaRowbytes ( 1 ), - mTextureFormatPrimary ( LL_MEDIA_BGRA ), - mTextureFormatType ( LL_MEDIA_UNSIGNED_INT_8_8_8_8_REV ), - mPump ( NULL ), - mPlaybin ( NULL ), - mVideoSink ( NULL ), - mLastTitle ( "" ), - mState( GST_STATE_NULL ), - mPlayThread ( NULL ) -{ - startup( NULL ); // Startup gstreamer if it hasn't been already. - - LL_DEBUGS("MediaManager") << "constructing media..." << LL_ENDL; - mVolume = -1.0; // XXX Hack to make the vould change happend first time - - setMediaDepth(4); - - // Create a pumpable main-loop for this media - mPump = g_main_loop_new (NULL, FALSE); - if (!mPump) - { - return; // error - } - - // instantiate a playbin element to do the hard work - mPlaybin = gst_element_factory_make ("playbin", "play"); - if (!mPlaybin) - { - // todo: cleanup pump - return; // error - } - - if (NULL == getenv("LL_GSTREAMER_EXTERNAL")) - { - // instantiate and connect a custom video sink - LL_DEBUGS("MediaManager") << "extrenal video sink..." << LL_ENDL; - - // Plays inworld instead of in external player - mVideoSink = - GST_SLVIDEO(gst_element_factory_make ("private-slvideo", "slvideo")); - if (!mVideoSink) - { - LL_WARNS("MediaImpl") << "Could not instantiate private-slvideo element." << LL_ENDL; - // todo: cleanup. - return; // error - } - - g_object_set(mPlaybin, "video-sink", mVideoSink, (void*)NULL); - } -} - -// virtual -int LLMediaImplGStreamer::getTextureFormatPrimary() const -{ - return mTextureFormatPrimary; -} - -// virtual -int LLMediaImplGStreamer::getTextureFormatType() const -{ - return mTextureFormatType; -} - -// virtual -int LLMediaImplGStreamer::getTextureFormatInternal() const -{ - return LL_MEDIA_RGB8; -} - -/////////////////////////////////////////////////////////////////////////////// -// -LLMediaImplGStreamer:: -~LLMediaImplGStreamer () -{ - LL_DEBUGS("MediaImpl") << ("dtor of media...") << LL_ENDL; - unload(); -} - -//////////////////////////////////////////////////////////////////////////////// -// virtual -std::string LLMediaImplGStreamer::getVersion() -{ - guint major, minor, micro, nano; - gst_version(&major, &minor, µ, &nano); - std::string version = llformat("%d.%d.%d.%d",major,minor,micro,nano); - return version; -} - -// -// STARTUP -/////////////////////////////////////////////////////////////////////////////// -// (static) super-initialization - called once at application startup -bool LLMediaImplGStreamer::startup (LLMediaManagerData* init_data) -{ - static bool done_init = false; - if (!done_init) - { - // Init the glib type system - we need it. - g_type_init(); - - set_gst_plugin_path(); - - // Protect against GStreamer resetting the locale, yuck. - static std::string saved_locale; - saved_locale = setlocale(LC_ALL, NULL); - if (0 == gst_init_check(NULL, NULL, NULL)) - { - LL_WARNS("MediaImpl") << "GStreamer library failed to initialize and load standard plugins." << LL_ENDL; - setlocale(LC_ALL, saved_locale.c_str() ); - return false; - } - setlocale(LC_ALL, saved_locale.c_str() ); - - // Set up logging facilities - gst_debug_remove_log_function( gst_debug_log_default ); - gst_debug_add_log_function( gstreamer_log, NULL ); - - // Init our custom plugins - only really need do this once. - gst_slvideo_init_class(); - - - // List the plugins GStreamer can find - LL_DEBUGS("MediaImpl") << "Found GStreamer plugins:" << LL_ENDL; - GList *list; - GstRegistry *registry = gst_registry_get_default(); - std::string loaded = ""; - for (list = gst_registry_get_plugin_list(registry); - list != NULL; - list = g_list_next(list)) - { - GstPlugin *list_plugin = (GstPlugin *)list->data; - (bool)gst_plugin_is_loaded(list_plugin) ? loaded = "Yes" : loaded = "No"; - LL_DEBUGS("MediaImpl") << gst_plugin_get_name(list_plugin) << ", loaded? " << loaded << LL_ENDL; - } - gst_plugin_list_free(list); - - - done_init = true; - } - return true; -} - - -void LLMediaImplGStreamer::set_gst_plugin_path() -{ - // Linux sets GST_PLUGIN_PATH in wrapper.sh, not here. -#if LL_WINDOWS || LL_DARWIN - - std::string imp_dir = ""; - - // Get the current working directory: -#if LL_WINDOWS - char* raw_dir; - raw_dir = _getcwd(NULL,0); - if( raw_dir != NULL ) - { - imp_dir = std::string( raw_dir ); - } -#elif LL_DARWIN - CFBundleRef main_bundle = CFBundleGetMainBundle(); - if( main_bundle != NULL ) - { - CFURLRef bundle_url = CFBundleCopyBundleURL( main_bundle ); - if( bundle_url != NULL ) - { - #ifndef MAXPATHLEN - #define MAXPATHLEN 1024 - #endif - char raw_dir[MAXPATHLEN]; - if( CFURLGetFileSystemRepresentation( bundle_url, true, (UInt8 *)raw_dir, MAXPATHLEN) ) - { - imp_dir = std::string( raw_dir ) + "/Contents/MacOS/"; - } - CFRelease(bundle_url); - } - } -#endif - - if( imp_dir == "" ) - { - LL_WARNS("MediaImpl") << "Could not get application directory, not setting GST_PLUGIN_PATH." - << LL_ENDL; - return; - } - - LL_DEBUGS("MediaImpl") << "Imprudence is installed at " - << imp_dir << LL_ENDL; - - // ":" on Mac and 'Nix, ";" on Windows - std::string separator = G_SEARCHPATH_SEPARATOR_S; - - // Grab the current path, if it's set. - std::string old_plugin_path = ""; - char *old_path = getenv("GST_PLUGIN_PATH"); - if(old_path == NULL) - { - LL_DEBUGS("MediaImpl") << "Did not find user-set GST_PLUGIN_PATH." - << LL_ENDL; - } - else - { - old_plugin_path = separator + std::string( old_path ); - } - - - // Search both Imprudence and Imprudence\lib\gstreamer-plugins. - // But we also want to search the path the user has set, if any. - std::string plugin_path = -#if LL_WINDOWS - imp_dir + "\\lib\\gstreamer-plugins" + -#elif LL_DARWIN - imp_dir + separator + - imp_dir + "/../Resources/lib/gstreamer-plugins" + -#endif - old_plugin_path; - - int put_result; - - // Place GST_PLUGIN_PATH in the environment settings -#if LL_WINDOWS - put_result = _putenv_s( "GST_PLUGIN_PATH", (char*)plugin_path.c_str() ); -#elif LL_DARWIN - put_result = setenv( "GST_PLUGIN_PATH", (char*)plugin_path.c_str(), 1 ); -#endif - - if( put_result == -1 ) - { - LL_WARNS("MediaImpl") << "Setting GST_PLUGIN_PATH failed!" << LL_ENDL; - } - else - { - LL_DEBUGS("MediaImpl") << "GST_PLUGIN_PATH set to " - << getenv("GST_PLUGIN_PATH") << LL_ENDL; - } - - // Don't load system plugins. We only want to use ours, to avoid conflicts. -#if LL_WINDOWS - put_result = _putenv_s( "GST_PLUGIN_SYSTEM_PATH", "" ); -#elif LL_DARWIN - put_result = setenv( "GST_PLUGIN_SYSTEM_PATH", "", 1 ); -#endif - - if( put_result == -1 ) - { - LL_WARNS("MediaImpl") << "Setting GST_PLUGIN_SYSTEM_PATH=\"\" failed!" - << LL_ENDL; - } - -#endif // LL_WINDOWS || LL_DARWIN -} - - -void LLMediaImplGStreamer::gstreamer_log(GstDebugCategory *category, - GstDebugLevel level, - const gchar *file, - const gchar *function, - gint line, - GObject *object, - GstDebugMessage *message, - gpointer data) -{ - std::stringstream log(std::stringstream::out); - - // Log format example: - // - // GST_ELEMENT_PADS: removing pad 'sink' (in gstelement.c:757:gst_element_remove_pad) - // - log << gst_debug_category_get_name( category ) << ": " - << gst_debug_message_get(message) << " " - << "(in " << file << ":" << line << ":" << function << ")"; - - switch( level ) - { - case GST_LEVEL_ERROR: - LL_WARNS("MediaImpl") << "(ERROR) " << log.str() << LL_ENDL; - break; - case GST_LEVEL_WARNING: - LL_WARNS("MediaImpl") << log.str() << LL_ENDL; - break; - case GST_LEVEL_DEBUG: - LL_DEBUGS("MediaImpl") << log.str() << LL_ENDL; - break; - case GST_LEVEL_INFO: - LL_INFOS("MediaImpl") << log.str() << LL_ENDL; - break; - default: - // Do nothing. - break; - } -} - - -bool LLMediaImplGStreamer::closedown() -{ - return true; -} - - -bool LLMediaImplGStreamer::setDebugLevel( LLMediaBase::EDebugLevel level ) -{ - // Do parent class stuff. - LLMediaImplCommon::setDebugLevel(level); - - // Set GStreamer verbosity. - gst_debug_set_default_threshold( (GstDebugLevel)level ); - - return true; -} - - -/////////////////////////////////////////////////////////////////////////////// -// -// Uncomment the line below to enable spammy debug data. -//#define LL_GST_REPORT_STATE_CHANGES -#ifdef LL_GST_REPORT_STATE_CHANGES -static const char* get_gst_state_name(GstState state) -{ - switch (state) - { - case GST_STATE_VOID_PENDING: return "VOID_PENDING"; - case GST_STATE_NULL: return "NULL"; - case GST_STATE_READY: return "READY"; - case GST_STATE_PAUSED: return "PAUSED"; - case GST_STATE_PLAYING: return "PLAYING"; - } - return "(unknown)"; -} -#endif // LL_GST_REPORT_STATE_CHANGES - -//static -gboolean LLMediaImplGStreamer::bus_callback(GstBus *bus, GstMessage *message, gpointer data) -{ -#ifdef LL_GST_REPORT_STATE_CHANGES - LL_DEBUGS("MediaCallback") << "Got GST message type: " << GST_MESSAGE_TYPE_NAME (message) << LL_ENDL; -#endif - - LLMediaImplGStreamer *impl = (LLMediaImplGStreamer*)data; - - switch (GST_MESSAGE_TYPE (message)) - { - case GST_MESSAGE_BUFFERING: - { - gint percent = 0; - gst_message_parse_buffering(message, &percent); -#ifdef LL_GST_REPORT_STATE_CHANGES - LL_DEBUGS("MediaBuffering") << "GST buffering: " << percent << "%%" << LL_ENDL; -#endif - LLMediaEvent event( impl, percent ); - impl->getEventEmitter().update( &LLMediaObserver::onUpdateProgress, event ); - } - break; - case GST_MESSAGE_STATE_CHANGED: - { - GstState old_state; - GstState new_state; - GstState pending_state; - gst_message_parse_state_changed(message, - &old_state, - &new_state, - &pending_state); -#ifdef LL_GST_REPORT_STATE_CHANGES - // not generally very useful, and rather spammy. - LL_DEBUGS("MediaState") << "GST state change (old,,pending): "<< get_gst_state_name(old_state) << ",<" << get_gst_state_name(new_state) << ">," << get_gst_state_name(pending_state) << LL_ENDL; -#endif // LL_GST_REPORT_STATE_CHANGES - - switch (new_state) - { - case GST_STATE_VOID_PENDING: - break; - case GST_STATE_NULL: -#ifdef LL_GST_REPORT_STATE_CHANGES - LL_DEBUGS("MediaImpl") << "State changed to NULL" << LL_ENDL; -#endif - if (impl->getState() == GST_STATE_PLAYING) - { - // Stream was probably dropped, trying to restart - impl->play(); -#ifdef LL_GST_REPORT_STATE_CHANGES - LL_DEBUGS("MediaImpl") << "Trying to restart." << LL_ENDL; -#endif - } - break; - case GST_STATE_READY: - break; - case GST_STATE_PAUSED: - break; - case GST_STATE_PLAYING: - //impl->mLastTitle = ""; - - LLMediaEvent event( impl, 100 ); - impl->getEventEmitter().update( &LLMediaObserver::onUpdateProgress, event ); - // emit an event to say that a media source was loaded - LLMediaEvent event2( impl ); - impl->getEventEmitter().update( &LLMediaObserver::onMediaLoaded, event2 ); - break; - } - break; - } - case GST_MESSAGE_ERROR: - { - GError *err = NULL; - gchar *debug = NULL; - - gst_message_parse_error (message, &err, &debug); - LL_WARNS("MediaImpl") << "GST Error: " << err->message << LL_ENDL; - g_error_free (err); - g_free (debug); - - impl->addCommand(LLMediaBase::COMMAND_STOP); - //impl->addCommand(LLMediaBase::COMMAND_START); - - break; - } - case GST_MESSAGE_INFO: - { - GError *err = NULL; - gchar *debug = NULL; - - gst_message_parse_info (message, &err, &debug); - LL_INFOS("MediaImpl") << "GST info: " << err->message - << LL_ENDL; - g_error_free (err); - g_free (debug); - break; - } - case GST_MESSAGE_WARNING: - { - GError *err = NULL; - gchar *debug = NULL; - - gst_message_parse_warning (message, &err, &debug); - LL_WARNS("MediaImpl") << "GST warning: " << err->message - << LL_ENDL; - g_error_free (err); - g_free (debug); - - break; - } - case GST_MESSAGE_TAG: - { - GstTagList *new_tags; - - gst_message_parse_tag( message, &new_tags ); - - gchar *title; - - if ( gst_tag_list_get_string(new_tags, GST_TAG_TITLE, &title) ) - { - LL_INFOS("MediaInfo") << "Title: " << title << LL_ENDL; - std::string newtitle(title); - gst_tag_list_free(new_tags); - - if ( newtitle != impl->mLastTitle && newtitle != "" ) - { - impl->mLastTitle = newtitle; - LLMediaEvent event( impl, impl->mLastTitle ); - impl->getEventEmitter().update( &LLMediaObserver::onMediaTitleChange, event ); - } - - g_free(title); - } - - break; - } - case GST_MESSAGE_EOS: - { - /* end-of-stream */ - LL_DEBUGS("MediaImpl") << "GST end-of-stream." << LL_ENDL; - if (impl->isLooping()) - { - LL_DEBUGS("MediaImpl") << "looping media..." << LL_ENDL; - impl->stop(); - impl->play(); - } - else - { - // inject a COMMAND_STOP - impl->addCommand(LLMediaBase::COMMAND_STOP); - } - break; - } - default: - /* unhandled message */ - break; - } - /* we want to be notified again the next time there is a message - * on the bus, so return true (false means we want to stop watching - * for messages on the bus and our callback should not be called again) - */ - return TRUE; -} - -/////////////////////////////////////////////////////////// -// virtual -bool LLMediaImplGStreamer::navigateTo (const std::string urlIn) -{ - LL_DEBUGS("MediaImpl") << "Setting media URI: " << urlIn.c_str() - << LL_ENDL; - - if (mPump == NULL || mPlaybin == NULL) - { - return false; - } - - setStatus( LLMediaBase::STATUS_NAVIGATING ); - - // set URI - g_object_set (G_OBJECT (mPlaybin), "uri", urlIn.c_str(), (void*)NULL); - - // get playbin's bus - perhaps this can/should be done in ctor - GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (mPlaybin)); - if (!bus) - { - return false; - } - gst_bus_add_watch (bus, bus_callback, this); - gst_object_unref (bus); - - mState = GST_STATE_READY; - - return true; -} - -/////////////////////////////////////////////////////////////////////////////// -// -bool LLMediaImplGStreamer::unload() -{ - LL_DEBUGS("MediaImpl") << "unloading media..." << LL_ENDL; - if (mPlaybin) - { - gst_element_set_state (mPlaybin, GST_STATE_NULL); - mState = GST_STATE_NULL; - gst_object_unref (GST_OBJECT (mPlaybin)); - mPlaybin = NULL; - } - - if (mPump) - { - g_main_loop_quit(mPump); - mPump = NULL; - } - - if (mediaData) - { - delete [] mediaData; - mediaData = NULL; - } - - mVideoSink = NULL; - mState = GST_STATE_NULL; - setStatus(LLMediaBase::STATUS_UNKNOWN); - - return true; -} - -/////////////////////////////////////////////////////////////////////////////// -// virtual -bool LLMediaImplGStreamer::updateMedia() -{ - //LL_DEBUGS("MediaImpl") << "updating media..." << LL_ENDL; - - // sanity check - if (mPump == NULL || mPlaybin == NULL) - { -#ifdef LL_GST_REPORT_STATE_CHANGES - LL_DEBUGS("MediaImpl") << "dead media..." << LL_ENDL; -#endif - mState = GST_STATE_NULL; - setStatus(LLMediaBase::STATUS_DEAD); - return false; - } - - if (mState == GST_STATE_VOID_PENDING || mState == GST_STATE_NULL) - return false; - - // process next outstanding command - switch (nextCommand()) - { - case LLMediaBase::COMMAND_START: - LL_DEBUGS("MediaImpl") << "COMMAND_START" << LL_ENDL; - if (getStatus() == LLMediaBase::STATUS_PAUSED || - getStatus() == LLMediaBase::STATUS_NAVIGATING || - getStatus() == LLMediaBase::STATUS_STOPPED) - { - play(); - setStatus(LLMediaBase::STATUS_STARTED); - clearCommand(); - } - break; - case LLMediaBase::COMMAND_STOP: - LL_DEBUGS("MediaImpl") << "COMMAND_STOP" << LL_ENDL; - stop(); - setStatus(LLMediaBase::STATUS_STOPPED); - clearCommand(); - break; - case LLMediaBase::COMMAND_PAUSE: - LL_DEBUGS("MediaImpl") << "COMMAND_PAUSE" << LL_ENDL; - if (getStatus() == LLMediaBase::STATUS_STARTED) - { - pause(); - setStatus(LLMediaBase::STATUS_PAUSED); - clearCommand(); - } - break; - default: - LL_INFOS("MediaImpl") << "Unknown command" << LL_ENDL; - clearCommand(); - break; - case LLMediaBase::COMMAND_NONE: - break; - } - - // deal with results - if (g_main_context_pending(g_main_loop_get_context(mPump))) - { - g_main_context_iteration(g_main_loop_get_context(mPump), FALSE); - } - - if (mVideoSink) - { - GST_OBJECT_LOCK(mVideoSink); - if (mVideoSink->retained_frame_ready) - { -#ifdef LL_GST_REPORT_STATE_CHANGES - LL_DEBUGS("MediaImpl") <<"NEW FRAME " << LL_ENDL; -#endif - if (mVideoSink->retained_frame_width != getMediaWidth() || - mVideoSink->retained_frame_height != getMediaHeight()) - // *TODO: also check for change in format - { - // just resize containe - int neww = mVideoSink->retained_frame_width; - int newh = mVideoSink->retained_frame_height; - int newd = SLVPixelFormatBytes[mVideoSink->retained_frame_format]; - if (SLV_PF_RGBX == mVideoSink->retained_frame_format) - { - mTextureFormatPrimary = LL_MEDIA_RGBA; - mTextureFormatType = LL_MEDIA_UNSIGNED_INT_8_8_8_8_REV; - } - else - { - mTextureFormatPrimary = LL_MEDIA_BGRA; - mTextureFormatType = LL_MEDIA_UNSIGNED_INT_8_8_8_8_REV; - } - mMediaRowbytes = neww * newd; - LL_DEBUGS("MediaImpl") - << "video container resized to " << - neww <<"x"<< newh << LL_ENDL; - - delete[] mediaData; - mediaData = new unsigned char[mMediaRowbytes * - newh]; - - GST_OBJECT_UNLOCK(mVideoSink); - - setMediaDepth(newd); - setMediaSize(neww, newh); - return true; - } - - // we're gonna totally consume this frame - reset 'ready' flag - mVideoSink->retained_frame_ready = FALSE; - memcpy(mediaData, mVideoSink->retained_frame_data, - mMediaRowbytes * getMediaHeight()); - - GST_OBJECT_UNLOCK(mVideoSink); - LLMediaEvent event( this ); - mEventEmitter.update( &LLMediaObserver::onMediaContentsChange, event ); - return true; - } - else - { - // nothing to do yet. - GST_OBJECT_UNLOCK(mVideoSink); - return true; - } - } - - return true; -} - -/////////////////////////////////////////////////////////////////////////////// -// -bool LLMediaImplGStreamer::stop() -{ - LL_DEBUGS("MediaImpl") << "attempting to stop..." << LL_ENDL; - - if (!mPlaybin || mState == GST_STATE_NULL) - return true; - - GstStateChangeReturn state_change; - - state_change = gst_element_set_state(mPlaybin, GST_STATE_READY); - - LL_DEBUGS("MediaImpl") << gst_element_state_change_return_get_name(state_change) << LL_ENDL; - - if (state_change == GST_STATE_CHANGE_FAILURE) - { - LL_WARNS("MediaImpl") << "could not stop stream!" << LL_ENDL; - return false; - } - else - { - // Going into pending after play keeps dead streams from looping - (mState == GST_STATE_PLAYING) ? (mState = GST_STATE_VOID_PENDING) : (mState = GST_STATE_READY); - return true; - } -} - -/////////////////////////////////////////////////////////////////////////////// -// -bool LLMediaImplGStreamer::play() -{ - LL_DEBUGS("MediaImpl") << "attempting to play..." << LL_ENDL; - - if (!mPlaybin || mState == GST_STATE_NULL) - return true; - - - if( getState() == GST_STATE_PLAYING ) - { - LL_DEBUGS("MediaImpl") << "... but already playing." << LL_ENDL; - return true; - } - - // Clean up the existing thread, if any. - if( mPlayThread != NULL && mPlayThread->isStopped()) - { - delete mPlayThread; - mPlayThread = NULL; - } - - if( mPlayThread == NULL ) - { - // Make a new thread to start playing. This keeps the viewer - // responsive while the stream is resolved and buffered. - mPlayThread = new LLGstPlayThread( (LLMediaImplCommon *)this, "GstPlayThread", NULL); - mPlayThread->start(); - } - - return true; -} - - -void LLMediaImplGStreamer::startPlay() -{ - GstStateChangeReturn state_change; - - state_change = gst_element_set_state(mPlaybin, GST_STATE_PLAYING); - mState = GST_STATE_PLAYING; - - LL_DEBUGS("MediaImpl") << gst_element_state_change_return_get_name(state_change) << LL_ENDL; - - // Check to make sure playing was successful. If not, stop. - // NOTE: state_change is almost always GST_STATE_CHANGE_ASYNC - if (state_change == GST_STATE_CHANGE_FAILURE) - { - // If failing from a bad stream, go into an unknown - // state to stop bus_callback from looping back. - // We also force a stop in case the operations don't sync - setStatus(LLMediaBase::STATUS_UNKNOWN); - stop(); - } -} - -/////////////////////////////////////////////////////////////////////////////// -// -bool LLMediaImplGStreamer::pause() -{ - LL_DEBUGS("MediaImpl") << "attempting to pause..." << LL_ENDL; - - if (!mPlaybin || mState == GST_STATE_NULL) - return true; - - GstStateChangeReturn state_change; - - state_change = gst_element_set_state(mPlaybin, GST_STATE_PAUSED); - - LL_DEBUGS("MediaImpl") << gst_element_state_change_return_get_name(state_change) << LL_ENDL; - - if (state_change == GST_STATE_CHANGE_FAILURE) - { - LL_WARNS("MediaImpl") << "could not pause stream!" << LL_ENDL; - return false; - } - else - { - mState = GST_STATE_PAUSED; - return true; - } -}; - - -/////////////////////////////////////////////////////////////////////////////// -// virtual -unsigned char* LLMediaImplGStreamer::getMediaData() -{ - return mediaData; -} - - -/////////////////////////////////////////////////////////////////////////////// -// virtual -bool LLMediaImplGStreamer::seek(double time) -{ - bool success = false; - if (mPlaybin) - { - success = gst_element_seek(mPlaybin, 1.0F, GST_FORMAT_TIME, - GstSeekFlags(GST_SEEK_FLAG_FLUSH | - GST_SEEK_FLAG_KEY_UNIT), - GST_SEEK_TYPE_SET, gint64(time*1000000000.0F), - GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); - } - LL_DEBUGS("MediaImpl") << "MEDIA SEEK REQUEST to " << float(time) - << "sec result was " << int(success) << LL_ENDL; - return success; -} - - -/////////////////////////////////////////////////////////////////////////////// -// virtual -bool LLMediaImplGStreamer::setVolume(float volume) -{ - // we try to only update volume as conservatively as - // possible, as many gst-plugins-base versions up to at least - // November 2008 have critical race-conditions in setting volume - sigh - if (mVolume == volume) - return true; // nothing to do, everything's fine - - mVolume = volume; - if (mPlaybin) - { - g_object_set(mPlaybin, "volume", mVolume, (void*)NULL); - return true; - } - - return false; -} - - - -///#endif // LL_GSTREAMER_ENABLED diff --git a/linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp~ b/linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp~ deleted file mode 100755 index 7d34a1e..0000000 --- a/linden/indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp~ +++ /dev/null @@ -1,1219 +0,0 @@ -/** - * @file media_plugin_gstreamer010.cpp - * @brief GStreamer-0.10 plugin for LLMedia API plugin system - * - * @cond - * $LicenseInfo:firstyear=2007&license=viewergpl$ - * - * Copyright (c) 2007-2010, Linden Research, Inc. - * - * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlife.com/developers/opensource/gplv2 - * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlife.com/developers/opensource/flossexception - * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. - * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. - * $/LicenseInfo$ - * - * @endcond - */ - -#include "linden_common.h" - -#include "llgl.h" - -#include "llplugininstance.h" -#include "llpluginmessage.h" -#include "llpluginmessageclasses.h" -#include "media_plugin_base.h" - -#if LL_GSTREAMER010_ENABLED - -extern "C" { -#include -} - -#include "llmediaimplgstreamer.h" -#include "llmediaimplgstreamertriviallogging.h" - -#include "llmediaimplgstreamervidplug.h" - -#include "llmediaimplgstreamer_syms.h" - -////////////////////////////////////////////////////////////////////////////// -// -class MediaPluginGStreamer010 : public MediaPluginBase -{ -public: - MediaPluginGStreamer010(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data); - ~MediaPluginGStreamer010(); - - /* virtual */ void receiveMessage(const char *message_string); - - static bool startup(); - static bool closedown(); - - gboolean processGSTEvents(GstBus *bus, - GstMessage *message); - -private: - std::string getVersion(); - bool navigateTo( const std::string urlIn ); - bool seek( double time_sec ); - bool setVolume( float volume ); - - // misc - bool pause(); - bool stop(); - bool play(double rate); - bool getTimePos(double &sec_out); - - static const double MIN_LOOP_SEC = 1.0F; - - bool mIsLooping; - - enum ECommand { - COMMAND_NONE, - COMMAND_STOP, - COMMAND_PLAY, - COMMAND_FAST_FORWARD, - COMMAND_FAST_REWIND, - COMMAND_PAUSE, - COMMAND_SEEK, - }; - ECommand mCommand; - -private: - bool unload(); - bool load(); - - bool update(int milliseconds); - void mouseDown( int x, int y ); - void mouseUp( int x, int y ); - void mouseMove( int x, int y ); - - void sizeChanged(); - - static bool mDoneInit; - - guint mBusWatchID; - - float mVolume; - - int mDepth; - - // media NATURAL size - int mNaturalWidth; - int mNaturalHeight; - // media current size - int mCurrentWidth; - int mCurrentHeight; - int mCurrentRowbytes; - // previous media size so we can detect changes - int mPreviousWidth; - int mPreviousHeight; - // desired render size from host - int mWidth; - int mHeight; - // padded texture size we need to write into - int mTextureWidth; - int mTextureHeight; - - int mTextureFormatPrimary; - int mTextureFormatType; - - bool mSeekWanted; - double mSeekDestination; - - // Very GStreamer-specific - GMainLoop *mPump; // event pump for this media - GstElement *mPlaybin; - GstSLVideo *mVideoSink; -}; - -//static -bool MediaPluginGStreamer010::mDoneInit = false; - -MediaPluginGStreamer010::MediaPluginGStreamer010( - LLPluginInstance::sendMessageFunction host_send_func, - void *host_user_data ) : - MediaPluginBase(host_send_func, host_user_data), - mBusWatchID ( 0 ), - mCurrentRowbytes ( 4 ), - mTextureFormatPrimary ( GL_RGBA ), - mTextureFormatType ( GL_UNSIGNED_INT_8_8_8_8_REV ), - mSeekWanted(false), - mSeekDestination(0.0), - mPump ( NULL ), - mPlaybin ( NULL ), - mVideoSink ( NULL ), - mCommand ( COMMAND_NONE ) -{ - std::ostringstream str; - INFOMSG("MediaPluginGStreamer010 constructor - my PID=%u", U32(getpid())); -} - -/////////////////////////////////////////////////////////////////////////////// -// -//#define LL_GST_REPORT_STATE_CHANGES -#ifdef LL_GST_REPORT_STATE_CHANGES -static char* get_gst_state_name(GstState state) -{ - switch (state) { - case GST_STATE_VOID_PENDING: return "VOID_PENDING"; - case GST_STATE_NULL: return "NULL"; - case GST_STATE_READY: return "READY"; - case GST_STATE_PAUSED: return "PAUSED"; - case GST_STATE_PLAYING: return "PLAYING"; - } - return "(unknown)"; -} -#endif // LL_GST_REPORT_STATE_CHANGES - -gboolean -MediaPluginGStreamer010::processGSTEvents(GstBus *bus, - GstMessage *message) -{ - if (!message) - return TRUE; // shield against GStreamer bug - - if (GST_MESSAGE_TYPE(message) != GST_MESSAGE_STATE_CHANGED && - GST_MESSAGE_TYPE(message) != GST_MESSAGE_BUFFERING) - { - DEBUGMSG("Got GST message type: %s", - LLGST_MESSAGE_TYPE_NAME (message)); - } - else - { - // TODO: grok 'duration' message type - DEBUGMSG("Got GST message type: %s", - LLGST_MESSAGE_TYPE_NAME (message)); - } - - switch (GST_MESSAGE_TYPE (message)) { - case GST_MESSAGE_BUFFERING: { - // NEEDS GST 0.10.11+ - if (llgst_message_parse_buffering) - { - gint percent = 0; - llgst_message_parse_buffering(message, &percent); - DEBUGMSG("GST buffering: %d%%", percent); - } - break; - } - case GST_MESSAGE_STATE_CHANGED: { - GstState old_state; - GstState new_state; - GstState pending_state; - llgst_message_parse_state_changed(message, - &old_state, - &new_state, - &pending_state); -#ifdef LL_GST_REPORT_STATE_CHANGES - // not generally very useful, and rather spammy. - DEBUGMSG("state change (old,,pending): %s,<%s>,%s", - get_gst_state_name(old_state), - get_gst_state_name(new_state), - get_gst_state_name(pending_state)); -#endif // LL_GST_REPORT_STATE_CHANGES - - switch (new_state) { - case GST_STATE_VOID_PENDING: - break; - case GST_STATE_NULL: - break; - case GST_STATE_READY: - setStatus(STATUS_LOADED); - break; - case GST_STATE_PAUSED: - setStatus(STATUS_PAUSED); - break; - case GST_STATE_PLAYING: - setStatus(STATUS_PLAYING); - break; - } - break; - } - case GST_MESSAGE_ERROR: { - GError *err = NULL; - gchar *debug = NULL; - - llgst_message_parse_error (message, &err, &debug); - WARNMSG("GST error: %s", err?err->message:"(unknown)"); - if (err) - g_error_free (err); - g_free (debug); - - mCommand = COMMAND_STOP; - - setStatus(STATUS_ERROR); - - break; - } - case GST_MESSAGE_INFO: { - if (llgst_message_parse_info) - { - GError *err = NULL; - gchar *debug = NULL; - - llgst_message_parse_info (message, &err, &debug); - INFOMSG("GST info: %s", err?err->message:"(unknown)"); - if (err) - g_error_free (err); - g_free (debug); - } - break; - } - case GST_MESSAGE_WARNING: { - GError *err = NULL; - gchar *debug = NULL; - - llgst_message_parse_warning (message, &err, &debug); - WARNMSG("GST warning: %s", err?err->message:"(unknown)"); - if (err) - g_error_free (err); - g_free (debug); - - break; - } - case GST_MESSAGE_EOS: - /* end-of-stream */ - DEBUGMSG("GST end-of-stream."); - if (mIsLooping) - { - DEBUGMSG("looping media..."); - double eos_pos_sec = 0.0F; - bool got_eos_position = getTimePos(eos_pos_sec); - - if (got_eos_position && eos_pos_sec < MIN_LOOP_SEC) - { - // if we know that the movie is really short, don't - // loop it else it can easily become a time-hog - // because of GStreamer spin-up overhead - DEBUGMSG("really short movie (%0.3fsec) - not gonna loop this, pausing instead.", eos_pos_sec); - // inject a COMMAND_PAUSE - mCommand = COMMAND_PAUSE; - } - else - { -#undef LLGST_LOOP_BY_SEEKING -// loop with a stop-start instead of a seek, because it actually seems rather -// faster than seeking on remote streams. -#ifdef LLGST_LOOP_BY_SEEKING - // first, try looping by an explicit rewind - bool seeksuccess = seek(0.0); - if (seeksuccess) - { - play(1.0); - } - else -#endif // LLGST_LOOP_BY_SEEKING - { // use clumsy stop-start to loop - DEBUGMSG("didn't loop by rewinding - stopping and starting instead..."); - stop(); - play(1.0); - } - } - } - else // not a looping media - { - // inject a COMMAND_STOP - mCommand = COMMAND_STOP; - } - break; - default: - /* unhandled message */ - break; - } - - /* we want to be notified again the next time there is a message - * on the bus, so return true (false means we want to stop watching - * for messages on the bus and our callback should not be called again) - */ - return TRUE; -} - -extern "C" { -gboolean -llmediaimplgstreamer_bus_callback (GstBus *bus, - GstMessage *message, - gpointer data) -{ - MediaPluginGStreamer010 *impl = (MediaPluginGStreamer010*)data; - return impl->processGSTEvents(bus, message); -} -} // extern "C" - - - -bool -MediaPluginGStreamer010::navigateTo ( const std::string urlIn ) -{ - if (!mDoneInit) - return false; // error - - setStatus(STATUS_LOADING); - - DEBUGMSG("Setting media URI: %s", urlIn.c_str()); - - mSeekWanted = false; - - if (NULL == mPump || - NULL == mPlaybin) - { - setStatus(STATUS_ERROR); - return false; // error - } - - // set URI - g_object_set (G_OBJECT (mPlaybin), "uri", urlIn.c_str(), NULL); - //g_object_set (G_OBJECT (mPlaybin), "uri", "file:///tmp/movie", NULL); - - // navigateTo implicitly plays, too. - play(1.0); - - return true; -} - - -bool -MediaPluginGStreamer010::update(int milliseconds) -{ - if (!mDoneInit) - return false; // error - - DEBUGMSG("updating media..."); - - // sanity check - if (NULL == mPump || - NULL == mPlaybin) - { - DEBUGMSG("dead media..."); - return false; - } - - // see if there's an outstanding seek wanted - if (mSeekWanted && - // bleh, GST has to be happy that the movie is really truly playing - // or it may quietly ignore the seek (with rtsp:// at least). - (GST_STATE(mPlaybin) == GST_STATE_PLAYING)) - { - seek(mSeekDestination); - mSeekWanted = false; - } - - // *TODO: time-limit - but there isn't a lot we can do here, most - // time is spent in gstreamer's own opaque worker-threads. maybe - // we can do something sneaky like only unlock the video object - // for 'milliseconds' and otherwise hold the lock. - while (g_main_context_pending(g_main_loop_get_context(mPump))) - { - g_main_context_iteration(g_main_loop_get_context(mPump), FALSE); - } - - // check for availability of a new frame - - if (mVideoSink) - { - GST_OBJECT_LOCK(mVideoSink); - if (mVideoSink->retained_frame_ready) - { - DEBUGMSG("NEW FRAME READY"); - - if (mVideoSink->retained_frame_width != mCurrentWidth || - mVideoSink->retained_frame_height != mCurrentHeight) - // *TODO: also check for change in format - { - // just resize container, don't consume frame - int neww = mVideoSink->retained_frame_width; - int newh = mVideoSink->retained_frame_height; - - int newd = 4; - mTextureFormatPrimary = GL_RGBA; - mTextureFormatType = GL_UNSIGNED_INT_8_8_8_8_REV; - - /* - int newd = SLVPixelFormatBytes[mVideoSink->retained_frame_format]; - if (SLV_PF_BGRX == mVideoSink->retained_frame_format) - { - mTextureFormatPrimary = GL_BGRA; - mTextureFormatType = GL_UNSIGNED_INT_8_8_8_8_REV; - } - else - { - mTextureFormatPrimary = GL_RGBA; - mTextureFormatType = GL_UNSIGNED_INT_8_8_8_8_REV; - } - */ - - GST_OBJECT_UNLOCK(mVideoSink); - - mCurrentRowbytes = neww * newd; - DEBUGMSG("video container resized to %dx%d", - neww, newh); - - mDepth = newd; - mCurrentWidth = neww; - mCurrentHeight = newh; - sizeChanged(); - return true; - } - - if (mPixels && - mCurrentHeight <= mHeight && - mCurrentWidth <= mWidth && - !mTextureSegmentName.empty()) - { - // we're gonna totally consume this frame - reset 'ready' flag - mVideoSink->retained_frame_ready = FALSE; - int destination_rowbytes = mWidth * mDepth; - for (int row=0; rowretained_frame_data - [mCurrentRowbytes * row], - mCurrentRowbytes); - } - - GST_OBJECT_UNLOCK(mVideoSink); - DEBUGMSG("NEW FRAME REALLY TRULY CONSUMED, TELLING HOST"); - - setDirty(0,0,mCurrentWidth,mCurrentHeight); - } - else - { - // new frame ready, but we're not ready to - // consume it. - - GST_OBJECT_UNLOCK(mVideoSink); - - DEBUGMSG("NEW FRAME not consumed, still waiting for a shm segment and/or shm resize"); - } - - return true; - } - else - { - // nothing to do yet. - GST_OBJECT_UNLOCK(mVideoSink); - return true; - } - } - - return true; -} - - -void -MediaPluginGStreamer010::mouseDown( int x, int y ) -{ - // do nothing -} - -void -MediaPluginGStreamer010::mouseUp( int x, int y ) -{ - // do nothing -} - -void -MediaPluginGStreamer010::mouseMove( int x, int y ) -{ - // do nothing -} - - -bool -MediaPluginGStreamer010::pause() -{ - DEBUGMSG("pausing media..."); - // todo: error-check this? - llgst_element_set_state(mPlaybin, GST_STATE_PAUSED); - return true; -} - -bool -MediaPluginGStreamer010::stop() -{ - DEBUGMSG("stopping media..."); - // todo: error-check this? - llgst_element_set_state(mPlaybin, GST_STATE_READY); - return true; -} - -bool -MediaPluginGStreamer010::play(double rate) -{ - // NOTE: we don't actually support non-natural rate. - - DEBUGMSG("playing media... rate=%f", rate); - // todo: error-check this? - llgst_element_set_state(mPlaybin, GST_STATE_PLAYING); - return true; -} - -bool -MediaPluginGStreamer010::setVolume( float volume ) -{ - // we try to only update volume as conservatively as - // possible, as many gst-plugins-base versions up to at least - // November 2008 have critical race-conditions in setting volume - sigh - if (mVolume == volume) - return true; // nothing to do, everything's fine - - mVolume = volume; - if (mDoneInit && mPlaybin) - { - g_object_set(mPlaybin, "volume", mVolume, NULL); - return true; - } - - return false; -} - -bool -MediaPluginGStreamer010::seek(double time_sec) -{ - bool success = false; - if (mDoneInit && mPlaybin) - { - success = llgst_element_seek(mPlaybin, 1.0F, GST_FORMAT_TIME, - GstSeekFlags(GST_SEEK_FLAG_FLUSH | - GST_SEEK_FLAG_KEY_UNIT), - GST_SEEK_TYPE_SET, gint64(time_sec*GST_SECOND), - GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); - } - DEBUGMSG("MEDIA SEEK REQUEST to %fsec result was %d", - float(time_sec), int(success)); - return success; -} - -bool -MediaPluginGStreamer010::getTimePos(double &sec_out) -{ - bool got_position = false; - if (mPlaybin) - { - gint64 pos; - GstFormat timefmt = GST_FORMAT_TIME; - got_position = - llgst_element_query_position && - llgst_element_query_position(mPlaybin, - &timefmt, - &pos); - got_position = got_position - && (timefmt == GST_FORMAT_TIME); - // GStreamer may have other ideas, but we consider the current position - // undefined if not PLAYING or PAUSED - got_position = got_position && - (GST_STATE(mPlaybin) == GST_STATE_PLAYING || - GST_STATE(mPlaybin) == GST_STATE_PAUSED); - if (got_position && !GST_CLOCK_TIME_IS_VALID(pos)) - { - if (GST_STATE(mPlaybin) == GST_STATE_PLAYING) - { - // if we're playing then we treat an invalid clock time - // as 0, for complicated reasons (insert reason here) - pos = 0; - } - else - { - got_position = false; - } - - } - // If all the preconditions succeeded... we can trust the result. - if (got_position) - { - sec_out = double(pos) / double(GST_SECOND); // gst to sec - } - } - return got_position; -} - -bool -MediaPluginGStreamer010::load() -{ - if (!mDoneInit) - return false; // error - - setStatus(STATUS_LOADING); - - DEBUGMSG("setting up media..."); - - mIsLooping = false; - mVolume = 0.1234567; // minor hack to force an initial volume update - - // Create a pumpable main-loop for this media - mPump = g_main_loop_new (NULL, FALSE); - if (!mPump) - { - setStatus(STATUS_ERROR); - return false; // error - } - - // instantiate a playbin element to do the hard work - mPlaybin = llgst_element_factory_make ("playbin", "play"); - if (!mPlaybin) - { - setStatus(STATUS_ERROR); - return false; // error - } - - // get playbin's bus - GstBus *bus = llgst_pipeline_get_bus (GST_PIPELINE (mPlaybin)); - if (!bus) - { - setStatus(STATUS_ERROR); - return false; // error - } - mBusWatchID = llgst_bus_add_watch (bus, - llmediaimplgstreamer_bus_callback, - this); - llgst_object_unref (bus); - - if (NULL == getenv("LL_GSTREAMER_EXTERNAL")) { - // instantiate a custom video sink - mVideoSink = - GST_SLVIDEO(llgst_element_factory_make ("private-slvideo", "slvideo")); - if (!mVideoSink) - { - WARNMSG("Could not instantiate private-slvideo element."); - // todo: cleanup. - setStatus(STATUS_ERROR); - return false; // error - } - - // connect the pieces - g_object_set(mPlaybin, "video-sink", mVideoSink, NULL); - } - - return true; -} - -bool -MediaPluginGStreamer010::unload () -{ - if (!mDoneInit) - return false; // error - - DEBUGMSG("unloading media..."); - - // stop getting callbacks for this bus - g_source_remove(mBusWatchID); - mBusWatchID = 0; - - if (mPlaybin) - { - llgst_element_set_state (mPlaybin, GST_STATE_NULL); - llgst_object_unref (GST_OBJECT (mPlaybin)); - mPlaybin = NULL; - } - - if (mPump) - { - g_main_loop_quit(mPump); - mPump = NULL; - } - - mVideoSink = NULL; - - setStatus(STATUS_NONE); - - return true; -} - - -//static -bool -MediaPluginGStreamer010::startup() -{ - // first - check if GStreamer is explicitly disabled - if (NULL != getenv("LL_DISABLE_GSTREAMER")) - return false; - - // only do global GStreamer initialization once. - if (!mDoneInit) - { - g_thread_init(NULL); - - // Init the glib type system - we need it. - g_type_init(); - - // Get symbols! -#if LL_DARWIN - if (! grab_gst_syms("libgstreamer-0.10.dylib", - "libgstvideo-0.10.dylib") ) -#elseif LL_WINDOWS - if (! grab_gst_syms("libgstreamer-0.10.dll", - "libgstvideo-0.10.dll") ) -#else // linux or other ELFy unixoid - if (! grab_gst_syms("libgstreamer-0.10.so.0", - "libgstvideo-0.10.so.0") ) -#endif - { - WARNMSG("Couldn't find suitable GStreamer 0.10 support on this system - video playback disabled."); - return false; - } - - if (llgst_segtrap_set_enabled) - { - llgst_segtrap_set_enabled(FALSE); - } - else - { - WARNMSG("gst_segtrap_set_enabled() is not available; plugin crashes won't be caught."); - } - -#if LL_LINUX - // Gstreamer tries a fork during init, waitpid-ing on it, - // which conflicts with any installed SIGCHLD handler... - struct sigaction tmpact, oldact; - if (llgst_registry_fork_set_enabled) { - // if we can disable SIGCHLD-using forking behaviour, - // do it. - llgst_registry_fork_set_enabled(false); - } - else { - // else temporarily install default SIGCHLD handler - // while GStreamer initialises - tmpact.sa_handler = SIG_DFL; - sigemptyset( &tmpact.sa_mask ); - tmpact.sa_flags = SA_SIGINFO; - sigaction(SIGCHLD, &tmpact, &oldact); - } -#endif // LL_LINUX - - // Protect against GStreamer resetting the locale, yuck. - static std::string saved_locale; - saved_locale = setlocale(LC_ALL, NULL); - - // finally, try to initialize GStreamer! - GError *err = NULL; - gboolean init_gst_success = llgst_init_check(NULL, NULL, &err); - - // restore old locale - setlocale(LC_ALL, saved_locale.c_str() ); - -#if LL_LINUX - // restore old SIGCHLD handler - if (!llgst_registry_fork_set_enabled) - sigaction(SIGCHLD, &oldact, NULL); -#endif // LL_LINUX - - if (!init_gst_success) // fail - { - if (err) - { - WARNMSG("GST init failed: %s", err->message); - g_error_free(err); - } - else - { - WARNMSG("GST init failed for unspecified reason."); - } - return false; - } - - // Init our custom plugins - only really need do this once. - gst_slvideo_init_class(); - - mDoneInit = true; - } - - return true; -} - - -void -MediaPluginGStreamer010::sizeChanged() -{ - // the shared writing space has possibly changed size/location/whatever - - // Check to see whether the movie's NATURAL size has been set yet - if (1 == mNaturalWidth && - 1 == mNaturalHeight) - { - mNaturalWidth = mCurrentWidth; - mNaturalHeight = mCurrentHeight; - DEBUGMSG("Media NATURAL size better detected as %dx%d", - mNaturalWidth, mNaturalHeight); - } - - // if the size has changed then the shm has changed and the app needs telling - if (mCurrentWidth != mPreviousWidth || - mCurrentHeight != mPreviousHeight) - { - mPreviousWidth = mCurrentWidth; - mPreviousHeight = mCurrentHeight; - - LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change_request"); - message.setValue("name", mTextureSegmentName); - message.setValueS32("width", mNaturalWidth); - message.setValueS32("height", mNaturalHeight); - DEBUGMSG("<--- Sending size change request to application with name: '%s' - natural size is %d x %d", mTextureSegmentName.c_str(), mNaturalWidth, mNaturalHeight); - sendMessage(message); - } -} - - - -//static -bool -MediaPluginGStreamer010::closedown() -{ - if (!mDoneInit) - return false; // error - - ungrab_gst_syms(); - - mDoneInit = false; - - return true; -} - -MediaPluginGStreamer010::~MediaPluginGStreamer010() -{ - DEBUGMSG("MediaPluginGStreamer010 destructor"); - - closedown(); - - DEBUGMSG("GStreamer010 closing down"); -} - - -std::string -MediaPluginGStreamer010::getVersion() -{ - std::string plugin_version = "GStreamer010 media plugin, GStreamer version "; - if (mDoneInit && - llgst_version) - { - guint major, minor, micro, nano; - llgst_version(&major, &minor, µ, &nano); - plugin_version += llformat("%u.%u.%u.%u (runtime), %u.%u.%u.%u (headers)", (unsigned int)major, (unsigned int)minor, (unsigned int)micro, (unsigned int)nano, (unsigned int)GST_VERSION_MAJOR, (unsigned int)GST_VERSION_MINOR, (unsigned int)GST_VERSION_MICRO, (unsigned int)GST_VERSION_NANO); - } - else - { - plugin_version += "(unknown)"; - } - return plugin_version; -} - -void MediaPluginGStreamer010::receiveMessage(const char *message_string) -{ - //std::cerr << "MediaPluginGStreamer010::receiveMessage: received message: \"" << message_string << "\"" << std::endl; - - LLPluginMessage message_in; - - if(message_in.parse(message_string) >= 0) - { - std::string message_class = message_in.getClass(); - std::string message_name = message_in.getName(); - if(message_class == LLPLUGIN_MESSAGE_CLASS_BASE) - { - if(message_name == "init") - { - LLPluginMessage message("base", "init_response"); - LLSD versions = LLSD::emptyMap(); - versions[LLPLUGIN_MESSAGE_CLASS_BASE] = LLPLUGIN_MESSAGE_CLASS_BASE_VERSION; - versions[LLPLUGIN_MESSAGE_CLASS_MEDIA] = LLPLUGIN_MESSAGE_CLASS_MEDIA_VERSION; - versions[LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME] = LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME_VERSION; - message.setValueLLSD("versions", versions); - - if ( load() ) - { - DEBUGMSG("GStreamer010 media instance set up"); - } - else - { - WARNMSG("GStreamer010 media instance failed to set up"); - } - - message.setValue("plugin_version", getVersion()); - sendMessage(message); - } - else if(message_name == "idle") - { - // no response is necessary here. - double time = message_in.getValueReal("time"); - - // Convert time to milliseconds for update() - update((int)(time * 1000.0f)); - } - else if(message_name == "cleanup") - { - unload(); - closedown(); - } - else if(message_name == "shm_added") - { - SharedSegmentInfo info; - info.mAddress = message_in.getValuePointer("address"); - info.mSize = (size_t)message_in.getValueS32("size"); - std::string name = message_in.getValue("name"); - - std::ostringstream str; - INFOMSG("MediaPluginGStreamer010::receiveMessage: shared memory added, name: %s, size: %d, address: %p", name.c_str(), int(info.mSize), info.mAddress); - - mSharedSegments.insert(SharedSegmentMap::value_type(name, info)); - } - else if(message_name == "shm_remove") - { - std::string name = message_in.getValue("name"); - - DEBUGMSG("MediaPluginGStreamer010::receiveMessage: shared memory remove, name = %s", name.c_str()); - - SharedSegmentMap::iterator iter = mSharedSegments.find(name); - if(iter != mSharedSegments.end()) - { - if(mPixels == iter->second.mAddress) - { - // This is the currently active pixel buffer. Make sure we stop drawing to it. - mPixels = NULL; - mTextureSegmentName.clear(); - - // Make sure the movie decoder is no longer pointed at the shared segment. - sizeChanged(); - } - mSharedSegments.erase(iter); - } - else - { - WARNMSG("MediaPluginGStreamer010::receiveMessage: unknown shared memory region!"); - } - - // Send the response so it can be cleaned up. - LLPluginMessage message("base", "shm_remove_response"); - message.setValue("name", name); - sendMessage(message); - } - else - { - std::ostringstream str; - INFOMSG("MediaPluginGStreamer010::receiveMessage: unknown base message: %s", message_name.c_str()); - } - } - else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA) - { - if(message_name == "init") - { - // Plugin gets to decide the texture parameters to use. - LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params"); - // lame to have to decide this now, it depends on the movie. Oh well. - mDepth = 4; - - mCurrentWidth = 1; - mCurrentHeight = 1; - mPreviousWidth = 1; - mPreviousHeight = 1; - mNaturalWidth = 1; - mNaturalHeight = 1; - mWidth = 1; - mHeight = 1; - mTextureWidth = 1; - mTextureHeight = 1; - - message.setValueU32("format", GL_RGBA); - message.setValueU32("type", GL_UNSIGNED_INT_8_8_8_8_REV); - - message.setValueS32("depth", mDepth); - message.setValueS32("default_width", mWidth); - message.setValueS32("default_height", mHeight); - message.setValueU32("internalformat", GL_RGBA8); - message.setValueBoolean("coords_opengl", true); // true == use OpenGL-style coordinates, false == (0,0) is upper left. - message.setValueBoolean("allow_downsample", true); // we respond with grace and performance if asked to downscale - sendMessage(message); - } - else if(message_name == "size_change") - { - std::string name = message_in.getValue("name"); - S32 width = message_in.getValueS32("width"); - S32 height = message_in.getValueS32("height"); - S32 texture_width = message_in.getValueS32("texture_width"); - S32 texture_height = message_in.getValueS32("texture_height"); - - std::ostringstream str; - INFOMSG("---->Got size change instruction from application with shm name: %s - size is %d x %d", name.c_str(), width, height); - - LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change_response"); - message.setValue("name", name); - message.setValueS32("width", width); - message.setValueS32("height", height); - message.setValueS32("texture_width", texture_width); - message.setValueS32("texture_height", texture_height); - sendMessage(message); - - if(!name.empty()) - { - // Find the shared memory region with this name - SharedSegmentMap::iterator iter = mSharedSegments.find(name); - if(iter != mSharedSegments.end()) - { - INFOMSG("*** Got size change with matching shm, new size is %d x %d", width, height); - INFOMSG("*** Got size change with matching shm, texture size size is %d x %d", texture_width, texture_height); - - mPixels = (unsigned char*)iter->second.mAddress; - mTextureSegmentName = name; - mWidth = width; - mHeight = height; - - if (texture_width > 1 || - texture_height > 1) // not a dummy size from the app, a real explicit forced size - { - INFOMSG("**** = REAL RESIZE REQUEST FROM APP"); - - GST_OBJECT_LOCK(mVideoSink); - mVideoSink->resize_forced_always = true; - mVideoSink->resize_try_width = texture_width; - mVideoSink->resize_try_height = texture_height; - GST_OBJECT_UNLOCK(mVideoSink); - } - - mTextureWidth = texture_width; - mTextureHeight = texture_height; - } - } - } - else if(message_name == "load_uri") - { - std::string uri = message_in.getValue("uri"); - navigateTo( uri ); - sendStatus(); - } - else if(message_name == "mouse_event") - { - std::string event = message_in.getValue("event"); - S32 x = message_in.getValueS32("x"); - S32 y = message_in.getValueS32("y"); - - if(event == "down") - { - mouseDown(x, y); - } - else if(event == "up") - { - mouseUp(x, y); - } - else if(event == "move") - { - mouseMove(x, y); - }; - }; - } - else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME) - { - if(message_name == "stop") - { - stop(); - } - else if(message_name == "start") - { - double rate = 0.0; - if(message_in.hasValue("rate")) - { - rate = message_in.getValueReal("rate"); - } - // NOTE: we don't actually support rate. - play(rate); - } - else if(message_name == "pause") - { - pause(); - } - else if(message_name == "seek") - { - double time = message_in.getValueReal("time"); - // defer the actual seek in case we haven't - // really truly started yet in which case there - // is nothing to seek upon - mSeekWanted = true; - mSeekDestination = time; - } - else if(message_name == "set_loop") - { - bool loop = message_in.getValueBoolean("loop"); - mIsLooping = loop; - } - else if(message_name == "set_volume") - { - double volume = message_in.getValueReal("volume"); - setVolume(volume); - } - } - else - { - INFOMSG("MediaPluginGStreamer010::receiveMessage: unknown message class: %s", message_class.c_str()); - } - } -} - -int init_media_plugin(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data, LLPluginInstance::sendMessageFunction *plugin_send_func, void **plugin_user_data) -{ - if (MediaPluginGStreamer010::startup()) - { - MediaPluginGStreamer010 *self = new MediaPluginGStreamer010(host_send_func, host_user_data); - *plugin_send_func = MediaPluginGStreamer010::staticReceiveMessage; - *plugin_user_data = (void*)self; - - return 0; // okay - } - else - { - return -1; // failed to init - } -} - -#else // LL_GSTREAMER010_ENABLED - -// Stubbed-out class with constructor/destructor (necessary or windows linker -// will just think its dead code and optimize it all out) -class MediaPluginGStreamer010 : public MediaPluginBase -{ -public: - MediaPluginGStreamer010(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data); - ~MediaPluginGStreamer010(); - /* virtual */ void receiveMessage(const char *message_string); -}; - -MediaPluginGStreamer010::MediaPluginGStreamer010( - LLPluginInstance::sendMessageFunction host_send_func, - void *host_user_data ) : - MediaPluginBase(host_send_func, host_user_data) -{ - // no-op -} - -MediaPluginGStreamer010::~MediaPluginGStreamer010() -{ - // no-op -} - -void MediaPluginGStreamer010::receiveMessage(const char *message_string) -{ - // no-op -} - -// We're building without GStreamer enabled. Just refuse to initialize. -int init_media_plugin(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data, LLPluginInstance::sendMessageFunction *plugin_send_func, void **plugin_user_data) -{ - return -1; -} - -#endif // LL_GSTREAMER010_ENABLED diff --git a/linden/indra/newview/linux_tools/getvoice.sh b/linden/indra/newview/linux_tools/getvoice.sh index 13b632f..afebda9 100755 --- a/linden/indra/newview/linux_tools/getvoice.sh +++ b/linden/indra/newview/linux_tools/getvoice.sh @@ -3,8 +3,9 @@ SCRIPTSRC=`readlink -f "$0" || echo "$0"` RUN_PATH=`dirname "${SCRIPTSRC}" || echo .` -#if mozilla-runtime-linux-x86_64 is present we are using 64bit Imprudence on 64bit Linux -if [ -d "${RUN_PATH}/app_settings/mozilla-runtime-linux-x86_64/" ]; then +BINARY_SYSTEM=$(expr match "$(file -b /bin/uname)" '\(.*executable\)') +BINARY_VIEWER=$(expr match "$(file -b ${RUN_PATH}/bin/do-not-directly-run-imprudence-bin)" '\(.*executable\)') +if ( [ "$BINARY_SYSTEM" == "ELF 64-bit LSB executable" ] && [ "$BINARY_VIEWER" == "ELF 64-bit LSB executable" ] ); then LIB_INSTALLDIR="lib32/" # It's 32bit voice on 64bit Linux and 64bit viewer. Not using lib/ for avoiding ambiguity. else LIB_INSTALLDIR="lib/" # It's 32bit voice on 32 or 64bit Linux and 32bit viewer. diff --git a/linden/indra/newview/linux_tools/wrapper.sh b/linden/indra/newview/linux_tools/wrapper.sh index bc2c127..8c47434 100755 --- a/linden/indra/newview/linux_tools/wrapper.sh +++ b/linden/indra/newview/linux_tools/wrapper.sh @@ -106,13 +106,13 @@ if [ -n "$LL_TCMALLOC" ]; then fi fi fi - -if([ "`uname -m`" = "x86_64" ] && [ -d "${RUN_PATH}/app_settings/mozilla-runtime-linux-x86_64/" ]); then - export GST_PLUGIN_PATH="${GST_PLUGIN_PATH}:${RUN_PATH}/lib64/gstreamer-plugins/" +BINARY_SYSTEM=$(expr match "$(file -b /bin/uname)" '\(.*executable\)') +BINARY_VIEWER=$(expr match "$(file -b ${RUN_PATH}/bin/do-not-directly-run-imprudence-bin)" '\(.*executable\)') +echo "viewer: $BINARY_VIEWER system: $BINARY_SYSTEM" +if ( [ "$BINARY_SYSTEM" == "ELF 64-bit LSB executable" ] && [ "$BINARY_VIEWER" == "ELF 64-bit LSB executable" ] ); then export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib64:"`pwd`"/lib32:"`pwd`"/app_settings/mozilla-runtime-linux-x86_64:"${LD_LIBRARY_PATH}"' else - export GST_PLUGIN_PATH="${GST_PLUGIN_PATH}:${RUN_PATH}/lib/gstreamer-plugins/" export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib:"`pwd`"/app_settings/mozilla-runtime-linux-i686:"${LD_LIBRARY_PATH}"' fi diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py index 0c00995..4c95f00 100755 --- a/linden/indra/newview/viewer_manifest.py +++ b/linden/indra/newview/viewer_manifest.py @@ -973,68 +973,69 @@ class Linux_i686Manifest(LinuxManifest): # self.path("libpangoxft-1.0.so.0") self.path("libpixman-1.so.0") +#KILL IT WITH FIRE # Gstreamer libs - self.path("libgstbase-0.10.so.0") - self.path("libgstreamer-0.10.so.0") - self.path("libgstaudio-0.10.so.0") - self.path("libgstbase-0.10.so.0") - self.path("libgstcontroller-0.10.so.0") - self.path("libgstdataprotocol-0.10.so.0") - self.path("libgstinterfaces-0.10.so.0") - self.path("libgstnetbuffer-0.10.so.0") - self.path("libgstpbutils-0.10.so.0") - self.path("libgstriff-0.10.so.0") - self.path("libgstrtp-0.10.so.0") - self.path("libgstrtsp-0.10.so.0") - self.path("libgstsdp-0.10.so.0") - self.path("libgsttag-0.10.so.0") - self.path("libgstvideo-0.10.so.0") - - # Gstreamer plugin dependencies - self.path("libfaad.so.0") - self.path("libogg.so.0") - self.path("libtheora.so.0") - self.path("libvorbis.so.0") - self.path("libvorbisenc.so.2") - self.path("liboil-0.3.so.0") - - # Gstreamer plugins - if self.prefix("gstreamer-plugins"): - self.path("libgstalsa.so") - self.path("libgstasf.so") - self.path("libgstaudioconvert.so") - self.path("libgstaudioresample.so") - self.path("libgstautodetect.so") - self.path("libgstavi.so") - self.path("libgstcoreelements.so") - self.path("libgstcoreindexers.so") - self.path("libgstdecodebin2.so") - self.path("libgstdecodebin.so") - self.path("libgstesd.so") - self.path("libgstfaad.so") - self.path("libgstffmpeg.so") - self.path("libgstgnomevfs.so") - self.path("libgsticydemux.so") - self.path("libgstid3demux.so") - self.path("libgstmpegdemux.so") - self.path("libgstmultifile.so") - self.path("libgstmultipart.so") - self.path("libgstogg.so") - self.path("libgstossaudio.so") - self.path("libgstplaybin.so") - self.path("libgstpulse.so") - self.path("libgstqtdemux.so") - self.path("libgstqueue2.so") - self.path("libgsttcp.so") - self.path("libgsttheora.so") - self.path("libgsttypefindfunctions.so") - self.path("libgstudp.so") - self.path("libgstvideoscale.so") - self.path("libgstvolume.so") - self.path("libgstvorbis.so") - self.path("libgstwavparse.so") + #self.path("libgstbase-0.10.so.0") + #self.path("libgstreamer-0.10.so.0") + #self.path("libgstaudio-0.10.so.0") + #self.path("libgstbase-0.10.so.0") + #self.path("libgstcontroller-0.10.so.0") + #self.path("libgstdataprotocol-0.10.so.0") + #self.path("libgstinterfaces-0.10.so.0") + #self.path("libgstnetbuffer-0.10.so.0") + #self.path("libgstpbutils-0.10.so.0") + #self.path("libgstriff-0.10.so.0") + #self.path("libgstrtp-0.10.so.0") + #self.path("libgstrtsp-0.10.so.0") + #self.path("libgstsdp-0.10.so.0") + #self.path("libgsttag-0.10.so.0") + #self.path("libgstvideo-0.10.so.0") + + ## Gstreamer plugin dependencies + #self.path("libfaad.so.0") + #self.path("libogg.so.0") + #self.path("libtheora.so.0") + #self.path("libvorbis.so.0") + #self.path("libvorbisenc.so.2") + #self.path("liboil-0.3.so.0") + + ## Gstreamer plugins + #if self.prefix("gstreamer-plugins"): + #self.path("libgstalsa.so") + #self.path("libgstasf.so") + #self.path("libgstaudioconvert.so") + #self.path("libgstaudioresample.so") + #self.path("libgstautodetect.so") + #self.path("libgstavi.so") + #self.path("libgstcoreelements.so") + #self.path("libgstcoreindexers.so") + #self.path("libgstdecodebin2.so") + #self.path("libgstdecodebin.so") + #self.path("libgstesd.so") + #self.path("libgstfaad.so") + #self.path("libgstffmpeg.so") + #self.path("libgstgnomevfs.so") + #self.path("libgsticydemux.so") + #self.path("libgstid3demux.so") + #self.path("libgstmpegdemux.so") + #self.path("libgstmultifile.so") + #self.path("libgstmultipart.so") + #self.path("libgstogg.so") + #self.path("libgstossaudio.so") + #self.path("libgstplaybin.so") + #self.path("libgstpulse.so") + #self.path("libgstqtdemux.so") + #self.path("libgstqueue2.so") + #self.path("libgsttcp.so") + #self.path("libgsttheora.so") + #self.path("libgsttypefindfunctions.so") + #self.path("libgstudp.so") + #self.path("libgstvideoscale.so") + #self.path("libgstvolume.so") + #self.path("libgstvorbis.so") + #self.path("libgstwavparse.so") - self.end_prefix("gstreamer-plugins") + #self.end_prefix("gstreamer-plugins") self.end_prefix("lib") @@ -1064,8 +1065,6 @@ class Linux_x86_64Manifest(LinuxManifest): self.path("featuretable_linux.txt") #self.path("secondlife-x86_64.supp") - self.path("app_settings/mozilla-runtime-linux-x86_64") - if self.prefix("../../libraries/x86_64-linux/lib_release_client", dst="lib64"): self.path("libapr-1.so.0") self.path("libaprutil-1.so.0") @@ -1102,69 +1101,70 @@ class Linux_x86_64Manifest(LinuxManifest): # self.path("libpangoxft-1.0.so.0") # So we depend system gdk pixbufs and pango anyway. self.path("libpixman-1.so.0") - # Gstreamer libs - self.path("libgstbase-0.10.so.0") - self.path("libgstreamer-0.10.so.0") - self.path("libgstaudio-0.10.so.0") - self.path("libgstbase-0.10.so.0") - self.path("libgstcontroller-0.10.so.0") - self.path("libgstdataprotocol-0.10.so.0") - self.path("libgstinterfaces-0.10.so.0") - self.path("libgstnetbuffer-0.10.so.0") - self.path("libgstpbutils-0.10.so.0") - self.path("libgstriff-0.10.so.0") - self.path("libgstrtp-0.10.so.0") - self.path("libgstrtsp-0.10.so.0") - self.path("libgstsdp-0.10.so.0") - self.path("libgsttag-0.10.so.0") - self.path("libgstvideo-0.10.so.0") - - # Gstreamer plugin dependencies - self.path("libfaad.so.0") - self.path("libogg.so.0") - self.path("libtheora.so.0") - self.path("libvorbis.so.0") - self.path("libvorbisenc.so.2") - self.path("liboil-0.3.so.0") - - # Gstreamer plugins - if self.prefix("gstreamer-plugins"): - self.path("libgstalsa.so") - self.path("libgstasf.so") - self.path("libgstaudioconvert.so") - self.path("libgstaudioresample.so") - self.path("libgstautodetect.so") - self.path("libgstavi.so") - self.path("libgstcoreelements.so") - self.path("libgstcoreindexers.so") - self.path("libgstdecodebin2.so") - self.path("libgstdecodebin.so") - self.path("libgstesd.so") - self.path("libgstfaad.so") - self.path("libgstffmpeg.so") - self.path("libgstffmpegcolorspace.so") - self.path("libgstgnomevfs.so") - self.path("libgsticydemux.so") - self.path("libgstid3demux.so") - self.path("libgstmpegdemux.so") - self.path("libgstmultifile.so") - self.path("libgstmultipart.so") - self.path("libgstogg.so") - self.path("libgstossaudio.so") - self.path("libgstplaybin.so") - self.path("libgstpulse.so") - self.path("libgstqtdemux.so") - self.path("libgstqueue2.so") - self.path("libgsttcp.so") - self.path("libgsttheora.so") - self.path("libgsttypefindfunctions.so") - self.path("libgstudp.so") - self.path("libgstvideoscale.so") - self.path("libgstvolume.so") - self.path("libgstvorbis.so") - self.path("libgstwavparse.so") +#KILL IT WITH FIRE + ## Gstreamer libs + #self.path("libgstbase-0.10.so.0") + #self.path("libgstreamer-0.10.so.0") + #self.path("libgstaudio-0.10.so.0") + #self.path("libgstbase-0.10.so.0") + #self.path("libgstcontroller-0.10.so.0") + #self.path("libgstdataprotocol-0.10.so.0") + #self.path("libgstinterfaces-0.10.so.0") + #self.path("libgstnetbuffer-0.10.so.0") + #self.path("libgstpbutils-0.10.so.0") + #self.path("libgstriff-0.10.so.0") + #self.path("libgstrtp-0.10.so.0") + #self.path("libgstrtsp-0.10.so.0") + #self.path("libgstsdp-0.10.so.0") + #self.path("libgsttag-0.10.so.0") + #self.path("libgstvideo-0.10.so.0") + + ## Gstreamer plugin dependencies + #self.path("libfaad.so.0") + #self.path("libogg.so.0") + #self.path("libtheora.so.0") + #self.path("libvorbis.so.0") + #self.path("libvorbisenc.so.2") + #self.path("liboil-0.3.so.0") + + ## Gstreamer plugins + #if self.prefix("gstreamer-plugins"): + #self.path("libgstalsa.so") + #self.path("libgstasf.so") + #self.path("libgstaudioconvert.so") + #self.path("libgstaudioresample.so") + #self.path("libgstautodetect.so") + #self.path("libgstavi.so") + #self.path("libgstcoreelements.so") + #self.path("libgstcoreindexers.so") + #self.path("libgstdecodebin2.so") + #self.path("libgstdecodebin.so") + #self.path("libgstesd.so") + #self.path("libgstfaad.so") + #self.path("libgstffmpeg.so") + #self.path("libgstffmpegcolorspace.so") + #self.path("libgstgnomevfs.so") + #self.path("libgsticydemux.so") + #self.path("libgstid3demux.so") + #self.path("libgstmpegdemux.so") + #self.path("libgstmultifile.so") + #self.path("libgstmultipart.so") + #self.path("libgstogg.so") + #self.path("libgstossaudio.so") + #self.path("libgstplaybin.so") + #self.path("libgstpulse.so") + #self.path("libgstqtdemux.so") + #self.path("libgstqueue2.so") + #self.path("libgsttcp.so") + #self.path("libgsttheora.so") + #self.path("libgsttypefindfunctions.so") + #self.path("libgstudp.so") + #self.path("libgstvideoscale.so") + #self.path("libgstvolume.so") + #self.path("libgstvorbis.so") + #self.path("libgstwavparse.so") - self.end_prefix("gstreamer-plugins") + #self.end_prefix("gstreamer-plugins") self.end_prefix("lib64") diff --git a/linden/indra/newview/viewer_manifest.py~ b/linden/indra/newview/viewer_manifest.py~ deleted file mode 100755 index 452b165..0000000 --- a/linden/indra/newview/viewer_manifest.py~ +++ /dev/null @@ -1,1176 +0,0 @@ -#!/usr/bin/python -# @file viewer_manifest.py -# @author Ryan Williams -# @brief Description of all installer viewer files, and methods for packaging -# them into installers for all supported platforms. -# -# $LicenseInfo:firstyear=2006&license=viewergpl$ -# -# Copyright (c) 2006-2009, Linden Research, Inc. -# -# Second Life Viewer Source Code -# The source code in this file ("Source Code") is provided by Linden Lab -# to you under the terms of the GNU General Public License, version 2.0 -# ("GPL"), unless you have obtained a separate licensing agreement -# ("Other License"), formally executed by you and Linden Lab. Terms of -# the GPL can be found in doc/GPL-license.txt in this distribution, or -# online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 -# -# There are special exceptions to the terms and conditions of the GPL as -# it is applied to this Source Code. View the full text of the exception -# in the file doc/FLOSS-exception.txt in this software distribution, or -# online at -# http://secondlifegrid.net/programs/open_source/licensing/flossexception -# -# By copying, modifying or distributing this software, you acknowledge -# that you have read and understood your obligations described above, -# and agree to abide by those obligations. -# -# ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO -# WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, -# COMPLETENESS OR PERFORMANCE. -# $/LicenseInfo$ - -# DO NOT RUN THIS FILE DIRECTLY -# Instead, run develop.py with "configure -DPACKAGE:BOOL=ON" e.g.: -# develop.py -G vc80 configure -DPACKAGE:BOOL=ON -# to generate the "package" project in Visual Studio 2005 -# Note: as of Imprudence 1.3, this defaults to on for Windows - -import sys -import os.path -import re -import tarfile -viewer_dir = os.path.dirname(__file__) -# add llmanifest library to our path so we don't have to muck with PYTHONPATH -sys.path.append(os.path.join(viewer_dir, '../lib/python/indra/util')) -from llmanifest import LLManifest, main, proper_windows_path, path_ancestors - -class ViewerManifest(LLManifest): - def construct(self): - super(ViewerManifest, self).construct() - self.exclude("*.svn*") - self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg") - self.path(src="../../etc/message.xml", dst="app_settings/message.xml") - - if self.prefix(src="app_settings"): - self.exclude("logcontrol.xml") - self.exclude("logcontrol-dev.xml") - self.path("*.pem") - self.path("*.ini") - self.path("*.xml") - self.path("*.db2") - - # include the entire shaders directory recursively - self.path("shaders") - # ... and the entire windlight directory - self.path("windlight") - self.end_prefix("app_settings") - - if self.prefix(src="character"): - self.path("*.llm") - self.path("*.xml") - self.path("*.tga") - self.end_prefix("character") - - # Include our fonts - if self.prefix(src="fonts"): - self.path("LiberationSans-Bold.ttf") - self.path("LiberationSans-Regular.ttf") - self.path("VeraMono.ttf") - self.path("DejaVuSansCondensed-BoldOblique.ttf") - self.path("DejaVuSansCondensed-Bold.ttf") - self.path("DejaVuSansCondensed-Oblique.ttf") - self.path("DejaVuSansCondensed.ttf") - self.path("GPL.txt") - self.path("Liberation-License.txt") - self.path("Vera-License.txt") - self.end_prefix("fonts") - - # skins - if self.prefix(src="skins"): - self.path("paths.xml") - # include the entire textures directory recursively - if self.prefix(src="*/textures"): - self.path("*.tga") - self.path("*.j2c") - self.path("*.jpg") - self.path("*.png") - self.path("textures.xml") - self.end_prefix("*/textures") - self.path("*/xui/*/*.xml") - self.path("*/*.xml") - - # Local HTML files (e.g. loading screen) - if self.prefix(src="*/html"): - self.path("*.png") - self.path("*/*/*.html") - self.path("*/*/*.gif") - self.path("*/*/*.png") - self.end_prefix("*/html") - self.end_prefix("skins") - - # Files in the newview/ directory - self.path("gpu_table.txt") - - - # Gather up the README file, etc. - def gather_documents(self): - # From the top level directory (imprudence) - if self.prefix("../../..", dst=""): - self.path("README.txt") - self.path("MANIFESTO.txt") - self.path("CONTRIBUTE.txt") - self.path("RELEASE_NOTES.txt") - self.path("ChangeLog.txt", required=False) - self.end_prefix("../../..") - - # From the linden directory - if self.prefix("../..", dst="doc"): - self.path("LICENSE-source.txt") - self.path("LICENSE-logos.txt", "LICENSE-artwork.txt") - self.end_prefix("../..") - - # From the linden/doc directory - if self.prefix("../../doc", dst="doc"): - self.path("contributions.txt") - self.path("GPL-license.txt", "GPL.txt") - self.path("FLOSS-exception.txt") - self.end_prefix("../../doc") - - - def login_channel(self): - """Channel reported for login and upgrade purposes ONLY; - used for A/B testing""" - # NOTE: Do not return the normal channel if login_channel - # is not specified, as some code may branch depending on - # whether or not this is present - return self.args.get('login_channel') - - def grid(self): - return self.args['grid'] - def channel(self): - return self.args['channel'] - def channel_unique(self): - return self.channel().replace("Imprudence", "").strip() - def channel_oneword(self): - return "".join(self.channel_unique().split()) - def channel_lowerword(self): - return self.channel_oneword().lower() - - def flags_list(self): - """ Convenience function that returns the command-line flags - for the grid""" - - # Set command line flags relating to the target grid - grid_flags = '' - if not self.default_grid(): - grid_flags = "--grid %(grid)s "\ - "--helperuri http://preview-%(grid)s.secondlife.com/helpers/" %\ - {'grid':self.grid()} - - # set command line flags for channel - channel_flags = '' - if self.login_channel() and self.login_channel() != self.channel(): - # Report a special channel during login, but use default - channel_flags = '--channel "%s"' % (self.login_channel()) - elif not self.default_channel(): - channel_flags = '--channel "%s"' % self.channel() - - # Deal with settings - setting_flags = '' - if not self.default_channel() or not self.default_grid(): - if self.default_grid(): - setting_flags = '--settings settings_%s.xml'\ - % self.channel_lowerword() - else: - setting_flags = '--settings settings_%s_%s.xml'\ - % (self.grid(), self.channel_lowerword()) - - return " ".join((channel_flags, grid_flags, setting_flags)).strip() - - -class WindowsManifest(ViewerManifest): - def final_exe(self): - if self.default_channel(): - if self.default_grid(): - return "imprudence.exe" - else: - return "imprudencepreview.exe" - else: - return ''.join(self.channel().split()) + '.exe' - - - def construct(self): - super(WindowsManifest, self).construct() - # the final exe is complicated because we're not sure where it's coming from, - # nor do we have a fixed name for the executable - self.path(self.find_existing_file('debug/imprudence-bin.exe', 'release/imprudence-bin.exe', 'relwithdebinfo/imprudence-bin.exe'), dst=self.final_exe()) - - self.gather_documents() - - if self.prefix("../..", dst="doc"): - self.path("LICENSE-libraries.txt") - self.end_prefix("../..") - - - self.path("imprudence.url") - - # Plugin host application - self.path(os.path.join(os.pardir, - 'llplugin', 'slplugin', self.args['configuration'], "SLPlugin.exe"), - "SLPlugin.exe") - - - self.path("featuretable.txt") - - # For use in crash reporting (generates minidumps) - self.path("dbghelp.dll") - - # For using FMOD for sound... DJS - #self.path("fmod.dll") - - # For spellchecking - self.path("libhunspell.dll") - - # For textures - if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""): - self.path("openjpeg.dll") - self.end_prefix() - - # For sound - if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""): - self.path("openal32.dll") - self.path("alut.dll") - self.end_prefix() - - - # Media plugins - QuickTime - if self.prefix(src='../media_plugins/quicktime/%s' % self.args['configuration'], dst="llplugin"): - self.path("media_plugin_quicktime.dll") - self.end_prefix() - - # Media plugins - WebKit/Qt - if self.prefix(src='../media_plugins/webkit/%s' % self.args['configuration'], dst="llplugin"): - self.path("media_plugin_webkit.dll") - self.end_prefix() - - # For WebKit/Qt plugin runtimes - if self.prefix(src="../../libraries/i686-win32/lib/release", dst="llplugin"): - self.path("libeay32.dll") - self.path("qtcore4.dll") - self.path("qtgui4.dll") - self.path("qtnetwork4.dll") - self.path("qtopengl4.dll") - self.path("qtwebkit4.dll") - self.path("ssleay32.dll") - self.end_prefix() - - # For WebKit/Qt plugin runtimes (image format plugins) - if self.prefix(src="../../libraries/i686-win32/lib/release/imageformats", dst="llplugin/imageformats"): - self.path("qgif4.dll") - self.path("qico4.dll") - self.path("qjpeg4.dll") - self.path("qmng4.dll") - self.path("qsvg4.dll") - self.path("qtiff4.dll") - self.end_prefix() - - # Per platform MIME config on the cheap. See SNOW-307 / DEV-41388 - self.path("skins/default/xui/en-us/mime_types_windows.xml", "skins/default/xui/en-us/mime_types.xml") - - # These need to be installed as a SxS assembly, currently a 'private' assembly. - # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx - if self.prefix(src=self.args['configuration'], dst=""): - if self.args['configuration'] == 'Debug': - self.path("msvcr80d.dll") - self.path("msvcp80d.dll") - self.path("Microsoft.VC80.DebugCRT.manifest") - else: - self.path("msvcr80.dll") - self.path("msvcp80.dll") - self.path("Microsoft.VC80.CRT.manifest") - self.end_prefix() - - # The config file name needs to match the exe's name. - self.path(src="%s/imprudence-bin.exe.config" % self.args['configuration'], dst=self.final_exe() + ".config") - - # We need this one too, so that llkdu loads at runtime - DEV-41194 - #self.path(src="%s/imprudence-bin.exe.config" % self.args['configuration'], dst="llkdu.dll.2.config") - self.path("llkdu.dll.2.config") - - # We need this one too, so that win_crash_logger.exe loads at runtime - DEV-19004 - #self.path(src="%s/imprudence-bin.exe.config" % self.args['configuration'], dst="win_crash_logger.exe.config") - - # same thing for auto-updater. - #self.path(src="%s/imprudence-bin.exe.config" % self.args['configuration'], dst="updater.exe.config") - - # Vivox runtimes - if self.prefix(src="vivox-runtime/i686-win32", dst=""): - # self.path("alut.dll") - self.path("wrap_oal.dll") - self.path("SLVoice.exe") - # self.path("SLVoiceAgent.exe") - # self.path("libeay32.dll") - # self.path("srtp.dll") - # self.path("ssleay32.dll") - # self.path("tntk.dll") - self.path("vivoxsdk.dll") - self.path("ortp.dll") - - self.end_prefix() - - # Gstreamer plugins - if self.prefix(src="lib/gstreamer-plugins", dst=""): - self.path("*.dll", dst="lib/gstreamer-plugins/*.dll") - self.end_prefix() - - # Gstreamer libs - if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""): - self.path("iconv.dll") - self.path("libxml2.dll") - self.path("libcairo-2.dll") - self.path("libgio-2.0-0.dll") - self.path("libglib-2.0-0.dll") - self.path("libgmodule-2.0-0.dll") - self.path("libgobject-2.0-0.dll") - self.path("libgthread-2.0-0.dll") - self.path("charset.dll") - self.path("intl.dll") - self.path("libgcrypt-11.dll") - self.path("libgnutls-26.dll") - self.path("libgpg-error-0.dll") - self.path("libgstapp.dll") - self.path("libgstaudio.dll") - self.path("libgstbase-0.10.dll") - self.path("libgstcdda.dll") - self.path("libgstcontroller-0.10.dll") - self.path("libgstdataprotocol-0.10.dll") - self.path("libgstdshow.dll") - self.path("libgstfft.dll") - self.path("libgstinterfaces.dll") - self.path("libgstnet-0.10.dll") - self.path("libgstnetbuffer.dll") - self.path("libgstpbutils.dll") - self.path("libgstreamer-0.10.dll") - self.path("libgstriff.dll") - self.path("libgstrtp.dll") - self.path("libgstrtsp.dll") - self.path("libgstsdp.dll") - self.path("libgsttag.dll") - self.path("libgstvideo.dll") - self.path("libjpeg.dll") - self.path("libmp3lame-0.dll") - self.path("libneon-27.dll") - self.path("libogg-0.dll") - self.path("liboil-0.3-0.dll") - self.path("libopenjpeg-2.dll") - self.path("libpng12-0.dll") - self.path("libschroedinger-1.0-0.dll") - self.path("libspeex-1.dll") - self.path("libtheora-0.dll") - self.path("libvorbis-0.dll") - self.path("libvorbisenc-2.dll") - self.path("libxml2-2.dll") - self.path("glew32.dll") - self.path("xvidcore.dll") - self.path("zlib1.dll") - self.end_prefix() - -# # pull in the crash logger and updater from other projects -# self.path(src=self.find_existing_file( # tag:"crash-logger" here as a cue to the exporter -# "../win_crash_logger/debug/windows-crash-logger.exe", -# "../win_crash_logger/release/windows-crash-logger.exe", -# "../win_crash_logger/relwithdebinfo/windows-crash-logger.exe"), -# dst="win_crash_logger.exe") - self.path(src=self.find_existing_file( - "../win_updater/debug/windows-updater.exe", - "../win_updater/release/windows-updater.exe", - "../win_updater/relwithdebinfo/windows-updater.exe"), - dst="updater.exe") - - # For google-perftools tcmalloc allocator. - #if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""): - # self.path("libtcmalloc_minimal.dll") - # self.end_prefix() - - - def nsi_file_commands(self, install=True): - def wpath(path): - if path.endswith('/') or path.endswith(os.path.sep): - path = path[:-1] - path = path.replace('/', '\\') - return path - - result = "" - dest_files = [pair[1] for pair in self.file_list if pair[0] and os.path.isfile(pair[1])] - # sort deepest hierarchy first - dest_files.sort(lambda a,b: cmp(a.count(os.path.sep),b.count(os.path.sep)) or cmp(a,b)) - dest_files.reverse() - out_path = None - for pkg_file in dest_files: - rel_file = os.path.normpath(pkg_file.replace(self.get_dst_prefix()+os.path.sep,'')) - installed_dir = wpath(os.path.join('$INSTDIR', os.path.dirname(rel_file))) - pkg_file = wpath(os.path.normpath(pkg_file)) - if installed_dir != out_path: - if install: - out_path = installed_dir - result += 'SetOutPath ' + out_path + '\n' - if install: - result += 'File ' + pkg_file + '\n' - else: - result += 'Delete ' + wpath(os.path.join('$INSTDIR', rel_file)) + '\n' - # at the end of a delete, just rmdir all the directories - if not install: - deleted_file_dirs = [os.path.dirname(pair[1].replace(self.get_dst_prefix()+os.path.sep,'')) for pair in self.file_list] - # find all ancestors so that we don't skip any dirs that happened to have no non-dir children - deleted_dirs = [] - for d in deleted_file_dirs: - deleted_dirs.extend(path_ancestors(d)) - # sort deepest hierarchy first - deleted_dirs.sort(lambda a,b: cmp(a.count(os.path.sep),b.count(os.path.sep)) or cmp(a,b)) - deleted_dirs.reverse() - prev = None - for d in deleted_dirs: - if d != prev: # skip duplicates - result += 'RMDir ' + wpath(os.path.join('$INSTDIR', os.path.normpath(d))) + '\n' - prev = d - - return result - - def package_finish(self): - # a standard map of strings for replacing in the templates - substitution_strings = { - 'version' : '.'.join(self.args['version']).replace(' ', '_'), - 'version_short' : '.'.join(self.args['version'][:-1]).replace(' ', '_'), - 'version_dashes' : '-'.join(self.args['version']).replace(' ', '_'), - 'final_exe' : self.final_exe(), - 'grid':self.args['grid'], - 'grid_caps':self.args['grid'].upper(), - # escape quotes becase NSIS doesn't handle them well - 'flags':self.flags_list().replace('"', '$\\"'), - 'channel':self.channel(), - 'channel_oneword':self.channel_oneword(), - 'channel_unique':self.channel_unique(), - } - - version_vars = """ - !define INSTEXE "%(final_exe)s" - !define VERSION "%(version_short)s" - !define VERSION_LONG "%(version)s" - !define VERSION_DASHES "%(version_dashes)s" - """ % substitution_strings - if self.default_channel(): - if self.default_grid(): - # release viewer - installer_file = "Imprudence_%(version_dashes)s_Setup.exe" - grid_vars_template = """ - OutFile "%(installer_file)s" - !define INSTFLAGS "%(flags)s" - !define INSTNAME "Imprudence" - !define SHORTCUT "Imprudence" - !define URLNAME "imprudence" - Caption "Imprudence ${VERSION}" - """ - else: - # beta grid viewer - installer_file = "Imprudence_%(version_dashes)s_(%(grid_caps)s)_Setup.exe" - grid_vars_template = """ - OutFile "%(installer_file)s" - !define INSTFLAGS "%(flags)s" - !define INSTNAME "Imprudence%(grid_caps)s" - !define SHORTCUT "Imprudence (%(grid_caps)s)" - !define URLNAME "imprudence%(grid)s" - !define UNINSTALL_SETTINGS 1 - Caption "Imprudence %(grid)s ${VERSION}" - """ - else: - # some other channel on some grid - installer_file = "Imprudence_%(version_dashes)s_%(channel_oneword)s_Setup.exe" - grid_vars_template = """ - OutFile "%(installer_file)s" - !define INSTFLAGS "%(flags)s" - !define INSTNAME "Imprudence%(channel_oneword)s" - !define SHORTCUT "%(channel)s" - !define URLNAME "imprudence" - !define UNINSTALL_SETTINGS 1 - Caption "%(channel)s ${VERSION}" - """ - if 'installer_name' in self.args: - installer_file = self.args['installer_name'] - else: - installer_file = installer_file % substitution_strings - substitution_strings['installer_file'] = installer_file - - tempfile = "imprudence_setup_tmp.nsi" - # the following replaces strings in the nsi template - # it also does python-style % substitution - self.replace_in("installers/windows/installer_template.nsi", tempfile, { - "%%VERSION%%":version_vars, - "%%SOURCE%%":self.get_src_prefix(), - "%%GRID_VARS%%":grid_vars_template % substitution_strings, - "%%INSTALL_FILES%%":self.nsi_file_commands(True), - "%%DELETE_FILES%%":self.nsi_file_commands(False)}) - - # We use the Unicode version of NSIS, available from - # http://www.scratchpaper.com/ - NSIS_path = 'C:\\Program Files\\NSIS\\Unicode\\makensis.exe' - self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile)) - # self.remove(self.dst_path_of(tempfile)) - # If we're on a build machine, sign the code using our Authenticode certificate. JC - sign_py = 'C:\\buildscripts\\code-signing\\sign.py' - if os.path.exists(sign_py): - self.run_command(sign_py + ' ' + self.dst_path_of(installer_file)) - else: - print "Skipping code signing,", sign_py, "does not exist" - self.created_path(self.dst_path_of(installer_file)) - self.package_file = installer_file - - -class DarwinManifest(ViewerManifest): - def construct(self): - # copy over the build result (this is a no-op if run within the xcode script) - self.path(self.args['configuration'] + "/Imprudence.app", dst="") - - if self.prefix(src="", dst="Contents"): # everything goes in Contents - - self.path("Info-Imprudence.plist", dst="Info.plist") - - # copy additional libs in /Contents/MacOS/ - if self.prefix(src="../../libraries/universal-darwin/lib_release", dst="MacOS/"): - - self.path("libndofdev.dylib") - - self.path("libopenal.1.dylib") - self.path("libalut.0.dylib") - - self.path("libglib-2.0.dylib") - self.path("libgmodule-2.0.dylib") - self.path("libgobject-2.0.dylib") - self.path("libgthread-2.0.dylib") - - self.path("libgstreamer-0.10.dylib") - self.path("libgstapp-0.10.dylib") - self.path("libgstaudio-0.10.dylib") - self.path("libgstbase-0.10.dylib") - self.path("libgstcdda-0.10.dylib") - self.path("libgstcontroller-0.10.dylib") - self.path("libgstdataprotocol-0.10.dylib") - self.path("libgstfft-0.10.dylib") - self.path("libgstinterfaces-0.10.dylib") - self.path("libgstnet-0.10.dylib") - self.path("libgstnetbuffer-0.10.dylib") - self.path("libgstpbutils-0.10.dylib") - self.path("libgstriff-0.10.dylib") - self.path("libgstrtp-0.10.dylib") - self.path("libgstrtsp-0.10.dylib") - self.path("libgstsdp-0.10.dylib") - self.path("libgsttag-0.10.dylib") - self.path("libgstvideo-0.10.dylib") - - self.path("libxml2.2.dylib") - self.path("libfaad.2.dylib") - self.path("libFLAC.8.dylib") - self.path("libintl.3.dylib") - self.path("libjpeg.62.dylib") - self.path("libpng12.0.dylib") - self.path("libneon.27.dylib") - self.path("libogg.0.dylib") - self.path("liboil-0.3.0.dylib") - self.path("libopenjpeg.1.4.dylib") - self.path("libtheora.0.dylib") - self.path("libvorbis.0.dylib") - self.path("libvorbisenc.2.dylib") - self.path("libvorbisfile.3.dylib") - - self.end_prefix("../../libraries/universal-darwin/lib_release") - - # most everything goes in the Resources directory - if self.prefix(src="", dst="Resources"): - super(DarwinManifest, self).construct() - - if self.prefix("cursors_mac"): - self.path("*.tif") - self.end_prefix("cursors_mac") - - # From the linden directory - if self.prefix("../..", dst="doc"): - self.path("LICENSE-libraries.txt") - self.end_prefix("../..") - - self.gather_documents() - - self.path("featuretable_mac.txt") - self.path("SecondLife.nib") - - self.path("viewer.icns") - - # Translations - self.path("English.lproj") - self.path("German.lproj") - self.path("Japanese.lproj") - self.path("Korean.lproj") - self.path("da.lproj") - self.path("es.lproj") - self.path("fr.lproj") - self.path("hu.lproj") - self.path("it.lproj") - self.path("nl.lproj") - self.path("pl.lproj") - self.path("pt.lproj") - self.path("ru.lproj") - self.path("tr.lproj") - self.path("uk.lproj") - self.path("zh-Hans.lproj") - - - if self.prefix(src="../../libraries/universal-darwin/lib_release/gstreamer-plugins", dst="lib/gstreamer-plugins"): - self.path("libgstaacparse.so") - self.path("libgstadder.so") - self.path("libgstaiffparse.so") - self.path("libgstamrparse.so") - self.path("libgstapp.so") - self.path("libgstaudioconvert.so") - self.path("libgstaudiorate.so") - self.path("libgstaudioresample.so") - self.path("libgstautodetect.so") - self.path("libgstavi.so") - self.path("libgstcoreelements.so") - self.path("libgstcoreindexers.so") - self.path("libgstdebug.so") - self.path("libgstdecodebin.so") - self.path("libgstdecodebin2.so") - self.path("libgstdeinterlace2.so") - self.path("libgstequalizer.so") - self.path("libgstfaad.so") - self.path("libgstffmpeg.so") - self.path("libgstffmpegcolorspace.so") - self.path("libgstffmpegscale.so") - self.path("libgstfilter.so") - self.path("libgstflac.so") - self.path("libgstflv.so") - self.path("libgstgdp.so") - self.path("libgsth264parse.so") - self.path("libgsticydemux.so") - self.path("libgstid3demux.so") - self.path("libgstinterleave.so") - self.path("libgstjpeg.so") - self.path("libgstlevel.so") - self.path("libgstmetadata.so") - self.path("libgstmpeg4videoparse.so") - self.path("libgstmpegdemux.so") - self.path("libgstmpegvideoparse.so") - self.path("libgstmultifile.so") - self.path("libgstmultipart.so") - self.path("libgstneonhttpsrc.so") - self.path("libgstogg.so") - self.path("libgstosxaudio.so") - self.path("libgstosxvideosink.so") - self.path("libgstplaybin.so") - self.path("libgstpng.so") - self.path("libgstpostproc.so") - self.path("libgstqtdemux.so") - #self.path("libgstqtwrapper.so") - self.path("libgstqueue2.so") - self.path("libgstreal.so") - self.path("libgstrtp.so") - self.path("libgstrtpmanager.so") - self.path("libgstrtsp.so") - self.path("libgstsdpelem.so") - self.path("libgstselector.so") - self.path("libgststereo.so") - self.path("libgsttcp.so") - self.path("libgsttheora.so") - self.path("libgsttypefindfunctions.so") - self.path("libgstudp.so") - self.path("libgstvideobalance.so") - self.path("libgstvideobox.so") - self.path("libgstvideocrop.so") - self.path("libgstvideoflip.so") - self.path("libgstvideomixer.so") - self.path("libgstvideorate.so") - self.path("libgstvideoscale.so") - self.path("libgstvideosignal.so") - self.path("libgstvolume.so") - self.path("libgstvorbis.so") - self.path("libgstwavparse.so") - - self.end_prefix("../../libraries/universal-darwin/lib_release/gstreamer-plugins") - - - # SLVoice and vivox lols - self.path("vivox-runtime/universal-darwin/libalut.dylib", "libalut.dylib") - self.path("vivox-runtime/universal-darwin/libopenal.dylib", "libopenal.dylib") - self.path("vivox-runtime/universal-darwin/libortp.dylib", "libortp.dylib") - self.path("vivox-runtime/universal-darwin/libvivoxsdk.dylib", "libvivoxsdk.dylib") - self.path("vivox-runtime/universal-darwin/SLVoice", "SLVoice") - #self.path("vivox-runtime/universal-darwin/SLVoiceAgent.app", "SLVoiceAgent.app") - - #libfmodwrapper.dylib - #self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib") - - # our apps -# self.path("../mac_crash_logger/" + self.args['configuration'] + "/mac-crash-logger.app", "mac-crash-logger.app") - self.path("../mac_updater/" + self.args['configuration'] + "/mac-updater.app", "mac-updater.app") - - # plugin launcher - self.path("../llplugin/slplugin/" + self.args['configuration'] + "/SLPlugin", "SLPlugin") - - # plugins - if self.prefix(src="", dst="llplugin"): - self.path("../media_plugins/quicktime/" + self.args['configuration'] + "/media_plugin_quicktime.dylib", "media_plugin_quicktime.dylib") - self.path("../media_plugins/webkit/" + self.args['configuration'] + "/media_plugin_webkit.dylib", "media_plugin_webkit.dylib") - self.path("../../libraries/universal-darwin/lib_release/libllqtwebkit.dylib", "libllqtwebkit.dylib") - - self.end_prefix("llplugin") - - # Per platform MIME config on the cheap. See SNOW-307 / DEV-41388 - self.path("skins/default/xui/en-us/mime_types_mac.xml", "skins/default/xui/en-us/mime_types.xml") - - # command line arguments for connecting to the proper grid - self.put_in_file(self.flags_list(), 'arguments.txt') - - self.end_prefix("Resources") - - self.end_prefix("Contents") - - # NOTE: the -S argument to strip causes it to keep enough info for - # annotated backtraces (i.e. function names in the crash log). 'strip' with no - # arguments yields a slightly smaller binary but makes crash logs mostly useless. - # This may be desirable for the final release. Or not. - if ("package" in self.args['actions'] or - "unpacked" in self.args['actions']): - self.run_command('strip -S "%(viewer_binary)s"' % - { 'viewer_binary' : self.dst_path_of('Contents/MacOS/Second Life')}) - - - def package_finish(self): - channel_standin = 'Imprudence' # hah, our default channel is not usable on its own - if not self.default_channel(): - channel_standin = self.channel() - - imagename="Imprudence_" + '_'.join(self.args['version']) - - # MBW -- If the mounted volume name changes, it breaks the .DS_Store's background image and icon positioning. - # If we really need differently named volumes, we'll need to create multiple DS_Store file images, or use some other trick. - - volname="Imprudence Installer" # DO NOT CHANGE without understanding comment above - - if self.default_channel(): - if not self.default_grid(): - # beta case - imagename = imagename + '_' + self.args['grid'].upper() - else: - # first look, etc - imagename = imagename + '_' + self.channel_oneword().upper() - - sparsename = imagename + ".sparseimage" - finalname = imagename + ".dmg" - # make sure we don't have stale files laying about - self.remove(sparsename, finalname) - - self.run_command('hdiutil create "%(sparse)s" -volname "%(vol)s" -fs HFS+ -type SPARSE -megabytes 400 -layout SPUD' % { - 'sparse':sparsename, - 'vol':volname}) - - # mount the image and get the name of the mount point and device node - hdi_output = self.run_command('hdiutil attach -private "' + sparsename + '"') - devfile = re.search("/dev/disk([0-9]+)[^s]", hdi_output).group(0).strip() - volpath = re.search('HFS\s+(.+)', hdi_output).group(1).strip() - - # Copy everything in to the mounted .dmg - - if self.default_channel() and not self.default_grid(): - app_name = "Imprudence " + self.args['grid'] - else: - app_name = channel_standin.strip() - - # Hack: - # Because there is no easy way to coerce the Finder into positioning - # the app bundle in the same place with different app names, we are - # adding multiple .DS_Store files to svn. There is one for release, - # one for release candidate and one for first look. Any other channels - # will use the release .DS_Store, and will look broken. - # - Ambroff 2008-08-20 - dmg_template = os.path.join( - 'installers', - 'darwin', - '%s-dmg' % "".join(self.channel_unique().split()).lower()) - - if not os.path.exists (self.src_path_of(dmg_template)): - dmg_template = os.path.join ('installers', 'darwin', 'release-dmg') - - for s,d in {self.get_dst_prefix():app_name + ".app", - os.path.join(dmg_template, "_VolumeIcon.icns"): ".VolumeIcon.icns", - os.path.join(dmg_template, "background.jpg"): "background.jpg", - os.path.join(dmg_template, "_DS_Store"): ".DS_Store"}.items(): - print "Copying to dmg", s, d - self.copy_action(self.src_path_of(s), os.path.join(volpath, d)) - - # Hide the background image, DS_Store file, and volume icon file (set their "visible" bit) - self.run_command('SetFile -a V "' + os.path.join(volpath, ".VolumeIcon.icns") + '"') - self.run_command('SetFile -a V "' + os.path.join(volpath, "background.jpg") + '"') - self.run_command('SetFile -a V "' + os.path.join(volpath, ".DS_Store") + '"') - - # Create the alias file (which is a resource file) from the .r - self.run_command('rez "' + self.src_path_of("installers/darwin/release-dmg/Applications-alias.r") + '" -o "' + os.path.join(volpath, "Applications") + '"') - - # Set the alias file's alias and custom icon bits - self.run_command('SetFile -a AC "' + os.path.join(volpath, "Applications") + '"') - - # Set the disk image root's custom icon bit - self.run_command('SetFile -a C "' + volpath + '"') - - # Unmount the image - self.run_command('hdiutil detach -force "' + devfile + '"') - - print "Converting temp disk image to final disk image" - self.run_command('hdiutil convert "%(sparse)s" -format UDZO -imagekey zlib-level=9 -o "%(final)s"' % {'sparse':sparsename, 'final':finalname}) - # get rid of the temp file - self.package_file = finalname - self.remove(sparsename) - -class LinuxManifest(ViewerManifest): - def construct(self): - super(LinuxManifest, self).construct() - - self.path("res/imprudence_icon.png","imprudence_icon.png") - if self.prefix("linux_tools", dst=""): - #self.path("client-readme.txt","README-linux.txt") - self.path("client-readme-voice.txt","README-linux-voice.txt") - #self.path("client-readme-joystick.txt","README-linux-joystick.txt") - self.path("wrapper.sh","imprudence") - self.path("handle_secondlifeprotocol.sh") - self.path("register_secondlifeprotocol.sh") - self.path("getvoice.sh") - self.end_prefix("linux_tools") - - self.gather_documents() - - # From the linden directory - if self.prefix("../..", dst="doc"): - self.path("LICENSE-libraries.txt") - self.end_prefix("../..") - - # Create an appropriate gridargs.dat for this package, denoting required grid. - self.put_in_file(self.flags_list(), 'gridargs.dat') - self.path("linux_tools/launch_url.sh","launch_url.sh") - self.path("../llplugin/slplugin/SLPlugin", "bin/SLPlugin") - if self.prefix("res-sdl"): - self.path("*") - # recurse - self.end_prefix("res-sdl") - - # plugins - if self.prefix(src="", dst="bin/llplugin"): - self.path("../media_plugins/webkit/libmedia_plugin_webkit.so", "libmedia_plugin_webkit.so") - self.path("../media_plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_gstreamer.so") - self.end_prefix("bin/llplugin") - - # Per platform MIME config on the cheap. See SNOW-307 / DEV-41388 - self.path("skins/default/xui/en-us/mime_types_linux.xml", "skins/default/xui/en-us/mime_types.xml") - - self.path("featuretable_linux.txt") - - - def package_finish(self): - if 'installer_name' in self.args: - installer_name = self.args['installer_name'] - else: - installer_name_components = ['Imprudence_', self.args.get('arch')] - installer_name_components.extend(self.args['version']) - installer_name = "_".join(installer_name_components) - if self.default_channel(): - if not self.default_grid(): - installer_name += '_' + self.args['grid'].upper() - else: - installer_name += '_' + self.channel_oneword().upper() - - # Fix access permissions - self.run_command(""" - find %(dst)s -type d | xargs --no-run-if-empty chmod 755; - find %(dst)s -type f -perm 0700 | xargs --no-run-if-empty chmod 0755; - find %(dst)s -type f -perm 0500 | xargs --no-run-if-empty chmod 0555; - find %(dst)s -type f -perm 0600 | xargs --no-run-if-empty chmod 0644; - find %(dst)s -type f -perm 0400 | xargs --no-run-if-empty chmod 0444; - true""" % {'dst':self.get_dst_prefix() }) - - self.package_file = installer_name + '.tar.bz2' - - # Disabled for now. It's a waste of time to package every compile. - - # if("package" in self.args['actions'] or - # "unpacked" in self.args['actions']): - # - # # temporarily move directory tree so that it has the right - # # name in the tarfile - # self.run_command("mv %(dst)s %(inst)s" % { - # 'dst': self.get_dst_prefix(), - # 'inst': self.build_path_of(installer_name)}) - # try: - # # --numeric-owner hides the username of the builder for - # # security etc. - # self.run_command('tar -C %(dir)s --numeric-owner -cjf ' - # '%(inst_path)s.tar.bz2 %(inst_name)s' % { - # 'dir': self.get_build_prefix(), - # 'inst_name': installer_name, - # 'inst_path':self.build_path_of(installer_name)}) - # finally: - # self.run_command("mv %(inst)s %(dst)s" % { - # 'dst': self.get_dst_prefix(), - # 'inst': self.build_path_of(installer_name)}) - -class Linux_i686Manifest(LinuxManifest): - def construct(self): - super(Linux_i686Manifest, self).construct() - self.path("imprudence-stripped","bin/do-not-directly-run-imprudence-bin") - - - if self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"): - self.path("libapr-1.so.0") - self.path("libaprutil-1.so.0") - self.path("libdb-4.2.so") - self.path("libcrypto.so.0.9.7") - self.path("libexpat.so.1") - self.path("libssl.so.0.9.7") - self.path("libuuid.so", "libuuid.so.1") - self.path("libSDL-1.2.so.0") - self.path("libELFIO.so") - self.path("libopenjpeg.so.2") - self.path("libxml2.so.2") - self.path("libz.so.1") - - # OpenAL - self.path("libopenal.so.1") - self.path("libalut.so.0") - - # GTK+ and dependencies - self.path("libatk-1.0.so.0") - self.path("libcairo.so.2") - self.path("libfontconfig.so.1") - self.path("libfreetype.so.6") - # self.path("libgdk_pixbuf-2.0.so.0") # see linux64 why - self.path("libgdk-x11-2.0.so.0") - self.path("libgtk-x11-2.0.so.0") - # self.path("libpango-1.0.so.0") # dto. - # self.path("libpangoft2-1.0.so.0") - # self.path("libpangox-1.0.so.0") - # self.path("libpangoxft-1.0.so.0") - self.path("libpixman-1.so.0") - - # Gstreamer libs - self.path("libgstbase-0.10.so.0") - self.path("libgstreamer-0.10.so.0") - self.path("libgstaudio-0.10.so.0") - self.path("libgstbase-0.10.so.0") - self.path("libgstcontroller-0.10.so.0") - self.path("libgstdataprotocol-0.10.so.0") - self.path("libgstinterfaces-0.10.so.0") - self.path("libgstnetbuffer-0.10.so.0") - self.path("libgstpbutils-0.10.so.0") - self.path("libgstriff-0.10.so.0") - self.path("libgstrtp-0.10.so.0") - self.path("libgstrtsp-0.10.so.0") - self.path("libgstsdp-0.10.so.0") - self.path("libgsttag-0.10.so.0") - self.path("libgstvideo-0.10.so.0") - - # Gstreamer plugin dependencies - self.path("libfaad.so.0") - self.path("libogg.so.0") - self.path("libtheora.so.0") - self.path("libvorbis.so.0") - self.path("libvorbisenc.so.2") - self.path("liboil-0.3.so.0") - - # Gstreamer plugins - if self.prefix("gstreamer-plugins"): - self.path("libgstalsa.so") - self.path("libgstasf.so") - self.path("libgstaudioconvert.so") - self.path("libgstaudioresample.so") - self.path("libgstautodetect.so") - self.path("libgstavi.so") - self.path("libgstcoreelements.so") - self.path("libgstcoreindexers.so") - self.path("libgstdecodebin2.so") - self.path("libgstdecodebin.so") - self.path("libgstesd.so") - self.path("libgstfaad.so") - self.path("libgstffmpeg.so") - self.path("libgstgnomevfs.so") - self.path("libgsticydemux.so") - self.path("libgstid3demux.so") - self.path("libgstmpegdemux.so") - self.path("libgstmultifile.so") - self.path("libgstmultipart.so") - self.path("libgstogg.so") - self.path("libgstossaudio.so") - self.path("libgstplaybin.so") - self.path("libgstpulse.so") - self.path("libgstqtdemux.so") - self.path("libgstqueue2.so") - self.path("libgsttcp.so") - self.path("libgsttheora.so") - self.path("libgsttypefindfunctions.so") - self.path("libgstudp.so") - self.path("libgstvideoscale.so") - self.path("libgstvolume.so") - self.path("libgstvorbis.so") - self.path("libgstwavparse.so") - - self.end_prefix("gstreamer-plugins") - - self.end_prefix("lib") - - # Vivox runtimes and libs - if self.prefix(src="vivox-runtime/i686-linux", dst="bin"): - self.path("SLVoice") - self.end_prefix("bin") - - if self.prefix(src="vivox-runtime/i686-linux", dst="lib"): - self.path("libalut.so") - self.path("libortp.so") - self.path("libvivoxsdk.so") - self.end_prefix("lib") - -class Linux_x86_64Manifest(LinuxManifest): - def construct(self): - super(Linux_x86_64Manifest, self).construct() - self.path("imprudence-stripped","bin/do-not-directly-run-imprudence-bin") -# self.path("../linux_crash_logger/linux-crash-logger-stripped","linux-crash-logger.bin") - - self.path("linux_tools/launch_url.sh","launch_url.sh") - if self.prefix("res-sdl"): - self.path("*") - # recurse - self.end_prefix("res-sdl") - - self.path("featuretable_linux.txt") - #self.path("secondlife-x86_64.supp") - - self.path("app_settings/mozilla-runtime-linux-x86_64") - - if self.prefix("../../libraries/x86_64-linux/lib_release_client", dst="lib64"): - self.path("libapr-1.so.0") - self.path("libaprutil-1.so.0") - self.path("libdb-4.2.so") - self.path("libcrypto.so.0.9.8") - self.path("libexpat.so.1") - self.path("libssl.so.0.9.8") - self.path("libuuid.so", "libuuid.so.1") - self.path("libSDL-1.2.so.0") - self.path("libELFIO.so") - self.path("libjpeg.so.7") - self.path("libpng12.so.0") - self.path("libopenjpeg.so.2") - self.path("libxml2.so.2") - #self.path("libz.so.1") #not needed - - # OpenAL - self.path("libopenal.so.1") - self.path("libalut.so.0") - - # GTK+ and dependencies - self.path("libatk-1.0.so.0") - self.path("libcairo.so.2") - self.path("libfontconfig.so.1") - self.path("libfreetype.so.6") - self.path("libgdk_pixbuf-2.0.so.0") # was commented to use systems gdk pixbufs instead - - # but seems webkit needs it o_O . Packaging for testing now. - self.path("libgdk-x11-2.0.so.0") - self.path("libgtk-x11-2.0.so.0") -# self.path("libpango-1.0.so.0") # use systems pango instead -# self.path("libpangoft2-1.0.so.0") # Both gdk pixbufs and pango would load systems modules -# self.path("libpangox-1.0.so.0") # and crash if not compatible or present. -# self.path("libpangoxft-1.0.so.0") # So we depend system gdk pixbufs and pango anyway. - self.path("libpixman-1.so.0") - - # Gstreamer libs - self.path("libgstbase-0.10.so.0") - self.path("libgstreamer-0.10.so.0") - self.path("libgstaudio-0.10.so.0") - self.path("libgstbase-0.10.so.0") - self.path("libgstcontroller-0.10.so.0") - self.path("libgstdataprotocol-0.10.so.0") - self.path("libgstinterfaces-0.10.so.0") - self.path("libgstnetbuffer-0.10.so.0") - self.path("libgstpbutils-0.10.so.0") - self.path("libgstriff-0.10.so.0") - self.path("libgstrtp-0.10.so.0") - self.path("libgstrtsp-0.10.so.0") - self.path("libgstsdp-0.10.so.0") - self.path("libgsttag-0.10.so.0") - self.path("libgstvideo-0.10.so.0") - - # Gstreamer plugin dependencies - self.path("libfaad.so.0") - self.path("libogg.so.0") - self.path("libtheora.so.0") - self.path("libvorbis.so.0") - self.path("libvorbisenc.so.2") - self.path("liboil-0.3.so.0") - - # Gstreamer plugins - if self.prefix("gstreamer-plugins"): - self.path("libgstalsa.so") - self.path("libgstasf.so") - self.path("libgstaudioconvert.so") - self.path("libgstaudioresample.so") - self.path("libgstautodetect.so") - self.path("libgstavi.so") - self.path("libgstcoreelements.so") - self.path("libgstcoreindexers.so") - self.path("libgstdecodebin2.so") - self.path("libgstdecodebin.so") - self.path("libgstesd.so") - self.path("libgstfaad.so") - self.path("libgstffmpeg.so") - self.path("libgstffmpegcolorspace.so") - self.path("libgstgnomevfs.so") - self.path("libgsticydemux.so") - self.path("libgstid3demux.so") - self.path("libgstmpegdemux.so") - self.path("libgstmultifile.so") - self.path("libgstmultipart.so") - self.path("libgstogg.so") - self.path("libgstossaudio.so") - self.path("libgstplaybin.so") - self.path("libgstpulse.so") - self.path("libgstqtdemux.so") - self.path("libgstqueue2.so") - self.path("libgsttcp.so") - self.path("libgsttheora.so") - self.path("libgsttypefindfunctions.so") - self.path("libgstudp.so") - self.path("libgstvideoscale.so") - self.path("libgstvolume.so") - self.path("libgstvorbis.so") - self.path("libgstwavparse.so") - - self.end_prefix("gstreamer-plugins") - self.end_prefix("lib64") - - - # Vivox runtimes and libs - if self.prefix(src="vivox-runtime/i686-linux", dst="bin"): - self.path("SLVoice") - self.end_prefix("bin") - - if self.prefix(src="vivox-runtime/i686-linux", dst="lib32"): - #self.path("libalut.so") - self.path("libortp.so") - self.path("libvivoxsdk.so") - self.end_prefix("lib32") - - # 32bit libs needed for voice - if self.prefix("../../libraries/x86_64-linux/lib_release_client/32bit-compat", dst="lib32"): - self.path("libalut.so") - self.path("libidn.so.11") - self.path("libopenal.so.1") - # self.path("libortp.so") - self.path("libuuid.so.1") - self.end_prefix("lib32") - -if __name__ == "__main__": - main() diff --git a/linden/install.xml b/linden/install.xml index 402ce00..5154fe0 100644 --- a/linden/install.xml +++ b/linden/install.xml @@ -735,20 +735,6 @@ url http://imprudenceviewer.org/download/libs/gstreamer-plugins-darwin-20100826.tar.bz2 - linux - - md5sum - 973aabcba37f6ee0ceab2e3d063eea84 - url - http://imprudenceviewer.org/download/libs/gstreamer-plugins-linux-20100827.tar.bz2 - - linux64 - - md5sum - 663c29f3885ab8429ad6841d80181c31 - url - http://imprudenceviewer.org/download/libs/gstreamer-plugins-linux64-20100827.tar.bz2 - gtk-etc -- cgit v1.1