summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/CMakeLists.txt1
-rw-r--r--indra/cmake/BuildVersion.cmake58
-rw-r--r--indra/cmake/CMakeLists.txt1
-rw-r--r--indra/cmake/Variables.cmake2
-rw-r--r--indra/lib/python/indra/util/llmanifest.py41
-rw-r--r--indra/llcommon/CMakeLists.txt1
-rw-r--r--indra/llcommon/llversionviewer.h41
-rw-r--r--indra/newview/CMakeLists.txt72
-rw-r--r--indra/newview/English.lproj/InfoPlist.strings4
-rw-r--r--indra/newview/Info-SecondLife.plist2
-rw-r--r--indra/newview/VIEWER_VERSION.txt1
-rwxr-xr-xindra/newview/linux_tools/wrapper.sh2
-rw-r--r--indra/newview/llappviewer.cpp2
-rw-r--r--indra/newview/llversioninfo.cpp58
-rw-r--r--indra/newview/llversioninfo.h1
-rw-r--r--indra/newview/res/viewerRes.rc10
-rw-r--r--indra/newview/tests/llversioninfo_test.cpp28
-rw-r--r--indra/newview/viewer_manifest.py8
-rw-r--r--indra/viewer_components/updater/CMakeLists.txt7
-rw-r--r--indra/viewer_components/updater/llupdaterservice.cpp15
20 files changed, 194 insertions, 161 deletions
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index 001bb4b935..dde700c932 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -19,6 +19,7 @@ project(${ROOT_PROJECT_NAME})
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(Variables)
+include(BuildVersion)
if (DARWIN)
# 2.6.4 fixes a Mac bug in get_target_property(... "SLPlugin" LOCATION):
diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake
index 60a519c9af..7ee852bf72 100644
--- a/indra/cmake/BuildVersion.cmake
+++ b/indra/cmake/BuildVersion.cmake
@@ -1,18 +1,48 @@
# -*- cmake -*-
+# Construct the viewer version number based on the indra/VIEWER_VERSION file
-include(Python)
+if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/newview/
+ set(VIEWER_VERSION_BASE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/newview/VIEWER_VERSION.txt")
-macro (build_version _target)
- execute_process(
- COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/build_version.py
- llversion${_target}.h ${LLCOMMON_INCLUDE_DIRS}
- OUTPUT_VARIABLE ${_target}_VERSION
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
+ if ( EXISTS ${VIEWER_VERSION_BASE_FILE} )
+ file(STRINGS ${VIEWER_VERSION_BASE_FILE} VIEWER_SHORT_VERSION REGEX "^[0-9]+\\.[0-9]+\\.[0-9]+")
+ string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" VIEWER_VERSION_MAJOR ${VIEWER_SHORT_VERSION})
+ string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" VIEWER_VERSION_MINOR ${VIEWER_SHORT_VERSION})
+ string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" VIEWER_VERSION_PATCH ${VIEWER_SHORT_VERSION})
- if (${_target}_VERSION)
- message(STATUS "Version of ${_target} is ${${_target}_VERSION}")
- else (${_target}_VERSION)
- message(SEND_ERROR "Could not determine ${_target} version")
- endif (${_target}_VERSION)
-endmacro (build_version)
+ if (DEFINED ENV{revision})
+ set(VIEWER_VERSION_REVISION $ENV{revision})
+ message("Revision (from environment): ${VIEWER_VERSION_REVISION}")
+
+ else (DEFINED ENV{revision})
+ find_program(MERCURIAL hg)
+ if (DEFINED MERCURIAL)
+ execute_process(
+ COMMAND ${MERCURIAL} parents --template "{rev}"
+ OUTPUT_VARIABLE VIEWER_VERSION_REVISION
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ if (DEFINED VIEWER_VERSION_REVISION)
+ message("Revision (from hg) ${VIEWER_VERSION_REVISION}")
+ else (DEFINED VIEWER_VERSION_REVISION)
+ set(VIEWER_VERSION_REVISION 0 )
+ message("Revision not set, repository not found, using ${VIEWER_VERSION_REVISION}")
+ endif (DEFINED VIEWER_VERSION_REVISION)
+ else (DEFINED MERCURIAL)
+ set(VIEWER_VERSION_REVISION 0)
+ message("Revision not set, 'hg' not found (${MERCURIAL}), using ${VIEWER_VERSION_REVISION}")
+ endif (DEFINED MERCURIAL)
+ endif (DEFINED ENV{revision})
+ message("Building Version ${VIEWER_SHORT_VERSION} ${VIEWER_VERSION_REVISION}")
+ else ( EXISTS ${VIEWER_VERSION_BASE_FILE} )
+ message(SEND_ERROR "Cannot get viewer version from '${VIEWER_VERSION_BASE_FILE}'")
+ endif ( EXISTS ${VIEWER_VERSION_BASE_FILE} )
+
+ set(VIEWER_CHANNEL_VERSION_DEFINES
+ "LL_VIEWER_CHANNEL=\"${VIEWER_CHANNEL}\""
+ "LL_VIEWER_VERSION_MAJOR=${VIEWER_VERSION_MAJOR}"
+ "LL_VIEWER_VERSION_MINOR=${VIEWER_VERSION_MINOR}"
+ "LL_VIEWER_VERSION_PATCH=${VIEWER_VERSION_PATCH}"
+ "LL_VIEWER_VERSION_BUILD=${VIEWER_VERSION_REVISION}"
+ )
+endif (NOT DEFINED VIEWER_SHORT_VERSION)
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 569034a6fb..4f567988b7 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -12,7 +12,6 @@ set(cmake_SOURCE_FILES
Audio.cmake
BerkeleyDB.cmake
Boost.cmake
- BuildVersion.cmake
CARes.cmake
CURL.cmake
CMakeCopyIfDifferent.cmake
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index 4b459f1a48..6c3b7801b9 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -141,7 +141,7 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(GRID agni CACHE STRING "Target Grid")
set(VIEWER ON CACHE BOOL "Build Second Life viewer.")
-set(VIEWER_CHANNEL "LindenDeveloper" CACHE STRING "Viewer Channel Name")
+set(VIEWER_CHANNEL "Second Life Test" CACHE STRING "Viewer Channel Name")
set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for A/B Testing")
if (XCODE_VERSION GREATER 4.2)
diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py
index 97cc31bba0..eaa94925b1 100644
--- a/indra/lib/python/indra/util/llmanifest.py
+++ b/indra/lib/python/indra/util/llmanifest.py
@@ -84,28 +84,6 @@ def get_default_platform(dummy):
'darwin':'darwin'
}[sys.platform]
-def get_default_version(srctree):
- # look up llversion.h and parse out the version info
- paths = [os.path.join(srctree, x, 'llversionviewer.h') for x in ['llcommon', '../llcommon', '../../indra/llcommon.h']]
- for p in paths:
- if os.path.exists(p):
- contents = open(p, 'r').read()
- major = re.search("LL_VERSION_MAJOR\s=\s([0-9]+)", contents).group(1)
- minor = re.search("LL_VERSION_MINOR\s=\s([0-9]+)", contents).group(1)
- patch = re.search("LL_VERSION_PATCH\s=\s([0-9]+)", contents).group(1)
- build = re.search("LL_VERSION_BUILD\s=\s([0-9]+)", contents).group(1)
- return major, minor, patch, build
-
-def get_channel(srctree):
- # look up llversionserver.h and parse out the version info
- paths = [os.path.join(srctree, x, 'llversionviewer.h') for x in ['llcommon', '../llcommon', '../../indra/llcommon.h']]
- for p in paths:
- if os.path.exists(p):
- contents = open(p, 'r').read()
- channel = re.search("LL_CHANNEL\s=\s\"(.+)\";\s*$", contents, flags = re.M).group(1)
- return channel
-
-
DEFAULT_SRCTREE = os.path.dirname(sys.argv[0])
DEFAULT_CHANNEL = 'Second Life Release'
@@ -140,7 +118,7 @@ ARGUMENTS=[
default=""),
dict(name='channel',
description="""The channel to use for updates, packaging, settings name, etc.""",
- default=get_channel),
+ default='CHANNEL UNSET'),
dict(name='login_channel',
description="""The channel to use for login handshake/updates only.""",
default=None),
@@ -164,10 +142,8 @@ ARGUMENTS=[
contain the name of the final package in a form suitable
for use by a .bat file.""",
default=None),
- dict(name='version',
- description="""This specifies the version of Second Life that is
- being packaged up.""",
- default=get_default_version),
+ dict(name='versionfile',
+ description="""The name of a file containing the full version number."""),
dict(name='signature',
description="""This specifies an identity to sign the viewer with, if any.
If no value is supplied, the default signature will be used, if any. Currently
@@ -232,9 +208,14 @@ def main():
args[arg['name']] = default
# fix up version
- if isinstance(args.get('version'), str):
- args['version'] = args['version'].split('.')
-
+ if isinstance(args.get('versionfile'), str):
+ try: # read in the version string
+ vf = open(args['versionfile'], 'r')
+ args['version'] = vf.read().strip().split('.')
+ except:
+ print "Unable to read versionfile '%s'" % args['versionfile']
+ raise
+
# default and agni are default
if args['grid'] in ['default', 'agni']:
args['grid'] = ''
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 5cce8ff2c4..f3afd9c1a9 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -246,7 +246,6 @@ set(llcommon_HEADER_FILES
lluuid.h
lluuidhashmap.h
llversionserver.h
- llversionviewer.h
llworkerthread.h
ll_template_cast.h
metaclass.h
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
deleted file mode 100644
index 39f9de3bc2..0000000000
--- a/indra/llcommon/llversionviewer.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * @file llversionviewer.h
- * @brief
- *
- * $LicenseInfo:firstyear=2002&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLVERSIONVIEWER_H
-#define LL_LLVERSIONVIEWER_H
-
-const S32 LL_VERSION_MAJOR = 3;
-const S32 LL_VERSION_MINOR = 4;
-const S32 LL_VERSION_PATCH = 5;
-const S32 LL_VERSION_BUILD = 0;
-
-const char * const LL_CHANNEL = "Second Life Developer";
-
-#if LL_DARWIN
-const char * const LL_VERSION_BUNDLE_ID = "com.secondlife.indra.viewer";
-#endif
-
-#endif
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index e93d73ad0e..dbd6a60a7c 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -4,7 +4,6 @@ project(viewer)
include(00-Common)
include(Boost)
-include(BuildVersion)
include(DBusGlib)
include(DirectX)
include(OpenSSL)
@@ -1228,6 +1227,21 @@ set(viewer_HEADER_FILES
source_group("CMake Rules" FILES ViewerInstall.cmake)
+set_source_files_properties(
+ llversioninfo.cpp tests/llversioninfo_test.cpp
+ PROPERTIES
+ OBJECT_DEPENDS always_generate_version
+ COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake
+ )
+
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/VIEWER_VERSION.txt
+ COMMAND echo "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}" > ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
+ COMMENT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Generating viewer_version.txt
+ )
+add_custom_target(generate_viewer_version DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt")
+add_dependencies(generate_viewer_version "${CMAKE_CURRENT_SOURCE_DIR}/VIEWER_VERSION.txt")
+
if (DARWIN)
LIST(APPEND viewer_SOURCE_FILES llappviewermacosx.cpp)
@@ -1308,12 +1322,16 @@ if (WINDOWS)
string(TOLOWER ${VIEWER_CHANNEL} channel_lower)
if(channel_lower MATCHES "^second life release")
set(ICON_PATH "release")
+ set(VIEWER_MACOSX_PHASE "f")
elseif(channel_lower MATCHES "^second life beta viewer")
set(ICON_PATH "beta")
+ set(VIEWER_MACOSX_PHASE "b")
elseif(channel_lower MATCHES "^second life development")
set(ICON_PATH "development")
+ set(VIEWER_MACOSX_PHASE "d")
elseif(channel_lower MATCHES "project")
set(ICON_PATH "project")
+ set(VIEWER_MACOSX_PHASE "a")
endif()
message("Copying icons for ${ICON_PATH}")
execute_process(
@@ -1382,8 +1400,11 @@ if (WINDOWS)
set_source_files_properties(${viewer_RESOURCE_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
+ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/res/viewerRes.rc
+ ${CMAKE_CURRENT_BINARY_DIR}/res/viewerRes.rc
+ )
set(viewer_RESOURCE_FILES
- res/viewerRes.rc
+ ${CMAKE_CURRENT_BINARY_DIR}/res/viewerRes.rc
${viewer_RESOURCE_FILES}
)
@@ -1695,10 +1716,13 @@ if (WINDOWS)
--configuration=${CMAKE_CFG_INTDIR}
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
--grid=${GRID}
+ --channel=${VIEWER_CHANNEL}
+ --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
--source=${CMAKE_CURRENT_SOURCE_DIR}
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+ ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
stage_third_party_libs
${COPY_INPUT_DEPENDENCIES}
COMMENT "Performing viewer_manifest copy"
@@ -1757,6 +1781,7 @@ if (WINDOWS)
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
--channel=${VIEWER_CHANNEL}
+ --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
--configuration=${CMAKE_CFG_INTDIR}
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
--grid=${GRID}
@@ -1766,12 +1791,14 @@ if (WINDOWS)
DEPENDS
${VIEWER_BINARY_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+ ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
${COPY_INPUT_DEPENDENCIES}
)
add_custom_target(package ALL DEPENDS
${CMAKE_CFG_INTDIR}/touched.bat
windows-setup-build-all
+ generate_viewer_version
)
# temporarily disable packaging of event_host until hg subrepos get
# sorted out on the parabuild cluster...
@@ -1854,14 +1881,11 @@ else (USE_KDU)
)
endif (USE_KDU)
-build_version(viewer)
-
set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH
"Path to artwork files.")
-
if (LINUX)
- set(product SecondLife-${ARCH}-${viewer_VERSION})
+ set(product SecondLife-${ARCH}-${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION})
# These are the generated targets that are copied to package/
set(COPY_INPUT_DEPENDENCIES
@@ -1883,6 +1907,7 @@ if (LINUX)
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
--channel=${VIEWER_CHANNEL}
+ --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
--configuration=${CMAKE_CFG_INTDIR}
--dest=${CMAKE_CURRENT_BINARY_DIR}/packaged
--grid=${GRID}
@@ -1892,11 +1917,13 @@ if (LINUX)
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+ ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
${COPY_INPUT_DEPENDENCIES}
)
if (PACKAGE)
endif (PACKAGE)
+
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched
COMMAND ${PYTHON_EXECUTABLE}
@@ -1910,9 +1937,12 @@ if (LINUX)
--configuration=${CMAKE_CFG_INTDIR}
--dest=${CMAKE_CURRENT_BINARY_DIR}/packaged
--grid=${GRID}
+ --channel=${VIEWER_CHANNEL}
+ --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
--source=${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+ ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
${COPY_INPUT_DEPENDENCIES}
COMMENT "Performing viewer_manifest copy"
)
@@ -1929,20 +1959,29 @@ endif (LINUX)
if (DARWIN)
set(product "Second Life")
+
set_target_properties(
${VIEWER_BINARY_NAME}
PROPERTIES
OUTPUT_NAME "${product}"
- MACOSX_BUNDLE_INFO_STRING "info string - localize me"
+ MACOSX_BUNDLE_INFO_STRING "Second Life Viewer"
MACOSX_BUNDLE_ICON_FILE "secondlife.icns"
MACOSX_BUNDLE_GUI_IDENTIFIER "Second Life"
- MACOSX_BUNDLE_LONG_VERSION_STRING "ververver"
+ MACOSX_BUNDLE_LONG_VERSION_STRING "${VIEWER_CHANNEL} ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}"
MACOSX_BUNDLE_BUNDLE_NAME "Second Life"
- MACOSX_BUNDLE_SHORT_VERSION_STRING "asdf"
- MACOSX_BUNDLE_BUNDLE_VERSION "asdf"
- MACOSX_BUNDLE_COPYRIGHT "copyright linden lab 2007 - localize me and run me through a legal wringer"
+ MACOSX_BUNDLE_SHORT_VERSION_STRING "${VIEWER_SHORT_VERSION}"
+ MACOSX_BUNDLE_BUNDLE_VERSION "${VIEWER_SHORT_VERSION}${VIEWER_MACOSX_PHASE}${VIEWER_REVISION}"
+ MACOSX_BUNDLE_COPYRIGHT "Copyright © Linden Research, Inc. 2007"
)
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/Info-SecondLife.plist"
+ "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app/Contents/Info.plist"
+ )
+ #configure_file(
+ # "${CMAKE_CURRENT_SOURCE_DIR}/English.lproj/InfoPlist.strings"
+ # "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app/Contents/Resources/English.lproj/InfoPlist.strings"
+ # )
add_custom_command(
TARGET ${VIEWER_BINARY_NAME} POST_BUILD
COMMAND ${PYTHON_EXECUTABLE}
@@ -1955,8 +1994,13 @@ if (DARWIN)
--configuration=${CMAKE_CFG_INTDIR}
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app
--grid=${GRID}
+ --channel=${VIEWER_CHANNEL}
+ --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
--source=${CMAKE_CURRENT_SOURCE_DIR}
- DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+ DEPENDS
+ ${VIEWER_BINARY_NAME}
+ ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+ ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
)
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-updater mac-crash-logger)
@@ -1969,6 +2013,7 @@ if (DARWIN)
if (PACKAGE)
add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME})
+ add_dependencies(package generate_viewer_version)
add_custom_command(
TARGET package POST_BUILD
@@ -1982,12 +2027,15 @@ if (DARWIN)
--configuration=${CMAKE_CFG_INTDIR}
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app
--grid=${GRID}
+ --channel=${VIEWER_CHANNEL}
+ --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
--login_channel=${VIEWER_LOGIN_CHANNEL}
--source=${CMAKE_CURRENT_SOURCE_DIR}
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
${SIGNING_SETTING}
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+ ${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
)
endif (PACKAGE)
endif (DARWIN)
diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings
index 5c7cacedec..041b8cea0b 100644
--- a/indra/newview/English.lproj/InfoPlist.strings
+++ b/indra/newview/English.lproj/InfoPlist.strings
@@ -2,6 +2,6 @@
CFBundleName = "Second Life";
-CFBundleShortVersionString = "Second Life version 2.1.0.13828";
-CFBundleGetInfoString = "Second Life version 2.1.0.13828, Copyright 2004-2009 Linden Research, Inc.";
+CFBundleShortVersionString = "Second Life version %%VERSION%%";
+CFBundleGetInfoString = "Second Life version %%VERSION%%, Copyright 2004 Linden Research, Inc.";
diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist
index f7b11b217c..a19844f11c 100644
--- a/indra/newview/Info-SecondLife.plist
+++ b/indra/newview/Info-SecondLife.plist
@@ -60,7 +60,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
- <string>2.1.0.13828</string>
+ <string>${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_REVISION}</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
new file mode 100644
index 0000000000..6cb9d3dd0d
--- /dev/null
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -0,0 +1 @@
+3.4.3
diff --git a/indra/newview/linux_tools/wrapper.sh b/indra/newview/linux_tools/wrapper.sh
index 20936c6460..98c8674fa5 100755
--- a/indra/newview/linux_tools/wrapper.sh
+++ b/indra/newview/linux_tools/wrapper.sh
@@ -113,7 +113,7 @@ export SAVED_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
export LD_LIBRARY_PATH="$PWD/lib:${LD_LIBRARY_PATH}"
# Have to deal specially with gridargs.dat; typical contents look like:
-# --channel "Second Life Developer" --settings settings_developer.xml
+# --channel "Second Life Test" --settings settings_test.xml
# Simply embedding $(<etc/gridargs.dat) into a command line treats each of
# Second, Life and Developer as separate args -- no good. We need bash to
# process quotes using eval.
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 1000c0e1e8..468a297c2d 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -30,7 +30,6 @@
// Viewer includes
#include "llversioninfo.h"
-#include "llversionviewer.h"
#include "llfeaturemanager.h"
#include "lluictrlfactory.h"
#include "lltexteditor.h"
@@ -251,6 +250,7 @@ static LLAppViewerListener sAppViewerListener(LLAppViewer::instance);
// viewer.cpp - these are only used in viewer, should be easily moved.
#if LL_DARWIN
+const char * const LL_VERSION_BUNDLE_ID = "com.secondlife.indra.viewer";
extern void init_apple_menu(const char* product);
#endif // LL_DARWIN
diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp
index 673d0c24cf..a15b280fc0 100644
--- a/indra/newview/llversioninfo.cpp
+++ b/indra/newview/llversioninfo.cpp
@@ -25,74 +25,78 @@
* $/LicenseInfo$
*/
-#include "llviewerprecompiledheaders.h"
+#include <iostream>
+#include <sstream>
#include "llversioninfo.h"
-#include "llversionviewer.h"
+#if ! defined(LL_VIEWER_VERSION_MAJOR) \
+ || ! defined(LL_VIEWER_VERSION_MINOR) \
+ || ! defined(LL_VIEWER_VERSION_PATCH) \
+ || ! defined(LL_VIEWER_VERSION_BUILD)
+ #error "Version information is undefined"
+#endif
+
+#ifndef LL_VIEWER_CHANNEL
+#define LL_VIEWER_CHANNEL "Second Life Test"
+#endif
+const char * const LL_CHANNEL = LL_VIEWER_CHANNEL;
//
-// Set the version numbers in indra/llcommon/llversionviewer.h
+// Set the version numbers in indra/VIEWER_VERSION
//
//static
S32 LLVersionInfo::getMajor()
{
- return LL_VERSION_MAJOR;
+ return LL_VIEWER_VERSION_MAJOR;
}
//static
S32 LLVersionInfo::getMinor()
{
- return LL_VERSION_MINOR;
+ return LL_VIEWER_VERSION_MINOR;
}
//static
S32 LLVersionInfo::getPatch()
{
- return LL_VERSION_PATCH;
+ return LL_VIEWER_VERSION_PATCH;
}
//static
S32 LLVersionInfo::getBuild()
{
- return LL_VERSION_BUILD;
+ return LL_VIEWER_VERSION_BUILD;
}
//static
const std::string &LLVersionInfo::getVersion()
{
static std::string version("");
-
if (version.empty())
{
- // cache the version string
std::ostringstream stream;
- stream << LL_VERSION_MAJOR << "."
- << LL_VERSION_MINOR << "."
- << LL_VERSION_PATCH << "."
- << LL_VERSION_BUILD;
+ stream << LLVersionInfo::getShortVersion() << "." << LLVersionInfo::getBuild();
+ // cache the version string
version = stream.str();
}
-
return version;
}
//static
const std::string &LLVersionInfo::getShortVersion()
{
- static std::string version("");
-
- if (version.empty())
+ static std::string short_version("");
+ if(short_version.empty())
{
// cache the version string
std::ostringstream stream;
- stream << LL_VERSION_MAJOR << "."
- << LL_VERSION_MINOR << "."
- << LL_VERSION_PATCH;
- version = stream.str();
+ stream << LL_VIEWER_VERSION_MAJOR << "."
+ << LL_VIEWER_VERSION_MINOR << "."
+ << LL_VIEWER_VERSION_PATCH;
+ short_version = stream.str();
}
-
- return version;
+ return short_version;
}
namespace
@@ -100,7 +104,7 @@ namespace
/// Storage of the channel name the viewer is using.
// The channel name is set by hardcoded constant,
// or by calling LLVersionInfo::resetChannel()
- std::string sWorkingChannelName(LL_CHANNEL);
+ std::string sWorkingChannelName(LL_VIEWER_CHANNEL);
// Storage for the "version and channel" string.
// This will get reset too.
@@ -113,11 +117,7 @@ const std::string &LLVersionInfo::getChannelAndVersion()
if (sVersionChannel.empty())
{
// cache the version string
- std::ostringstream stream;
- stream << LLVersionInfo::getChannel()
- << " "
- << LLVersionInfo::getVersion();
- sVersionChannel = stream.str();
+ sVersionChannel = LLVersionInfo::getChannel() + " " + LLVersionInfo::getVersion();
}
return sVersionChannel;
diff --git a/indra/newview/llversioninfo.h b/indra/newview/llversioninfo.h
index 6f64544f3b..077105cae8 100644
--- a/indra/newview/llversioninfo.h
+++ b/indra/newview/llversioninfo.h
@@ -29,6 +29,7 @@
#define LL_LLVERSIONINFO_H
#include <string>
+#include "stdtypes.h"
///
/// This API provides version information for the viewer. This
diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc
index df75f3f697..5360842134 100644
--- a/indra/newview/res/viewerRes.rc
+++ b/indra/newview/res/viewerRes.rc
@@ -135,8 +135,8 @@ TOOLNO CURSOR "llno.cur"
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,1,1,0
- PRODUCTVERSION 2,1,1,0
+ FILEVERSION ${VIEWER_VERSION_MAJOR},${VIEWER_VERSION_MINOR},${VIEWER_VERSION_PATCH},${VIEWER_VERSION_BUILD}
+ PRODUCTVERSION ${VIEWER_VERSION_MAJOR},${VIEWER_VERSION_MINOR},${VIEWER_VERSION_PATCH},${VIEWER_VERSION_BUILD}
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -153,12 +153,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Linden Lab"
VALUE "FileDescription", "Second Life"
- VALUE "FileVersion", "2.1.1.0"
+ VALUE "FileVersion", "${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_BUILD}"
VALUE "InternalName", "Second Life"
- VALUE "LegalCopyright", "Copyright � 2001-2010, Linden Research, Inc."
+ VALUE "LegalCopyright", "Copyright � 2001, Linden Research, Inc."
VALUE "OriginalFilename", "SecondLife.exe"
VALUE "ProductName", "Second Life"
- VALUE "ProductVersion", "2.1.1.0"
+ VALUE "ProductVersion", "${VIEWER_VERSION_MAJOR}.${VIEWER_VERSION_MINOR}.${VIEWER_VERSION_PATCH}.${VIEWER_VERSION_BUILD}"
END
END
BLOCK "VarFileInfo"
diff --git a/indra/newview/tests/llversioninfo_test.cpp b/indra/newview/tests/llversioninfo_test.cpp
index 398d8f16ed..6b0be29c2d 100644
--- a/indra/newview/tests/llversioninfo_test.cpp
+++ b/indra/newview/tests/llversioninfo_test.cpp
@@ -28,7 +28,6 @@
#include "../test/lltut.h"
#include "../llversioninfo.h"
-#include "llversionviewer.h"
namespace tut
{
@@ -38,20 +37,20 @@ namespace tut
: mResetChannel("Reset Channel")
{
std::ostringstream stream;
- stream << LL_VERSION_MAJOR << "."
- << LL_VERSION_MINOR << "."
- << LL_VERSION_PATCH << "."
- << LL_VERSION_BUILD;
+ stream << LL_VIEWER_VERSION_MAJOR << "."
+ << LL_VIEWER_VERSION_MINOR << "."
+ << LL_VIEWER_VERSION_PATCH << "."
+ << LL_VIEWER_VERSION_BUILD;
mVersion = stream.str();
stream.str("");
- stream << LL_VERSION_MAJOR << "."
- << LL_VERSION_MINOR << "."
- << LL_VERSION_PATCH;
+ stream << LL_VIEWER_VERSION_MAJOR << "."
+ << LL_VIEWER_VERSION_MINOR << "."
+ << LL_VIEWER_VERSION_PATCH;
mShortVersion = stream.str();
stream.str("");
- stream << LL_CHANNEL
+ stream << LL_VIEWER_CHANNEL
<< " "
<< mVersion;
mVersionAndChannel = stream.str();
@@ -78,20 +77,19 @@ namespace tut
{
ensure_equals("Major version",
LLVersionInfo::getMajor(),
- LL_VERSION_MAJOR);
+ LL_VIEWER_VERSION_MAJOR);
ensure_equals("Minor version",
LLVersionInfo::getMinor(),
- LL_VERSION_MINOR);
+ LL_VIEWER_VERSION_MINOR);
ensure_equals("Patch version",
LLVersionInfo::getPatch(),
- LL_VERSION_PATCH);
+ LL_VIEWER_VERSION_PATCH);
ensure_equals("Build version",
LLVersionInfo::getBuild(),
- LL_VERSION_BUILD);
+ LL_VIEWER_VERSION_BUILD);
ensure_equals("Channel version",
LLVersionInfo::getChannel(),
- LL_CHANNEL);
-
+ LL_VIEWER_CHANNEL);
ensure_equals("Version String",
LLVersionInfo::getVersion(),
mVersion);
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index e7108141ee..20f64dbf4b 100644
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -666,7 +666,7 @@ class DarwinManifest(ViewerManifest):
self.path(self.args['configuration'] + "/Second Life.app", dst="")
if self.prefix(src="", dst="Contents"): # everything goes in Contents
- self.path("Info-SecondLife.plist", dst="Info.plist")
+ self.path("Info.plist", dst="Info.plist")
# copy additional libs in <bundle>/Contents/MacOS/
self.path("../packages/lib/release/libndofdev.dylib", dst="Resources/libndofdev.dylib")
@@ -694,7 +694,11 @@ class DarwinManifest(ViewerManifest):
self.path("SecondLife.nib")
# Translations
- self.path("English.lproj")
+ self.path("English.lproj/language.txt")
+ self.replace_in(src="English.lproj/InfoPlist.strings",
+ dst="English.lproj/InfoPlist.strings",
+ searchdict={'%%VERSION%%':'.'.join(self.args['version'])}
+ )
self.path("German.lproj")
self.path("Japanese.lproj")
self.path("Korean.lproj")
diff --git a/indra/viewer_components/updater/CMakeLists.txt b/indra/viewer_components/updater/CMakeLists.txt
index ef82290b47..5d84f79dbd 100644
--- a/indra/viewer_components/updater/CMakeLists.txt
+++ b/indra/viewer_components/updater/CMakeLists.txt
@@ -38,6 +38,13 @@ set(updater_service_HEADER_FILES
set_source_files_properties(${updater_service_HEADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
+set_source_files_properties(
+ llupdaterservice.cpp
+ PROPERTIES
+ OBJECT_DEPENDS always_generate_version
+ COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake
+ )
+
list(APPEND
updater_service_SOURCE_FILES
${updater_service_HEADER_FILES}
diff --git a/indra/viewer_components/updater/llupdaterservice.cpp b/indra/viewer_components/updater/llupdaterservice.cpp
index bc73c72ddc..d783360f80 100644
--- a/indra/viewer_components/updater/llupdaterservice.cpp
+++ b/indra/viewer_components/updater/llupdaterservice.cpp
@@ -32,7 +32,6 @@
#include "lltimer.h"
#include "llupdatechecker.h"
#include "llupdateinstaller.h"
-#include "llversionviewer.h"
#include <boost/scoped_ptr.hpp>
#include <boost/weak_ptr.hpp>
@@ -44,6 +43,12 @@
#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
#endif
+#if ! defined(LL_VIEWER_VERSION_MAJOR) \
+ || ! defined(LL_VIEWER_VERSION_MINOR) \
+ || ! defined(LL_VIEWER_VERSION_PATCH) \
+ || ! defined(LL_VIEWER_VERSION_BUILD)
+#error "Version information is undefined"
+#endif
namespace
{
@@ -609,10 +614,10 @@ std::string const & ll_get_version(void) {
if (version.empty()) {
std::ostringstream stream;
- stream << LL_VERSION_MAJOR << "."
- << LL_VERSION_MINOR << "."
- << LL_VERSION_PATCH << "."
- << LL_VERSION_BUILD;
+ stream << LL_VIEWER_VERSION_MAJOR << "."
+ << LL_VIEWER_VERSION_MINOR << "."
+ << LL_VIEWER_VERSION_PATCH << "."
+ << LL_VIEWER_VERSION_BUILD;
version = stream.str();
}