From 24b4d3c13f15917f8c775d5b4211d213af9309c0 Mon Sep 17 00:00:00 2001
From: "coyot@coyot-sager-PC" <coyot@coyot-sager-PC>
Date: Fri, 28 Apr 2017 01:09:14 +0100
Subject: SL-671: make icon point to launcher, not viewer

---
 indra/newview/installers/windows/installer_template.nsi | 4 ++++
 indra/newview/viewer_manifest.py                        | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index fe1b35767e..4396a576cc 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -337,6 +337,10 @@ WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\DefaultIcon" "" '"$INSTDIR\$
 # 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" -url "%1"'
 
+# Only allow Launcher to be the icon
+WriteRegStr HKEY_CLASSES_ROOT "Applications" "$INSTEXE" "IsHostApp"
+WriteRegStr HKEY_CLASSES_ROOT "Applications" "$VIEWER_EXE" "NoStartPage"
+
 # Write out uninstaller
 WriteUninstaller "$INSTDIR\uninst.exe"
 
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index bac80d8c13..78dc830c1b 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -654,6 +654,7 @@ class WindowsManifest(ViewerManifest):
             'version' : '.'.join(self.args['version']),
             'version_short' : '.'.join(self.args['version'][:-1]),
             'version_dashes' : '-'.join(self.args['version']),
+            'viewer_exe' : self.channel_with_pkg_suffix().replace(' ', '')+'.exe',
             'final_exe' : self.final_exe(),
             'flags':'',
             'app_name':self.app_name(),
@@ -668,6 +669,7 @@ class WindowsManifest(ViewerManifest):
         !define VERSION "%(version_short)s"
         !define VERSION_LONG "%(version)s"
         !define VERSION_DASHES "%(version_dashes)s"
+        !define VIEWER_EXE "%(viewer_exe)%s"
         """ % substitution_strings
         
         if self.channel_type() == 'release':
-- 
cgit v1.2.3