aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/viewerversion.cpp
diff options
context:
space:
mode:
authorDavid Seikel2011-06-04 00:17:28 +1000
committerDavid Seikel2011-06-04 00:17:28 +1000
commit492eaaf4eec82327116f2605e3d8becf94bec1b3 (patch)
treedcddd674cb4861445c3ec5aaa59325b99a437614 /linden/indra/newview/viewerversion.cpp
parentSet the real bare minimum prim size to 0.00001, as 0 sized objects cause bugs. (diff)
parentFixing the menu to actually use its color options reveals how broken the whol... (diff)
downloadmeta-impy-492eaaf4eec82327116f2605e3d8becf94bec1b3.zip
meta-impy-492eaaf4eec82327116f2605e3d8becf94bec1b3.tar.gz
meta-impy-492eaaf4eec82327116f2605e3d8becf94bec1b3.tar.bz2
meta-impy-492eaaf4eec82327116f2605e3d8becf94bec1b3.tar.xz
Merge branch 'next' of git://github.com/jacek/imprudence into next
Conflicts (manually merged): linden/indra/llcommon/llversionviewer.h linden/indra/llvfs/lldir.cpp linden/indra/llvfs/lldir_mac.cpp linden/indra/newview/CMakeLists.txt linden/indra/newview/English.lproj/InfoPlist.strings linden/indra/newview/Info-Imprudence.plist linden/indra/newview/Info-meta-impy.plist linden/indra/newview/llappviewer.cpp linden/indra/newview/llpanellogin.cpp linden/indra/newview/packaging/mac/Info.plist.in linden/indra/newview/res/viewerRes.rc linden/indra/newview/skins/default/xui/en-us/floater_about.xml linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml linden/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml linden/indra/newview/skins/default/xui/en-us/panel_preferences_skins.xml linden/indra/newview/skins/default/xui/en-us/panel_preferences_web.xml linden/indra/newview/skins/default/xui/zh/menu_viewer.xml linden/indra/newview/skins/default/xui/zh/panel_group_general.xml linden/indra/newview/viewer_manifest.py linden/indra/newview/viewerversion.cpp linden/indra/newview/viewerversion.h linden/install.xml Also some post merge tweaks.
Diffstat (limited to 'linden/indra/newview/viewerversion.cpp')
-rw-r--r--linden/indra/newview/viewerversion.cpp89
1 files changed, 0 insertions, 89 deletions
diff --git a/linden/indra/newview/viewerversion.cpp b/linden/indra/newview/viewerversion.cpp
deleted file mode 100644
index 3678cb4..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
38S32 ViewerVersion::sVersionMajor = 0;
39S32 ViewerVersion::sVersionMinor = 0;
40S32 ViewerVersion::sVersionPatch = 0;
41std::string ViewerVersion::sVersionTest = "";
42
43const std::string ViewerVersion::sViewerName = "meta-impy";
44
45ViewerVersion::ViewerVersion()
46{
47}
48
49bool 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}