summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/CMakeLists.txt5
-rw-r--r--indra/newview/VIEWER_VERSION.txt2
-rwxr-xr-xindra/newview/installers/windows/installer_template.nsi28
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp11
-rwxr-xr-xindra/newview/lltracker.cpp152
-rwxr-xr-xindra/newview/lltracker.h2
-rwxr-xr-xindra/newview/skins/default/colors.xml3
-rwxr-xr-xindra/newview/viewer_manifest.py257
8 files changed, 224 insertions, 236 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 1fea6dea9f..c5e1cde4e6 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1748,6 +1748,7 @@ if (WINDOWS)
ARGS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
--actions=copy
+ --arch=${ARCH}
--artwork=${ARTWORK_DIR}
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
@@ -1815,6 +1816,7 @@ if (WINDOWS)
COMMAND ${PYTHON_EXECUTABLE}
ARGS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+ --arch=${ARCH}
--artwork=${ARTWORK_DIR}
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
@@ -1939,7 +1941,6 @@ if (LINUX)
--configuration=${CMAKE_CFG_INTDIR}
--dest=${CMAKE_CURRENT_BINARY_DIR}/packaged
--grid=${GRID}
- --installer_name=${product}
--source=${CMAKE_CURRENT_SOURCE_DIR}
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
DEPENDS
@@ -2017,6 +2018,7 @@ if (DARWIN)
ARGS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
--actions=copy
+ --arch=${ARCH}
--artwork=${ARTWORK_DIR}
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
@@ -2049,6 +2051,7 @@ if (DARWIN)
COMMAND ${PYTHON_EXECUTABLE}
ARGS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+ --arch=${ARCH}
--artwork=${ARTWORK_DIR}
--build=${CMAKE_CURRENT_BINARY_DIR}
--buildtype=${CMAKE_BUILD_TYPE}
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index 8b7b0b52e5..3609cf7707 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-3.6.12
+3.6.13
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 8a6114f0d5..dd316cdbdf 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -72,16 +72,8 @@ LangString LanguageCode ${LANG_RUSSIAN} "ru"
LangString LanguageCode ${LANG_TURKISH} "tr"
LangString LanguageCode ${LANG_TRADCHINESE} "zh"
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Tweak for different servers/builds (this placeholder is replaced by viewer_manifest.py)
-;; For example:
-;; !define INSTFLAGS "%(flags)s"
-;; !define INSTNAME "SecondLife%(grid_caps)s"
-;; !define SHORTCUT "Second Life (%(grid_caps)s)"
-;; !define URLNAME "secondlife%(grid)s"
-;; !define UNINSTALL_SETTINGS 1
-
-%%GRID_VARS%%
+;; this placeholder is replaced by viewer_manifest.py
+%%INST_VARS%%
Name ${INSTNAME}
@@ -109,7 +101,6 @@ Page instfiles
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Var INSTPROG
Var INSTEXE
-Var INSTFLAGS
Var INSTSHORTCUT
Var COMMANDLINE ; command line passed to this installer, set in .onInit
Var SHORTCUT_LANG_PARAM ; "--set InstallLanguage de", passes language to viewer
@@ -147,7 +138,7 @@ label_ask_launch:
label_launch:
# Assumes SetOutPath $INSTDIR
- Exec '"$INSTDIR\$INSTEXE" $INSTFLAGS $SHORTCUT_LANG_PARAM'
+ Exec '"$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM'
label_no_launch:
Pop $R0
FunctionEnd
@@ -720,7 +711,6 @@ ShowUninstDetails show
Section Uninstall
; Start with some default values.
-StrCpy $INSTFLAGS ""
StrCpy $INSTPROG "${INSTNAME}"
StrCpy $INSTEXE "${INSTEXE}"
StrCpy $INSTSHORTCUT "${SHORTCUT}"
@@ -919,7 +909,6 @@ Section "" ; (default section)
SetShellVarContext all ; install for all users (if you change this, change it in the uninstall as well)
; Start with some default values.
-StrCpy $INSTFLAGS "${INSTFLAGS}"
StrCpy $INSTPROG "${INSTNAME}"
StrCpy $INSTEXE "${INSTEXE}"
StrCpy $INSTSHORTCUT "${SHORTCUT}"
@@ -966,7 +955,7 @@ StrCpy $SHORTCUT_LANG_PARAM "--set InstallLanguage $(LanguageCode)"
CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT"
SetOutPath "$INSTDIR"
CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \
- "$INSTDIR\$INSTEXE" "$INSTFLAGS $SHORTCUT_LANG_PARAM"
+ "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM"
WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Account.url" \
@@ -985,9 +974,9 @@ CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \
; Other shortcuts
SetOutPath "$INSTDIR"
CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \
- "$INSTDIR\$INSTEXE" "$INSTFLAGS $SHORTCUT_LANG_PARAM"
+ "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM"
CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \
- "$INSTDIR\$INSTEXE" "$INSTFLAGS $SHORTCUT_LANG_PARAM"
+ "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM"
CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \
'"$INSTDIR\uninst.exe"' ''
@@ -996,7 +985,6 @@ CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \
; Write registry
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}"
-WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Flags" "$INSTFLAGS"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE"
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG (remove only)"
@@ -1009,13 +997,13 @@ WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "URL Protocol" ""
WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$INSTEXE"'
;; URL param must be last item passed to viewer, it ignores subsequent params
;; to avoid parameter injection attacks.
-WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" $INSTFLAGS -url "%1"'
+WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"'
WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info"(default)" "URL:Second Life"
WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info" "URL Protocol" ""
WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\DefaultIcon" "" '"$INSTDIR\$INSTEXE"'
;; URL param must be last item passed to viewer, it ignores subsequent params
;; to avoid parameter injection attacks.
-WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" '"$INSTDIR\$INSTEXE" $INSTFLAGS -url "%1"'
+WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"'
; write out uninstaller
WriteUninstaller "$INSTDIR\uninst.exe"
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 19cec55837..855836af7a 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -535,9 +535,16 @@ BOOL LLFloaterModelPreview::postBuild()
mUploadBtn = getChild<LLButton>("ok_btn");
mCalculateBtn = getChild<LLButton>("calculate_btn");
- mCalculateBtn->setClickedCallback(boost::bind(&LLFloaterModelPreview::onClickCalculateBtn, this));
+ if (LLConvexDecomposition::getInstance() != NULL)
+ {
+ mCalculateBtn->setClickedCallback(boost::bind(&LLFloaterModelPreview::onClickCalculateBtn, this));
- toggleCalculateButton(true);
+ toggleCalculateButton(true);
+ }
+ else
+ {
+ mCalculateBtn->setEnabled(false);
+ }
return TRUE;
}
diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp
index cbd16e873d..73ceb783b5 100755
--- a/indra/newview/lltracker.cpp
+++ b/indra/newview/lltracker.cpp
@@ -167,6 +167,7 @@ void LLTracker::render3D()
}
static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white);
+ static LLUIColor map_track_color_under = LLUIColorTable::instance().getColor("MapTrackColorUnder", LLColor4::white);
// Arbitary location beacon
if( instance()->mIsTrackingLocation )
@@ -187,7 +188,7 @@ void LLTracker::render3D()
}
else
{
- renderBeacon( instance()->mTrackedPositionGlobal, map_track_color,
+ renderBeacon( instance()->mTrackedPositionGlobal, map_track_color, map_track_color_under,
instance()->mBeaconText, instance()->mTrackedLocationName );
}
}
@@ -229,7 +230,7 @@ void LLTracker::render3D()
// and back again
instance()->mHasReachedLandmark = FALSE;
}
- renderBeacon( instance()->mTrackedPositionGlobal, map_track_color,
+ renderBeacon( instance()->mTrackedPositionGlobal, map_track_color, map_track_color_under,
instance()->mBeaconText, instance()->mTrackedLandmarkName );
}
}
@@ -258,7 +259,7 @@ void LLTracker::render3D()
}
else
{
- renderBeacon( av_tracker.getGlobalPos(), map_track_color,
+ renderBeacon( av_tracker.getGlobalPos(), map_track_color, map_track_color_under,
instance()->mBeaconText, av_tracker.getName() );
}
}
@@ -412,7 +413,7 @@ const std::string& LLTracker::getTrackedLocationName()
return instance()->mTrackedLocationName;
}
-F32 pulse_func(F32 t, F32 z)
+F32 pulse_func(F32 t, F32 z, bool tracking_avatar, std::string direction)
{
if (!LLTracker::sCheesyBeacon)
{
@@ -420,8 +421,15 @@ F32 pulse_func(F32 t, F32 z)
}
t *= F_PI;
- z -= t*64.f - 256.f;
-
+ if ("DOWN" == direction)
+ {
+ z += t*64.f - 256.f;
+ }
+ else
+ {
+ z -= t*64.f - 256.f;
+ }
+
F32 a = cosf(z*F_PI/512.f)*10.0f;
a = llmax(a, 9.9f);
a -= 9.9f;
@@ -474,10 +482,78 @@ void draw_shockwave(F32 center_z, F32 t, S32 steps, LLColor4 color)
gGL.end();
}
+void LLTracker::drawBeacon(LLVector3 pos_agent, std::string direction, LLColor4 fogged_color, F32 dist)
+{
+ const U32 BEACON_VERTS = 256;
+ F32 step;
+
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.pushMatrix();
+
+ if ("DOWN" == direction)
+ {
+ gGL.translatef(pos_agent.mV[0], pos_agent.mV[1], pos_agent.mV[2]);
+ draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, fogged_color);
+ step = (5020.0f - pos_agent.mV[2]) / BEACON_VERTS;
+ }
+ else
+ {
+ gGL.translatef(pos_agent.mV[0], pos_agent.mV[1], 0);
+ step = pos_agent.mV[2] / BEACON_VERTS;
+ }
+
+ gGL.color4fv(fogged_color.mV);
+
+ LLVector3 x_axis = LLViewerCamera::getInstance()->getLeftAxis();
+ F32 t = gRenderStartTime.getElapsedTimeF32();
+
+ for (U32 i = 0; i < BEACON_VERTS; i++)
+ {
+ F32 x = x_axis.mV[0];
+ F32 y = x_axis.mV[1];
+
+ F32 z = i * step;
+ F32 z_next = (i+1)*step;
+
+ bool tracking_avatar = getTrackingStatus() == TRACKING_AVATAR;
+ F32 a = pulse_func(t, z, tracking_avatar, direction);
+ F32 an = pulse_func(t, z_next, tracking_avatar, direction);
+
+ LLColor4 c_col = fogged_color + LLColor4(a,a,a,a);
+ LLColor4 col_next = fogged_color + LLColor4(an,an,an,an);
+ LLColor4 col_edge = fogged_color * LLColor4(a,a,a,0.0f);
+ LLColor4 col_edge_next = fogged_color * LLColor4(an,an,an,0.0f);
+
+ a *= 2.f;
+ a += 1.0f;
+
+ an *= 2.f;
+ an += 1.0f;
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.color4fv(col_edge.mV);
+ gGL.vertex3f(-x*a, -y*a, z);
+ gGL.color4fv(col_edge_next.mV);
+ gGL.vertex3f(-x*an, -y*an, z_next);
+
+ gGL.color4fv(c_col.mV);
+ gGL.vertex3f(0, 0, z);
+ gGL.color4fv(col_next.mV);
+ gGL.vertex3f(0, 0, z_next);
+
+ gGL.color4fv(col_edge.mV);
+ gGL.vertex3f(x*a,y*a,z);
+ gGL.color4fv(col_edge_next.mV);
+ gGL.vertex3f(x*an,y*an,z_next);
+ gGL.end();
+ }
+ gGL.popMatrix();
+}
// static
void LLTracker::renderBeacon(LLVector3d pos_global,
- const LLColor4& color,
+ const LLColor4& color,
+ const LLColor4& color_under,
LLHUDText* hud_textp,
const std::string& label )
{
@@ -497,9 +573,11 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
}
LLColor4 fogged_color = color_frac * color + (1 - color_frac)*gSky.getFogColor();
+ LLColor4 fogged_color_under = color_frac * color_under + (1 - color_frac) * gSky.getFogColor();
F32 FADE_DIST = 3.f;
fogged_color.mV[3] = llmax(0.2f, llmin(0.5f,(dist-FADE_DIST)/FADE_DIST));
+ fogged_color_under.mV[3] = llmax(0.2f, llmin(0.5f,(dist-FADE_DIST)/FADE_DIST));
LLVector3 pos_agent = gAgent.getPosAgentFromGlobal(pos_global);
@@ -508,64 +586,8 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
LLGLDisable cull_face(GL_CULL_FACE);
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
-
- gGL.matrixMode(LLRender::MM_MODELVIEW);
- gGL.pushMatrix();
- {
- gGL.translatef(pos_agent.mV[0], pos_agent.mV[1], pos_agent.mV[2]);
-
- draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, fogged_color);
-
- gGL.color4fv(fogged_color.mV);
- const U32 BEACON_VERTS = 256;
- const F32 step = 1024.0f/BEACON_VERTS;
-
- LLVector3 x_axis = LLViewerCamera::getInstance()->getLeftAxis();
- F32 t = gRenderStartTime.getElapsedTimeF32();
- F32 dr = dist/LLViewerCamera::getInstance()->getFar();
-
- for (U32 i = 0; i < BEACON_VERTS; i++)
- {
- F32 x = x_axis.mV[0];
- F32 y = x_axis.mV[1];
-
- F32 z = i * step;
- F32 z_next = (i+1)*step;
-
- F32 a = pulse_func(t, z);
- F32 an = pulse_func(t, z_next);
-
- LLColor4 c_col = fogged_color + LLColor4(a,a,a,a);
- LLColor4 col_next = fogged_color + LLColor4(an,an,an,an);
- LLColor4 col_edge = fogged_color * LLColor4(a,a,a,0.0f);
- LLColor4 col_edge_next = fogged_color * LLColor4(an,an,an,0.0f);
-
- a *= 2.f;
- a += 1.0f+dr;
-
- an *= 2.f;
- an += 1.0f+dr;
-
- gGL.begin(LLRender::TRIANGLE_STRIP);
- gGL.color4fv(col_edge.mV);
- gGL.vertex3f(-x*a, -y*a, z);
- gGL.color4fv(col_edge_next.mV);
- gGL.vertex3f(-x*an, -y*an, z_next);
-
- gGL.color4fv(c_col.mV);
- gGL.vertex3f(0, 0, z);
- gGL.color4fv(col_next.mV);
- gGL.vertex3f(0, 0, z_next);
-
- gGL.color4fv(col_edge.mV);
- gGL.vertex3f(x*a,y*a,z);
- gGL.color4fv(col_edge_next.mV);
- gGL.vertex3f(x*an,y*an,z_next);
-
- gGL.end();
- }
- }
- gGL.popMatrix();
+ LLTracker::drawBeacon(pos_agent, "DOWN", fogged_color, dist);
+ LLTracker::drawBeacon(pos_agent, "UP", fogged_color_under, dist);
std::string text;
text = llformat( "%.0f m", to_vec.magVec());
diff --git a/indra/newview/lltracker.h b/indra/newview/lltracker.h
index 8e916af315..d8d5803787 100755
--- a/indra/newview/lltracker.h
+++ b/indra/newview/lltracker.h
@@ -108,8 +108,10 @@ protected:
LLTracker();
~LLTracker();
+ static void drawBeacon(LLVector3 pos_agent, std::string direction, LLColor4 fogged_color, F32 dist);
static void renderBeacon( LLVector3d pos_global,
const LLColor4& color,
+ const LLColor4& color_under,
LLHUDText* hud_textp,
const std::string& label );
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index f53995732f..6f1a24d7f8 100755
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -511,6 +511,9 @@
name="MapTrackColor"
reference="Red" />
<color
+ name="MapTrackColorUnder"
+ reference="Blue" />
+ <color
name="MapTrackDisabledColor"
value="0.5 0 0 1" />
<color
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 894e368427..9e8623c1f9 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -38,7 +38,7 @@ viewer_dir = os.path.dirname(__file__)
# Put it FIRST because some of our build hosts have an ancient install of
# indra.util.llmanifest under their system Python!
sys.path.insert(0, os.path.join(viewer_dir, os.pardir, "lib", "python"))
-from indra.util.llmanifest import LLManifest, main, proper_windows_path, path_ancestors
+from indra.util.llmanifest import LLManifest, main, proper_windows_path, path_ancestors, CHANNEL_VENDOR_BASE, RELEASE_CHANNEL
try:
from llbase import llsd
except ImportError:
@@ -112,21 +112,29 @@ class ViewerManifest(LLManifest):
Persist=1,
Type='String',
Value=''),
+ CmdLineGridChoice=dict(Comment='Default grid',
+ Persist=0,
+ Type='String',
+ Value=''),
CmdLineChannel=dict(Comment='Command line specified channel name',
Persist=0,
Type='String',
Value=''))
settings_install = {}
- for key, setting in (("sourceid", "sourceid"),
- ("channel", "CmdLineChannel")):
- if key in self.args:
- # only set if value is non-empty
- if self.args[key]:
- # copy corresponding setting from settings_template
- settings_install[setting] = settings_template[setting].copy()
- # then fill in Value
- settings_install[setting]["Value"] = self.args[key]
- print "Put %s '%s' in settings_install.xml" % (setting, self.args[key])
+ if 'sourceid' in self.args and self.args['sourceid']:
+ settings_install['sourceid'] = settings_template['sourceid'].copy()
+ settings_install['sourceid']['Value'] = self.args['sourceid']
+ print "Set sourceid in settings_install.xml to '%s'" % self.args['sourceid']
+
+ if 'channel_suffix' in self.args and self.args['channel_suffix']:
+ settings_install['CmdLineChannel'] = settings_template['CmdLineChannel'].copy()
+ settings_install['CmdLineChannel']['Value'] = self.channel_with_pkg_suffix()
+ print "Set CmdLineChannel in settings_install.xml to '%s'" % self.channel_with_pkg_suffix()
+
+ if 'grid' in self.args and self.args['grid']:
+ settings_install['CmdLineGridChoice'] = settings_template['CmdLineGridChoice'].copy()
+ settings_install['CmdLineGridChoice']['Value'] = self.grid()
+ print "Set CmdLineGridChoice in settings_install.xml to '%s'" % self.grid()
# did we actually copy anything into settings_install dict?
if settings_install:
@@ -197,62 +205,72 @@ class ViewerManifest(LLManifest):
def grid(self):
return self.args['grid']
+
def channel(self):
return self.args['channel']
- def channel_unique(self):
- return self.channel().replace("Second Life", "").strip()
- def channel_oneword(self):
- return "".join(self.channel_unique().split())
- def channel_lowerword(self):
- return self.channel_oneword().lower()
+
+ def channel_with_pkg_suffix(self):
+ fullchannel=self.channel()
+ if 'channel_suffix' in self.args and self.args['channel_suffix']:
+ fullchannel+=' '+self.args['channel_suffix']
+ return fullchannel
+
+ def channel_variant(self):
+ global CHANNEL_VENDOR_BASE
+ return self.channel().replace(CHANNEL_VENDOR_BASE, "").strip()
+
+ def channel_type(self): # returns 'release', 'beta', 'project', or 'test'
+ global CHANNEL_VENDOR_BASE
+ channel_qualifier=self.channel().replace(CHANNEL_VENDOR_BASE, "").lower().strip()
+ if channel_qualifier.startswith('release'):
+ channel_type='release'
+ elif channel_qualifier.startswith('beta'):
+ channel_type='beta'
+ elif channel_qualifier.startswith('project'):
+ channel_type='project'
+ else:
+ channel_type='test'
+ return channel_type
+
+ def channel_variant_app_suffix(self):
+ # get any part of the compiled channel name after the CHANNEL_VENDOR_BASE
+ suffix=self.channel_variant()
+ # by ancient convention, we don't use Release in the app name
+ if self.channel_type() == 'release':
+ suffix=suffix.replace('Release', '').strip()
+ # for the base release viewer, suffix will now be null - for any other, append what remains
+ if len(suffix) > 0:
+ suffix = "_"+ ("_".join(suffix.split()))
+ # the additional_packages mechanism adds more to the installer name (but not to the app name itself)
+ if 'channel_suffix' in self.args and self.args['channel_suffix']:
+ suffix+='_'+("_".join(self.args['channel_suffix'].split()))
+ return suffix
+
+ def installer_base_name(self):
+ global CHANNEL_VENDOR_BASE
+ # a standard map of strings for replacing in the templates
+ substitution_strings = {
+ 'channel_vendor_base' : '_'.join(CHANNEL_VENDOR_BASE.split()),
+ 'channel_variant_underscores':self.channel_variant_app_suffix(),
+ 'version_underscores' : '_'.join(self.args['version']),
+ 'arch':self.args['arch']
+ }
+ return "%(channel_vendor_base)s%(channel_variant_underscores)s_%(version_underscores)s_%(arch)s" % substitution_strings
def app_name(self):
- app_suffix='Test'
- channel_type=self.channel_lowerword()
- if channel_type.startswith('release') :
+ global CHANNEL_VENDOR_BASE
+ channel_type=self.channel_type()
+ if channel_type == 'release':
app_suffix='Viewer'
- elif re.match('^(beta|project).*',channel_type) :
- app_suffix=self.channel_unique()
- return "Second Life "+app_suffix
-
+ else:
+ app_suffix=self.channel_variant()
+ return CHANNEL_VENDOR_BASE + ' ' + app_suffix
+
+ def app_name_oneword(self):
+ return ''.join(self.app_name().split())
+
def icon_path(self):
- icon_path="icons/"
- channel_type=self.channel_lowerword()
- print "Icon channel type '%s'" % channel_type
- if channel_type.startswith('release') :
- icon_path += 'release'
- elif re.match('^beta.*',channel_type) :
- icon_path += 'beta'
- elif re.match('^project.*',channel_type) :
- icon_path += 'project'
- else :
- icon_path += 'test'
- return icon_path
-
- def flags_list(self):
- """ Convenience function that returns the command-line flags
- for the grid"""
-
- # The original role of this method seems to have been to build a
- # grid-specific viewer: one that would, on launch, preselect a
- # particular grid. (Apparently that dates back to when the protocol
- # between viewer and simulator required them to be updated in
- # lockstep, so that "the beta grid" required "a beta viewer.") But
- # those viewer command-line switches no longer work without tweaking
- # user_settings/grids.xml. In fact, going forward, it's unclear what
- # use case that would address.
-
- # This method also set a channel-specific (or grid-and-channel-
- # specific) user_settings/settings_something.xml file. It has become
- # clear that saving user settings in a channel-specific file causes
- # more problems (confusion) than it solves, so we've discontinued that.
-
- # In fact we now avoid forcing viewer command-line switches at all,
- # instead introducing a settings_install.xml file. Command-line
- # switches don't aggregate well; for instance the generated --channel
- # switch actually prevented the user specifying --channel on the
- # command line. Settings files have well-defined override semantics.
- return None
+ return "icons/" + self.channel_type()
def extract_names(self,src):
try:
@@ -277,15 +295,9 @@ class ViewerManifest(LLManifest):
random.shuffle(names)
return ', '.join(names)
-class WindowsManifest(ViewerManifest):
+class Windows_i686_Manifest(ViewerManifest):
def final_exe(self):
- app_suffix="Test"
- channel_type=self.channel_lowerword()
- if channel_type.startswith('release') :
- app_suffix=''
- elif re.match('^(beta|project).*',channel_type) :
- app_suffix=''.join(self.channel_unique().split())
- return "SecondLife"+app_suffix+".exe"
+ return self.app_name_oneword()+".exe"
def test_msvcrt_and_copy_action(self, src, dst):
# This is used to test a dll manifest.
@@ -334,7 +346,7 @@ class WindowsManifest(ViewerManifest):
print "Doesn't exist:", src
def construct(self):
- super(WindowsManifest, self).construct()
+ super(Windows_i686_Manifest, self).construct()
if self.is_packaging_viewer():
# Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe.
@@ -567,65 +579,33 @@ class WindowsManifest(ViewerManifest):
'version_short' : '.'.join(self.args['version'][:-1]),
'version_dashes' : '-'.join(self.args['version']),
'final_exe' : self.final_exe(),
- 'grid':self.args['grid'],
- 'grid_caps':self.args['grid'].upper(),
'flags':'',
- 'channel':self.channel(),
- 'channel_oneword':self.channel_oneword(),
- 'channel_unique':self.channel_unique(),
- 'subchannel_underscores':'_'.join(self.channel_unique().split())
+ 'app_name':self.app_name(),
+ 'app_name_oneword':self.app_name_oneword()
}
+ installer_file = self.installer_base_name() + '_Setup.exe'
+ substitution_strings['installer_file'] = installer_file
+
version_vars = """
!define INSTEXE "%(final_exe)s"
!define VERSION "%(version_short)s"
!define VERSION_LONG "%(version)s"
!define VERSION_DASHES "%(version_dashes)s"
""" % substitution_strings
- if self.default_channel():
- if self.default_grid():
- # release viewer
- installer_file = "Second_Life_%(version_dashes)s_Setup.exe"
- grid_vars_template = """
- OutFile "%(installer_file)s"
- !define INSTFLAGS "%(flags)s"
- !define INSTNAME "SecondLifeViewer"
- !define SHORTCUT "Second Life Viewer"
- !define URLNAME "secondlife"
- Caption "Second Life"
- """
- else:
- # alternate grid viewer
- installer_file = "Second_Life_%(version_dashes)s_(%(grid_caps)s)_Setup.exe"
- grid_vars_template = """
- OutFile "%(installer_file)s"
- !define INSTFLAGS "%(flags)s"
- !define INSTNAME "SecondLife%(grid_caps)s"
- !define SHORTCUT "Second Life (%(grid_caps)s)"
- !define URLNAME "secondlife%(grid)s"
- !define UNINSTALL_SETTINGS 1
- Caption "Second Life %(grid)s ${VERSION}"
- """
+
+ if self.channel_type() == 'release':
+ substitution_strings['caption'] = CHANNEL_VENDOR_BASE
else:
- # some other channel (grid name not used)
- installer_file = "Second_Life_%(version_dashes)s_%(subchannel_underscores)s_Setup.exe"
- grid_vars_template = """
+ substitution_strings['caption'] = self.app_name() + ' ${VERSION}'
+
+ inst_vars_template = """
OutFile "%(installer_file)s"
- !define INSTFLAGS "%(flags)s"
- !define INSTNAME "SecondLife%(channel_oneword)s"
- !define SHORTCUT "%(channel)s"
+ !define INSTNAME "%(app_name_oneword)s"
+ !define SHORTCUT "%(app_name)s"
!define URLNAME "secondlife"
- !define UNINSTALL_SETTINGS 1
- Caption "%(channel)s ${VERSION}"
+ Caption "%(caption)s"
"""
- if 'installer_name' in self.args:
- installer_file = self.args['installer_name']
- else:
- installer_file = installer_file % substitution_strings
- if len(self.args['package_id']) > 0:
- installer_file = installer_file.replace(self.args['package_id'], "")
- installer_file = installer_file.replace(".exe", self.args['package_id'] + ".exe")
- substitution_strings['installer_file'] = installer_file
tempfile = "secondlife_setup_tmp.nsi"
# the following replaces strings in the nsi template
@@ -633,7 +613,7 @@ class WindowsManifest(ViewerManifest):
self.replace_in("installers/windows/installer_template.nsi", tempfile, {
"%%VERSION%%":version_vars,
"%%SOURCE%%":self.get_src_prefix(),
- "%%GRID_VARS%%":grid_vars_template % substitution_strings,
+ "%%INST_VARS%%":inst_vars_template % substitution_strings,
"%%INSTALL_FILES%%":self.nsi_file_commands(True),
"%%DELETE_FILES%%":self.nsi_file_commands(False)})
@@ -663,7 +643,7 @@ class WindowsManifest(ViewerManifest):
self.package_file = installer_file
-class DarwinManifest(ViewerManifest):
+class Darwin_i386_Manifest(ViewerManifest):
def is_packaging_viewer(self):
# darwin requires full app bundle packaging even for debugging.
return True
@@ -685,7 +665,7 @@ class DarwinManifest(ViewerManifest):
# most everything goes in the Resources directory
if self.prefix(src="", dst="Resources"):
- super(DarwinManifest, self).construct()
+ super(Darwin_i386_Manifest, self).construct()
if self.prefix("cursors_mac"):
self.path("*.tif")
@@ -821,6 +801,7 @@ class DarwinManifest(ViewerManifest):
self.run_command("chmod +x %r" % os.path.join(self.get_dst_prefix(), script))
def package_finish(self):
+ global CHANNEL_VENDOR_BASE
# Sign the app if requested.
if 'signature' in self.args:
identity = self.args['signature']
@@ -850,17 +831,9 @@ class DarwinManifest(ViewerManifest):
# MBW -- If the mounted volume name changes, it breaks the .DS_Store's background image and icon positioning.
# If we really need differently named volumes, we'll need to create multiple DS_Store file images, or use some other trick.
- volname="Second Life Installer" # DO NOT CHANGE without understanding comment above
+ volname=CHANNEL_VENDOR_BASE+" Installer" # DO NOT CHANGE without understanding comment above
- if len(self.args['package_id']) > 0:
- imagename = imagename + self.args['package_id']
- elif self.default_channel():
- if not self.default_grid():
- # beta case
- imagename = imagename + '_' + self.args['grid'].upper()
- else:
- # first look, etc
- imagename = imagename + '_' + self.channel_oneword().upper()
+ imagename = self.installer_base_name()
sparsename = imagename + ".sparseimage"
finalname = imagename + ".dmg"
@@ -894,7 +867,7 @@ class DarwinManifest(ViewerManifest):
# will use the release .DS_Store, and will look broken.
# - Ambroff 2008-08-20
dmg_template = os.path.join(
- 'installers', 'darwin', '%s-dmg' % self.channel_lowerword())
+ 'installers', 'darwin', '%s-dmg' % self.channel_type())
if not os.path.exists (self.src_path_of(dmg_template)):
dmg_template = os.path.join ('installers', 'darwin', 'release-dmg')
@@ -977,8 +950,9 @@ class LinuxManifest(ViewerManifest):
# recurse
self.end_prefix("res-sdl")
- # Get the icons based on the channel
+ # Get the icons based on the channel type
icon_path = self.icon_path()
+ print "DEBUG: icon_path '%s'" % icon_path
if self.prefix(src=icon_path, dst="") :
self.path("secondlife_256.png","secondlife_icon.png")
if self.prefix(src="",dst="res-sdl") :
@@ -1004,18 +978,7 @@ class LinuxManifest(ViewerManifest):
self.run_command("chmod +x %r" % os.path.join(self.get_dst_prefix(), script))
def package_finish(self):
- if 'installer_name' in self.args:
- installer_name = self.args['installer_name']
- else:
- installer_name_components = ['SecondLife_', self.args.get('arch')]
- installer_name_components.extend(self.args['version'])
- installer_name = "_".join(installer_name_components)
- if self.default_channel():
- if not self.default_grid():
- installer_name += '_' + self.args['grid'].upper()
- else:
- installer_name += '_' + self.channel_oneword().upper()
- installer_name = installer_name + self.args['package_id']
+ installer_name = self.installer_base_name()
self.strip_binaries()
@@ -1057,9 +1020,9 @@ class LinuxManifest(ViewerManifest):
print "* Going strip-crazy on the packaged binaries, since this is a RELEASE build"
self.run_command(r"find %(d)r/bin %(d)r/lib -type f \! -name update_install | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure
-class Linux_i686Manifest(LinuxManifest):
+class Linux_i686_Manifest(LinuxManifest):
def construct(self):
- super(Linux_i686Manifest, self).construct()
+ super(Linux_i686_Manifest, self).construct()
if self.prefix("../packages/lib/release", dst="lib"):
self.path("libapr-1.so")
@@ -1145,9 +1108,9 @@ class Linux_i686Manifest(LinuxManifest):
self.strip_binaries()
-class Linux_x86_64Manifest(LinuxManifest):
+class Linux_x86_64_Manifest(LinuxManifest):
def construct(self):
- super(Linux_x86_64Manifest, self).construct()
+ super(Linux_x86_64_Manifest, self).construct()
# support file for valgrind debug tool
self.path("secondlife-i686.supp")