diff options
45 files changed, 1066 insertions, 510 deletions
diff --git a/linden/indra/cmake/00-Common.cmake b/linden/indra/cmake/00-Common.cmake index 7e85ce0..1a24a41 100644 --- a/linden/indra/cmake/00-Common.cmake +++ b/linden/indra/cmake/00-Common.cmake | |||
@@ -14,10 +14,13 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO | |||
14 | "-DLL_RELEASE=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1") | 14 | "-DLL_RELEASE=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1") |
15 | 15 | ||
16 | 16 | ||
17 | # Don't bother with a MinSizeRel build. | 17 | # Available build types / configurations. |
18 | # Add our current build type first, to coax Xcode into selecting it by default. | ||
18 | 19 | ||
19 | set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;Debug" CACHE STRING | 20 | set(TYPES ${CMAKE_BUILD_TYPE} RelWithDebInfo Release Debug) |
20 | "Supported build types." FORCE) | 21 | list(REMOVE_DUPLICATES TYPES) |
22 | set(CMAKE_CONFIGURATION_TYPES ${TYPES} CACHE STRING "Supported build types." FORCE) | ||
23 | unset(TYPES) | ||
21 | 24 | ||
22 | 25 | ||
23 | # Determine the number of bits of this processor | 26 | # Determine the number of bits of this processor |
diff --git a/linden/indra/cmake/AddPackageTarget.cmake b/linden/indra/cmake/AddPackageTarget.cmake new file mode 100644 index 0000000..66adf3e --- /dev/null +++ b/linden/indra/cmake/AddPackageTarget.cmake | |||
@@ -0,0 +1,32 @@ | |||
1 | # This function adds a custom target named 'package', which runs | ||
2 | # scripts/package.py to create an installer package. | ||
3 | # | ||
4 | # By default, you must manually build the 'package' target when you | ||
5 | # are ready to create the installer package. But if the global | ||
6 | # AUTOPACKAGE variable is ON ("cmake -D AUTOPACKAGE:BOOL=ON"), the | ||
7 | # 'package' target will be added to the default build target. | ||
8 | |||
9 | |||
10 | set(AUTOPACKAGE OFF CACHE BOOL | ||
11 | "Automatically build an installer package after compiling.") | ||
12 | |||
13 | |||
14 | function( add_package_target ) | ||
15 | |||
16 | if (AUTOPACKAGE) | ||
17 | add_custom_target(package ALL) | ||
18 | else (AUTOPACKAGE) | ||
19 | add_custom_target(package) | ||
20 | endif (AUTOPACKAGE) | ||
21 | |||
22 | add_custom_command( | ||
23 | TARGET package POST_BUILD | ||
24 | COMMAND | ||
25 | ${PYTHON_EXECUTABLE} | ||
26 | ${SCRIPTS_DIR}/package.py | ||
27 | --build-dir=${CMAKE_BINARY_DIR} | ||
28 | --build-type=${CMAKE_BUILD_TYPE} | ||
29 | --source-dir=${CMAKE_SOURCE_DIR} | ||
30 | ) | ||
31 | |||
32 | endfunction( add_package_target ) | ||
diff --git a/linden/indra/cmake/BuildVersion.cmake b/linden/indra/cmake/BuildVersion.cmake index 59b36ff..f86e9e5 100644 --- a/linden/indra/cmake/BuildVersion.cmake +++ b/linden/indra/cmake/BuildVersion.cmake | |||
@@ -2,17 +2,32 @@ | |||
2 | 2 | ||
3 | include(Python) | 3 | include(Python) |
4 | 4 | ||
5 | if (NOT SCRIPTS_DIR) | ||
6 | set( SCRIPTS_DIR "${CMAKE_SOURCE_DIR}/../scripts" ) | ||
7 | endif (NOT SCRIPTS_DIR) | ||
8 | |||
5 | macro (build_version _target) | 9 | macro (build_version _target) |
6 | execute_process( | 10 | execute_process( |
7 | COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/build_version.py | 11 | COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/viewer_info.py --version |
8 | viewerversion.xml ${CMAKE_CURRENT_SOURCE_DIR}/app_settings/ | ||
9 | OUTPUT_VARIABLE ${_target}_VERSION | 12 | OUTPUT_VARIABLE ${_target}_VERSION |
10 | OUTPUT_STRIP_TRAILING_WHITESPACE | 13 | OUTPUT_STRIP_TRAILING_WHITESPACE |
11 | ) | 14 | ) |
12 | 15 | ||
13 | if (${_target}_VERSION) | 16 | execute_process( |
14 | message(STATUS "Version of ${_target} is ${${_target}_VERSION}") | 17 | COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/viewer_info.py --name |
18 | OUTPUT_VARIABLE ${_target}_NAME | ||
19 | OUTPUT_STRIP_TRAILING_WHITESPACE | ||
20 | ) | ||
21 | |||
22 | execute_process( | ||
23 | COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/viewer_info.py --bundle-id | ||
24 | OUTPUT_VARIABLE ${_target}_BUNDLE_ID | ||
25 | OUTPUT_STRIP_TRAILING_WHITESPACE | ||
26 | ) | ||
27 | |||
28 | if ("${_target}_VERSION" AND "${_target}_NAME") | ||
29 | message(STATUS "Version of ${_target} is ${${_target}_NAME} ${${_target}_VERSION}") | ||
15 | else (${_target}_VERSION) | 30 | else (${_target}_VERSION) |
16 | message(SEND_ERROR "Could not determine ${_target} version") | 31 | message(SEND_ERROR "Could not determine ${_target} version") |
17 | endif (${_target}_VERSION) | 32 | endif ("${_target}_VERSION" AND "${_target}_NAME") |
18 | endmacro (build_version) | 33 | endmacro (build_version) |
diff --git a/linden/indra/develop.py b/linden/indra/develop.py index e804374..094ce3b 100755 --- a/linden/indra/develop.py +++ b/linden/indra/develop.py | |||
@@ -121,7 +121,7 @@ class PlatformSetup(object): | |||
121 | opts=quote(opts), | 121 | opts=quote(opts), |
122 | standalone=self.standalone, | 122 | standalone=self.standalone, |
123 | unattended=self.unattended, | 123 | unattended=self.unattended, |
124 | type=self.build_type.upper(), | 124 | type=self.build_type, |
125 | ) | 125 | ) |
126 | #if simple: | 126 | #if simple: |
127 | # return 'cmake %(opts)s %(dir)r' % args | 127 | # return 'cmake %(opts)s %(dir)r' % args |
@@ -287,7 +287,7 @@ class LinuxSetup(UnixSetup): | |||
287 | opts=quote(opts), | 287 | opts=quote(opts), |
288 | standalone=self.standalone, | 288 | standalone=self.standalone, |
289 | unattended=self.unattended, | 289 | unattended=self.unattended, |
290 | type=self.build_type.upper(), | 290 | type=self.build_type, |
291 | project_name=self.project_name | 291 | project_name=self.project_name |
292 | ) | 292 | ) |
293 | if not self.is_internal_tree(): | 293 | if not self.is_internal_tree(): |
@@ -419,7 +419,7 @@ class DarwinSetup(UnixSetup): | |||
419 | unattended=self.unattended, | 419 | unattended=self.unattended, |
420 | project_name=self.project_name, | 420 | project_name=self.project_name, |
421 | universal=self.universal, | 421 | universal=self.universal, |
422 | type=self.build_type.upper() | 422 | type=self.build_type |
423 | ) | 423 | ) |
424 | if self.universal == 'ON': | 424 | if self.universal == 'ON': |
425 | args['universal'] = '-DCMAKE_OSX_ARCHITECTURES:STRING=\'i386\'' | 425 | args['universal'] = '-DCMAKE_OSX_ARCHITECTURES:STRING=\'i386\'' |
diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h index ab74a3f..4162234 100644 --- a/linden/indra/llcommon/llversionviewer.h +++ b/linden/indra/llcommon/llversionviewer.h | |||
@@ -33,8 +33,6 @@ | |||
33 | #ifndef LL_LLVERSIONVIEWER_H | 33 | #ifndef LL_LLVERSIONVIEWER_H |
34 | #define LL_LLVERSIONVIEWER_H | 34 | #define LL_LLVERSIONVIEWER_H |
35 | 35 | ||
36 | // Version info should be accessed using newview\viewerversion.h -- MC | ||
37 | |||
38 | const S32 LL_VERSION_MAJOR = 1; | 36 | const S32 LL_VERSION_MAJOR = 1; |
39 | const S32 LL_VERSION_MINOR = 23; | 37 | const S32 LL_VERSION_MINOR = 23; |
40 | const S32 LL_VERSION_PATCH = 5; | 38 | const S32 LL_VERSION_PATCH = 5; |
@@ -42,17 +40,13 @@ const S32 LL_VERSION_BUILD = 136262; | |||
42 | 40 | ||
43 | const char * const LL_VIEWER_NAME = "Second Life"; | 41 | const char * const LL_VIEWER_NAME = "Second Life"; |
44 | 42 | ||
45 | // These aren't used anymore. | 43 | // These aren't used anymore. See newview/viewerinfo.cpp instead. |
46 | // The channel is ViewerChannelName in settings.xml | 44 | // |
47 | // The Imprudence version is set in app_settings\viewerversion.xml -- MC | 45 | // const char * const LL_CHANNEL = "Imprudence"; |
48 | 46 | // const char * const IMP_VIEWER_NAME = "Imprudence"; | |
49 | /*const char * const LL_CHANNEL = "Imprudence"; | 47 | // const S32 IMP_VERSION_MAJOR = 0; |
50 | 48 | // const S32 IMP_VERSION_MINOR = 0; | |
51 | const char * const IMP_VIEWER_NAME = "Imprudence"; | 49 | // const S32 IMP_VERSION_PATCH = 0; |
52 | 50 | // const char * const IMP_VERSION_TEST = ""; | |
53 | const S32 IMP_VERSION_MAJOR = 1; | ||
54 | const S32 IMP_VERSION_MINOR = 3; | ||
55 | const S32 IMP_VERSION_PATCH = 0; | ||
56 | const char * const IMP_VERSION_TEST = "beta 4";*/ | ||
57 | 51 | ||
58 | #endif | 52 | #endif |
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index 58c16e6..5500a73 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt | |||
@@ -3,6 +3,7 @@ | |||
3 | project(viewer) | 3 | project(viewer) |
4 | 4 | ||
5 | include(00-Common) | 5 | include(00-Common) |
6 | include(AddPackageTarget) | ||
6 | include(Boost) | 7 | include(Boost) |
7 | include(BuildVersion) | 8 | include(BuildVersion) |
8 | include(DBusGlib) | 9 | include(DBusGlib) |
@@ -499,8 +500,8 @@ set(viewer_SOURCE_FILES | |||
499 | rlvextensions.cpp | 500 | rlvextensions.cpp |
500 | rlvfloaterbehaviour.cpp | 501 | rlvfloaterbehaviour.cpp |
501 | slfloatermediafilter.cpp | 502 | slfloatermediafilter.cpp |
503 | viewerinfo.cpp | ||
502 | viewertime.cpp | 504 | viewertime.cpp |
503 | viewerversion.cpp | ||
504 | windlightsettingsupdate.cpp | 505 | windlightsettingsupdate.cpp |
505 | wlfloatermanager.cpp | 506 | wlfloatermanager.cpp |
506 | wlfloaterwindlightsend.cpp | 507 | wlfloaterwindlightsend.cpp |
@@ -971,8 +972,8 @@ set(viewer_HEADER_FILES | |||
971 | slfloatermediafilter.h | 972 | slfloatermediafilter.h |
972 | VertexCache.h | 973 | VertexCache.h |
973 | VorbisFramework.h | 974 | VorbisFramework.h |
975 | viewerinfo.h | ||
974 | viewertime.h | 976 | viewertime.h |
975 | viewerversion.h | ||
976 | wlfloatermanager.h | 977 | wlfloatermanager.h |
977 | wlfloaterwindlightsend.h | 978 | wlfloaterwindlightsend.h |
978 | wlretrievesettings.h | 979 | wlretrievesettings.h |
@@ -1002,14 +1003,14 @@ if (DARWIN) | |||
1002 | viewer.icns | 1003 | viewer.icns |
1003 | macview.r | 1004 | macview.r |
1004 | gpu_table.txt | 1005 | gpu_table.txt |
1005 | Info-Imprudence.plist | 1006 | packaging/mac/Info.plist.in |
1006 | Imprudence.nib/ | 1007 | packaging/mac/SecondLife.nib/ |
1007 | # CMake doesn't seem to support Xcode language variants well just yet | 1008 | # CMake doesn't seem to support Xcode language variants well just yet |
1008 | English.lproj/InfoPlist.strings | 1009 | packaging/mac/English.lproj/InfoPlist.strings |
1009 | English.lproj/language.txt | 1010 | packaging/mac/English.lproj/language.txt |
1010 | German.lproj/language.txt | 1011 | packaging/mac/German.lproj/language.txt |
1011 | Japanese.lproj/language.txt | 1012 | packaging/mac/Japanese.lproj/language.txt |
1012 | Korean.lproj/language.txt | 1013 | packaging/mac/Korean.lproj/language.txt |
1013 | ) | 1014 | ) |
1014 | set_source_files_properties( | 1015 | set_source_files_properties( |
1015 | ${viewer_RESOURCE_FILES} | 1016 | ${viewer_RESOURCE_FILES} |
@@ -1210,7 +1211,6 @@ set(viewer_APPSETTINGS_FILES | |||
1210 | app_settings/trees.xml | 1211 | app_settings/trees.xml |
1211 | app_settings/ultra_graphics.xml | 1212 | app_settings/ultra_graphics.xml |
1212 | app_settings/viewerart.xml | 1213 | app_settings/viewerart.xml |
1213 | app_settings/viewerversion.xml | ||
1214 | ${CMAKE_SOURCE_DIR}/../etc/message.xml | 1214 | ${CMAKE_SOURCE_DIR}/../etc/message.xml |
1215 | ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg | 1215 | ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg |
1216 | ) | 1216 | ) |
@@ -1288,6 +1288,10 @@ add_executable(${VIEWER_BINARY_NAME} | |||
1288 | ) | 1288 | ) |
1289 | check_message_template(${VIEWER_BINARY_NAME}) | 1289 | check_message_template(${VIEWER_BINARY_NAME}) |
1290 | 1290 | ||
1291 | |||
1292 | # NOTE: This variable is DEPRECATED, and should not be used anymore. | ||
1293 | # The package target should always be added. The variable AUTOPACKAGE | ||
1294 | # (in AddPackageTarget.cmake) controls whether package is auto-built. | ||
1291 | set(PACKAGE OFF CACHE BOOL | 1295 | set(PACKAGE OFF CACHE BOOL |
1292 | "Add a package target that builds an installer package.") | 1296 | "Add a package target that builds an installer package.") |
1293 | 1297 | ||
@@ -1429,121 +1433,102 @@ set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH | |||
1429 | 1433 | ||
1430 | 1434 | ||
1431 | if (LINUX) | 1435 | if (LINUX) |
1432 | add_custom_command( | ||
1433 | OUTPUT imprudence-stripped | ||
1434 | COMMAND strip | ||
1435 | ARGS --strip-debug -o imprudence-stripped ${VIEWER_BINARY_NAME} | ||
1436 | DEPENDS imprudence-bin | ||
1437 | ) | ||
1438 | 1436 | ||
1439 | set(product Imprudence-${ARCH}-${viewer_VERSION}) | 1437 | string(REPLACE "-bin" "-stripped" |
1438 | VIEWER_STRIPPED_NAME ${VIEWER_BINARY_NAME}) | ||
1439 | |||
1440 | add_dependencies(${VIEWER_BINARY_NAME} | ||
1441 | SLPlugin | ||
1442 | media_plugin_gstreamer010 | ||
1443 | media_plugin_webkit) | ||
1440 | 1444 | ||
1441 | add_custom_command( | 1445 | add_custom_command( |
1442 | OUTPUT ${product}.tar.bz2 | 1446 | OUTPUT ${VIEWER_STRIPPED_NAME} |
1443 | COMMAND ${PYTHON_EXECUTABLE} | 1447 | COMMAND strip |
1444 | ARGS | 1448 | ARGS --strip-debug -o ${VIEWER_STRIPPED_NAME} ${VIEWER_BINARY_NAME} |
1445 | ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py | 1449 | DEPENDS ${VIEWER_BINARY_NAME} |
1446 | --standalone=${STANDALONE} | 1450 | ) |
1447 | --buildtype=${CMAKE_BUILD_TYPE} | 1451 | |
1448 | --grid=${GRID} | 1452 | add_custom_target( |
1449 | --channel=${VIEWER_CHANNEL} | 1453 | viewer-manifest-target |
1450 | --login_channel=${VIEWER_LOGIN_CHANNEL} | 1454 | COMMAND |
1451 | --installer_name=${product} | 1455 | ${PYTHON_EXECUTABLE} |
1452 | --arch=${ARCH} | 1456 | ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py |
1453 | --source=${CMAKE_CURRENT_SOURCE_DIR} | 1457 | --standalone=${STANDALONE} |
1454 | --artwork=${ARTWORK_DIR} | 1458 | --buildtype=${CMAKE_BUILD_TYPE} |
1455 | --build=${CMAKE_CURRENT_BINARY_DIR} | 1459 | --grid=${GRID} |
1456 | --dest=${CMAKE_CURRENT_BINARY_DIR}/packaged | 1460 | --channel=${VIEWER_CHANNEL} |
1457 | --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched | 1461 | --login_channel=${VIEWER_LOGIN_CHANNEL} |
1458 | DEPENDS imprudence-stripped ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py | 1462 | --arch=${ARCH} |
1459 | ) | 1463 | --source=${CMAKE_CURRENT_SOURCE_DIR} |
1460 | 1464 | --artwork=${ARTWORK_DIR} | |
1461 | add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_gstreamer010 media_plugin_webkit) | 1465 | --build=${CMAKE_CURRENT_BINARY_DIR} |
1466 | --dest=${CMAKE_CURRENT_BINARY_DIR}/packaged | ||
1467 | DEPENDS | ||
1468 | ${VIEWER_STRIPPED_NAME} | ||
1469 | linux-crash-logger | ||
1470 | ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py | ||
1471 | ) | ||
1472 | |||
1473 | add_package_target() | ||
1474 | add_dependencies(package viewer-manifest-target) | ||
1462 | 1475 | ||
1463 | if (NOT INSTALL) | ||
1464 | add_custom_target(package ALL DEPENDS ${product}.tar.bz2) | ||
1465 | add_dependencies(package linux-crash-logger-strip-target) | ||
1466 | endif (NOT INSTALL) | ||
1467 | endif (LINUX) | 1476 | endif (LINUX) |
1468 | 1477 | ||
1478 | |||
1469 | if (DARWIN) | 1479 | if (DARWIN) |
1470 | set(product "Imprudence") | 1480 | set(product "${viewer_NAME}") |
1481 | |||
1471 | set_target_properties( | 1482 | set_target_properties( |
1472 | ${VIEWER_BINARY_NAME} | 1483 | ${VIEWER_BINARY_NAME} |
1473 | PROPERTIES | 1484 | PROPERTIES |
1474 | OUTPUT_NAME "${product}" | 1485 | OUTPUT_NAME "${product}" |
1475 | MACOSX_BUNDLE_INFO_STRING "info string - localize me" | ||
1476 | MACOSX_BUNDLE_ICON_FILE "viewer.icns" | ||
1477 | MACOSX_BUNDLE_GUI_IDENTIFIER "Imprudence" | ||
1478 | MACOSX_BUNDLE_LONG_VERSION_STRING "ververver" | ||
1479 | MACOSX_BUNDLE_BUNDLE_NAME "Imprudence" | ||
1480 | MACOSX_BUNDLE_SHORT_VERSION_STRING "asdf" | ||
1481 | MACOSX_BUNDLE_BUNDLE_VERSION "asdf" | ||
1482 | MACOSX_BUNDLE_COPYRIGHT "copyright linden lab 2007 - localize me and run me through a legal wringer" | ||
1483 | ) | 1486 | ) |
1487 | |||
1488 | # Generate Info.plist from the template. | ||
1489 | add_custom_target( | ||
1490 | GenerateInfoPlist | ||
1491 | ALL | ||
1492 | COMMENT "Generating Info.plist..." | ||
1493 | VERBATIM | ||
1494 | DEPENDS | ||
1495 | ${CMAKE_CURRENT_SOURCE_DIR}/packaging/mac/GenerateInfoPlist.cmake | ||
1496 | ${CMAKE_CURRENT_SOURCE_DIR}/packaging/mac/Info.plist.in | ||
1497 | ${CMAKE_CURRENT_SOURCE_DIR}/viewerinfo.cpp | ||
1498 | COMMAND | ||
1499 | ${CMAKE_COMMAND} | ||
1500 | -DSOURCE_DIR=${CMAKE_SOURCE_DIR} | ||
1501 | -DBINARY_DIR=${CMAKE_BINARY_DIR} | ||
1502 | -P ${CMAKE_CURRENT_SOURCE_DIR}/packaging/mac/GenerateInfoPlist.cmake | ||
1503 | ) | ||
1504 | |||
1505 | # Ensure that it's generated before the binary is built, so | ||
1506 | # that it will definitely be ready when viewer_manifest.py runs. | ||
1507 | add_dependencies(${VIEWER_BINARY_NAME} GenerateInfoPlist) | ||
1508 | |||
1484 | 1509 | ||
1485 | add_custom_command( | 1510 | add_custom_command( |
1486 | TARGET ${VIEWER_BINARY_NAME} POST_BUILD | 1511 | TARGET ${VIEWER_BINARY_NAME} POST_BUILD |
1487 | COMMAND ${PYTHON_EXECUTABLE} | 1512 | COMMAND ${PYTHON_EXECUTABLE} |
1488 | ARGS | 1513 | ARGS |
1489 | ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py | 1514 | ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py |
1490 | --grid=${GRID} | ||
1491 | --actions=copy | 1515 | --actions=copy |
1492 | --configuration=${CMAKE_CFG_INTDIR} | ||
1493 | --source=${CMAKE_CURRENT_SOURCE_DIR} | ||
1494 | --artwork=${ARTWORK_DIR} | 1516 | --artwork=${ARTWORK_DIR} |
1495 | --build=${CMAKE_CURRENT_BINARY_DIR} | 1517 | --build=${CMAKE_CURRENT_BINARY_DIR} |
1518 | --buildtype=${CMAKE_BUILD_TYPE} | ||
1519 | --configuration=${CMAKE_CFG_INTDIR} | ||
1496 | --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app | 1520 | --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app |
1521 | --grid=${GRID} | ||
1522 | --source=${CMAKE_CURRENT_SOURCE_DIR} | ||
1523 | --standalone=${STANDALONE} | ||
1497 | DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py | 1524 | DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py |
1498 | ) | 1525 | ) |
1499 | |||
1500 | add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit media_plugin_gstreamer010) | ||
1501 | |||
1502 | if (PACKAGE) | ||
1503 | add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME}) | ||
1504 | add_dependencies(package mac-updater mac-crash-logger) | ||
1505 | |||
1506 | add_custom_command( | ||
1507 | TARGET package POST_BUILD | ||
1508 | COMMAND ${PYTHON_EXECUTABLE} | ||
1509 | ARGS | ||
1510 | ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py | ||
1511 | --standalone=${STANDALONE} | ||
1512 | --buildtype=${CMAKE_BUILD_TYPE} | ||
1513 | --grid=${GRID} | ||
1514 | --configuration=${CMAKE_CFG_INTDIR} | ||
1515 | --channel=${VIEWER_CHANNEL} | ||
1516 | --login_channel=${VIEWER_LOGIN_CHANNEL} | ||
1517 | --source=${CMAKE_CURRENT_SOURCE_DIR} | ||
1518 | --artwork=${ARTWORK_DIR} | ||
1519 | --build=${CMAKE_CURRENT_BINARY_DIR} | ||
1520 | --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app | ||
1521 | --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched | ||
1522 | 1526 | ||
1523 | DEPENDS | 1527 | add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit media_plugin_gstreamer010 mac-updater mac-crash-logger) |
1524 | ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py | ||
1525 | ) | ||
1526 | 1528 | ||
1527 | add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit media_plugin_gstreamer010) | 1529 | add_package_target() |
1528 | add_custom_command( | 1530 | add_dependencies(package ${VIEWER_BINARY_NAME}) |
1529 | TARGET package POST_BUILD | ||
1530 | COMMAND ${PYTHON_EXECUTABLE} | ||
1531 | ARGS | ||
1532 | ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py | ||
1533 | --grid=${GRID} | ||
1534 | --configuration=${CMAKE_CFG_INTDIR} | ||
1535 | --channel=${VIEWER_CHANNEL} | ||
1536 | --login_channel=${VIEWER_LOGIN_CHANNEL} | ||
1537 | --source=${CMAKE_CURRENT_SOURCE_DIR} | ||
1538 | --artwork=${ARTWORK_DIR} | ||
1539 | --build=${CMAKE_CURRENT_BINARY_DIR} | ||
1540 | --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app | ||
1541 | --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched | ||
1542 | DEPENDS | ||
1543 | ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py | ||
1544 | ) | ||
1545 | 1531 | ||
1546 | endif (PACKAGE) | ||
1547 | endif (DARWIN) | 1532 | endif (DARWIN) |
1548 | 1533 | ||
1549 | if (INSTALL) | 1534 | if (INSTALL) |
diff --git a/linden/indra/newview/app_settings/viewerversion.xml b/linden/indra/newview/app_settings/viewerversion.xml deleted file mode 100644 index 33d810e..0000000 --- a/linden/indra/newview/app_settings/viewerversion.xml +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | <!-- | ||
2 | Set the version for Imprudence here! | ||
3 | |||
4 | NOTE: llcommon/llviewerversion.h still | ||
5 | contains the version for the LL viewer. | ||
6 | |||
7 | OS-specific version resources still | ||
8 | need to be changed manually - MC | ||
9 | --> | ||
10 | |||
11 | <viewer_version> | ||
12 | |||
13 | <!--int--> | ||
14 | <viewer version_major="1" /> | ||
15 | |||
16 | <!--int--> | ||
17 | <viewer version_minor="4" /> | ||
18 | |||
19 | <!--int--> | ||
20 | <viewer version_patch="0" /> | ||
21 | |||
22 | <!--string--> | ||
23 | <viewer version_test="beta 1" /> | ||
24 | |||
25 | </viewer_version> | ||
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index aa3de97..aeb52a2 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp | |||
@@ -154,7 +154,7 @@ | |||
154 | #include "llflexibleobject.h" | 154 | #include "llflexibleobject.h" |
155 | #include "llvosurfacepatch.h" | 155 | #include "llvosurfacepatch.h" |
156 | #include "llslider.h" | 156 | #include "llslider.h" |
157 | #include "viewerversion.h" | 157 | #include "viewerinfo.h" |
158 | 158 | ||
159 | // includes for idle() idleShutdown() | 159 | // includes for idle() idleShutdown() |
160 | #include "floaterao.h" | 160 | #include "floaterao.h" |
@@ -597,7 +597,7 @@ bool LLAppViewer::init() | |||
597 | 597 | ||
598 | // Need to do this initialization before we do anything else, since anything | 598 | // Need to do this initialization before we do anything else, since anything |
599 | // that touches files should really go through the lldir API | 599 | // that touches files should really go through the lldir API |
600 | gDirUtilp->initAppDirs(ViewerVersion::getImpViewerName()); | 600 | gDirUtilp->initAppDirs(ViewerInfo::viewerName()); |
601 | // set skin search path to default, will be overridden later | 601 | // set skin search path to default, will be overridden later |
602 | // this allows simple skinned file lookups to work | 602 | // this allows simple skinned file lookups to work |
603 | gDirUtilp->setSkinFolder("default"); | 603 | gDirUtilp->setSkinFolder("default"); |
@@ -619,15 +619,8 @@ bool LLAppViewer::init() | |||
619 | writeSystemInfo(); | 619 | writeSystemInfo(); |
620 | 620 | ||
621 | 621 | ||
622 | // Build a string representing the current version number. | 622 | // String representing the current version name/number. |
623 | gCurrentVersion = llformat( | 623 | gCurrentVersion = ViewerInfo::terseInfo(); |
624 | "%s %d.%d.%d.%d", | ||
625 | gSavedSettings.getString("VersionChannelName").c_str(), | ||
626 | ViewerVersion::getImpMajorVersion(), | ||
627 | ViewerVersion::getImpMinorVersion(), | ||
628 | ViewerVersion::getImpPatchVersion(), | ||
629 | 0 // our 'build number' | ||
630 | ); | ||
631 | 624 | ||
632 | ////////////////////////////////////////////////////////////////////////////// | 625 | ////////////////////////////////////////////////////////////////////////////// |
633 | ////////////////////////////////////////////////////////////////////////////// | 626 | ////////////////////////////////////////////////////////////////////////////// |
@@ -1796,9 +1789,6 @@ std::string LLAppViewer::getSettingsFilename(const std::string& location_key, | |||
1796 | 1789 | ||
1797 | bool LLAppViewer::initConfiguration() | 1790 | bool LLAppViewer::initConfiguration() |
1798 | { | 1791 | { |
1799 | // init Imprudence version - MC | ||
1800 | ViewerVersion::initViewerVersion(); | ||
1801 | |||
1802 | //Set up internal pointers | 1792 | //Set up internal pointers |
1803 | gSettings[sGlobalSettingsName] = &gSavedSettings; | 1793 | gSettings[sGlobalSettingsName] = &gSavedSettings; |
1804 | gSettings[sPerAccountSettingsName] = &gSavedPerAccountSettings; | 1794 | gSettings[sPerAccountSettingsName] = &gSavedPerAccountSettings; |
@@ -1846,7 +1836,7 @@ bool LLAppViewer::initConfiguration() | |||
1846 | // gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global"))); | 1836 | // gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global"))); |
1847 | gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings_imprudence.xml")); | 1837 | gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings_imprudence.xml")); |
1848 | 1838 | ||
1849 | gSavedSettings.setString("VersionChannelName", ViewerVersion::getImpViewerName()); | 1839 | gSavedSettings.setString("VersionChannelName", ViewerInfo::nameWithVariant()); |
1850 | 1840 | ||
1851 | //*FIX:Mani - Set default to disabling watchdog mainloop | 1841 | //*FIX:Mani - Set default to disabling watchdog mainloop |
1852 | // timeout for mac and linux. There is no call stack info | 1842 | // timeout for mac and linux. There is no call stack info |
@@ -2092,7 +2082,7 @@ bool LLAppViewer::initConfiguration() | |||
2092 | mYieldTime = gSavedSettings.getS32("YieldTime"); | 2082 | mYieldTime = gSavedSettings.getS32("YieldTime"); |
2093 | 2083 | ||
2094 | // XUI:translate | 2084 | // XUI:translate |
2095 | gSecondLife = ViewerVersion::getImpViewerName(); | 2085 | gSecondLife = ViewerInfo::viewerName(); |
2096 | 2086 | ||
2097 | // Read skin/branding settings if specified. | 2087 | // Read skin/branding settings if specified. |
2098 | //if (! gDirUtilp->getSkinDir().empty() ) | 2088 | //if (! gDirUtilp->getSkinDir().empty() ) |
@@ -2464,11 +2454,12 @@ void LLAppViewer::writeSystemInfo() | |||
2464 | { | 2454 | { |
2465 | gDebugInfo["SLLog"] = LLError::logFileName(); | 2455 | gDebugInfo["SLLog"] = LLError::logFileName(); |
2466 | 2456 | ||
2467 | gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); | 2457 | gDebugInfo["ClientInfo"]["Name"] = ViewerInfo::viewerName(); |
2468 | gDebugInfo["ClientInfo"]["MajorVersion"] = ViewerVersion::getImpMajorVersion(); | 2458 | gDebugInfo["ClientInfo"]["MajorVersion"] = ViewerInfo::versionMajor(); |
2469 | gDebugInfo["ClientInfo"]["MinorVersion"] = ViewerVersion::getImpMinorVersion(); | 2459 | gDebugInfo["ClientInfo"]["MinorVersion"] = ViewerInfo::versionMinor(); |
2470 | gDebugInfo["ClientInfo"]["PatchVersion"] = ViewerVersion::getImpPatchVersion(); | 2460 | gDebugInfo["ClientInfo"]["PatchVersion"] = ViewerInfo::versionPatch(); |
2471 | gDebugInfo["ClientInfo"]["BuildVersion"] = 0; | 2461 | gDebugInfo["ClientInfo"]["ReleaseVersion"] = ViewerInfo::versionRelease(); |
2462 | gDebugInfo["ClientInfo"]["ExtraVersion"] = ViewerInfo::versionExtra(); | ||
2472 | 2463 | ||
2473 | gDebugInfo["CAFilename"] = gDirUtilp->getCAFile(); | 2464 | gDebugInfo["CAFilename"] = gDirUtilp->getCAFile(); |
2474 | 2465 | ||
@@ -2553,11 +2544,12 @@ void LLAppViewer::handleViewerCrash() | |||
2553 | 2544 | ||
2554 | //We already do this in writeSystemInfo(), but we do it again here to make /sure/ we have a version | 2545 | //We already do this in writeSystemInfo(), but we do it again here to make /sure/ we have a version |
2555 | //to check against no matter what | 2546 | //to check against no matter what |
2556 | gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); | 2547 | gDebugInfo["ClientInfo"]["Name"] = ViewerInfo::viewerName(); |
2557 | gDebugInfo["ClientInfo"]["MajorVersion"] = ViewerVersion::getImpMajorVersion(); | 2548 | gDebugInfo["ClientInfo"]["MajorVersion"] = ViewerInfo::versionMajor(); |
2558 | gDebugInfo["ClientInfo"]["MinorVersion"] = ViewerVersion::getImpMinorVersion(); | 2549 | gDebugInfo["ClientInfo"]["MinorVersion"] = ViewerInfo::versionMinor(); |
2559 | gDebugInfo["ClientInfo"]["PatchVersion"] = ViewerVersion::getImpPatchVersion(); | 2550 | gDebugInfo["ClientInfo"]["PatchVersion"] = ViewerInfo::versionPatch(); |
2560 | gDebugInfo["ClientInfo"]["BuildVersion"] = 0; | 2551 | gDebugInfo["ClientInfo"]["ReleaseVersion"] = ViewerInfo::versionRelease(); |
2552 | gDebugInfo["ClientInfo"]["ExtraVersion"] = ViewerInfo::versionExtra(); | ||
2561 | 2553 | ||
2562 | LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); | 2554 | LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); |
2563 | if ( parcel && parcel->getMusicURL()[0]) | 2555 | if ( parcel && parcel->getMusicURL()[0]) |
@@ -4333,11 +4325,12 @@ void LLAppViewer::handleLoginComplete() | |||
4333 | initMainloopTimeout("Mainloop Init"); | 4325 | initMainloopTimeout("Mainloop Init"); |
4334 | 4326 | ||
4335 | // Store some data to DebugInfo in case of a freeze. | 4327 | // Store some data to DebugInfo in case of a freeze. |
4336 | gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); | 4328 | gDebugInfo["ClientInfo"]["Name"] = ViewerInfo::viewerName(); |
4337 | gDebugInfo["ClientInfo"]["MajorVersion"] = ViewerVersion::getImpMajorVersion(); | 4329 | gDebugInfo["ClientInfo"]["MajorVersion"] = ViewerInfo::versionMajor(); |
4338 | gDebugInfo["ClientInfo"]["MinorVersion"] = ViewerVersion::getImpMinorVersion(); | 4330 | gDebugInfo["ClientInfo"]["MinorVersion"] = ViewerInfo::versionMinor(); |
4339 | gDebugInfo["ClientInfo"]["PatchVersion"] = ViewerVersion::getImpPatchVersion(); | 4331 | gDebugInfo["ClientInfo"]["PatchVersion"] = ViewerInfo::versionPatch(); |
4340 | gDebugInfo["ClientInfo"]["BuildVersion"] = 0; | 4332 | gDebugInfo["ClientInfo"]["ReleaseVersion"] = ViewerInfo::versionRelease(); |
4333 | gDebugInfo["ClientInfo"]["ExtraVersion"] = ViewerInfo::versionExtra(); | ||
4341 | 4334 | ||
4342 | gDebugInfo["SettingsFilename"] = gSavedSettings.getString("ClientSettingsFile"); | 4335 | gDebugInfo["SettingsFilename"] = gSavedSettings.getString("ClientSettingsFile"); |
4343 | gDebugInfo["CAFilename"] = gDirUtilp->getCAFile(); | 4336 | gDebugInfo["CAFilename"] = gDirUtilp->getCAFile(); |
diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp index a5d2c98..8878de5 100644 --- a/linden/indra/newview/llfloaterabout.cpp +++ b/linden/indra/newview/llfloaterabout.cpp | |||
@@ -59,7 +59,7 @@ | |||
59 | #include "llglheaders.h" | 59 | #include "llglheaders.h" |
60 | #include "llviewerwindow.h" | 60 | #include "llviewerwindow.h" |
61 | #include "llwindow.h" | 61 | #include "llwindow.h" |
62 | #include "viewerversion.h" | 62 | #include "viewerinfo.h" |
63 | 63 | ||
64 | // [RLVa:KB] | 64 | // [RLVa:KB] |
65 | #include "rlvhandler.h" | 65 | #include "rlvhandler.h" |
@@ -120,11 +120,7 @@ LLFloaterAbout::LLFloaterAbout() | |||
120 | viewer_link_style->setColor(gSavedSettings.getColor4("HTMLLinkColor")); | 120 | viewer_link_style->setColor(gSavedSettings.getColor4("HTMLLinkColor")); |
121 | 121 | ||
122 | // Version string | 122 | // Version string |
123 | std::string version = llformat( | 123 | std::string version = llformat("%s (%s %s)\n", ViewerInfo::prettyInfo().c_str(), __DATE__, __TIME__); |
124 | "%s %d.%d.%d %s (%s %s)\n", | ||
125 | ViewerVersion::getImpViewerName().c_str(), | ||
126 | ViewerVersion::getImpMajorVersion(), ViewerVersion::getImpMinorVersion(), ViewerVersion::getImpPatchVersion(), ViewerVersion::getImpTestVersion().c_str(), | ||
127 | __DATE__, __TIME__); | ||
128 | 124 | ||
129 | support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); | 125 | support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); |
130 | support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, viewer_link_style); | 126 | support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, viewer_link_style); |
@@ -318,13 +314,13 @@ void LLFloaterAbout::onClickCopy(void* user_data) | |||
318 | static std::string get_viewer_release_notes_url() | 314 | static std::string get_viewer_release_notes_url() |
319 | { | 315 | { |
320 | std::ostringstream version; | 316 | std::ostringstream version; |
321 | version << ViewerVersion::getImpMajorVersion() << "." | 317 | version << ViewerInfo::versionMajor() << "." |
322 | << ViewerVersion::getImpMinorVersion() << "." | 318 | << ViewerInfo::versionMinor() << "." |
323 | << ViewerVersion::getImpPatchVersion(); | 319 | << ViewerInfo::versionPatch(); |
324 | 320 | ||
325 | // Append the test version if it's not empty | 321 | // Append the test version if it's not empty |
326 | if( !(ViewerVersion::getImpTestVersion().empty()) ) | 322 | if( !(ViewerInfo::versionExtra().empty()) ) |
327 | version << "-" << ViewerVersion::getImpTestVersion(); | 323 | version << "-" << ViewerInfo::versionExtra(); |
328 | 324 | ||
329 | std::ostringstream url; | 325 | std::ostringstream url; |
330 | url << RELEASE_NOTES_BASE_URL << version.str(); | 326 | url << RELEASE_NOTES_BASE_URL << version.str(); |
diff --git a/linden/indra/newview/llfloaterreporter.cpp b/linden/indra/newview/llfloaterreporter.cpp index 15f278d..16123ae 100644 --- a/linden/indra/newview/llfloaterreporter.cpp +++ b/linden/indra/newview/llfloaterreporter.cpp | |||
@@ -80,7 +80,7 @@ | |||
80 | #include "llselectmgr.h" | 80 | #include "llselectmgr.h" |
81 | #include "lluictrlfactory.h" | 81 | #include "lluictrlfactory.h" |
82 | #include "llviewernetwork.h" | 82 | #include "llviewernetwork.h" |
83 | #include "viewerversion.h" | 83 | #include "viewerinfo.h" |
84 | 84 | ||
85 | #include "llassetuploadresponders.h" | 85 | #include "llassetuploadresponders.h" |
86 | 86 | ||
@@ -742,13 +742,11 @@ LLSD LLFloaterReporter::gatherReport() | |||
742 | 742 | ||
743 | if ( mReportType == BUG_REPORT) | 743 | if ( mReportType == BUG_REPORT) |
744 | { | 744 | { |
745 | summary << short_platform << " V" << ViewerVersion::getLLMajorVersion() << "." | 745 | summary << short_platform << " " |
746 | << ViewerVersion::getLLMinorVersion() << "." | 746 | << ViewerInfo::terseInfo() |
747 | << ViewerVersion::getLLPatchVersion() << "." | 747 | << " (" << regionp->getName() << ")" |
748 | << ViewerVersion::getLLBuildVersion() | 748 | << "[" << category_name << "] " |
749 | << " (" << regionp->getName() << ")" | 749 | << "\"" << childGetValue("summary_edit").asString() << "\""; |
750 | << "[" << category_name << "] " | ||
751 | << "\"" << childGetValue("summary_edit").asString() << "\""; | ||
752 | } | 750 | } |
753 | else | 751 | else |
754 | { | 752 | { |
@@ -763,10 +761,7 @@ LLSD LLFloaterReporter::gatherReport() | |||
763 | std::ostringstream details; | 761 | std::ostringstream details; |
764 | if (mReportType != BUG_REPORT) | 762 | if (mReportType != BUG_REPORT) |
765 | { | 763 | { |
766 | details << "V" << ViewerVersion::getLLMajorVersion() << "." // client version moved to body of email for abuse reports | 764 | details << ViewerInfo::terseInfo() << std::endl << std::endl; |
767 | << ViewerVersion::getLLMinorVersion() << "." | ||
768 | << ViewerVersion::getLLPatchVersion() << "." | ||
769 | << ViewerVersion::getLLBuildVersion() << std::endl << std::endl; | ||
770 | } | 765 | } |
771 | std::string object_name = childGetText("object_name"); | 766 | std::string object_name = childGetText("object_name"); |
772 | std::string owner_name = childGetText("owner_name"); | 767 | std::string owner_name = childGetText("owner_name"); |
@@ -786,10 +781,8 @@ LLSD LLFloaterReporter::gatherReport() | |||
786 | 781 | ||
787 | std::string version_string; | 782 | std::string version_string; |
788 | version_string = llformat( | 783 | version_string = llformat( |
789 | "%d.%d.%d %s %s %s %s", | 784 | "%s %s %s %s %s", |
790 | ViewerVersion::getLLMajorVersion(), | 785 | ViewerInfo::terseInfo().c_str(), |
791 | ViewerVersion::getLLMinorVersion(), | ||
792 | ViewerVersion::getLLPatchVersion(), | ||
793 | platform, | 786 | platform, |
794 | gSysCPU.getFamily().c_str(), | 787 | gSysCPU.getFamily().c_str(), |
795 | gGLManager.mGLRenderer.c_str(), | 788 | gGLManager.mGLRenderer.c_str(), |
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index e83a466..824c5b0 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp | |||
@@ -73,7 +73,7 @@ | |||
73 | #include "lluictrlfactory.h" | 73 | #include "lluictrlfactory.h" |
74 | #include "llhttpclient.h" | 74 | #include "llhttpclient.h" |
75 | #include "llweb.h" | 75 | #include "llweb.h" |
76 | #include "viewerversion.h" | 76 | #include "viewerinfo.h" |
77 | #include "llmediactrl.h" | 77 | #include "llmediactrl.h" |
78 | 78 | ||
79 | #include "llfloatermediabrowser.h" | 79 | #include "llfloatermediabrowser.h" |
@@ -264,25 +264,10 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, | |||
264 | 264 | ||
265 | // childSetAction("quit_btn", onClickQuit, this); | 265 | // childSetAction("quit_btn", onClickQuit, this); |
266 | 266 | ||
267 | std::string imp_channel = gSavedSettings.getString("VersionChannelName"); | 267 | std::string imp_version = ViewerInfo::prettyInfo(); |
268 | std::string imp_version = llformat("%d.%d.%d %s", | ||
269 | ViewerVersion::getImpMajorVersion(), | ||
270 | ViewerVersion::getImpMinorVersion(), | ||
271 | ViewerVersion::getImpPatchVersion(), | ||
272 | ViewerVersion::getImpTestVersion().c_str() ); | ||
273 | |||
274 | std::string ll_channel = ViewerVersion::getLLViewerName(); | ||
275 | std::string ll_version = llformat("%d.%d.%d (%d)", | ||
276 | ViewerVersion::getLLMajorVersion(), | ||
277 | ViewerVersion::getLLMinorVersion(), | ||
278 | ViewerVersion::getLLPatchVersion(), | ||
279 | ViewerVersion::getLLBuildVersion() ); | ||
280 | 268 | ||
281 | LLTextBox* channel_text = getChild<LLTextBox>("channel_text"); | 269 | LLTextBox* channel_text = getChild<LLTextBox>("channel_text"); |
282 | channel_text->setTextArg("[CHANNEL]", imp_channel); | ||
283 | channel_text->setTextArg("[VERSION]", imp_version); | 270 | channel_text->setTextArg("[VERSION]", imp_version); |
284 | channel_text->setTextArg("[ALT_CHANNEL]", ll_channel); | ||
285 | channel_text->setTextArg("[ALT_VERSION]", ll_version); | ||
286 | channel_text->setClickedCallback(onClickVersion); | 271 | channel_text->setClickedCallback(onClickVersion); |
287 | channel_text->setCallbackUserData(this); | 272 | channel_text->setCallbackUserData(this); |
288 | 273 | ||
@@ -916,12 +901,8 @@ void LLPanelLogin::loadLoginPage() | |||
916 | } | 901 | } |
917 | 902 | ||
918 | // Channel and Version | 903 | // Channel and Version |
919 | std::string version = llformat("%d.%d.%d %s", | 904 | char* curl_channel = curl_escape(ViewerInfo::nameWithVariant().c_str(), 0); |
920 | ViewerVersion::getImpMajorVersion(), ViewerVersion::getImpMinorVersion(), | 905 | char* curl_version = curl_escape(ViewerInfo::versionNumbers4().c_str(), 0); |
921 | ViewerVersion::getImpPatchVersion(), ViewerVersion::getImpTestVersion().c_str() ); | ||
922 | |||
923 | char* curl_channel = curl_escape(gSavedSettings.getString("VersionChannelName").c_str(), 0); | ||
924 | char* curl_version = curl_escape(version.c_str(), 0); | ||
925 | 906 | ||
926 | oStr << "&channel=" << curl_channel; | 907 | oStr << "&channel=" << curl_channel; |
927 | oStr << "&version=" << curl_version; | 908 | oStr << "&version=" << curl_version; |
@@ -1373,19 +1354,10 @@ bool LLPanelLogin::loadNewsBar() | |||
1373 | full_url << "?"; | 1354 | full_url << "?"; |
1374 | } | 1355 | } |
1375 | 1356 | ||
1376 | std::string channel = gSavedSettings.getString("VersionChannelName"); | 1357 | std::string channel = ViewerInfo::nameWithVariant(); |
1358 | std::string version = ViewerInfo::versionNumbers4(); | ||
1377 | std::string skin = gSavedSettings.getString("SkinCurrent"); | 1359 | std::string skin = gSavedSettings.getString("SkinCurrent"); |
1378 | 1360 | ||
1379 | std::string version = | ||
1380 | llformat("%d.%d.%d", | ||
1381 | ViewerVersion::getImpMajorVersion(), | ||
1382 | ViewerVersion::getImpMinorVersion(), | ||
1383 | ViewerVersion::getImpPatchVersion()); | ||
1384 | if (!ViewerVersion::getImpTestVersion().empty()) | ||
1385 | { | ||
1386 | version += " " + ViewerVersion::getImpTestVersion(); | ||
1387 | } | ||
1388 | |||
1389 | char* curl_channel = curl_escape(channel.c_str(), 0); | 1361 | char* curl_channel = curl_escape(channel.c_str(), 0); |
1390 | char* curl_version = curl_escape(version.c_str(), 0); | 1362 | char* curl_version = curl_escape(version.c_str(), 0); |
1391 | char* curl_skin = curl_escape(skin.c_str(), 0); | 1363 | char* curl_skin = curl_escape(skin.c_str(), 0); |
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index b80a286..083a082 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -190,7 +190,7 @@ | |||
190 | #include "llwaterparammanager.h" | 190 | #include "llwaterparammanager.h" |
191 | #include "llagentlanguage.h" | 191 | #include "llagentlanguage.h" |
192 | #include "llsocks5.h" | 192 | #include "llsocks5.h" |
193 | #include "viewerversion.h" | 193 | #include "viewerinfo.h" |
194 | 194 | ||
195 | #include "lgghunspell_wrapper.h" | 195 | #include "lgghunspell_wrapper.h" |
196 | #include "jcfloater_animation_list.h" | 196 | #include "jcfloater_animation_list.h" |
@@ -533,9 +533,9 @@ bool idle_startup() | |||
533 | if(!start_messaging_system( | 533 | if(!start_messaging_system( |
534 | message_template_path, | 534 | message_template_path, |
535 | port, | 535 | port, |
536 | ViewerVersion::getLLMajorVersion(), | 536 | ViewerInfo::versionMajor(), |
537 | ViewerVersion::getLLMinorVersion(), | 537 | ViewerInfo::versionMinor(), |
538 | ViewerVersion::getLLPatchVersion(), | 538 | ViewerInfo::versionPatch(), |
539 | FALSE, | 539 | FALSE, |
540 | std::string(), | 540 | std::string(), |
541 | responder, | 541 | responder, |
diff --git a/linden/indra/newview/llviewermedia.cpp b/linden/indra/newview/llviewermedia.cpp index 84fd0ba..dbb6f62 100644 --- a/linden/indra/newview/llviewermedia.cpp +++ b/linden/indra/newview/llviewermedia.cpp | |||
@@ -40,7 +40,7 @@ | |||
40 | #include "llviewerimage.h" | 40 | #include "llviewerimage.h" |
41 | #include "llviewerwindow.h" | 41 | #include "llviewerwindow.h" |
42 | #include "llviewerimagelist.h" | 42 | #include "llviewerimagelist.h" |
43 | //#include "viewerversion.h" | 43 | //#include "viewerinfo.h" |
44 | 44 | ||
45 | #include "llpluginclassmedia.h" | 45 | #include "llpluginclassmedia.h" |
46 | 46 | ||
@@ -261,7 +261,7 @@ std::string LLViewerMedia::getCurrentUserAgent() | |||
261 | std::ostringstream codec; | 261 | std::ostringstream codec; |
262 | codec << "SecondLife/"; | 262 | codec << "SecondLife/"; |
263 | codec << "C64 Basic V2"; | 263 | codec << "C64 Basic V2"; |
264 | //codec << ViewerVersion::getImpMajorVersion() << "." << ViewerVersion::getImpMinorVersion() << "." << ViewerVersion::getImpPatchVersion() << " " << ViewerVersion::getImpTestVersion(); | 264 | //codec << " " << ViewerInfo::versionNumbers3(); |
265 | //codec << " (" << channel << "; " << skin_name << " skin)"; | 265 | //codec << " (" << channel << "; " << skin_name << " skin)"; |
266 | // llinfos << codec.str() << llendl; | 266 | // llinfos << codec.str() << llendl; |
267 | 267 | ||
diff --git a/linden/indra/newview/packaging/mac/ConfigureDMG.scpt b/linden/indra/newview/packaging/mac/ConfigureDMG.scpt new file mode 100644 index 0000000..198ab9e --- /dev/null +++ b/linden/indra/newview/packaging/mac/ConfigureDMG.scpt | |||
@@ -0,0 +1,110 @@ | |||
1 | (* | ||
2 | |||
3 | @file ConfigureDMG.scpt | ||
4 | @author Jacek Antonelli | ||
5 | @brief Script for configuring the Mac installer disk image. | ||
6 | |||
7 | Copyright (c) 2011, Jacek Antonelli | ||
8 | |||
9 | Permission is hereby granted, free of charge, to any person | ||
10 | obtaining a copy of this software and associated documentation files | ||
11 | (the "Software"), to deal in the Software without restriction, | ||
12 | including without limitation the rights to use, copy, modify, merge, | ||
13 | publish, distribute, sublicense, and/or sell copies of the Software, | ||
14 | and to permit persons to whom the Software is furnished to do so, | ||
15 | subject to the following conditions: | ||
16 | |||
17 | The above copyright notice and this permission notice shall be | ||
18 | included in all copies or substantial portions of the Software. | ||
19 | |||
20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
22 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
23 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
24 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
25 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
26 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
27 | SOFTWARE. | ||
28 | |||
29 | ----- | ||
30 | |||
31 | This AppleScript script configures the view options and icon layout of | ||
32 | the Mac installer disk image (DMG) as part of the packaging process. | ||
33 | See also scripts/package.py, which executes this script. | ||
34 | |||
35 | This script takes two required positional command line arguments: | ||
36 | |||
37 | 1: the name of the mounted volume (e.g. for "/Volumes/Imprudence Installer", | ||
38 | the volume name is "Imprudence Installer"). | ||
39 | 2: the name of the application file (e.g. "Imprudence.app"). | ||
40 | |||
41 | Example usage: | ||
42 | |||
43 | osascript ConfigureDMG.scpt "Imprudence Installer" "Imprudence.app" | ||
44 | |||
45 | Some preparation is necessary before running this script: | ||
46 | |||
47 | * The target disk image must be currently attached as a volume, with | ||
48 | the volume name specified by the first command line argument. | ||
49 | * The volume must contain the application file, with the file | ||
50 | name specified by the second command line argument. | ||
51 | * The volume must contain the "background.png" image file. | ||
52 | * The volume must not contain a file or folder named "Applications". | ||
53 | * It might be necessary to "Enable access for assistive devices" | ||
54 | in System Preferences > Universal Access. | ||
55 | |||
56 | *) | ||
57 | |||
58 | on run argv | ||
59 | |||
60 | -- Read the first positional argument, the volume name. | ||
61 | set volumeName to item 1 of argv | ||
62 | |||
63 | -- Read the second positional argument, the app name. | ||
64 | set appName to item 2 of argv | ||
65 | |||
66 | tell application "Finder" to tell disk volumeName | ||
67 | -- Open the volume in a Finder window. | ||
68 | open | ||
69 | set theWindow to the container window | ||
70 | |||
71 | -- Tweak some options. | ||
72 | set current view of theWindow to icon view | ||
73 | set toolbar visible of theWindow to false | ||
74 | set statusbar visible of theWindow to false | ||
75 | |||
76 | -- Set window to position {150,150}, size {+600,+420}. | ||
77 | set bounds of theWindow to {150, 150, 750, 570} | ||
78 | |||
79 | -- Tweak some more options. | ||
80 | set viewOptions to the icon view options of theWindow | ||
81 | set arrangement of viewOptions to not arranged | ||
82 | set icon size of viewOptions to 128 | ||
83 | |||
84 | -- Make sure background.png is visible, so Finder can see it. | ||
85 | set bgPicPath to the quoted form of (the POSIX path of (it as alias) & "background.png") | ||
86 | do shell script ("SetFile -a v " & bgPicPath) | ||
87 | update without registering applications | ||
88 | |||
89 | -- Use background.png as the background picture. | ||
90 | set background picture of viewOptions to file "background.png" | ||
91 | |||
92 | -- Now set background.png to invisible, so the end user won't see it. | ||
93 | do shell script ("SetFile -a V " & bgPicPath) | ||
94 | |||
95 | -- Position the application file. | ||
96 | set position of item appName of theWindow to {138, 260} | ||
97 | |||
98 | -- Create and position an alias to the Applications folder. | ||
99 | set appAlias to make new alias file at theWindow to POSIX file "/Applications" | ||
100 | set name of appAlias to "Applications" | ||
101 | set position of appAlias to {470, 260} | ||
102 | |||
103 | -- Visually update the window so all the changes take effect. | ||
104 | update without registering applications | ||
105 | |||
106 | -- Pause briefly so we can admire the results. | ||
107 | delay 2 | ||
108 | end tell | ||
109 | |||
110 | end run | ||
diff --git a/linden/indra/newview/English.lproj/InfoPlist.strings b/linden/indra/newview/packaging/mac/English.lproj/InfoPlist.strings index 1ebe727..1ebe727 100644 --- a/linden/indra/newview/English.lproj/InfoPlist.strings +++ b/linden/indra/newview/packaging/mac/English.lproj/InfoPlist.strings | |||
diff --git a/linden/indra/newview/English.lproj/language.txt b/linden/indra/newview/packaging/mac/English.lproj/language.txt index bc0aa57..bc0aa57 100644 --- a/linden/indra/newview/English.lproj/language.txt +++ b/linden/indra/newview/packaging/mac/English.lproj/language.txt | |||
diff --git a/linden/indra/newview/packaging/mac/GenerateInfoPlist.cmake b/linden/indra/newview/packaging/mac/GenerateInfoPlist.cmake new file mode 100644 index 0000000..ecbec34 --- /dev/null +++ b/linden/indra/newview/packaging/mac/GenerateInfoPlist.cmake | |||
@@ -0,0 +1,39 @@ | |||
1 | # | ||
2 | # Generate the Info.plist file from the template. | ||
3 | # Only @-style "@VARIABLES@" are substituted in the template (not "${VARIABLES}"). | ||
4 | # | ||
5 | # This script is needed because CMake has no other way to perform | ||
6 | # configure_file() as a build-time custom command. :( | ||
7 | # | ||
8 | # When running this script, you must define (-D) SOURCE_DIR and | ||
9 | # BINARY_DIR to refer to indra and the build directory respectively. | ||
10 | # (Equivalent to CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR in | ||
11 | # CMakeLists.txt ) | ||
12 | # | ||
13 | |||
14 | if (NOT SOURCE_DIR) | ||
15 | message( FATAL_ERROR "You forgot to define SOURCE_DIR!" ) | ||
16 | endif (NOT SOURCE_DIR) | ||
17 | |||
18 | if (NOT BINARY_DIR) | ||
19 | message( FATAL_ERROR "You forgot to define BINARY_DIR!" ) | ||
20 | endif (NOT BINARY_DIR) | ||
21 | |||
22 | set(SCRIPTS_DIR "${SOURCE_DIR}/../scripts") | ||
23 | set(CMAKE_MODULE_PATH "${SOURCE_DIR}/cmake/" "${CMAKE_ROOT/Modules}") | ||
24 | |||
25 | include(BuildVersion) | ||
26 | build_version(viewer) | ||
27 | |||
28 | SET( BUNDLE_NAME "${viewer_NAME}" ) | ||
29 | SET( EXECUTABLE "${viewer_NAME}" ) | ||
30 | set( BUNDLE_VERSION "${viewer_VERSION}" ) | ||
31 | set( SHORT_VERSION_STRING "${viewer_NAME} ${viewer_VERSION}" ) | ||
32 | set( ICON_FILE "viewer.icns" ) | ||
33 | set( IDENTIFIER "${viewer_BUNDLE_ID}" ) | ||
34 | set( SIGNATURE "impr" ) | ||
35 | |||
36 | configure_file( | ||
37 | ${SOURCE_DIR}/newview/packaging/mac/Info.plist.in | ||
38 | ${BINARY_DIR}/newview/packaging/mac/Info.plist | ||
39 | @ONLY) | ||
diff --git a/linden/indra/newview/German.lproj/language.txt b/linden/indra/newview/packaging/mac/German.lproj/language.txt index c42e816..c42e816 100644 --- a/linden/indra/newview/German.lproj/language.txt +++ b/linden/indra/newview/packaging/mac/German.lproj/language.txt | |||
diff --git a/linden/indra/newview/Info-Imprudence.plist b/linden/indra/newview/packaging/mac/Info.plist.in index b3045c9..78cc6b7 100644 --- a/linden/indra/newview/Info-Imprudence.plist +++ b/linden/indra/newview/packaging/mac/Info.plist.in | |||
@@ -2,22 +2,20 @@ | |||
2 | <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | 2 | <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
3 | <plist version="1.0"> | 3 | <plist version="1.0"> |
4 | <dict> | 4 | <dict> |
5 | <key>CFBundleDevelopmentRegion</key> | 5 | <key>CFBundleName</key> |
6 | <string>English</string> | 6 | <string>@BUNDLE_NAME@</string> |
7 | <key>CFBundleExecutable</key> | 7 | <key>CFBundleExecutable</key> |
8 | <string>Imprudence</string> | 8 | <string>@EXECUTABLE@</string> |
9 | <key>CFBundleVersion</key> | ||
10 | <string>@BUNDLE_VERSION@</string> | ||
11 | <key>CFBundleShortVersionString</key> | ||
12 | <string>@SHORT_VERSION_STRING@</string> | ||
9 | <key>CFBundleIconFile</key> | 13 | <key>CFBundleIconFile</key> |
10 | <string>viewer.icns</string> | 14 | <string>@ICON_FILE@</string> |
11 | <key>CFBundleIdentifier</key> | 15 | <key>CFBundleIdentifier</key> |
12 | <string>org.imprudenceviewer.viewer</string> | 16 | <string>@IDENTIFIER@</string> |
13 | <key>CFBundleInfoDictionaryVersion</key> | ||
14 | <string>6.0</string> | ||
15 | <key>CFBundleName</key> | ||
16 | <string>Imprudence</string> | ||
17 | <key>CFBundlePackageType</key> | ||
18 | <string>APPL</string> | ||
19 | <key>CFBundleSignature</key> | 17 | <key>CFBundleSignature</key> |
20 | <string>????</string> | 18 | <string>@SIGNATURE@</string> |
21 | <key>CFBundleURLTypes</key> | 19 | <key>CFBundleURLTypes</key> |
22 | <array> | 20 | <array> |
23 | <dict> | 21 | <dict> |
@@ -31,8 +29,12 @@ | |||
31 | <true/> | 29 | <true/> |
32 | </dict> | 30 | </dict> |
33 | </array> | 31 | </array> |
34 | <key>CFBundleVersion</key> | 32 | <key>CFBundleDevelopmentRegion</key> |
35 | <string>1.4.0 beta 1</string> | 33 | <string>English</string> |
34 | <key>CFBundleInfoDictionaryVersion</key> | ||
35 | <string>6.0</string> | ||
36 | <key>CFBundlePackageType</key> | ||
37 | <string>APPL</string> | ||
36 | <key>CSResourcesFileMapped</key> | 38 | <key>CSResourcesFileMapped</key> |
37 | <true/> | 39 | <true/> |
38 | </dict> | 40 | </dict> |
diff --git a/linden/indra/newview/Japanese.lproj/language.txt b/linden/indra/newview/packaging/mac/Japanese.lproj/language.txt index c6e3ab6..c6e3ab6 100644 --- a/linden/indra/newview/Japanese.lproj/language.txt +++ b/linden/indra/newview/packaging/mac/Japanese.lproj/language.txt | |||
diff --git a/linden/indra/newview/Korean.lproj/language.txt b/linden/indra/newview/packaging/mac/Korean.lproj/language.txt index b03ec72..b03ec72 100644 --- a/linden/indra/newview/Korean.lproj/language.txt +++ b/linden/indra/newview/packaging/mac/Korean.lproj/language.txt | |||
diff --git a/linden/indra/newview/SecondLife.nib/classes.nib b/linden/indra/newview/packaging/mac/SecondLife.nib/classes.nib index ea58db1..ea58db1 100644 --- a/linden/indra/newview/SecondLife.nib/classes.nib +++ b/linden/indra/newview/packaging/mac/SecondLife.nib/classes.nib | |||
diff --git a/linden/indra/newview/SecondLife.nib/info.nib b/linden/indra/newview/packaging/mac/SecondLife.nib/info.nib index 1b531de..1b531de 100644 --- a/linden/indra/newview/SecondLife.nib/info.nib +++ b/linden/indra/newview/packaging/mac/SecondLife.nib/info.nib | |||
diff --git a/linden/indra/newview/SecondLife.nib/objects.xib b/linden/indra/newview/packaging/mac/SecondLife.nib/objects.xib index 553b6f3..553b6f3 100644 --- a/linden/indra/newview/SecondLife.nib/objects.xib +++ b/linden/indra/newview/packaging/mac/SecondLife.nib/objects.xib | |||
diff --git a/linden/indra/newview/packaging/mac/background.png b/linden/indra/newview/packaging/mac/background.png new file mode 100644 index 0000000..9b0b0b2 --- /dev/null +++ b/linden/indra/newview/packaging/mac/background.png | |||
Binary files differ | |||
diff --git a/linden/indra/newview/da.lproj/language.txt b/linden/indra/newview/packaging/mac/da.lproj/language.txt index 316d25d..316d25d 100644 --- a/linden/indra/newview/da.lproj/language.txt +++ b/linden/indra/newview/packaging/mac/da.lproj/language.txt | |||
diff --git a/linden/indra/newview/es.lproj/language.txt b/linden/indra/newview/packaging/mac/es.lproj/language.txt index 6c43814..6c43814 100644 --- a/linden/indra/newview/es.lproj/language.txt +++ b/linden/indra/newview/packaging/mac/es.lproj/language.txt | |||
diff --git a/linden/indra/newview/fr.lproj/language.txt b/linden/indra/newview/packaging/mac/fr.lproj/language.txt index 717280a..717280a 100644 --- a/linden/indra/newview/fr.lproj/language.txt +++ b/linden/indra/newview/packaging/mac/fr.lproj/language.txt | |||
diff --git a/linden/indra/newview/hu.lproj/language.txt b/linden/indra/newview/packaging/mac/hu.lproj/language.txt index 6c604cf..6c604cf 100644 --- a/linden/indra/newview/hu.lproj/language.txt +++ b/linden/indra/newview/packaging/mac/hu.lproj/language.txt | |||
diff --git a/linden/indra/newview/it.lproj/language.txt b/linden/indra/newview/packaging/mac/it.lproj/language.txt index c919714..c919714 100644 --- a/linden/indra/newview/it.lproj/language.txt +++ b/linden/indra/newview/packaging/mac/it.lproj/language.txt | |||
diff --git a/linden/indra/newview/nl.lproj/language.txt b/linden/indra/newview/packaging/mac/nl.lproj/language.txt index d5f5c2a..d5f5c2a 100644 --- a/linden/indra/newview/nl.lproj/language.txt +++ b/linden/indra/newview/packaging/mac/nl.lproj/language.txt | |||
diff --git a/linden/indra/newview/pl.lproj/language.txt b/linden/indra/newview/packaging/mac/pl.lproj/language.txt index 55239f3..55239f3 100644 --- a/linden/indra/newview/pl.lproj/language.txt +++ b/linden/indra/newview/packaging/mac/pl.lproj/language.txt | |||
diff --git a/linden/indra/newview/pt.lproj/language.txt b/linden/indra/newview/packaging/mac/pt.lproj/language.txt index 9e3340e..9e3340e 100644 --- a/linden/indra/newview/pt.lproj/language.txt +++ b/linden/indra/newview/packaging/mac/pt.lproj/language.txt | |||
diff --git a/linden/indra/newview/ru.lproj/language.txt b/linden/indra/newview/packaging/mac/ru.lproj/language.txt index adc719b..adc719b 100644 --- a/linden/indra/newview/ru.lproj/language.txt +++ b/linden/indra/newview/packaging/mac/ru.lproj/language.txt | |||
diff --git a/linden/indra/newview/tr.lproj/language.txt b/linden/indra/newview/packaging/mac/tr.lproj/language.txt index 44266bf..44266bf 100644 --- a/linden/indra/newview/tr.lproj/language.txt +++ b/linden/indra/newview/packaging/mac/tr.lproj/language.txt | |||
diff --git a/linden/indra/newview/uk.lproj/language.txt b/linden/indra/newview/packaging/mac/uk.lproj/language.txt index fbc658f..fbc658f 100644 --- a/linden/indra/newview/uk.lproj/language.txt +++ b/linden/indra/newview/packaging/mac/uk.lproj/language.txt | |||
diff --git a/linden/indra/newview/zh-Hans.lproj/language.txt b/linden/indra/newview/packaging/mac/zh-Hans.lproj/language.txt index 147d659..147d659 100644 --- a/linden/indra/newview/zh-Hans.lproj/language.txt +++ b/linden/indra/newview/packaging/mac/zh-Hans.lproj/language.txt | |||
diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py index 0f129dd..5e1e816 100755 --- a/linden/indra/newview/viewer_manifest.py +++ b/linden/indra/newview/viewer_manifest.py | |||
@@ -585,7 +585,8 @@ class DarwinManifest(ViewerManifest): | |||
585 | 585 | ||
586 | if self.prefix(src="", dst="Contents"): # everything goes in Contents | 586 | if self.prefix(src="", dst="Contents"): # everything goes in Contents |
587 | 587 | ||
588 | self.path("Info-Imprudence.plist", dst="Info.plist") | 588 | # Info.plist goes directly in Contents |
589 | self.path("packaging/mac/Info.plist", dst="Info.plist") | ||
589 | 590 | ||
590 | # copy additional libs in <bundle>/Contents/MacOS/ | 591 | # copy additional libs in <bundle>/Contents/MacOS/ |
591 | if (not self.standalone()) and self.prefix(src="../../libraries/universal-darwin/lib_release", dst="MacOS/"): | 592 | if (not self.standalone()) and self.prefix(src="../../libraries/universal-darwin/lib_release", dst="MacOS/"): |
@@ -653,27 +654,27 @@ class DarwinManifest(ViewerManifest): | |||
653 | self.gather_documents() | 654 | self.gather_documents() |
654 | 655 | ||
655 | self.path("featuretable_mac.txt") | 656 | self.path("featuretable_mac.txt") |
656 | self.path("SecondLife.nib") | ||
657 | |||
658 | self.path("viewer.icns") | 657 | self.path("viewer.icns") |
659 | 658 | ||
660 | # Translations | 659 | if self.prefix(src="packaging/mac", dst=""): |
661 | self.path("English.lproj") | 660 | self.path("SecondLife.nib") |
662 | self.path("German.lproj") | 661 | self.path("English.lproj") |
663 | self.path("Japanese.lproj") | 662 | self.path("German.lproj") |
664 | self.path("Korean.lproj") | 663 | self.path("Japanese.lproj") |
665 | self.path("da.lproj") | 664 | self.path("Korean.lproj") |
666 | self.path("es.lproj") | 665 | self.path("da.lproj") |
667 | self.path("fr.lproj") | 666 | self.path("es.lproj") |
668 | self.path("hu.lproj") | 667 | self.path("fr.lproj") |
669 | self.path("it.lproj") | 668 | self.path("hu.lproj") |
670 | self.path("nl.lproj") | 669 | self.path("it.lproj") |
671 | self.path("pl.lproj") | 670 | self.path("nl.lproj") |
672 | self.path("pt.lproj") | 671 | self.path("pl.lproj") |
673 | self.path("ru.lproj") | 672 | self.path("pt.lproj") |
674 | self.path("tr.lproj") | 673 | self.path("ru.lproj") |
675 | self.path("uk.lproj") | 674 | self.path("tr.lproj") |
676 | self.path("zh-Hans.lproj") | 675 | self.path("uk.lproj") |
676 | self.path("zh-Hans.lproj") | ||
677 | self.end_prefix("packaging/mac") | ||
677 | 678 | ||
678 | 679 | ||
679 | # if (not self.standalone()) and self.prefix(src="../../libraries/universal-darwin/lib_release/gstreamer-plugins", dst="lib/gstreamer-plugins"): | 680 | # if (not self.standalone()) and self.prefix(src="../../libraries/universal-darwin/lib_release/gstreamer-plugins", dst="lib/gstreamer-plugins"): |
diff --git a/linden/indra/newview/viewerinfo.cpp b/linden/indra/newview/viewerinfo.cpp new file mode 100644 index 0000000..3da924c --- /dev/null +++ b/linden/indra/newview/viewerinfo.cpp | |||
@@ -0,0 +1,148 @@ | |||
1 | /** | ||
2 | * @file viewerinfo.cpp | ||
3 | * @brief Functions for querying the viewer name, version, and other info. | ||
4 | * @author Jacek Antonelli | ||
5 | * | ||
6 | * Copyright (c) 2010-2011, Jacek Antonelli | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU Lesser General Public | ||
10 | * License as published by the Free Software Foundation; | ||
11 | * version 2.1 of the License only. | ||
12 | |||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * Lesser General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU Lesser General Public | ||
19 | * License along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
21 | * Boston, MA 02110-1301 USA | ||
22 | */ | ||
23 | |||
24 | #include "llviewerprecompiledheaders.h" | ||
25 | |||
26 | #include "viewerinfo.h" | ||
27 | |||
28 | namespace ViewerInfo | ||
29 | { | ||
30 | |||
31 | // These are intentionally defined here instead of in the header, | ||
32 | // because they should NOT be read directly. Use the functions. | ||
33 | const std::string NAME = "Imprudence"; | ||
34 | const std::string VARNT = ""; | ||
35 | const S32 MAJOR = 1; | ||
36 | const S32 MINOR = 4; | ||
37 | const S32 PATCH = 1; | ||
38 | const S32 RLEAS = 1; // increment for each beta/RC/release | ||
39 | const std::string EXTRA = "beta 1"; | ||
40 | |||
41 | // Mac OS X bundle identifier. Should match the one in Info.plist. | ||
42 | const std::string BUNDLE_ID = "org.imprudenceviewer.viewer"; | ||
43 | |||
44 | |||
45 | const std::string& viewerName() | ||
46 | { | ||
47 | return NAME; | ||
48 | } | ||
49 | |||
50 | const std::string& viewerVariant() | ||
51 | { | ||
52 | return VARNT; | ||
53 | } | ||
54 | |||
55 | const std::string& nameWithVariant() | ||
56 | { | ||
57 | static std::string s; | ||
58 | if (!s.empty()) | ||
59 | { | ||
60 | return s; | ||
61 | } | ||
62 | |||
63 | if (VARNT.empty()) | ||
64 | { | ||
65 | s = NAME; | ||
66 | } | ||
67 | else | ||
68 | { | ||
69 | s = NAME + " " + VARNT; | ||
70 | } | ||
71 | |||
72 | return s; | ||
73 | } | ||
74 | |||
75 | S32 versionMajor() | ||
76 | { | ||
77 | return MAJOR; | ||
78 | } | ||
79 | |||
80 | S32 versionMinor() | ||
81 | { | ||
82 | return MINOR; | ||
83 | } | ||
84 | |||
85 | S32 versionPatch() | ||
86 | { | ||
87 | return PATCH; | ||
88 | } | ||
89 | |||
90 | S32 versionRelease() | ||
91 | { | ||
92 | return RLEAS; | ||
93 | } | ||
94 | |||
95 | const std::string& versionExtra() | ||
96 | { | ||
97 | return EXTRA; | ||
98 | } | ||
99 | |||
100 | const std::string& versionNumbers3() | ||
101 | { | ||
102 | static std::string s = llformat("%d.%d.%d", MAJOR, MINOR, PATCH); | ||
103 | return s; | ||
104 | } | ||
105 | |||
106 | const std::string& versionNumbers4() | ||
107 | { | ||
108 | static std::string s = llformat("%d.%d.%d.%d", | ||
109 | MAJOR, MINOR, PATCH, RLEAS); | ||
110 | return s; | ||
111 | } | ||
112 | |||
113 | const std::string& prettyVersion() | ||
114 | { | ||
115 | static std::string s; | ||
116 | if (s.length() > 0) | ||
117 | { | ||
118 | return s; | ||
119 | } | ||
120 | |||
121 | s = versionNumbers3(); | ||
122 | |||
123 | if (EXTRA.length() > 0) | ||
124 | { | ||
125 | s += " " + EXTRA; | ||
126 | } | ||
127 | |||
128 | return s; | ||
129 | } | ||
130 | |||
131 | const std::string& prettyInfo() | ||
132 | { | ||
133 | static std::string s = nameWithVariant() + " " + prettyVersion(); | ||
134 | return s; | ||
135 | } | ||
136 | |||
137 | const std::string& terseInfo() | ||
138 | { | ||
139 | static std::string s = nameWithVariant() + " " + versionNumbers4(); | ||
140 | return s; | ||
141 | } | ||
142 | |||
143 | const std::string& bundleID() | ||
144 | { | ||
145 | return BUNDLE_ID; | ||
146 | } | ||
147 | |||
148 | } | ||
diff --git a/linden/indra/newview/viewerinfo.h b/linden/indra/newview/viewerinfo.h new file mode 100644 index 0000000..fe2e829 --- /dev/null +++ b/linden/indra/newview/viewerinfo.h | |||
@@ -0,0 +1,93 @@ | |||
1 | /** | ||
2 | * @file viewerinfo.h | ||
3 | * @brief Functions for querying the viewer name, version, and other info. | ||
4 | * @author Jacek Antonelli | ||
5 | * | ||
6 | * Copyright (c) 2010-2011, Jacek Antonelli | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU Lesser General Public | ||
10 | * License as published by the Free Software Foundation; | ||
11 | * version 2.1 of the License only. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * Lesser General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU Lesser General Public | ||
19 | * License along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
21 | * Boston, MA 02110-1301 USA | ||
22 | */ | ||
23 | |||
24 | #ifndef VERSIONINFO_H | ||
25 | #define VERSIONINFO_H | ||
26 | |||
27 | #include "linden_common.h" | ||
28 | |||
29 | namespace ViewerInfo | ||
30 | { | ||
31 | /// Returns the name of the viewer. | ||
32 | const std::string& viewerName(); | ||
33 | |||
34 | /// Returns the viewer variant (e.g. "Experimental"). | ||
35 | /// May be empty, if no variant string was set. | ||
36 | const std::string& viewerVariant(); | ||
37 | |||
38 | /// Returns a string with the viewer name and variant | ||
39 | /// (if it has one). | ||
40 | const std::string& nameWithVariant(); | ||
41 | |||
42 | /// Returns the major (first) version number. | ||
43 | /// This number increases for each major release, and the | ||
44 | /// minor, patch, and release numbers are reset to zero. | ||
45 | S32 versionMajor(); | ||
46 | |||
47 | /// Returns the minor (second) version number. | ||
48 | /// This number increases for each minor release, and the | ||
49 | /// patch and release numbers are reset to zero. | ||
50 | S32 versionMinor(); | ||
51 | |||
52 | /// Returns the patch (third) version number. | ||
53 | /// This number increases for each patch (bugfix) release, | ||
54 | /// and the release number is reset to zero. | ||
55 | S32 versionPatch(); | ||
56 | |||
57 | /// Returns the release (fourth) version number. | ||
58 | /// This number increases for each beta, release candidate, | ||
59 | /// and final release. | ||
60 | S32 versionRelease(); | ||
61 | |||
62 | /// Returns the extra version string (e.g. "beta 1", "RC1"). | ||
63 | /// May be empty, if no extra string was set. | ||
64 | const std::string& versionExtra(); | ||
65 | |||
66 | /// Returns a three-segment dot-separated version string | ||
67 | /// ("major.minor.patch"). Intended for human reading. | ||
68 | const std::string& versionNumbers3(); | ||
69 | |||
70 | /// Returns a four-segment dot-separated version string | ||
71 | /// ("major.minor.patch.release"). Intended for computer use, e.g. | ||
72 | /// login channel or version number comparison. | ||
73 | const std::string& versionNumbers4(); | ||
74 | |||
75 | /// Returns the three-segment version number with extra version | ||
76 | /// string (if not empty). Intended for human reading. | ||
77 | const std::string& prettyVersion(); | ||
78 | |||
79 | /// Returns the viewer name, variant (if not empty), and pretty | ||
80 | /// version. Intended for human reading. | ||
81 | const std::string& prettyInfo(); | ||
82 | |||
83 | /// Returns the the viewer name, variant (if not empty), and | ||
84 | /// 4-segment version. Intended for computer use, e.g. login channel | ||
85 | /// or version number comparison. | ||
86 | const std::string& terseInfo(); | ||
87 | |||
88 | /// Returns a string with the viewer's Mac OS X bundle identifier. | ||
89 | const std::string& bundleID(); | ||
90 | |||
91 | } | ||
92 | |||
93 | #endif // VERSIONINFO_H | ||
diff --git a/linden/indra/newview/viewerversion.cpp b/linden/indra/newview/viewerversion.cpp deleted file mode 100644 index 95c8f76..0000000 --- a/linden/indra/newview/viewerversion.cpp +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | /** | ||
2 | * @file viewerversion.cpp | ||
3 | * @brief set the viewer version in xml | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2009&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2010, McCabe Maxsted | ||
8 | * | ||
9 | * Imprudence Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided to you | ||
11 | * under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in | ||
13 | * this distribution, or online at | ||
14 | * http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
15 | * | ||
16 | * There are special exceptions to the terms and conditions of the GPL as | ||
17 | * it is applied to this Source Code. View the full text of the exception | ||
18 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
19 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
20 | * | ||
21 | * By copying, modifying or distributing this software, you acknowledge | ||
22 | * that you have read and understood your obligations described above, | ||
23 | * and agree to abide by those obligations. | ||
24 | * | ||
25 | * ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO | ||
26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
27 | * COMPLETENESS OR PERFORMANCE. | ||
28 | * $/LicenseInfo$ | ||
29 | */ | ||
30 | |||
31 | #include "llviewerprecompiledheaders.h" | ||
32 | |||
33 | #include "lldir.h" | ||
34 | #include "llxmltree.h" | ||
35 | #include "viewerversion.h" | ||
36 | |||
37 | |||
38 | S32 ViewerVersion::sVersionMajor = 0; | ||
39 | S32 ViewerVersion::sVersionMinor = 0; | ||
40 | S32 ViewerVersion::sVersionPatch = 0; | ||
41 | std::string ViewerVersion::sVersionTest = ""; | ||
42 | |||
43 | const std::string ViewerVersion::sViewerName = "Imprudence"; | ||
44 | |||
45 | ViewerVersion::ViewerVersion() | ||
46 | { | ||
47 | } | ||
48 | |||
49 | bool ViewerVersion::initViewerVersion() | ||
50 | { | ||
51 | std::string file_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "viewerversion.xml"); | ||
52 | |||
53 | if (!gDirUtilp->fileExists(file_path)) | ||
54 | { | ||
55 | llwarns << "Unable to find viewerversion.xml in app_settings folder" << llendl; | ||
56 | return false; | ||
57 | } | ||
58 | else | ||
59 | { | ||
60 | LLXMLNodePtr root; | ||
61 | |||
62 | if (!LLXMLNode::parseFile(file_path, root, NULL)) | ||
63 | { | ||
64 | llwarns << "Unable to parse version file: " << file_path << llendl; | ||
65 | return false; | ||
66 | } | ||
67 | |||
68 | if (root.isNull()) // shouldn't ever happen | ||
69 | { | ||
70 | llwarns << "Error while trying to read viewerversion.xml" << llendl; | ||
71 | return false; | ||
72 | } | ||
73 | |||
74 | LLXMLNodePtr child_nodep = root->getFirstChild(); | ||
75 | while (child_nodep.notNull()) | ||
76 | { | ||
77 | child_nodep->getAttributeS32("version_major", sVersionMajor); | ||
78 | child_nodep->getAttributeS32("version_minor", sVersionMinor); | ||
79 | child_nodep->getAttributeS32("version_patch", sVersionPatch); | ||
80 | child_nodep->getAttributeString("version_test", sVersionTest); | ||
81 | |||
82 | child_nodep = child_nodep->getNextSibling(); | ||
83 | } | ||
84 | |||
85 | llinfos << "Version set to: " << sVersionMajor << "." << sVersionMinor << "." << sVersionPatch << " " << sVersionTest << llendl; | ||
86 | |||
87 | return true; | ||
88 | } | ||
89 | } | ||
diff --git a/linden/indra/newview/viewerversion.h b/linden/indra/newview/viewerversion.h deleted file mode 100644 index d67cee5..0000000 --- a/linden/indra/newview/viewerversion.h +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | /** | ||
2 | * @file viewerversion.h | ||
3 | * @brief set the viewer version in xml | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2009&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2010, McCabe Maxsted | ||
8 | * | ||
9 | * Imprudence Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided to you | ||
11 | * under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in | ||
13 | * this distribution, or online at | ||
14 | * http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
15 | * | ||
16 | * There are special exceptions to the terms and conditions of the GPL as | ||
17 | * it is applied to this Source Code. View the full text of the exception | ||
18 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
19 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
20 | * | ||
21 | * By copying, modifying or distributing this software, you acknowledge | ||
22 | * that you have read and understood your obligations described above, | ||
23 | * and agree to abide by those obligations. | ||
24 | * | ||
25 | * ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO | ||
26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
27 | * COMPLETENESS OR PERFORMANCE. | ||
28 | * $/LicenseInfo$ | ||
29 | */ | ||
30 | |||
31 | #ifndef VIEWERVERSION_H | ||
32 | #define VIEWERVERSION_H | ||
33 | |||
34 | #include "llversionviewer.h" // for LL versioning only | ||
35 | |||
36 | class ViewerVersion | ||
37 | { | ||
38 | public: | ||
39 | ViewerVersion(); | ||
40 | /*virtual*/ ~ViewerVersion(); | ||
41 | |||
42 | static bool initViewerVersion(); | ||
43 | |||
44 | // Returns the major version of Imprudence | ||
45 | static S32 getImpMajorVersion() { return sVersionMajor; } | ||
46 | // Returns the minor version of Imprudence | ||
47 | static S32 getImpMinorVersion() { return sVersionMinor; } | ||
48 | // Returns the patch version of Imprudence | ||
49 | static S32 getImpPatchVersion() { return sVersionPatch; } | ||
50 | // Returns the test version of Imprudence | ||
51 | static std::string getImpTestVersion() { return sVersionTest; } | ||
52 | // Returns the name of the viewer. Currently always "Imprudence" | ||
53 | static std::string getImpViewerName() { return sViewerName; } | ||
54 | |||
55 | // Returns the major version of Second Life | ||
56 | static S32 getLLMajorVersion() { return LL_VERSION_MAJOR; } | ||
57 | // Returns the minor version of Second Life | ||
58 | static S32 getLLMinorVersion() { return LL_VERSION_MINOR; } | ||
59 | // Returns the patch version of Second Life | ||
60 | static S32 getLLPatchVersion() { return LL_VERSION_PATCH; } | ||
61 | // Returns the build version of Second Life | ||
62 | static S32 getLLBuildVersion() { return LL_VERSION_BUILD; } | ||
63 | // Returns the name of the LL viewer ("Second Life") | ||
64 | static std::string getLLViewerName() { return LL_VIEWER_NAME; } | ||
65 | |||
66 | // Note that the viewer channel is set in settings.xml | ||
67 | // as VersionChannelName. LL_VIEWER_CHANNEL is not | ||
68 | // used in Imprudence | ||
69 | |||
70 | private: | ||
71 | static S32 sVersionMajor; | ||
72 | static S32 sVersionMinor; | ||
73 | static S32 sVersionPatch; | ||
74 | static std::string sVersionTest; | ||
75 | |||
76 | static const std::string sViewerName; | ||
77 | }; | ||
78 | |||
79 | #endif // VIEWERVERSION_H | ||
diff --git a/linden/scripts/build_version.py b/linden/scripts/build_version.py deleted file mode 100755 index f6b88a9..0000000 --- a/linden/scripts/build_version.py +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # | ||
3 | # Print the build information embedded in a header file. | ||
4 | # | ||
5 | # Expects to be invoked from the command line with a file name and a | ||
6 | # list of directories to search. The file name will be one of the | ||
7 | # following: | ||
8 | # | ||
9 | # llversionserver.h | ||
10 | # llversionviewer.h | ||
11 | # | ||
12 | # The directory list that follows will include indra/llcommon, where | ||
13 | # these files live. | ||
14 | |||
15 | import errno, os, re | ||
16 | |||
17 | def get_version(filename): | ||
18 | fp = open(filename) | ||
19 | data = fp.read() | ||
20 | fp.close() | ||
21 | |||
22 | vals = {} | ||
23 | m = re.search('<viewer version_major="(\d+)" />', data) | ||
24 | vals['major'] = m.group(1) | ||
25 | m = re.search('<viewer version_minor="(\d+)" />', data) | ||
26 | vals['minor'] = m.group(1) | ||
27 | m = re.search('<viewer version_patch="(\d+)" />', data) | ||
28 | vals['patch'] = m.group(1) | ||
29 | m = re.search('<viewer version_test="(.*)" />', data) | ||
30 | vals['test'] = m.group(1) | ||
31 | |||
32 | version = "%(major)s.%(minor)s.%(patch)s" % vals | ||
33 | |||
34 | if len(vals['test']) > 0: | ||
35 | # Replace some puncuation and spaces with '-' in the test version | ||
36 | vals['test'] = re.sub('[ \t:;,+/\\"\'`]+', '-', vals['test']) | ||
37 | version += "-%(test)s" % vals | ||
38 | |||
39 | return version | ||
40 | |||
41 | |||
42 | if __name__ == '__main__': | ||
43 | import sys | ||
44 | |||
45 | try: | ||
46 | for path in sys.argv[2:]: | ||
47 | name = os.path.join(path, sys.argv[1]) | ||
48 | try: | ||
49 | print get_version(name) | ||
50 | break | ||
51 | except OSError, err: | ||
52 | if err.errno != errno.ENOENT: | ||
53 | raise | ||
54 | else: | ||
55 | print >> sys.stderr, 'File not found:', sys.argv[1] | ||
56 | sys.exit(1) | ||
57 | except AttributeError: | ||
58 | print >> sys.stderr, 'Error: malformatted file: ', name | ||
59 | sys.exit(1) | ||
60 | except IndexError: | ||
61 | print >> sys.stderr, ('Usage: %s llversion[...].h [directories]' % | ||
62 | sys.argv[0]) | ||
diff --git a/linden/scripts/package.py b/linden/scripts/package.py new file mode 100755 index 0000000..e02a9cc --- /dev/null +++ b/linden/scripts/package.py | |||
@@ -0,0 +1,334 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # | ||
3 | # @file package.py | ||
4 | # @author Jacek Antonelli | ||
5 | # @brief Script for generating viewer installer packages. | ||
6 | # | ||
7 | # Usage: package.py --build-dir=PATH [options] | ||
8 | # | ||
9 | # Copyright (c) 2007-2009, Linden Research, Inc. | ||
10 | # Copyright (c) 2010-2011, Jacek Antonelli | ||
11 | # | ||
12 | # Permission is hereby granted, free of charge, to any person | ||
13 | # obtaining a copy of this software and associated documentation files | ||
14 | # (the "Software"), to deal in the Software without restriction, | ||
15 | # including without limitation the rights to use, copy, modify, merge, | ||
16 | # publish, distribute, sublicense, and/or sell copies of the Software, | ||
17 | # and to permit persons to whom the Software is furnished to do so, | ||
18 | # subject to the following conditions: | ||
19 | # | ||
20 | # The above copyright notice and this permission notice shall be | ||
21 | # included in all copies or substantial portions of the Software. | ||
22 | # | ||
23 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
24 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
25 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
26 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
27 | # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
28 | # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
29 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
30 | # SOFTWARE. | ||
31 | # | ||
32 | |||
33 | import os, sys | ||
34 | from viewer_info import ViewerInfo | ||
35 | |||
36 | |||
37 | SCRIPTS_DIR = sys.path[0] # directory containing this script | ||
38 | TOP_DIR = os.path.abspath(os.path.join(SCRIPTS_DIR,'..')) | ||
39 | SOURCE_DIR = os.path.abspath(os.path.join(TOP_DIR,'indra')) | ||
40 | BUILD_TYPE = "RelWithDebInfo" | ||
41 | |||
42 | |||
43 | class PackagerError(Exception): pass | ||
44 | |||
45 | class BadDir(PackagerError): pass | ||
46 | |||
47 | class WeirdPlatform(PackagerError): pass | ||
48 | |||
49 | class CmdFailed(PackagerError): pass | ||
50 | |||
51 | |||
52 | def indent(text, amount=4): | ||
53 | import string | ||
54 | lines = [(' '*amount + line) for line in string.split(text, '\n')] | ||
55 | return string.join(lines, '\n') | ||
56 | |||
57 | def message(*args): | ||
58 | """Prints an informational message with a leading '#'.""" | ||
59 | print '# ' + ' '.join([str(arg) for arg in args]) | ||
60 | |||
61 | def error(*args): | ||
62 | """Prints an error message to stderr.""" | ||
63 | print >> sys.stderr, 'Error: ' + ' '.join([str(arg) for arg in args]) | ||
64 | |||
65 | |||
66 | class Packager: | ||
67 | |||
68 | def __init__(self, build_dir, opts={}): | ||
69 | options = {'source_dir': SOURCE_DIR, | ||
70 | 'build_type': BUILD_TYPE, | ||
71 | 'verbose': False, | ||
72 | } | ||
73 | options.update(opts) | ||
74 | |||
75 | self.build_dir = os.path.abspath(build_dir) | ||
76 | self.__check_build_dir() | ||
77 | |||
78 | # Package results go in the top build directory. | ||
79 | self.dest_dir = build_dir | ||
80 | |||
81 | self.source_dir = os.path.abspath(options['source_dir']) | ||
82 | self.__check_source_dir() | ||
83 | |||
84 | self.build_type = options['build_type'] | ||
85 | self.platform = self.__get_platform() | ||
86 | self.verbose = options['verbose'] | ||
87 | self.viewer_info = ViewerInfo() | ||
88 | |||
89 | |||
90 | def make(self): | ||
91 | plat = self.platform | ||
92 | if plat == 'linux': self.make_linux() | ||
93 | elif plat == 'mac': self.make_mac() | ||
94 | elif plat == 'windows': self.make_windows() | ||
95 | |||
96 | |||
97 | ######### | ||
98 | # LINUX # | ||
99 | ######### | ||
100 | |||
101 | def make_linux(self): | ||
102 | import shutil | ||
103 | |||
104 | packaged_dir = os.path.join(self.build_dir, 'newview', 'packaged') | ||
105 | |||
106 | if not os.path.exists(packaged_dir): | ||
107 | raise BadDir("invalid build dir, has no 'newview/packaged/' " | ||
108 | 'subdirectory: %(d)r'%{'d': self.build_dir}) | ||
109 | |||
110 | self.__run_command( 'Checking/fixing file permissions...', | ||
111 | """find %(d)r -type d | xargs --no-run-if-empty chmod 755; | ||
112 | find %(d)r -type f -perm 0700 | xargs --no-run-if-empty chmod 0755; | ||
113 | find %(d)r -type f -perm 0500 | xargs --no-run-if-empty chmod 0555; | ||
114 | find %(d)r -type f -perm 0600 | xargs --no-run-if-empty chmod 0644; | ||
115 | find %(d)r -type f -perm 0400 | xargs --no-run-if-empty chmod 0444; | ||
116 | true""" % {'d': packaged_dir}) | ||
117 | |||
118 | plat = 'Linux' | ||
119 | from platform import architecture | ||
120 | if architecture()[0] == '64bit': | ||
121 | plat += '-x86_64' | ||
122 | elif architecture()[0] == '32bit': | ||
123 | plat += '-x86' | ||
124 | |||
125 | inst_name = self.viewer_info.combined + '-' + plat | ||
126 | dest_file = os.path.join(self.dest_dir, inst_name + '.tar.bz2') | ||
127 | |||
128 | if (os.path.exists(dest_file)): | ||
129 | bkp = dest_file + ".bkp" | ||
130 | message("Renaming existing package to %r..." % bkp) | ||
131 | shutil.move(dest_file, bkp) | ||
132 | |||
133 | self.__run_command( | ||
134 | 'Creating package %r (this takes a while)...'%dest_file, | ||
135 | 'tar -C %(dir)s --numeric-owner ' | ||
136 | '--transform "s,^./,%(inst_name)s/," ' | ||
137 | #'--verbose --show-transformed-names ' | ||
138 | '-cjf %(dest_file)s .' % { 'dir': packaged_dir, | ||
139 | 'inst_name': inst_name, | ||
140 | 'dest_file': dest_file}) | ||
141 | |||
142 | message('Package complete: %r' % dest_file) | ||
143 | |||
144 | |||
145 | ####### | ||
146 | # MAC # | ||
147 | ####### | ||
148 | |||
149 | def make_mac(self): | ||
150 | import shutil | ||
151 | |||
152 | volname = self.viewer_info.name + " Installer" | ||
153 | |||
154 | # Where the DMG files (background image, etc.) come from. | ||
155 | dmg_src = os.path.join(self.source_dir, 'newview', 'packaging', 'mac') | ||
156 | |||
157 | # Everything that will be in the package is copied to here. | ||
158 | dmg_dst = os.path.join('/Volumes', volname) | ||
159 | |||
160 | if (os.path.exists(dmg_dst)): | ||
161 | error('%r is currently attached. Eject it and try again.' % dmg_dst) | ||
162 | sys.exit(1) | ||
163 | |||
164 | app_name = self.viewer_info.name + ".app" | ||
165 | app_orig = os.path.join(self.build_dir, 'newview', self.build_type, app_name) | ||
166 | app_dst = os.path.join(dmg_dst, app_name) | ||
167 | |||
168 | if (not os.path.exists(app_orig)): | ||
169 | error("App does not exist: %r" % app_orig) | ||
170 | sys.exit(1) | ||
171 | |||
172 | dmg_name = "%s-Mac"%(self.viewer_info.combined) | ||
173 | temp_dmg = os.path.join(self.build_dir, dmg_name+".sparseimage") | ||
174 | final_dmg = os.path.join(self.dest_dir, dmg_name+".dmg") | ||
175 | |||
176 | if (os.path.exists(temp_dmg)): | ||
177 | message("Removing stale temp disk image...") | ||
178 | os.remove(temp_dmg) | ||
179 | |||
180 | self.__run_command( | ||
181 | 'Creating temp disk image...', | ||
182 | 'hdiutil create %(temp)r -volname %(volname)r -fs HFS+ ' | ||
183 | '-layout SPUD -type SPARSE' % | ||
184 | {'temp': temp_dmg, 'volname': volname, 'src': dmg_dst}) | ||
185 | |||
186 | self.__run_command( | ||
187 | 'Mounting temp disk image...', | ||
188 | 'hdiutil attach %r -readwrite -noautoopen' % temp_dmg) | ||
189 | |||
190 | # Move the .app to the staging area (temporarily). | ||
191 | message("Copying %r (this takes a while)..."%(app_name)) | ||
192 | shutil.copytree(app_orig, app_dst, symlinks=True) | ||
193 | |||
194 | message("Copying background.png...") | ||
195 | shutil.copy2( os.path.join(dmg_src, 'background.png'), | ||
196 | os.path.join(dmg_dst, 'background.png')) | ||
197 | |||
198 | config_script = os.path.join(self.source_dir, 'newview', | ||
199 | 'packaging', 'mac', 'ConfigureDMG.scpt') | ||
200 | |||
201 | self.__run_command( | ||
202 | "Configuring temp disk image's view options...", | ||
203 | 'osascript %(script)r %(volname)r %(app_name)r' % | ||
204 | {'script': config_script, 'volname': volname, 'app_name': app_name}) | ||
205 | |||
206 | self.__run_command( | ||
207 | 'Unmounting temp disk image...', | ||
208 | 'hdiutil detach %r' % dmg_dst) | ||
209 | |||
210 | if (os.path.exists(final_dmg)): | ||
211 | bkp = final_dmg + ".bkp" | ||
212 | message("Renaming existing final disk image to %r..." % bkp) | ||
213 | shutil.move(final_dmg, bkp) | ||
214 | |||
215 | self.__run_command( | ||
216 | 'Creating compressed final disk image (this takes a while)...', | ||
217 | 'hdiutil convert %(temp)r -format UDBZ -o %(final)r' % | ||
218 | {'temp':temp_dmg, 'final':final_dmg}) | ||
219 | |||
220 | message("Removing temp disk image...") | ||
221 | os.remove(temp_dmg) | ||
222 | |||
223 | message('Package complete: %r'%final_dmg) | ||
224 | |||
225 | |||
226 | ########### | ||
227 | # WINDOWS # | ||
228 | ########### | ||
229 | |||
230 | def make_windows(self): | ||
231 | print "Packaging for Windows is not supported yet." | ||
232 | |||
233 | |||
234 | ################### | ||
235 | # PRIVATE METHODS # | ||
236 | ################### | ||
237 | |||
238 | def __check_build_dir(self): | ||
239 | if not os.path.exists(self.build_dir): | ||
240 | raise BadDir('build dir %(dir)r does not exist.' % | ||
241 | {'dir': self.build_dir}) | ||
242 | if not os.path.isdir(self.build_dir): | ||
243 | raise BadDir('build dir %(dir)r is not a directory.' % | ||
244 | {'dir': self.build_dir}) | ||
245 | |||
246 | def __check_source_dir(self): | ||
247 | if not os.path.exists(self.source_dir): | ||
248 | raise BadDir('source dir %(dir)r does not exist.' % | ||
249 | {'dir': self.source_dir}) | ||
250 | if not os.path.isdir(self.source_dir): | ||
251 | raise BadDir('source dir %(dir)r is not a directory.' % | ||
252 | {'dir': self.source_dir}) | ||
253 | |||
254 | def __get_platform(self): | ||
255 | platform = sys.platform | ||
256 | try: | ||
257 | return {'linux2':'linux', | ||
258 | 'linux1':'linux', | ||
259 | 'cygwin':'windows', | ||
260 | 'win32' :'windows', | ||
261 | 'darwin':'mac', | ||
262 | }[platform] | ||
263 | except KeyError: | ||
264 | raise WeirdPlatform( | ||
265 | "Unrecognized platform/operating system: %r" % platform) | ||
266 | |||
267 | def __run_command(self, summary=None, command=None): | ||
268 | if summary: message(summary) | ||
269 | |||
270 | if not command: return | ||
271 | |||
272 | import subprocess | ||
273 | |||
274 | out = subprocess.PIPE # = intercept command's output | ||
275 | if self.verbose: | ||
276 | print indent(command) | ||
277 | out = None # = don't intercept | ||
278 | |||
279 | child = subprocess.Popen(command, shell=True, stdout=out, stderr=None) | ||
280 | status = child.wait() | ||
281 | |||
282 | if status: | ||
283 | raise CmdFailed('A command returned non-zero status (%s):\n%s'% | ||
284 | (status, indent(command))) | ||
285 | |||
286 | |||
287 | |||
288 | def main(args=sys.argv[1:]): | ||
289 | from optparse import OptionParser | ||
290 | |||
291 | op = OptionParser(usage='%prog --build-dir=PATH [options]') | ||
292 | |||
293 | op.add_option('--build-dir', dest='build_dir', nargs=1, metavar='PATH', | ||
294 | help='path to the \'build\' directory, which contains ' | ||
295 | 'CMakeCache.txt and the compile result subdirectories') | ||
296 | |||
297 | op.add_option('--source-dir', dest='source_dir', nargs=1, metavar='PATH', | ||
298 | default=SOURCE_DIR, | ||
299 | help='optional path to an alternate source directory, ' | ||
300 | 'i.e. \'indra\'. Default: %(SOURCE_DIR)r' | ||
301 | %{ 'SOURCE_DIR': SOURCE_DIR } ) | ||
302 | |||
303 | op.add_option('--build-type', dest='build_type', nargs=1, metavar='TYPE', | ||
304 | default=BUILD_TYPE, | ||
305 | help='\'Debug\', \'RelWithDebInfo\', or \'Release\'. ' | ||
306 | 'Default: %(BUILD_TYPE)r' | ||
307 | %{ 'BUILD_TYPE': BUILD_TYPE } ) | ||
308 | |||
309 | op.add_option('-v', '--verbose', action='store_true', default=False, | ||
310 | help='print all shell commands as they are run') | ||
311 | |||
312 | if not args: | ||
313 | op.print_help() | ||
314 | return | ||
315 | |||
316 | options = op.parse_args(args)[0] | ||
317 | |||
318 | if not options.build_dir: | ||
319 | error('--build-dir=PATH is required.') | ||
320 | sys.exit(1) | ||
321 | |||
322 | opts_dict = {'source_dir': options.source_dir, | ||
323 | 'build_type': options.build_type, | ||
324 | 'verbose': options.verbose} | ||
325 | |||
326 | try: | ||
327 | Packager(options.build_dir, opts_dict).make() | ||
328 | except PackagerError, err: | ||
329 | error(err.args[0]) | ||
330 | sys.exit(1) | ||
331 | |||
332 | |||
333 | if __name__ == '__main__': | ||
334 | main() | ||
diff --git a/linden/scripts/viewer_info.py b/linden/scripts/viewer_info.py new file mode 100755 index 0000000..53ea432 --- /dev/null +++ b/linden/scripts/viewer_info.py | |||
@@ -0,0 +1,101 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # | ||
3 | # @file viewer_info.py | ||
4 | # @author Jacek Antonelli | ||
5 | # @brief Scans and prints the viewer name and/or version. | ||
6 | # | ||
7 | # Copyright (c) 2010, Jacek Antonelli | ||
8 | # | ||
9 | # Permission is hereby granted, free of charge, to any person | ||
10 | # obtaining a copy of this software and associated documentation files | ||
11 | # (the "Software"), to deal in the Software without restriction, | ||
12 | # including without limitation the rights to use, copy, modify, merge, | ||
13 | # publish, distribute, sublicense, and/or sell copies of the Software, | ||
14 | # and to permit persons to whom the Software is furnished to do so, | ||
15 | # subject to the following conditions: | ||
16 | # | ||
17 | # The above copyright notice and this permission notice shall be | ||
18 | # included in all copies or substantial portions of the Software. | ||
19 | # | ||
20 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
21 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
22 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
23 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
24 | # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
25 | # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
26 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
27 | # SOFTWARE. | ||
28 | # | ||
29 | # | ||
30 | # Usage: | ||
31 | # | ||
32 | # viewer_info.py --name # viewer name (e.g. "Kokua") | ||
33 | # viewer_info.py --version # viewer version (e.g. "1.0.0-RC1" | ||
34 | # viewer_info.py --combined # name + version (e.g. "Kokua-1.0.0-RC1") | ||
35 | # | ||
36 | # You can pass multiple flags to print each thing on a separate line. | ||
37 | # E.g. `viewer_info.py --name --version' will print 2 lines, e.g.: | ||
38 | # | ||
39 | # Kokua | ||
40 | # 1.0.0-RC1 | ||
41 | # | ||
42 | |||
43 | import errno, os, re, string, sys | ||
44 | |||
45 | |||
46 | class ViewerInfo: | ||
47 | |||
48 | def __init__(self, filepath=None): | ||
49 | f = open(filepath or self.default_file()) | ||
50 | data = f.read() | ||
51 | f.close() | ||
52 | |||
53 | self.name = re.search('NAME\s*=\s*"([^"]*)"', data).group(1) | ||
54 | self.major = re.search('MAJOR\s*=\s*(\d+)', data).group(1) | ||
55 | self.minor = re.search('MINOR\s*=\s*(\d+)', data).group(1) | ||
56 | self.patch = re.search('PATCH\s*=\s*(\d+)', data).group(1) | ||
57 | self.extra = re.search('EXTRA\s*=\s*"([^"]*)"', data).group(1) | ||
58 | self.bundle_id = re.search('BUNDLE_ID\s*=\s*"([^"]*)"', data).group(1) | ||
59 | |||
60 | self.version = "%s.%s.%s"%(self.major, self.minor, self.patch) | ||
61 | if len(self.extra) > 0: | ||
62 | # Replace spaces and some puncuation with '-' in extra | ||
63 | extra = re.sub('[- \t:;,!+/\\"\'`]+', '-', self.extra) | ||
64 | # Strip any leading or trailing "-"s | ||
65 | extra = string.strip(extra, '-') | ||
66 | self.version += "-" + extra | ||
67 | |||
68 | self.combined = self.name + "-" + self.version | ||
69 | |||
70 | @classmethod | ||
71 | def default_file(klass): | ||
72 | scripts_dir = sys.path[0] # directory containing this script | ||
73 | viewerinfo = os.path.join('indra', 'newview', 'viewerinfo.cpp') | ||
74 | filepath = os.path.join(scripts_dir, '..', viewerinfo) | ||
75 | return os.path.abspath(filepath) | ||
76 | |||
77 | |||
78 | if __name__ == '__main__': | ||
79 | |||
80 | try: | ||
81 | info = ViewerInfo() | ||
82 | except IOError, err: | ||
83 | if err.errno == errno.ENOENT: | ||
84 | print >> sys.stderr, 'File not found:', ViewerInfo.default_file() | ||
85 | sys.exit(1) | ||
86 | else: | ||
87 | raise | ||
88 | |||
89 | args = sys.argv[1:] | ||
90 | |||
91 | if not args: | ||
92 | print "Usage: %s [--name] [--version] [--combined]"%(sys.argv[0]) | ||
93 | for arg in args: | ||
94 | if '--name' == arg: | ||
95 | print info.name | ||
96 | elif '--version' == arg: | ||
97 | print info.version | ||
98 | elif '--combined' == arg: | ||
99 | print info.combined | ||
100 | elif '--bundle-id' == arg: | ||
101 | print info.bundle_id | ||