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
@@ -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
-#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 @@
Value
0.0
- InventoryAutoOpenDelay
+ InstallLanguage
+
+ InventoryAutoOpenDelay
windows
md5sum
- 8c1b8881285631eb32ba541e10d07b07
+ 42cb780c595d25881b4967292a4a0f40
url
- http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llmozlib-windows-20080922.tar.bz2
+ http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llmozlib-windows-20080828.tar.bz2
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)
+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)
+ # 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)
+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)
+ # 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