summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/CMakeLists.txt2
-rw-r--r--indra/cmake/CMakeLists.txt1
-rw-r--r--indra/cmake/FindMT.cmake15
-rwxr-xr-xindra/develop.py20
-rw-r--r--indra/llui/llbutton.cpp1
-rw-r--r--indra/llui/llui.cpp36
-rw-r--r--indra/llui/llui.h19
-rw-r--r--indra/llui/lluictrlfactory.cpp10
-rw-r--r--indra/newview/app_settings/settings.xml17
-rw-r--r--indra/newview/installers/windows/installer_template.nsi37
-rw-r--r--indra/newview/installers/windows/lang_es.nsibin7612 -> 7846 bytes
-rw-r--r--indra/newview/installers/windows/lang_fr.nsibin7858 -> 8118 bytes
-rw-r--r--indra/newview/installers/windows/lang_it.nsibin7196 -> 7438 bytes
-rw-r--r--indra/newview/installers/windows/lang_nl.nsibin7160 -> 7388 bytes
-rw-r--r--indra/newview/installers/windows/lang_pt-br.nsibin7590 -> 7832 bytes
-rw-r--r--indra/newview/installers/windows/lang_zh.nsibin5354 -> 5552 bytes
-rw-r--r--indra/newview/llagentlanguage.cpp9
-rw-r--r--indra/newview/llagentlanguage.h2
-rw-r--r--indra/newview/llappviewer.cpp6
-rw-r--r--indra/newview/llfloaterhud.cpp7
-rw-r--r--indra/newview/llpanellogin.cpp6
-rw-r--r--indra/newview/llviewerstats.cpp3
-rwxr-xr-xindra/newview/viewer_manifest.py4
-rw-r--r--install.xml4
-rwxr-xr-xscripts/install.py46
-rwxr-xr-xscripts/template_verifier.py37
-rwxr-xr-xscripts/update_version_files.py37
27 files changed, 201 insertions, 118 deletions
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index c473b94ff7..0755f810bd 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -73,7 +73,9 @@ if (VIEWER)
add_dependencies(viewer mac-updater mac-crash-logger)
elseif (WINDOWS)
add_subdirectory(${VIEWER_PREFIX}win_crash_logger)
+ add_subdirectory(${VIEWER_PREFIX}win_setup)
add_subdirectory(${VIEWER_PREFIX}win_updater)
+ # add_dependencies(viewer windows-updater windows-setup windows-crash-logger)
add_dependencies(viewer windows-updater windows-crash-logger)
elseif (SOLARIS)
add_subdirectory(solaris_crash_logger)
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index a2658d3f3a..46b9b52f3f 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -28,6 +28,7 @@ set(cmake_SOURCE_FILES
FindELFIO.cmake
FindGooglePerfTools.cmake
FindMono.cmake
+ FindMT.cmake
FindMySQL.cmake
FindOpenJPEG.cmake
FindXmlRpcEpi.cmake
diff --git a/indra/cmake/FindMT.cmake b/indra/cmake/FindMT.cmake
new file mode 100644
index 0000000000..5239a4c2f5
--- /dev/null
+++ b/indra/cmake/FindMT.cmake
@@ -0,0 +1,15 @@
+#Find the windows manifest tool.
+
+FIND_PROGRAM(HAVE_MANIFEST_TOOL NAMES mt
+ PATHS
+ "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/VC/bin"
+ "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/Common7/Tools/Bin"
+ "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/SDK/v2.0/Bin")
+IF(HAVE_MANIFEST_TOOL)
+ MESSAGE(STATUS "Found Mainfest Tool. Embedding custom manifests.")
+ELSE(HAVE_MANIFEST_TOOL)
+ MESSAGE(FATAL_ERROR "Manifest tool, mt.exe, can't be found.")
+ENDIF(HAVE_MANIFEST_TOOL)
+
+STRING(REPLACE "/MANIFEST" "/MANIFEST:NO" CMAKE_EXE_LINKER_FLAGS
+ ${CMAKE_EXE_LINKER_FLAGS})
diff --git a/indra/develop.py b/indra/develop.py
index a987bb3da6..3692fac2b3 100755
--- a/indra/develop.py
+++ b/indra/develop.py
@@ -613,7 +613,7 @@ setup_platform = {
usage_msg = '''
-Usage: develop.py [options] command [command-options]
+Usage: develop.py [options] [command [command-options]]
Options:
-h | --help print this help message
@@ -623,21 +623,27 @@ Options:
-t | --type=NAME build type ("Debug", "Release", or "RelWithDebInfo")
-N | --no-distcc disable use of distcc
-G | --generator=NAME generator name
- Windows: VC71 or VS2003 (default), VC80 (VS2005) or VC90 (VS2008)
+ Windows: VC71 or VS2003 (default), VC80 (VS2005) or
+ VC90 (VS2008)
Mac OS X: Xcode (default), Unix Makefiles
Linux: Unix Makefiles (default), KDevelop3
Commands:
- build configure and build default target
- clean delete all build directories (does not affect sources)
- configure configure project by running cmake
+ build configure and build default target
+ clean delete all build directories, does not affect sources
+ configure configure project by running cmake (default command if none given)
-If you do not specify a command, the default is "configure".
+Command-options for "configure":
+ We use cmake variables to change the build configuration.
+ -DSERVER:BOOL=OFF Don't configure simulator/dataserver/etc
+ -DVIEWER:BOOL=OFF Don't configure the viewer
+ -DPACKAGE:BOOL=ON Create "package" target to make installers
+ -DLOCALIZESETUP:BOOL=ON Create one win_setup target per supported language
Examples:
Set up a viewer-only project for your system:
develop.py configure -DSERVER:BOOL=OFF
- Set up a Visual Studio 2005 project with package target (to build installer):
+ Set up a Visual Studio 2005 project with "package" target:
develop.py -G vc80 configure -DPACKAGE:BOOL=ON
'''
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 3f6338006f..47b7067f63 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -38,6 +38,7 @@
#include "llstring.h"
// Project includes
+#include "llhtmlhelp.h"
#include "llkeyboard.h"
#include "llui.h"
#include "lluiconstants.h"
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index 472f8606b1..f1e7b98a60 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -30,8 +30,6 @@
*/
// Utilities functions the user interface needs
-
-//#include "llviewerprecompiledheaders.h"
#include "linden_common.h"
#include <string>
@@ -1647,6 +1645,34 @@ void LLUI::setCursorPositionLocal(const LLView* viewp, S32 x, S32 y)
setCursorPositionScreen(screen_x, screen_y);
}
+// On Windows, the user typically sets the language when they install the
+// app (by running it with a shortcut that sets InstallLanguage). On Mac,
+// or on Windows if the SecondLife.exe executable is run directly, the
+// language follows the OS language. In all cases the user can override
+// the language manually in preferences. JC
+// static
+std::string LLUI::getLanguage()
+{
+ std::string language = "en-us";
+ if (sConfigGroup)
+ {
+ language = sConfigGroup->getString("Language");
+ if (language.empty() || language == "default")
+ {
+ language = sConfigGroup->getString("InstallLanguage");
+ }
+ if (language.empty() || language == "default")
+ {
+ language = sConfigGroup->getString("SystemLanguage");
+ }
+ if (language.empty() || language == "default")
+ {
+ language = "en-us";
+ }
+ }
+ return language;
+}
+
//static
std::string LLUI::locateSkin(const std::string& filename)
{
@@ -1660,11 +1686,7 @@ std::string LLUI::locateSkin(const std::string& filename)
{
if (!gDirUtilp->fileExists(found_file))
{
- std::string localization(sConfigGroup->getString("Language"));
- if(localization == "default")
- {
- localization = sConfigGroup->getString("SystemLanguage");
- }
+ std::string localization = getLanguage();
std::string local_skin = "xui" + slash + localization + slash + filename;
found_file = gDirUtilp->findSkinnedFilename(local_skin);
}
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index d434dbd6d1..aa3cff433e 100644
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -38,15 +38,17 @@
#include "llcontrol.h"
#include "llrect.h"
#include "llcoord.h"
-#include "llhtmlhelp.h"
-#include "llgl.h"
+//#include "llhtmlhelp.h"
+#include "llgl.h" // *TODO: break this dependency
#include <stack>
-#include "llimagegl.h"
+//#include "llimagegl.h"
// LLUIFactory
#include "llsd.h"
class LLColor4;
+class LLHtmlHelp;
+class LLImageGL;
class LLVector3;
class LLVector2;
class LLUUID;
@@ -139,13 +141,6 @@ inline void gl_rect_2d_offset_local( const LLRect& rect, S32 pixel_offset, BOOL
gl_rect_2d_offset_local( rect.mLeft, rect.mTop, rect.mRight, rect.mBottom, pixel_offset, filled );
}
-// No longer used
-// Initializes translation table
-// void init_tr();
-
-// Returns a string from the string table in the correct language
-// std::string tr(const std::string& english_chars);
-
// Used to hide the flashing text cursor when window doesn't have focus.
extern BOOL gShowTextEditCursor;
@@ -172,6 +167,10 @@ public:
static void loadIdentity();
static void translate(F32 x, F32 y, F32 z = 0.0f);
+ // Return the ISO639 language name ("en", "ko", etc.) for the viewer UI.
+ // http://www.loc.gov/standards/iso639-2/php/code_list.php
+ static std::string getLanguage();
+
//helper functions (should probably move free standing rendering helper functions here)
static std::string locateSkin(const std::string& filename);
static void setCursorPositionScreen(S32 x, S32 y);
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp
index eaaa9990a0..da718c8a33 100644
--- a/indra/llui/lluictrlfactory.cpp
+++ b/indra/llui/lluictrlfactory.cpp
@@ -130,15 +130,7 @@ void LLUICtrlFactory::setupPaths()
for (path = root->getFirstChild(); path.notNull(); path = path->getNextSibling())
{
LLUIString path_val_ui(path->getValue());
- std::string language = "en-us";
- if (LLUI::sConfigGroup)
- {
- language = LLUI::sConfigGroup->getString("Language");
- if(language == "default")
- {
- language = LLUI::sConfigGroup->getString("SystemLanguage");
- }
- }
+ std::string language = LLUI::getLanguage();
path_val_ui.setArg("[LANGUAGE]", language);
if (std::find(sXUIPaths.begin(), sXUIPaths.end(), path_val_ui.getString()) == sXUIPaths.end())
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index b01fbbec4f..62bc827bb1 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3971,7 +3971,18 @@
<key>Value</key>
<real>0.0</real>
</map>
- <key>InventoryAutoOpenDelay</key>
+ <key>InstallLanguage</key>
+ <map>
+ <key>Comment</key>
+ <string>Language passed from installer (for UI)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>default</string>
+ </map>
+ <key>InventoryAutoOpenDelay</key>
<map>
<key>Comment</key>
<string>Seconds before automatically opening inventory when mouse is over inventory button when performing inventory drag and drop</string>
@@ -4221,7 +4232,7 @@
<key>Language</key>
<map>
<key>Comment</key>
- <string>Language specifier (for XUI)</string>
+ <string>Language specifier (for UI)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -7670,7 +7681,7 @@
<key>SystemLanguage</key>
<map>
<key>Comment</key>
- <string>Language indicated by system settings (for XUI)</string>
+ <string>Language indicated by system settings (for UI)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 01bd98f87c..495012aac2 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -31,15 +31,27 @@ RequestExecutionLevel admin ; on Vista we must be admin because we write to Prog
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!include "%%SOURCE%%\installers\windows\lang_de.nsi"
!include "%%SOURCE%%\installers\windows\lang_en-us.nsi"
-!include "%%SOURCE%%\installers\windows\lang_ja.nsi"
-!include "%%SOURCE%%\installers\windows\lang_ko.nsi"
-!include "%%SOURCE%%\installers\windows\lang_pt-br.nsi"
-!include "%%SOURCE%%\installers\windows\lang_fr.nsi"
!include "%%SOURCE%%\installers\windows\lang_es.nsi"
+!include "%%SOURCE%%\installers\windows\lang_fr.nsi"
+!include "%%SOURCE%%\installers\windows\lang_ja.nsi"
!include "%%SOURCE%%\installers\windows\lang_it.nsi"
+!include "%%SOURCE%%\installers\windows\lang_ko.nsi"
!include "%%SOURCE%%\installers\windows\lang_nl.nsi"
+!include "%%SOURCE%%\installers\windows\lang_pt-br.nsi"
!include "%%SOURCE%%\installers\windows\lang_zh.nsi"
+# *TODO: Move these into the language files themselves
+LangString LanguageCode ${LANG_GERMAN} "de"
+LangString LanguageCode ${LANG_ENGLISH} "en"
+LangString LanguageCode ${LANG_SPANISH} "es"
+LangString LanguageCode ${LANG_FRENCH} "fr"
+LangString LanguageCode ${LANG_JAPANESE} "ja"
+LangString LanguageCode ${LANG_ITALIAN} "it"
+LangString LanguageCode ${LANG_KOREAN} "ko"
+LangString LanguageCode ${LANG_DUTCH} "nl"
+LangString LanguageCode ${LANG_PORTUGUESEBR} "pt"
+LangString LanguageCode ${LANG_SIMPCHINESE} "zh"
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Tweak for different servers/builds (this placeholder is replaced by viewer_manifest.py)
;; For example:
@@ -70,7 +82,6 @@ InstallDir "$PROGRAMFILES\${INSTNAME}"
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" ""
DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup)
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Variables
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -79,6 +90,7 @@ Var INSTEXE
Var INSTFLAGS
Var INSTSHORTCUT
Var COMMANDLINE ; command line passed to this installer, set in .onInit
+Var SHORTCUT_LANG_PARAM ; "--set InstallLanguage de", passes language to viewer
;;; Function definitions should go before file includes, because calls to
;;; DLLs like LangDLL trigger an implicit file include, so if that call is at
@@ -107,7 +119,7 @@ label_ask_launch:
label_launch:
# Assumes SetOutPath $INSTDIR
- Exec '"$INSTDIR\$INSTEXE" $INSTFLAGS'
+ Exec '"$INSTDIR\$INSTEXE" $INSTFLAGS $SHORTCUT_LANG_PARAM'
label_no_launch:
Pop $R0
FunctionEnd
@@ -222,7 +234,7 @@ Function CheckNetworkConnection
; Don't show secondary progress bar, this will be quick.
NSISdl::download_quiet \
/TIMEOUT=${HTTP_TIMEOUT} \
- "http://join.secondlife.com/installer-check/?v=${VERSION_LONG}" \
+ "http://install.secondlife.com/check/?v=${VERSION_LONG}" \
$0
Pop $1 ; Return value, either "success", "cancel" or an error message
; MessageBox MB_OK "Download result: $1"
@@ -682,7 +694,6 @@ lbl_end:
Return
FunctionEnd
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; MAIN SECTION
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -725,13 +736,15 @@ Call RemoveOldReleaseNotes
;; This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py
%%INSTALL_FILES%%
+# Pass the installer's language to the client to use as a default
+StrCpy $SHORTCUT_LANG_PARAM "--set InstallLanguage $(LanguageCode)"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Shortcuts in start menu
CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT"
SetOutPath "$INSTDIR"
CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \
- "$INSTDIR\$INSTEXE" "$INSTFLAGS"
+ "$INSTDIR\$INSTEXE" "$INSTFLAGS $SHORTCUT_LANG_PARAM"
WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Account.url" \
@@ -749,8 +762,10 @@ CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Other shortcuts
SetOutPath "$INSTDIR"
-CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS"
-CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS"
+CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \
+ "$INSTDIR\$INSTEXE" "$INSTFLAGS $SHORTCUT_LANG_PARAM"
+CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \
+ "$INSTDIR\$INSTEXE" "$INSTFLAGS $SHORTCUT_LANG_PARAM"
CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \
'"$INSTDIR\uninst.exe"' ''
diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi
index 3340a1230f..c6a7f38f3f 100644
--- a/indra/newview/installers/windows/lang_es.nsi
+++ b/indra/newview/installers/windows/lang_es.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi
index 5c17ad077f..d23615de91 100644
--- a/indra/newview/installers/windows/lang_fr.nsi
+++ b/indra/newview/installers/windows/lang_fr.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi
index 9f18013691..1208ec4eb8 100644
--- a/indra/newview/installers/windows/lang_it.nsi
+++ b/indra/newview/installers/windows/lang_it.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_nl.nsi b/indra/newview/installers/windows/lang_nl.nsi
index 42453baa28..c8ffa8bfcd 100644
--- a/indra/newview/installers/windows/lang_nl.nsi
+++ b/indra/newview/installers/windows/lang_nl.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_pt-br.nsi b/indra/newview/installers/windows/lang_pt-br.nsi
index 6524cc7c01..da56a3c336 100644
--- a/indra/newview/installers/windows/lang_pt-br.nsi
+++ b/indra/newview/installers/windows/lang_pt-br.nsi
Binary files differ
diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi
index e644e6389b..f4b7b5d143 100644
--- a/indra/newview/installers/windows/lang_zh.nsi
+++ b/indra/newview/installers/windows/lang_zh.nsi
Binary files differ
diff --git a/indra/newview/llagentlanguage.cpp b/indra/newview/llagentlanguage.cpp
index 7401f95f29..e34e8d1969 100644
--- a/indra/newview/llagentlanguage.cpp
+++ b/indra/newview/llagentlanguage.cpp
@@ -31,13 +31,17 @@
#include "llviewerprecompiledheaders.h"
#include "llagentlanguage.h"
+// viewer includes
#include "llagent.h"
#include "llviewercontrol.h"
#include "llviewerregion.h"
+// library includes
+#include "llui.h" // getLanguage()
LLAgentLanguage::LLAgentLanguage()
{
gSavedSettings.getControl("Language")->getSignal()->connect(boost::bind(&update));
+ gSavedSettings.getControl("InstallLanguage")->getSignal()->connect(boost::bind(&update));
gSavedSettings.getControl("SystemLanguage")->getSignal()->connect(boost::bind(&update));
gSavedSettings.getControl("LanguageIsPublic")->getSignal()->connect(boost::bind(&update));
}
@@ -51,9 +55,7 @@ bool LLAgentLanguage::update()
std::string url = gAgent.getRegion()->getCapability("UpdateAgentLanguage");
if (!url.empty())
{
- std::string language = gSavedSettings.getString("Language");
- if (language == "default")
- language = gSavedSettings.getString("SystemLanguage");
+ std::string language = LLUI::getLanguage();
body["language"] = language;
body["language_is_public"] = gSavedSettings.getBOOL("LanguageIsPublic");
@@ -62,4 +64,3 @@ bool LLAgentLanguage::update()
}
return true;
}
-
diff --git a/indra/newview/llagentlanguage.h b/indra/newview/llagentlanguage.h
index 8d708b27fc..aba23e28cf 100644
--- a/indra/newview/llagentlanguage.h
+++ b/indra/newview/llagentlanguage.h
@@ -32,7 +32,7 @@
#ifndef LL_LLAGENTLANGUAGE_H
#define LL_LLAGENTLANGUAGE_H
-#include "llmemory.h"
+#include "llmemory.h" // LLSingleton<>
#include "llevent.h"
class LLAgentLanguage: public LLSingleton<LLAgentLanguage>, public LLSimpleListener
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index f47f9b1f43..0ee3b148d0 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -296,6 +296,9 @@ const std::string LOGOUT_MARKER_FILE_NAME("SecondLife.logout_marker");
static BOOL gDoDisconnect = FALSE;
static std::string gLaunchFileOnQuit;
+// Used on Win32 for other apps to identify our window (eg, win_setup)
+const char* const VIEWER_WINDOW_CLASSNAME = "Second Life";
+
//----------------------------------------------------------------------------
// File scope definitons
const char *VFS_DATA_FILE_BASE = "data.db2.x.";
@@ -2082,7 +2085,8 @@ bool LLAppViewer::initWindow()
// always start windowed
BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth");
- gViewerWindow = new LLViewerWindow(gWindowTitle, "Second Life",
+ gViewerWindow = new LLViewerWindow(gWindowTitle,
+ VIEWER_WINDOW_CLASSNAME,
gSavedSettings.getS32("WindowX"), gSavedSettings.getS32("WindowY"),
gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"),
FALSE, ignorePixelDepth);
diff --git a/indra/newview/llfloaterhud.cpp b/indra/newview/llfloaterhud.cpp
index 82b3097ee2..848068ee9d 100644
--- a/indra/newview/llfloaterhud.cpp
+++ b/indra/newview/llfloaterhud.cpp
@@ -62,12 +62,7 @@ LLFloaterHUD::LLFloaterHUD()
// arrow keys during tutorial).
mWebBrowser->setTakeFocusOnClick(false);
- std::string language(gSavedSettings.getString("Language"));
- if(language == "default")
- {
- language = gSavedSettings.getString("SystemLanguage");
- }
-
+ std::string language = LLUI::getLanguage();
std::string base_url = gSavedSettings.getString("TutorialURL");
std::string url = base_url + language + "/";
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 13f3d125ed..816a8b5765 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -925,11 +925,7 @@ void LLPanelLogin::loadLoginPage()
}
// Language
- std::string language(gSavedSettings.getString("Language"));
- if(language == "default")
- {
- language = gSavedSettings.getString("SystemLanguage");
- }
+ std::string language = LLUI::getLanguage();
oStr << first_query_delimiter<<"lang=" << language;
// First Login?
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 72d6308503..7d0d16a100 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -680,8 +680,7 @@ void send_stats()
// send fps only for time app spends in foreground
agent["fps"] = (F32)gForegroundFrameCount / gForegroundTime.getElapsedTimeF32();
agent["version"] = gCurrentVersion;
- std::string language(gSavedSettings.getString("Language"));
- if(language == "default") language = gSavedSettings.getString("SystemLanguage");
+ std::string language = LLUI::getLanguage();
agent["language"] = language;
agent["sim_fps"] = ((F32) gFrameCount - gSimFrames) /
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index db46dac1c6..ef13f9151b 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -190,8 +190,8 @@ class WindowsManifest(ViewerManifest):
self.end_prefix()
# Mozilla appears to force a dependency on these files so we need to ship it (CP)
- self.path("msvcr71.dll")
- self.path("msvcp71.dll")
+ self.path("msvcr80.dll")
+ self.path("msvcp80.dll")
# Mozilla runtime DLLs (CP)
if self.prefix(src="../../libraries/i686-win32/lib/release", dst=""):
diff --git a/install.xml b/install.xml
index 6419951e3d..1c8e3aab9e 100644
--- a/install.xml
+++ b/install.xml
@@ -1036,9 +1036,9 @@ anguage Infrstructure (CLI) international standard</string>
<key>windows</key>
<map>
<key>md5sum</key>
- <string>8c1b8881285631eb32ba541e10d07b07</string>
+ <string>42cb780c595d25881b4967292a4a0f40</string>
<key>url</key>
- <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llmozlib-windows-20080922.tar.bz2</uri>
+ <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llmozlib-windows-20080828.tar.bz2</uri>
</map>
</map>
</map>
diff --git a/scripts/install.py b/scripts/install.py
index 59c441748e..67b1c8f409 100755
--- a/scripts/install.py
+++ b/scripts/install.py
@@ -33,6 +33,36 @@ THE SOFTWARE.
$/LicenseInfo$
"""
+import sys
+import os.path
+
+# Look for indra/lib/python in all possible parent directories ...
+# This is an improvement over the setup-path.py method used previously:
+# * the script may blocated anywhere inside the source tree
+# * it doesn't depend on the current directory
+# * it doesn't depend on another file being present.
+
+def add_indra_lib_path():
+ root = os.path.realpath(__file__)
+ # always insert the directory of the script in the search path
+ dir = os.path.dirname(root)
+ if dir not in sys.path:
+ sys.path.insert(0, dir)
+
+ # Now go look for indra/lib/python in the parent dies
+ while root != os.path.sep:
+ root = os.path.dirname(root)
+ dir = os.path.join(root, 'indra', 'lib', 'python')
+ if os.path.isdir(dir):
+ if dir not in sys.path:
+ sys.path.insert(0, dir)
+ return root
+ else:
+ print >>sys.stderr, "This script is not inside a valid installation."
+ sys.exit(1)
+
+base_dir = add_indra_lib_path()
+
import copy
import md5
import optparse
@@ -40,7 +70,6 @@ import os
import platform
import pprint
import shutil
-import sys
import tarfile
import tempfile
import urllib2
@@ -48,17 +77,6 @@ import urlparse
from sets import Set as set, ImmutableSet as frozenset
-# Locate -our- python library relative to our install location.
-from os.path import realpath, dirname, join
-
-# Walk back to checkout base directory
-base_dir = dirname(dirname(realpath(__file__)))
-# Walk in to libraries directory
-lib_dir = join(join(join(base_dir, 'indra'), 'lib'), 'python')
-
-if lib_dir not in sys.path:
- sys.path.insert(0, lib_dir)
-
from indra.base import llsd
from indra.util import helpformatter
@@ -830,13 +848,13 @@ darwin/universal/gcc/4.0
parser.add_option(
'--install-manifest',
type='string',
- default=join(base_dir, 'install.xml'),
+ default=os.path.join(base_dir, 'install.xml'),
dest='install_filename',
help='The file used to describe what should be installed.')
parser.add_option(
'--installed-manifest',
type='string',
- default=join(base_dir, 'installed.xml'),
+ default=os.path.join(base_dir, 'installed.xml'),
dest='installed_filename',
help='The file used to record what is installed.')
parser.add_option(
diff --git a/scripts/template_verifier.py b/scripts/template_verifier.py
index 581f1168ff..8f822daf6a 100755
--- a/scripts/template_verifier.py
+++ b/scripts/template_verifier.py
@@ -47,23 +47,26 @@ import os.path
# * it doesn't depend on the current directory
# * it doesn't depend on another file being present.
-root = os.path.abspath(__file__)
-# always insert the directory of the script in the search path
-dir = os.path.dirname(root)
-if dir not in sys.path:
- sys.path.insert(0, dir)
-
-# Now go look for indra/lib/python in the parent dies
-while root != os.path.sep:
- root = os.path.dirname(root)
- dir = os.path.join(root, 'indra', 'lib', 'python')
- if os.path.isdir(dir):
- if dir not in sys.path:
- sys.path.insert(0, dir)
- break
-else:
- print >>sys.stderr, "This script is not inside a valid installation."
- sys.exit(1)
+def add_indra_lib_path():
+ root = os.path.realpath(__file__)
+ # always insert the directory of the script in the search path
+ dir = os.path.dirname(root)
+ if dir not in sys.path:
+ sys.path.insert(0, dir)
+
+ # Now go look for indra/lib/python in the parent dies
+ while root != os.path.sep:
+ root = os.path.dirname(root)
+ dir = os.path.join(root, 'indra', 'lib', 'python')
+ if os.path.isdir(dir):
+ if dir not in sys.path:
+ sys.path.insert(0, dir)
+ break
+ else:
+ print >>sys.stderr, "This script is not inside a valid installation."
+ sys.exit(1)
+
+add_indra_lib_path()
import optparse
import os
diff --git a/scripts/update_version_files.py b/scripts/update_version_files.py
index 87a3b6f389..9081941521 100755
--- a/scripts/update_version_files.py
+++ b/scripts/update_version_files.py
@@ -13,23 +13,26 @@ import os.path
# * it doesn't depend on the current directory
# * it doesn't depend on another file being present.
-root = os.path.abspath(__file__)
-# always insert the directory of the script in the search path
-dir = os.path.dirname(root)
-if dir not in sys.path:
- sys.path.insert(0, dir)
-
-# Now go look for indra/lib/python in the parent dies
-while root != os.path.sep:
- root = os.path.dirname(root)
- dir = os.path.join(root, 'indra', 'lib', 'python')
- if os.path.isdir(dir):
- if dir not in sys.path:
- sys.path.insert(0, dir)
- break
-else:
- print >>sys.stderr, "This script is not inside a valid installation."
- sys.exit(1)
+def add_indra_lib_path():
+ root = os.path.realpath(__file__)
+ # always insert the directory of the script in the search path
+ dir = os.path.dirname(root)
+ if dir not in sys.path:
+ sys.path.insert(0, dir)
+
+ # Now go look for indra/lib/python in the parent dies
+ while root != os.path.sep:
+ root = os.path.dirname(root)
+ dir = os.path.join(root, 'indra', 'lib', 'python')
+ if os.path.isdir(dir):
+ if dir not in sys.path:
+ sys.path.insert(0, dir)
+ break
+ else:
+ print >>sys.stderr, "This script is not inside a valid installation."
+ sys.exit(1)
+
+add_indra_lib_path()
import getopt, os, re, commands
from indra.util import llversion