diff options
Diffstat (limited to 'linden')
-rw-r--r-- | linden/indra/llcommon/llversionviewer.h | 13 | ||||
-rw-r--r-- | linden/indra/newview/CMakeLists.txt | 3 | ||||
-rw-r--r-- | linden/indra/newview/app_settings/viewerversion.xml | 25 | ||||
-rw-r--r-- | linden/indra/newview/floaterlogin.cpp | 1 | ||||
-rw-r--r-- | linden/indra/newview/hippoUpdate.cpp | 2 | ||||
-rw-r--r-- | linden/indra/newview/llappviewer.cpp | 69 | ||||
-rw-r--r-- | linden/indra/newview/llfloaterabout.cpp | 21 | ||||
-rw-r--r-- | linden/indra/newview/llfloaterreporter.cpp | 25 | ||||
-rw-r--r-- | linden/indra/newview/llnotify.cpp | 1 | ||||
-rw-r--r-- | linden/indra/newview/llpanellogin.cpp | 25 | ||||
-rw-r--r-- | linden/indra/newview/llstartup.cpp | 8 | ||||
-rw-r--r-- | linden/indra/newview/lluserauth.cpp | 2 | ||||
-rw-r--r-- | linden/indra/newview/llviewerassetstorage.cpp | 1 | ||||
-rw-r--r-- | linden/indra/newview/llviewerbuild.h | 6 | ||||
-rw-r--r-- | linden/indra/newview/llviewercontrol.cpp | 1 | ||||
-rw-r--r-- | linden/indra/newview/llviewermedia.cpp | 4 | ||||
-rw-r--r-- | linden/indra/newview/viewerversion.cpp | 89 | ||||
-rw-r--r-- | linden/indra/newview/viewerversion.h | 79 |
18 files changed, 287 insertions, 88 deletions
diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h index 799ad5f..ab74a3f 100644 --- a/linden/indra/llcommon/llversionviewer.h +++ b/linden/indra/llcommon/llversionviewer.h | |||
@@ -33,19 +33,26 @@ | |||
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 | |||
36 | const S32 LL_VERSION_MAJOR = 1; | 38 | const S32 LL_VERSION_MAJOR = 1; |
37 | const S32 LL_VERSION_MINOR = 23; | 39 | const S32 LL_VERSION_MINOR = 23; |
38 | const S32 LL_VERSION_PATCH = 5; | 40 | const S32 LL_VERSION_PATCH = 5; |
39 | const S32 LL_VERSION_BUILD = 136262; | 41 | const S32 LL_VERSION_BUILD = 136262; |
40 | 42 | ||
41 | const char * const LL_CHANNEL = "Imprudence"; | ||
42 | |||
43 | const char * const LL_VIEWER_NAME = "Second Life"; | 43 | const char * const LL_VIEWER_NAME = "Second Life"; |
44 | |||
45 | // These aren't used anymore. | ||
46 | // The channel is ViewerChannelName in settings.xml | ||
47 | // The Imprudence version is set in app_settings\viewerversion.xml -- MC | ||
48 | |||
49 | /*const char * const LL_CHANNEL = "Imprudence"; | ||
50 | |||
44 | const char * const IMP_VIEWER_NAME = "Imprudence"; | 51 | const char * const IMP_VIEWER_NAME = "Imprudence"; |
45 | 52 | ||
46 | const S32 IMP_VERSION_MAJOR = 1; | 53 | const S32 IMP_VERSION_MAJOR = 1; |
47 | const S32 IMP_VERSION_MINOR = 3; | 54 | const S32 IMP_VERSION_MINOR = 3; |
48 | const S32 IMP_VERSION_PATCH = 0; | 55 | const S32 IMP_VERSION_PATCH = 0; |
49 | const char * const IMP_VERSION_TEST = "beta 4"; | 56 | const char * const IMP_VERSION_TEST = "beta 4";*/ |
50 | 57 | ||
51 | #endif | 58 | #endif |
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index 1af5e9e..70d4257 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt | |||
@@ -468,6 +468,7 @@ set(viewer_SOURCE_FILES | |||
468 | rlvmultistringsearch.cpp | 468 | rlvmultistringsearch.cpp |
469 | rlvextensions.cpp | 469 | rlvextensions.cpp |
470 | rlvfloaterbehaviour.cpp | 470 | rlvfloaterbehaviour.cpp |
471 | viewerversion.cpp | ||
471 | ) | 472 | ) |
472 | 473 | ||
473 | set(VIEWER_BINARY_NAME "imprudence-bin" CACHE STRING | 474 | set(VIEWER_BINARY_NAME "imprudence-bin" CACHE STRING |
@@ -905,6 +906,7 @@ set(viewer_HEADER_FILES | |||
905 | rlvmultistringsearch.h | 906 | rlvmultistringsearch.h |
906 | rlvextensions.h | 907 | rlvextensions.h |
907 | rlvfloaterbehaviour.h | 908 | rlvfloaterbehaviour.h |
909 | viewerversion.h | ||
908 | ) | 910 | ) |
909 | 911 | ||
910 | source_group("CMake Rules" FILES ViewerInstall.cmake) | 912 | source_group("CMake Rules" FILES ViewerInstall.cmake) |
@@ -1313,6 +1315,7 @@ set(viewer_APPSETTINGS_FILES | |||
1313 | app_settings/trees.xml | 1315 | app_settings/trees.xml |
1314 | app_settings/ultra_graphics.xml | 1316 | app_settings/ultra_graphics.xml |
1315 | app_settings/viewerart.xml | 1317 | app_settings/viewerart.xml |
1318 | app_settings/viewerversion.xml | ||
1316 | ${CMAKE_SOURCE_DIR}/../etc/message.xml | 1319 | ${CMAKE_SOURCE_DIR}/../etc/message.xml |
1317 | ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg | 1320 | ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg |
1318 | ) | 1321 | ) |
diff --git a/linden/indra/newview/app_settings/viewerversion.xml b/linden/indra/newview/app_settings/viewerversion.xml new file mode 100644 index 0000000..0ef2332 --- /dev/null +++ b/linden/indra/newview/app_settings/viewerversion.xml | |||
@@ -0,0 +1,25 @@ | |||
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="3" /> | ||
18 | |||
19 | <!--int--> | ||
20 | <viewer version_patch="0" /> | ||
21 | |||
22 | <!--string--> | ||
23 | <viewer version_test="Beta 4" /> | ||
24 | |||
25 | </viewer_version> | ||
diff --git a/linden/indra/newview/floaterlogin.cpp b/linden/indra/newview/floaterlogin.cpp index f1afc53..78aa0a2 100644 --- a/linden/indra/newview/floaterlogin.cpp +++ b/linden/indra/newview/floaterlogin.cpp | |||
@@ -8,7 +8,6 @@ | |||
8 | 8 | ||
9 | #include <boost/algorithm/string.hpp> | 9 | #include <boost/algorithm/string.hpp> |
10 | #include "llviewercontrol.h" | 10 | #include "llviewercontrol.h" |
11 | #include "llviewerbuild.h" | ||
12 | #include "llcombobox.h" | 11 | #include "llcombobox.h" |
13 | #include "llscrolllistctrl.h" | 12 | #include "llscrolllistctrl.h" |
14 | #include "llmd5.h" | 13 | #include "llmd5.h" |
diff --git a/linden/indra/newview/hippoUpdate.cpp b/linden/indra/newview/hippoUpdate.cpp index 872ca30..f6947ad 100644 --- a/linden/indra/newview/hippoUpdate.cpp +++ b/linden/indra/newview/hippoUpdate.cpp | |||
@@ -8,7 +8,7 @@ | |||
8 | #include <stdtypes.h> | 8 | #include <stdtypes.h> |
9 | #include <llhttpclient.h> | 9 | #include <llhttpclient.h> |
10 | #include <llmemory.h> | 10 | #include <llmemory.h> |
11 | #include <llversionviewer.h> | 11 | //#include <llversionviewer.h> |
12 | #include "llviewercontrol.h" | 12 | #include "llviewercontrol.h" |
13 | #include "llviewernetwork.h" | 13 | #include "llviewernetwork.h" |
14 | #include "llweb.h" | 14 | #include "llweb.h" |
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index e5a915a..22b18ce 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp | |||
@@ -35,7 +35,6 @@ | |||
35 | #include "llappviewer.h" | 35 | #include "llappviewer.h" |
36 | #include "llprimitive.h" | 36 | #include "llprimitive.h" |
37 | 37 | ||
38 | #include "llversionviewer.h" | ||
39 | #include "llfeaturemanager.h" | 38 | #include "llfeaturemanager.h" |
40 | #include "lluictrlfactory.h" | 39 | #include "lluictrlfactory.h" |
41 | #include "lltexteditor.h" | 40 | #include "lltexteditor.h" |
@@ -151,6 +150,7 @@ | |||
151 | #include "llflexibleobject.h" | 150 | #include "llflexibleobject.h" |
152 | #include "llvosurfacepatch.h" | 151 | #include "llvosurfacepatch.h" |
153 | #include "llslider.h" | 152 | #include "llslider.h" |
153 | #include "viewerversion.h" | ||
154 | 154 | ||
155 | // includes for idle() idleShutdown() | 155 | // includes for idle() idleShutdown() |
156 | #include "llviewercontrol.h" | 156 | #include "llviewercontrol.h" |
@@ -577,7 +577,7 @@ bool LLAppViewer::init() | |||
577 | 577 | ||
578 | // Need to do this initialization before we do anything else, since anything | 578 | // Need to do this initialization before we do anything else, since anything |
579 | // that touches files should really go through the lldir API | 579 | // that touches files should really go through the lldir API |
580 | gDirUtilp->initAppDirs(IMP_VIEWER_NAME); | 580 | gDirUtilp->initAppDirs(ViewerVersion::getImpViewerName()); |
581 | // set skin search path to default, will be overridden later | 581 | // set skin search path to default, will be overridden later |
582 | // this allows simple skinned file lookups to work | 582 | // this allows simple skinned file lookups to work |
583 | gDirUtilp->setSkinFolder("default"); | 583 | gDirUtilp->setSkinFolder("default"); |
@@ -601,15 +601,15 @@ bool LLAppViewer::init() | |||
601 | // Build a string representing the current version number. | 601 | // Build a string representing the current version number. |
602 | gCurrentVersion = llformat("%s %d.%d.%d %s / %s %d.%d.%d.%d", | 602 | gCurrentVersion = llformat("%s %d.%d.%d %s / %s %d.%d.%d.%d", |
603 | gSavedSettings.getString("VersionChannelName").c_str(), | 603 | gSavedSettings.getString("VersionChannelName").c_str(), |
604 | IMP_VERSION_MAJOR, | 604 | ViewerVersion::getImpMajorVersion(), |
605 | IMP_VERSION_MINOR, | 605 | ViewerVersion::getImpMinorVersion(), |
606 | IMP_VERSION_PATCH, | 606 | ViewerVersion::getImpPatchVersion(), |
607 | IMP_VERSION_TEST, | 607 | ViewerVersion::getImpTestVersion().c_str(), |
608 | LL_VIEWER_NAME, | 608 | ViewerVersion::getLLViewerName().c_str(), |
609 | LL_VERSION_MAJOR, | 609 | ViewerVersion::getLLMajorVersion(), |
610 | LL_VERSION_MINOR, | 610 | ViewerVersion::getLLMinorVersion(), |
611 | LL_VERSION_PATCH, | 611 | ViewerVersion::getLLPatchVersion(), |
612 | LL_VERSION_BUILD ); | 612 | ViewerVersion::getLLBuildVersion() ); |
613 | 613 | ||
614 | ////////////////////////////////////////////////////////////////////////////// | 614 | ////////////////////////////////////////////////////////////////////////////// |
615 | ////////////////////////////////////////////////////////////////////////////// | 615 | ////////////////////////////////////////////////////////////////////////////// |
@@ -1685,6 +1685,9 @@ std::string LLAppViewer::getSettingsFilename(const std::string& location_key, | |||
1685 | 1685 | ||
1686 | bool LLAppViewer::initConfiguration() | 1686 | bool LLAppViewer::initConfiguration() |
1687 | { | 1687 | { |
1688 | // init Imprudence version - MC | ||
1689 | ViewerVersion::initViewerVersion(); | ||
1690 | |||
1688 | //Set up internal pointers | 1691 | //Set up internal pointers |
1689 | gSettings[sGlobalSettingsName] = &gSavedSettings; | 1692 | gSettings[sGlobalSettingsName] = &gSavedSettings; |
1690 | gSettings[sPerAccountSettingsName] = &gSavedPerAccountSettings; | 1693 | gSettings[sPerAccountSettingsName] = &gSavedPerAccountSettings; |
@@ -1732,7 +1735,7 @@ bool LLAppViewer::initConfiguration() | |||
1732 | // gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global"))); | 1735 | // gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global"))); |
1733 | gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings_imprudence.xml")); | 1736 | gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings_imprudence.xml")); |
1734 | 1737 | ||
1735 | gSavedSettings.setString("VersionChannelName", IMP_VIEWER_NAME); | 1738 | gSavedSettings.setString("VersionChannelName", ViewerVersion::getImpViewerName()); |
1736 | 1739 | ||
1737 | //*FIX:Mani - Set default to disabling watchdog mainloop | 1740 | //*FIX:Mani - Set default to disabling watchdog mainloop |
1738 | // timeout for mac and linux. There is no call stack info | 1741 | // timeout for mac and linux. There is no call stack info |
@@ -1970,7 +1973,7 @@ bool LLAppViewer::initConfiguration() | |||
1970 | mYieldTime = gSavedSettings.getS32("YieldTime"); | 1973 | mYieldTime = gSavedSettings.getS32("YieldTime"); |
1971 | 1974 | ||
1972 | // XUI:translate | 1975 | // XUI:translate |
1973 | gSecondLife = IMP_VIEWER_NAME; | 1976 | gSecondLife = ViewerVersion::getImpViewerName(); |
1974 | 1977 | ||
1975 | // Read skin/branding settings if specified. | 1978 | // Read skin/branding settings if specified. |
1976 | //if (! gDirUtilp->getSkinDir().empty() ) | 1979 | //if (! gDirUtilp->getSkinDir().empty() ) |
@@ -2339,14 +2342,14 @@ void LLAppViewer::writeSystemInfo() | |||
2339 | gDebugInfo["SLLog"] = LLError::logFileName(); | 2342 | gDebugInfo["SLLog"] = LLError::logFileName(); |
2340 | 2343 | ||
2341 | gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); | 2344 | gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); |
2342 | gDebugInfo["ClientInfo"]["ImpMajorVersion"] = IMP_VERSION_MAJOR; | 2345 | gDebugInfo["ClientInfo"]["ImpMajorVersion"] = ViewerVersion::getImpMajorVersion(); |
2343 | gDebugInfo["ClientInfo"]["ImpMinorVersion"] = IMP_VERSION_MINOR; | 2346 | gDebugInfo["ClientInfo"]["ImpMinorVersion"] = ViewerVersion::getImpMinorVersion(); |
2344 | gDebugInfo["ClientInfo"]["ImpPatchVersion"] = IMP_VERSION_PATCH; | 2347 | gDebugInfo["ClientInfo"]["ImpPatchVersion"] = ViewerVersion::getImpPatchVersion(); |
2345 | gDebugInfo["ClientInfo"]["ImpTestVersion"] = IMP_VERSION_TEST; | 2348 | gDebugInfo["ClientInfo"]["ImpTestVersion"] = ViewerVersion::getImpTestVersion(); |
2346 | gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; | 2349 | gDebugInfo["ClientInfo"]["MajorVersion"] = ViewerVersion::getLLMajorVersion(); |
2347 | gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; | 2350 | gDebugInfo["ClientInfo"]["MinorVersion"] = ViewerVersion::getLLMinorVersion(); |
2348 | gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; | 2351 | gDebugInfo["ClientInfo"]["PatchVersion"] = ViewerVersion::getLLPatchVersion(); |
2349 | gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD; | 2352 | gDebugInfo["ClientInfo"]["BuildVersion"] = ViewerVersion::getLLBuildVersion(); |
2350 | 2353 | ||
2351 | gDebugInfo["CAFilename"] = gDirUtilp->getCAFile(); | 2354 | gDebugInfo["CAFilename"] = gDirUtilp->getCAFile(); |
2352 | 2355 | ||
@@ -2433,14 +2436,14 @@ void LLAppViewer::handleViewerCrash() | |||
2433 | //to check against no matter what | 2436 | //to check against no matter what |
2434 | gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); | 2437 | gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); |
2435 | 2438 | ||
2436 | gDebugInfo["ClientInfo"]["ImpMajorVersion"] = IMP_VERSION_MAJOR; | 2439 | gDebugInfo["ClientInfo"]["ImpMajorVersion"] = ViewerVersion::getImpMajorVersion(); |
2437 | gDebugInfo["ClientInfo"]["ImpMinorVersion"] = IMP_VERSION_MINOR; | 2440 | gDebugInfo["ClientInfo"]["ImpMinorVersion"] = ViewerVersion::getImpMinorVersion(); |
2438 | gDebugInfo["ClientInfo"]["ImpPatchVersion"] = IMP_VERSION_PATCH; | 2441 | gDebugInfo["ClientInfo"]["ImpPatchVersion"] = ViewerVersion::getImpPatchVersion(); |
2439 | gDebugInfo["ClientInfo"]["ImpTestVersion"] = IMP_VERSION_TEST; | 2442 | gDebugInfo["ClientInfo"]["ImpTestVersion"] = ViewerVersion::getImpTestVersion(); |
2440 | gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; | 2443 | gDebugInfo["ClientInfo"]["MajorVersion"] = ViewerVersion::getLLMajorVersion(); |
2441 | gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; | 2444 | gDebugInfo["ClientInfo"]["MinorVersion"] = ViewerVersion::getLLMinorVersion(); |
2442 | gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; | 2445 | gDebugInfo["ClientInfo"]["PatchVersion"] = ViewerVersion::getLLPatchVersion(); |
2443 | gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD; | 2446 | gDebugInfo["ClientInfo"]["BuildVersion"] = ViewerVersion::getLLBuildVersion(); |
2444 | 2447 | ||
2445 | LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); | 2448 | LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); |
2446 | if ( parcel && parcel->getMusicURL()[0]) | 2449 | if ( parcel && parcel->getMusicURL()[0]) |
@@ -4115,10 +4118,10 @@ void LLAppViewer::handleLoginComplete() | |||
4115 | // Store some data to DebugInfo in case of a freeze. | 4118 | // Store some data to DebugInfo in case of a freeze. |
4116 | gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); | 4119 | gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); |
4117 | 4120 | ||
4118 | gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; | 4121 | gDebugInfo["ClientInfo"]["MajorVersion"] = ViewerVersion::getLLMajorVersion(); |
4119 | gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; | 4122 | gDebugInfo["ClientInfo"]["MinorVersion"] = ViewerVersion::getLLMinorVersion(); |
4120 | gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; | 4123 | gDebugInfo["ClientInfo"]["PatchVersion"] = ViewerVersion::getLLPatchVersion(); |
4121 | gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD; | 4124 | gDebugInfo["ClientInfo"]["BuildVersion"] = ViewerVersion::getLLBuildVersion(); |
4122 | gDebugInfo["SettingsFilename"] = gSavedSettings.getString("ClientSettingsFile"); | 4125 | gDebugInfo["SettingsFilename"] = gSavedSettings.getString("ClientSettingsFile"); |
4123 | gDebugInfo["CAFilename"] = gDirUtilp->getCAFile(); | 4126 | gDebugInfo["CAFilename"] = gDirUtilp->getCAFile(); |
4124 | gDebugInfo["ViewerExePath"] = gDirUtilp->getExecutablePathAndName(); | 4127 | gDebugInfo["ViewerExePath"] = gDirUtilp->getExecutablePathAndName(); |
diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp index 772428e..7e6c43f 100644 --- a/linden/indra/newview/llfloaterabout.cpp +++ b/linden/indra/newview/llfloaterabout.cpp | |||
@@ -50,8 +50,6 @@ | |||
50 | #include "llagent.h" | 50 | #include "llagent.h" |
51 | #include "llviewerstats.h" | 51 | #include "llviewerstats.h" |
52 | #include "llviewerregion.h" | 52 | #include "llviewerregion.h" |
53 | #include "llversionviewer.h" | ||
54 | #include "llviewerbuild.h" | ||
55 | #include "lluictrlfactory.h" | 53 | #include "lluictrlfactory.h" |
56 | #include "lluri.h" | 54 | #include "lluri.h" |
57 | #include "llweb.h" | 55 | #include "llweb.h" |
@@ -61,6 +59,7 @@ | |||
61 | #include "llglheaders.h" | 59 | #include "llglheaders.h" |
62 | #include "llmediamanager.h" | 60 | #include "llmediamanager.h" |
63 | #include "llwindow.h" | 61 | #include "llwindow.h" |
62 | #include "viewerversion.h" | ||
64 | 63 | ||
65 | #if LL_WINDOWS | 64 | #if LL_WINDOWS |
66 | #include "lldxhardware.h" | 65 | #include "lldxhardware.h" |
@@ -118,10 +117,10 @@ LLFloaterAbout::LLFloaterAbout() | |||
118 | // Version string | 117 | // Version string |
119 | std::string version = llformat( | 118 | std::string version = llformat( |
120 | "%s %d.%d.%d %s / %s %d.%d.%d (%d), %s %s\n", | 119 | "%s %d.%d.%d %s / %s %d.%d.%d (%d), %s %s\n", |
121 | IMP_VIEWER_NAME, | 120 | ViewerVersion::getImpViewerName().c_str(), |
122 | IMP_VERSION_MAJOR, IMP_VERSION_MINOR, IMP_VERSION_PATCH, IMP_VERSION_TEST, | 121 | ViewerVersion::getImpMajorVersion(), ViewerVersion::getImpMinorVersion(), ViewerVersion::getImpPatchVersion(), ViewerVersion::getImpTestVersion().c_str(), |
123 | LL_VIEWER_NAME, | 122 | ViewerVersion::getLLViewerName().c_str(), |
124 | LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD, | 123 | ViewerVersion::getLLMajorVersion(), ViewerVersion::getLLMinorVersion(), ViewerVersion::getLLPatchVersion(), ViewerVersion::getLLBuildVersion(), |
125 | __DATE__, __TIME__); | 124 | __DATE__, __TIME__); |
126 | 125 | ||
127 | support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); | 126 | support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); |
@@ -315,13 +314,13 @@ void LLFloaterAbout::show(void*) | |||
315 | static std::string get_viewer_release_notes_url() | 314 | static std::string get_viewer_release_notes_url() |
316 | { | 315 | { |
317 | std::ostringstream version; | 316 | std::ostringstream version; |
318 | version << IMP_VERSION_MAJOR << "." | 317 | version << ViewerVersion::getImpMajorVersion() << "." |
319 | << IMP_VERSION_MINOR << "." | 318 | << ViewerVersion::getImpMinorVersion() << "." |
320 | << IMP_VERSION_PATCH; | 319 | << ViewerVersion::getImpPatchVersion(); |
321 | 320 | ||
322 | // Append the test version if it's not empty | 321 | // Append the test version if it's not empty |
323 | if( strcmp(IMP_VERSION_TEST, "") != 0 ) | 322 | if( !(ViewerVersion::getImpTestVersion().empty()) ) |
324 | version << "-" << IMP_VERSION_TEST; | 323 | version << "-" << ViewerVersion::getImpTestVersion(); |
325 | 324 | ||
326 | std::ostringstream url; | 325 | std::ostringstream url; |
327 | 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 7a5f2ba..a7f41ea 100644 --- a/linden/indra/newview/llfloaterreporter.cpp +++ b/linden/indra/newview/llfloaterreporter.cpp | |||
@@ -45,7 +45,6 @@ | |||
45 | #include "llinventory.h" | 45 | #include "llinventory.h" |
46 | #include "llstring.h" | 46 | #include "llstring.h" |
47 | #include "llsys.h" | 47 | #include "llsys.h" |
48 | #include "llversionviewer.h" | ||
49 | #include "message.h" | 48 | #include "message.h" |
50 | #include "v3math.h" | 49 | #include "v3math.h" |
51 | 50 | ||
@@ -79,9 +78,9 @@ | |||
79 | #include "llfloateravatarpicker.h" | 78 | #include "llfloateravatarpicker.h" |
80 | #include "lldir.h" | 79 | #include "lldir.h" |
81 | #include "llselectmgr.h" | 80 | #include "llselectmgr.h" |
82 | #include "llviewerbuild.h" | ||
83 | #include "lluictrlfactory.h" | 81 | #include "lluictrlfactory.h" |
84 | #include "llviewernetwork.h" | 82 | #include "llviewernetwork.h" |
83 | #include "viewerversion.h" | ||
85 | 84 | ||
86 | #include "llassetuploadresponders.h" | 85 | #include "llassetuploadresponders.h" |
87 | 86 | ||
@@ -738,10 +737,10 @@ LLSD LLFloaterReporter::gatherReport() | |||
738 | 737 | ||
739 | if ( mReportType == BUG_REPORT) | 738 | if ( mReportType == BUG_REPORT) |
740 | { | 739 | { |
741 | summary << short_platform << " V" << LL_VERSION_MAJOR << "." | 740 | summary << short_platform << " V" << ViewerVersion::getLLMajorVersion() << "." |
742 | << LL_VERSION_MINOR << "." | 741 | << ViewerVersion::getLLMinorVersion() << "." |
743 | << LL_VERSION_PATCH << "." | 742 | << ViewerVersion::getLLPatchVersion() << "." |
744 | << LL_VIEWER_BUILD | 743 | << ViewerVersion::getLLBuildVersion() |
745 | << " (" << regionp->getName() << ")" | 744 | << " (" << regionp->getName() << ")" |
746 | << "[" << category_name << "] " | 745 | << "[" << category_name << "] " |
747 | << "\"" << childGetValue("summary_edit").asString() << "\""; | 746 | << "\"" << childGetValue("summary_edit").asString() << "\""; |
@@ -759,10 +758,10 @@ LLSD LLFloaterReporter::gatherReport() | |||
759 | std::ostringstream details; | 758 | std::ostringstream details; |
760 | if (mReportType != BUG_REPORT) | 759 | if (mReportType != BUG_REPORT) |
761 | { | 760 | { |
762 | details << "V" << LL_VERSION_MAJOR << "." // client version moved to body of email for abuse reports | 761 | details << "V" << ViewerVersion::getLLMajorVersion() << "." // client version moved to body of email for abuse reports |
763 | << LL_VERSION_MINOR << "." | 762 | << ViewerVersion::getLLMinorVersion() << "." |
764 | << LL_VERSION_PATCH << "." | 763 | << ViewerVersion::getLLPatchVersion() << "." |
765 | << LL_VIEWER_BUILD << std::endl << std::endl; | 764 | << ViewerVersion::getLLBuildVersion() << std::endl << std::endl; |
766 | } | 765 | } |
767 | std::string object_name = childGetText("object_name"); | 766 | std::string object_name = childGetText("object_name"); |
768 | std::string owner_name = childGetText("owner_name"); | 767 | std::string owner_name = childGetText("owner_name"); |
@@ -783,9 +782,9 @@ LLSD LLFloaterReporter::gatherReport() | |||
783 | std::string version_string; | 782 | std::string version_string; |
784 | version_string = llformat( | 783 | version_string = llformat( |
785 | "%d.%d.%d %s %s %s %s", | 784 | "%d.%d.%d %s %s %s %s", |
786 | LL_VERSION_MAJOR, | 785 | ViewerVersion::getLLMajorVersion(), |
787 | LL_VERSION_MINOR, | 786 | ViewerVersion::getLLMinorVersion(), |
788 | LL_VERSION_PATCH, | 787 | ViewerVersion::getLLPatchVersion(), |
789 | platform, | 788 | platform, |
790 | gSysCPU.getFamily().c_str(), | 789 | gSysCPU.getFamily().c_str(), |
791 | gGLManager.mGLRenderer.c_str(), | 790 | gGLManager.mGLRenderer.c_str(), |
diff --git a/linden/indra/newview/llnotify.cpp b/linden/indra/newview/llnotify.cpp index a436d2d..2afd185 100644 --- a/linden/indra/newview/llnotify.cpp +++ b/linden/indra/newview/llnotify.cpp | |||
@@ -54,7 +54,6 @@ | |||
54 | #include "llfloaterchat.h" // for add_chat_history() | 54 | #include "llfloaterchat.h" // for add_chat_history() |
55 | #include "lloverlaybar.h" // for gOverlayBar | 55 | #include "lloverlaybar.h" // for gOverlayBar |
56 | #include "lluictrlfactory.h" | 56 | #include "lluictrlfactory.h" |
57 | #include "llversionviewer.h" | ||
58 | 57 | ||
59 | #include "hippoGridManager.h" | 58 | #include "hippoGridManager.h" |
60 | 59 | ||
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index df5601a..8dde683 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp | |||
@@ -45,7 +45,6 @@ | |||
45 | #include "llfontgl.h" | 45 | #include "llfontgl.h" |
46 | #include "llmd5.h" | 46 | #include "llmd5.h" |
47 | #include "llsecondlifeurls.h" | 47 | #include "llsecondlifeurls.h" |
48 | #include "llversionviewer.h" | ||
49 | #include "v4color.h" | 48 | #include "v4color.h" |
50 | 49 | ||
51 | #include "llbutton.h" | 50 | #include "llbutton.h" |
@@ -64,7 +63,6 @@ | |||
64 | #include "llui.h" | 63 | #include "llui.h" |
65 | #include "lluiconstants.h" | 64 | #include "lluiconstants.h" |
66 | #include "llurlsimstring.h" | 65 | #include "llurlsimstring.h" |
67 | #include "llviewerbuild.h" | ||
68 | #include "llviewerimagelist.h" | 66 | #include "llviewerimagelist.h" |
69 | #include "llviewermenu.h" // for handle_preferences() | 67 | #include "llviewermenu.h" // for handle_preferences() |
70 | #include "llviewernetwork.h" | 68 | #include "llviewernetwork.h" |
@@ -76,6 +74,7 @@ | |||
76 | #include "llhttpclient.h" | 74 | #include "llhttpclient.h" |
77 | #include "llweb.h" | 75 | #include "llweb.h" |
78 | #include "llwebbrowserctrl.h" | 76 | #include "llwebbrowserctrl.h" |
77 | #include "viewerversion.h" | ||
79 | 78 | ||
80 | #include "llfloaterhtml.h" | 79 | #include "llfloaterhtml.h" |
81 | 80 | ||
@@ -264,17 +263,17 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, | |||
264 | 263 | ||
265 | std::string imp_channel = gSavedSettings.getString("VersionChannelName"); | 264 | std::string imp_channel = gSavedSettings.getString("VersionChannelName"); |
266 | std::string imp_version = llformat("%d.%d.%d %s", | 265 | std::string imp_version = llformat("%d.%d.%d %s", |
267 | IMP_VERSION_MAJOR, | 266 | ViewerVersion::getImpMajorVersion(), |
268 | IMP_VERSION_MINOR, | 267 | ViewerVersion::getImpMinorVersion(), |
269 | IMP_VERSION_PATCH, | 268 | ViewerVersion::getImpPatchVersion(), |
270 | IMP_VERSION_TEST ); | 269 | ViewerVersion::getImpTestVersion().c_str() ); |
271 | 270 | ||
272 | std::string ll_channel = LL_VIEWER_NAME; | 271 | std::string ll_channel = ViewerVersion::getLLViewerName(); |
273 | std::string ll_version = llformat("%d.%d.%d (%d)", | 272 | std::string ll_version = llformat("%d.%d.%d (%d)", |
274 | LL_VERSION_MAJOR, | 273 | ViewerVersion::getLLMajorVersion(), |
275 | LL_VERSION_MINOR, | 274 | ViewerVersion::getLLMinorVersion(), |
276 | LL_VERSION_PATCH, | 275 | ViewerVersion::getLLPatchVersion(), |
277 | LL_VIEWER_BUILD ); | 276 | ViewerVersion::getLLBuildVersion() ); |
278 | 277 | ||
279 | LLTextBox* channel_text = getChild<LLTextBox>("channel_text"); | 278 | LLTextBox* channel_text = getChild<LLTextBox>("channel_text"); |
280 | channel_text->setTextArg("[CHANNEL]", imp_channel); | 279 | channel_text->setTextArg("[CHANNEL]", imp_channel); |
@@ -845,8 +844,8 @@ void LLPanelLogin::loadLoginPage() | |||
845 | 844 | ||
846 | // Channel and Version | 845 | // Channel and Version |
847 | std::string version = llformat("%d.%d.%d %s", | 846 | std::string version = llformat("%d.%d.%d %s", |
848 | IMP_VERSION_MAJOR, IMP_VERSION_MINOR, | 847 | ViewerVersion::getImpMajorVersion(), ViewerVersion::getImpMinorVersion(), |
849 | IMP_VERSION_PATCH, IMP_VERSION_TEST); | 848 | ViewerVersion::getImpPatchVersion(), ViewerVersion::getImpTestVersion().c_str() ); |
850 | 849 | ||
851 | char* curl_channel = curl_escape(gSavedSettings.getString("VersionChannelName").c_str(), 0); | 850 | char* curl_channel = curl_escape(gSavedSettings.getString("VersionChannelName").c_str(), 0); |
852 | char* curl_version = curl_escape(version.c_str(), 0); | 851 | char* curl_version = curl_escape(version.c_str(), 0); |
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 9a6e6a0..e2b6cc5 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -73,7 +73,6 @@ | |||
73 | #include "llsecondlifeurls.h" | 73 | #include "llsecondlifeurls.h" |
74 | #include "llstring.h" | 74 | #include "llstring.h" |
75 | #include "lluserrelations.h" | 75 | #include "lluserrelations.h" |
76 | #include "llversionviewer.h" | ||
77 | #include "llvfs.h" | 76 | #include "llvfs.h" |
78 | #include "llxorcipher.h" // saved password, MAC address | 77 | #include "llxorcipher.h" // saved password, MAC address |
79 | #include "message.h" | 78 | #include "message.h" |
@@ -185,6 +184,7 @@ | |||
185 | #include "llwlparammanager.h" | 184 | #include "llwlparammanager.h" |
186 | #include "llwaterparammanager.h" | 185 | #include "llwaterparammanager.h" |
187 | #include "llagentlanguage.h" | 186 | #include "llagentlanguage.h" |
187 | #include "viewerversion.h" | ||
188 | 188 | ||
189 | #include "jcfloater_animation_list.h" | 189 | #include "jcfloater_animation_list.h" |
190 | 190 | ||
@@ -504,9 +504,9 @@ bool idle_startup() | |||
504 | if(!start_messaging_system( | 504 | if(!start_messaging_system( |
505 | message_template_path, | 505 | message_template_path, |
506 | port, | 506 | port, |
507 | LL_VERSION_MAJOR, | 507 | ViewerVersion::getLLMajorVersion(), |
508 | LL_VERSION_MINOR, | 508 | ViewerVersion::getLLMinorVersion(), |
509 | LL_VERSION_PATCH, | 509 | ViewerVersion::getLLPatchVersion(), |
510 | FALSE, | 510 | FALSE, |
511 | std::string(), | 511 | std::string(), |
512 | responder, | 512 | responder, |
diff --git a/linden/indra/newview/lluserauth.cpp b/linden/indra/newview/lluserauth.cpp index b19692f..d76ed72 100644 --- a/linden/indra/newview/lluserauth.cpp +++ b/linden/indra/newview/lluserauth.cpp | |||
@@ -38,9 +38,7 @@ | |||
38 | #include <iterator> | 38 | #include <iterator> |
39 | 39 | ||
40 | #include "lldir.h" | 40 | #include "lldir.h" |
41 | #include "llversionviewer.h" | ||
42 | #include "llappviewer.h" | 41 | #include "llappviewer.h" |
43 | #include "llviewerbuild.h" | ||
44 | #include "llviewercontrol.h" | 42 | #include "llviewercontrol.h" |
45 | #include "llxmlrpctransaction.h" | 43 | #include "llxmlrpctransaction.h" |
46 | #include "llmd5.h" | 44 | #include "llmd5.h" |
diff --git a/linden/indra/newview/llviewerassetstorage.cpp b/linden/indra/newview/llviewerassetstorage.cpp index c32e67e..a041f3a 100644 --- a/linden/indra/newview/llviewerassetstorage.cpp +++ b/linden/indra/newview/llviewerassetstorage.cpp | |||
@@ -36,7 +36,6 @@ | |||
36 | 36 | ||
37 | #include "llagent.h" | 37 | #include "llagent.h" |
38 | #include "llviewerassetstorage.h" | 38 | #include "llviewerassetstorage.h" |
39 | #include "llviewerbuild.h" | ||
40 | #include "llvfile.h" | 39 | #include "llvfile.h" |
41 | #include "llvfs.h" | 40 | #include "llvfs.h" |
42 | 41 | ||
diff --git a/linden/indra/newview/llviewerbuild.h b/linden/indra/newview/llviewerbuild.h index b93c45c..daf520b 100644 --- a/linden/indra/newview/llviewerbuild.h +++ b/linden/indra/newview/llviewerbuild.h | |||
@@ -30,8 +30,10 @@ | |||
30 | * $/LicenseInfo$ | 30 | * $/LicenseInfo$ |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include "llversionviewer.h" | 33 | // This file is not used anymore -- MC |
34 | |||
35 | //#include "llversionviewer.h" | ||
34 | 36 | ||
35 | // Set the build number in indra/llcommon/llversionviewer.h! | 37 | // Set the build number in indra/llcommon/llversionviewer.h! |
36 | 38 | ||
37 | const S32 LL_VIEWER_BUILD = LL_VERSION_BUILD; | 39 | //const S32 LL_VIEWER_BUILD = LL_VERSION_BUILD; |
diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp index 8bbef79..cca737c 100644 --- a/linden/indra/newview/llviewercontrol.cpp +++ b/linden/indra/newview/llviewercontrol.cpp | |||
@@ -65,7 +65,6 @@ | |||
65 | #include "llnotify.h" | 65 | #include "llnotify.h" |
66 | #include "llkeyboard.h" | 66 | #include "llkeyboard.h" |
67 | #include "llerrorcontrol.h" | 67 | #include "llerrorcontrol.h" |
68 | #include "llversionviewer.h" | ||
69 | #include "llappviewer.h" | 68 | #include "llappviewer.h" |
70 | #include "llvosurfacepatch.h" | 69 | #include "llvosurfacepatch.h" |
71 | #include "llvowlsky.h" | 70 | #include "llvowlsky.h" |
diff --git a/linden/indra/newview/llviewermedia.cpp b/linden/indra/newview/llviewermedia.cpp index b6dd9d6..6bcf8ce 100644 --- a/linden/indra/newview/llviewermedia.cpp +++ b/linden/indra/newview/llviewermedia.cpp | |||
@@ -38,8 +38,8 @@ | |||
38 | #include "llviewercontrol.h" | 38 | #include "llviewercontrol.h" |
39 | #include "llviewerimage.h" | 39 | #include "llviewerimage.h" |
40 | #include "llviewerwindow.h" | 40 | #include "llviewerwindow.h" |
41 | #include "llversionviewer.h" | ||
42 | #include "llviewerimagelist.h" | 41 | #include "llviewerimagelist.h" |
42 | #include "viewerversion.h" | ||
43 | 43 | ||
44 | #include "llevent.h" // LLSimpleListener | 44 | #include "llevent.h" // LLSimpleListener |
45 | #include "llmediamanager.h" | 45 | #include "llmediamanager.h" |
@@ -443,7 +443,7 @@ void LLViewerMediaImpl::updateBrowserUserAgent() | |||
443 | // http://www.mozilla.org/build/revised-user-agent-strings.html | 443 | // http://www.mozilla.org/build/revised-user-agent-strings.html |
444 | std::ostringstream codec; | 444 | std::ostringstream codec; |
445 | codec << "SecondLife/"; | 445 | codec << "SecondLife/"; |
446 | codec << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH << "." << LL_VERSION_BUILD; | 446 | codec << ViewerVersion::getLLMajorVersion() << "." << ViewerVersion::getLLMinorVersion() << "." << ViewerVersion::getLLPatchVersion() << "." << ViewerVersion::getLLBuildVersion(); |
447 | codec << " (" << channel << "; " << skin_name << " skin)"; | 447 | codec << " (" << channel << "; " << skin_name << " skin)"; |
448 | llinfos << codec.str() << llendl; | 448 | llinfos << codec.str() << llendl; |
449 | LLMediaManager::setBrowserUserAgent( codec.str() ); | 449 | LLMediaManager::setBrowserUserAgent( codec.str() ); |
diff --git a/linden/indra/newview/viewerversion.cpp b/linden/indra/newview/viewerversion.cpp new file mode 100644 index 0000000..95c8f76 --- /dev/null +++ b/linden/indra/newview/viewerversion.cpp | |||
@@ -0,0 +1,89 @@ | |||
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 new file mode 100644 index 0000000..d67cee5 --- /dev/null +++ b/linden/indra/newview/viewerversion.h | |||
@@ -0,0 +1,79 @@ | |||
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 | ||