diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/cmake/BuildPackagesInfo.cmake | 10 | ||||
| -rwxr-xr-x | indra/cmake/Havok.cmake | 6 | ||||
| -rwxr-xr-x | indra/llcommon/llpreprocessor.h | 5 | ||||
| -rwxr-xr-x | indra/llcommon/llthread.cpp | 18 | ||||
| -rw-r--r-- | indra/llcommon/llthreadlocalstorage.h | 41 | ||||
| -rwxr-xr-x | indra/newview/CMakeLists.txt | 2 | ||||
| -rwxr-xr-x | indra/newview/llfloaterabout.cpp | 56 | ||||
| -rwxr-xr-x | indra/newview/skins/default/xui/en/floater_about.xml | 57 | ||||
| -rwxr-xr-x | indra/newview/viewer_manifest.py | 24 | ||||
| -rwxr-xr-x | indra/test/lltut.h | 4 | 
10 files changed, 55 insertions, 168 deletions
| diff --git a/indra/cmake/BuildPackagesInfo.cmake b/indra/cmake/BuildPackagesInfo.cmake new file mode 100644 index 0000000000..0f574ee39a --- /dev/null +++ b/indra/cmake/BuildPackagesInfo.cmake @@ -0,0 +1,10 @@ +# -*- cmake -*- +# Construct the version and copyright information based on package data. +include(Python) + +add_custom_command(OUTPUT packages-info.txt +  COMMENT Generating packages-info.txt for the about box +  MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/../autobuild.xml +  DEPENDS ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py +  COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py > packages-info.txt +  ) diff --git a/indra/cmake/Havok.cmake b/indra/cmake/Havok.cmake index 8b7f01d20b..798e59a679 100755 --- a/indra/cmake/Havok.cmake +++ b/indra/cmake/Havok.cmake @@ -3,7 +3,7 @@  if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)  set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") -use_prebuilt_binary(havok-source) +use_prebuilt_binary(havok_source)  set(Havok_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/havok/Source)  list(APPEND Havok_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/havok/Demo) @@ -68,7 +68,7 @@ foreach(HAVOK_LIB ${HAVOK_LIBS})        endif(DEBUG_PREBUILT)      endif("${havok_${HAVOK_LIB}_extracted}" STREQUAL "" AND EXISTS "${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted") -    if(${CMAKE_BINARY_DIR}/temp/havok-source_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted OR NOT ${havok_${HAVOK_LIB}_extracted} EQUAL 0) +    if(${CMAKE_BINARY_DIR}/temp/havok_source_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted OR NOT ${havok_${HAVOK_LIB}_extracted} EQUAL 0)        if(DEBUG_PREBUILT)          MESSAGE(STATUS "Extracting ${HAVOK_LIB}...")        endif(DEBUG_PREBUILT) @@ -111,7 +111,7 @@ foreach(HAVOK_LIB ${HAVOK_LIBS})        set(havok_${HAVOK_LIB}_extracted 0)        file(WRITE ${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted "${havok_${HAVOK_LIB}_extracted}") -    endif(${CMAKE_BINARY_DIR}/temp/havok-source_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted OR NOT ${havok_${HAVOK_LIB}_extracted} EQUAL 0) +    endif(${CMAKE_BINARY_DIR}/temp/havok_source_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted OR NOT ${havok_${HAVOK_LIB}_extracted} EQUAL 0)              file(GLOB extracted_debug "${debug_dir}/*.o")              file(GLOB extracted_release "${release_dir}/*.o") diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index 309165da7f..2c4bcc91f6 100755 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -101,6 +101,11 @@  #endif +#if LL_WINDOWS +# define LL_THREAD_LOCAL __declspec(thread) +#else +# define LL_THREAD_LOCAL __thread +#endif  // Static linking with apr on windows needs to be declared.  #if LL_WINDOWS && !LL_COMMON_LINK_SHARED diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index 51c89e1eaf..c3f235c6ee 100755 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -92,13 +92,7 @@ void set_thread_name( DWORD dwThreadID, const char* threadName)  //   //---------------------------------------------------------------------------- -#if LL_DARWIN -// statically allocated thread local storage not supported in Darwin executable formats -#elif LL_WINDOWS -U32 __declspec(thread) sThreadID = 0; -#elif LL_LINUX -U32 __thread sThreadID = 0; -#endif  +U32 LL_THREAD_LOCAL sThreadID = 0;  U32 LLThread::sIDIter = 0; @@ -115,9 +109,7 @@ LL_COMMON_API void assert_main_thread()  void LLThread::registerThreadID()  { -#if !LL_DARWIN  	sThreadID = ++sIDIter; -#endif  }  // @@ -134,9 +126,7 @@ void *APR_THREAD_FUNC LLThread::staticRun(apr_thread_t *apr_threadp, void *datap  	// for now, hard code all LLThreads to report to single master thread recorder, which is known to be running on main thread  	threadp->mRecorder = new LLTrace::ThreadRecorder(*LLTrace::get_master_thread_recorder()); -#if !LL_DARWIN  	sThreadID = threadp->mID; -#endif  	// Run the user supplied function  	threadp->run(); @@ -347,13 +337,7 @@ void LLThread::setQuitting()  // static  U32 LLThread::currentID()  { -#if LL_DARWIN -	// statically allocated thread local storage not supported in Darwin executable formats -	return (U32)apr_os_thread_current(); -#else  	return sThreadID; -#endif -  }  // static diff --git a/indra/llcommon/llthreadlocalstorage.h b/indra/llcommon/llthreadlocalstorage.h index ec3b52c8cb..3b5786023f 100644 --- a/indra/llcommon/llthreadlocalstorage.h +++ b/indra/llcommon/llthreadlocalstorage.h @@ -130,56 +130,19 @@ class LLThreadLocalSingletonPointer  public:  	LL_FORCE_INLINE static DERIVED_TYPE* getInstance()  	{ -#if LL_DARWIN -        createTLSKey(); -        return (DERIVED_TYPE*)pthread_getspecific(sInstanceKey); -#else  		return sInstance; -#endif  	}  	static void setInstance(DERIVED_TYPE* instance)  	{ -#if LL_DARWIN -        createTLSKey(); -        pthread_setspecific(sInstanceKey, (void*)instance); -#else  		sInstance = instance; -#endif  	}  private: - -#if LL_WINDOWS -	static __declspec(thread) DERIVED_TYPE* sInstance; -#elif LL_LINUX -	static __thread DERIVED_TYPE* sInstance; -#elif LL_DARWIN -    static void TLSError() -    { -        LL_ERRS() << "Could not create thread local storage" << LL_ENDL; -    } -    static void createTLSKey() -    { -        static S32 key_created = pthread_key_create(&sInstanceKey, NULL); -        if (key_created != 0) -        { -            LL_ERRS() << "Could not create thread local storage" << LL_ENDL; -        } -    } -    static pthread_key_t sInstanceKey; -#endif +	static LL_THREAD_LOCAL DERIVED_TYPE* sInstance;  }; -#if LL_WINDOWS -template<typename DERIVED_TYPE> -__declspec(thread) DERIVED_TYPE* LLThreadLocalSingletonPointer<DERIVED_TYPE>::sInstance = NULL; -#elif LL_LINUX -template<typename DERIVED_TYPE> -__thread DERIVED_TYPE* LLThreadLocalSingletonPointer<DERIVED_TYPE>::sInstance = NULL; -#elif LL_DARWIN  template<typename DERIVED_TYPE> -pthread_key_t LLThreadLocalSingletonPointer<DERIVED_TYPE>::sInstanceKey; -#endif +LL_THREAD_LOCAL DERIVED_TYPE* LLThreadLocalSingletonPointer<DERIVED_TYPE>::sInstance = NULL;  #endif // LL_LLTHREADLOCALSTORAGE_H diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index f5a04a49d0..0905ae7a73 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -5,6 +5,7 @@ project(viewer)  include(00-Common)  include(Boost)  include(BuildVersion) +include(BuildPackagesInfo)  include(DBusGlib)  include(DirectX)  include(OpenSSL) @@ -1583,6 +1584,7 @@ set(viewer_APPSETTINGS_FILES      app_settings/viewerart.xml      ${CMAKE_SOURCE_DIR}/../etc/message.xml      ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg +    packages-info.txt      )  source_group("App Settings" FILES ${viewer_APPSETTINGS_FILES}) diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 66149a4367..7ac3ac2f61 100755 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -123,18 +123,17 @@ BOOL LLFloaterAbout::postBuild()  	LLViewerTextEditor *support_widget =   		getChild<LLViewerTextEditor>("support_editor", true); -	LLViewerTextEditor *linden_names_widget =  -		getChild<LLViewerTextEditor>("linden_names", true); -  	LLViewerTextEditor *contrib_names_widget =   		getChild<LLViewerTextEditor>("contrib_names", true); -	LLViewerTextEditor *trans_names_widget =  -		getChild<LLViewerTextEditor>("trans_names", true); +	LLViewerTextEditor *licenses_widget =  +		getChild<LLViewerTextEditor>("licenses_editor", true);  	getChild<LLUICtrl>("copy_btn")->setCommitCallback(  		boost::bind(&LLFloaterAbout::onClickCopyToClipboard, this)); +	static const LLUIColor about_color = LLUIColorTable::instance().getColor("TextFgReadOnlyColor"); +  	if (gAgent.getRegion())  	{  		// start fetching server release notes URL @@ -153,24 +152,6 @@ BOOL LLFloaterAbout::postBuild()  	support_widget->setEnabled(FALSE);  	support_widget->startOfDoc(); -	// Get the names of Lindens, added by viewer_manifest.py at build time -	std::string lindens_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"lindens.txt"); -	llifstream linden_file; -	std::string lindens; -	linden_file.open(lindens_path);		/* Flawfinder: ignore */ -	if (linden_file.is_open()) -	{ -		std::getline(linden_file, lindens); // all names are on a single line -		linden_file.close(); -		linden_names_widget->setText(lindens); -	} -	else -	{ -		LL_INFOS("AboutInit") << "Could not read lindens file at " << lindens_path << LL_ENDL; -	} -	linden_names_widget->setEnabled(FALSE); -	linden_names_widget->startOfDoc(); -  	// Get the names of contributors, extracted from .../doc/contributions.txt by viewer_manifest.py at build time  	std::string contributors_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"contributors.txt");  	llifstream contrib_file; @@ -189,23 +170,28 @@ BOOL LLFloaterAbout::postBuild()  	contrib_names_widget->setEnabled(FALSE);  	contrib_names_widget->startOfDoc(); -	// Get the names of translators, extracted from .../doc/tranlations.txt by viewer_manifest.py at build time -	std::string translators_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"translators.txt"); -	llifstream trans_file; -	std::string translators; -	trans_file.open(translators_path);		/* Flawfinder: ignore */ -	if (trans_file.is_open()) +    // Get the Versions and Copyrights, created at build time +	std::string licenses_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"packages-info.txt"); +	llifstream licenses_file; +	licenses_file.open(licenses_path);		/* Flawfinder: ignore */ +	if (licenses_file.is_open())  	{ -		std::getline(trans_file, translators); // all names are on a single line -		trans_file.close(); +		std::string license_line; +		licenses_widget->clear(); +		while ( std::getline(licenses_file, license_line) ) +		{ +			licenses_widget->appendText(license_line+"\n", FALSE, +										LLStyle::Params() .color(about_color)); +		} +		licenses_file.close();  	}  	else  	{ -		LL_WARNS("AboutInit") << "Could not read translators file at " << translators_path << LL_ENDL; +		// this case will use the (out of date) hard coded value from the XUI +		LL_INFOS("AboutInit") << "Could not read licenses file at " << licenses_path << LL_ENDL;  	} -	trans_names_widget->setText(translators); -	trans_names_widget->setEnabled(FALSE); -	trans_names_widget->startOfDoc(); +	licenses_widget->setEnabled(FALSE); +	licenses_widget->startOfDoc();  	return TRUE;  } diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index ef2f158a86..60f36770bb 100755 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -51,44 +51,20 @@        name="credits_panel">        <text            follows="top|left|right" -          height="10" +          height="20"            layout="topleft"            left="5"            name="linden_intro"            top="10"            width="435"            wrap="true"> -Second Life is brought to you by the Lindens: -      </text> -      <text_editor -       enabled="false"  -       follows="top|left" -       height="98" -       bg_readonly_color="Transparent" -       left="5" -       text_color="LtGray" -       max_length="65536" -       name="linden_names" -       top_pad="10" -       width="435" -       word_wrap="true"> -Philip, Andrew, Doug, Richard, Phoenix, Ian, Mark, Robin, Dan, Char, Ryan, Eric, Jim, Lee, Jeff, Michael, Kelly, Steve, Catherine, Bub, Ramzi, Jill, Jeska, Don, Kona, Callum, Charity, Jack, Shawn, babbage, James, Lauren, Blue, Brent, Reuben, Pathfinder, Jesse, Patsy, Torley, Bo, Cyn, Jonathan, Gia, Annette, Ginsu, Harry, Lex, Runitai, Guy, Cornelius, Beth, Swiss, Thumper, Wendy, Teeple, Seth, Dee, Mia, Sally, Liana, Aura, Beez, Milo, Red, Gulliver, Marius, Joe, Jose, Dore, Justin, Nora, Morpheus, Lexie, Amber, Chris, Xan, Leyla, Walker, Sabin, Joshua, Hiromi, Tofu, Fritz, June, Jean, Ivy, Dez, Ken, Betsy, Which, Spike, Rob, Zee, Dustin, George, Claudia, del, Matthew, jane, jay, Adrian, Yool, Rika, Yoz, siobhan, Qarl, Benjamin, Beast, Everett, madhavi, Christopher, Izzy, stephany, Jeremy, sean, adreanne, Pramod, Tobin, sejong, Iridium, maurice, kj, Meta, kari, JP, bert, kyle, Jon, Socrates, Bridie, Ivan, maria, Aric, Coco, Periapse, sandy, Storrs, Lotte, Colossus, Brad, Pastrami, Zen, BigPapi, Banzai, Sardonyx, Mani, Garry, Jaime, Neuro, Samuel, Niko, CeeLo, Austin, Soft, Poppy, emma, tessa, angelo, kurz, alexa, Sue, CG, Blake, Erica, Brett, Bevis, kristen, Q, simon, Enus, MJ, laurap, Kip, Scouse, Ron, Ram, kend, Marty, Prospero, melissa, kraft, Nat, Seraph, Hamilton, Lordan, Green, miz, Ashlei, Trinity, Ekim, Echo, Charlie, Rowan, Rome, Jt, Doris, benoc, Christy, Bao, Kate, Tj, Patch, Cheah, Johan, Brandy, Angela, Oreh, Cogsworth, Lan, Mitchell, Space, Bambers, Einstein, Bender, Malbers, Matias, Maggie, Rothman, Milton, Niall, Marin, Allison, Mango, Andrea, Katt, Yi, Ambroff, Rico, Raymond, Gail, Christa, William, Dawn, Usi, Dynamike, M, Corr, Dante, Molly, kaylee, Danica, Kelv, Lil, jacob, Nya, Rodney, elsie, Blondin, Grant, Nyx, Devin, Monty, Minerva, Keira, Katie, Jenn, Makai, Clare, Joy, Cody, Gayathri, FJ, spider, Oskar, Landon, Jarv, Noelle, Al, Doc, Gray, Vir, t, Maestro, Simone, Shannon, yang, Courtney, Scott, charlene, Quixote, Susan, Zed, Amanda, Katelin, Esbee, JoRoan, Enkidu, roxie, Scarlet, Merov, Kevin, Judy, Rand, Newell, Les, Dessie, Galen, Michon, Geo, Siz, Calyle, Pete, Praveen, Callen, Sheldon, Pink, Nelson, jenelle, Terrence, Nathan, Juan, Sascha, Huseby, Karina, Kaye, Kotler, Lis, Darv, Charrell, Dakota, Kimmora, Theeba, Taka, Mae, Perry, Ducot, dana, Esther, Dough, gisele, Doten, Viale, Fisher, jessieann, ashley, Torres, delby, rountree, kurt, Slaton, Madison, Rue, Gino, Wen, Casssandra, Brodesky, Squid, Gez, Rakesh, Gecko, Ladan, Tony, Tatem, Squire, Falcon, BK, Crimp, Tiggs, Bacon, Coyot, Carmilla, Webb, Sea, Arch, Jillian, Jason, Bernard, Vogt, Peggy, dragon, Pup, xandix, Wallace, Bewest, Inoshiro, Rhett, AG, Aimee, Ghengis, Itiaes, Eli, Steffan, Epic, Grapes, Stone, Prep, Scobu, Robert, Alain, Carla, Vicky, Tia, Alec, Taras, Lisa, Oz, Ariane, Log, House, Kazu, Kim, Drofnas, Tyler, Campbell, Michele, Madeline, Nelly, Baron, Thor, Lori, Hele, Fredrik, Teddy, Pixie, Berry, Gabrielle, Alfonso, Brooke, Wolf, Ringo, Cru, Charlar, Rodvik, Gibson, Elise, Bagman, Greger, Leonidas, Jerm, Leslie, CB, Brenda, Durian, Carlo, mm, Zeeshan, Caleb, Max, Elikak, Mercille, Steph, Chase, Baker -      </text_editor> -      <text -          follows="top|left" -          height="10" -          layout="topleft" -          left="5" -          name="contrib_intro" -          top_pad="10" -          width="435" -          wrap="true"> +Second Life is brought to you by the Lindens,   with open source contributions from:        </text>        <text_editor         enabled="false"          follows="top|left" -       height="98" +       height="340"         bg_readonly_color="Transparent"         left="5"         text_color="LtGray" @@ -99,31 +75,6 @@ with open source contributions from:         word_wrap="true">  Dummy Name replaced at run time        </text_editor> -      <text -          follows="top|left" -          height="10" -          layout="topleft" -          left="5" -          name="trans_intro" -          top_pad="10" -          width="435" -          wrap="true"> -and translations from: -      </text> -      <text_editor -       enabled="false"  -       follows="top|left" -       height="98" -       bg_readonly_color="Transparent" -       left="5" -       text_color="LtGray" -       max_length="65536" -       name="trans_names" -       top_pad="10" -       width="435" -       word_wrap="true"> -Dummy Name replaced at run time -      </text_editor>      </panel>      <panel        border="true" @@ -138,7 +89,7 @@ Dummy Name replaced at run time         left="5"         text_color="LtGray"         max_length="65536" -       name="credits_editor" +       name="licenses_editor"         top="5"         width="435"         word_wrap="true"> diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index a2039b4528..2394dd26b9 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -55,7 +55,6 @@ 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") @@ -74,26 +73,6 @@ class ViewerManifest(LLManifest):                  contributions_path = "../../doc/contributions.txt"                  contributor_names = self.extract_names(contributions_path)                  self.put_in_file(contributor_names, "contributors.txt", src=contributions_path) -                # include the extracted list of translators -                translations_path = "../../doc/translations.txt" -                translator_names = self.extract_names(translations_path) -                self.put_in_file(translator_names, "translators.txt", src=translations_path) -                # include the list of Lindens (if any) -                #   see https://wiki.lindenlab.com/wiki/Generated_Linden_Credits -                linden_names_path = os.getenv("LINDEN_CREDITS") -                if not linden_names_path : -                    print "No 'LINDEN_CREDITS' specified in environment, using built-in list" -                else: -                    try: -                        linden_file = open(linden_names_path,'r') -                    except IOError: -                        print "No Linden names found at '%s', using built-in list" % linden_names_path -                    else: -                         # all names should be one line, but the join below also converts to a string -                        linden_names = ', '.join(linden_file.readlines()) -                        self.put_in_file(linden_names, "lindens.txt", src=linden_names_path) -                        linden_file.close() -                        print "Linden names extracted from '%s'" % linden_names_path                  # ... and the entire windlight directory                  self.path("windlight") @@ -107,6 +86,9 @@ class ViewerManifest(LLManifest):                      self.path("dictionaries")                      self.end_prefix(pkgdir) +                # include the extracted packages information (see BuildPackagesInfo.cmake) +                self.path(src=os.path.join(self.args['build'],"packages-info.txt"), dst="packages-info.txt") +                  # CHOP-955: If we have "sourceid" or "viewer_channel" in the                  # build process environment, generate it into                  # settings_install.xml. diff --git a/indra/test/lltut.h b/indra/test/lltut.h index b334fb51e2..9835565bb6 100755 --- a/indra/test/lltut.h +++ b/indra/test/lltut.h @@ -75,10 +75,14 @@ namespace tut  // overloads declared above.  // turn off warnings about unused functions from clang for tut package +#if __clang__  #pragma clang diagnostic push  #pragma clang diagnostic ignored "-Wunused-function" +#endif  #include <tut/tut.hpp> +#if __clang__  #pragma clang diagnostic pop +#endif  // The functions BELOW this point actually consume tut.hpp functionality.  namespace tut | 
