From 9cae70db44a00d101236e0ddcfa50cca63ef2cbc Mon Sep 17 00:00:00 2001 From: "Brian R. Bondy" Date: Wed, 24 Oct 2012 11:45:16 -0400 Subject: [PATCH] Bug 793438 - Always add start menu shortcut on Win8 for Metro browser builds. r=jimm --- browser/installer/windows/nsis/installer.nsi | 33 +++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/browser/installer/windows/nsis/installer.nsi b/browser/installer/windows/nsis/installer.nsi index 081fa996faa7..9c24aba63e82 100755 --- a/browser/installer/windows/nsis/installer.nsi +++ b/browser/installer/windows/nsis/installer.nsi @@ -831,7 +831,16 @@ Function leaveShortcuts Abort ${EndIf} ${MUI_INSTALLOPTIONS_READ} $AddDesktopSC "shortcuts.ini" "Field 2" "State" - ${MUI_INSTALLOPTIONS_READ} $AddStartMenuSC "shortcuts.ini" "Field 3" "State" + + ; If we have a Metro browser and are Win8, then we don't have a Field 3 +!ifdef MOZ_METRO + ${Unless} ${AtLeastWin8} +!endif + ${MUI_INSTALLOPTIONS_READ} $AddStartMenuSC "shortcuts.ini" "Field 3" "State" +!ifdef MOZ_METRO + ${EndIf} +!endif + ; Don't install the quick launch shortcut on Windows 7 ${Unless} ${AtLeastWin7} ${MUI_INSTALLOPTIONS_READ} $AddQuickLaunchSC "shortcuts.ini" "Field 4" "State" @@ -1097,13 +1106,21 @@ Function .onInit WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 2" State "1" WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 2" Flags "GROUP" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Type "checkbox" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Text "$(ICONS_STARTMENU)" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Left "0" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Right "-1" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Top "40" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Bottom "50" - WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" State "1" + ; Don't offer to install the start menu shortcut on Windows 8 + ; for Metro builds. +!ifdef MOZ_METRO + ${Unless} ${AtLeastWin8} +!endif + WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Type "checkbox" + WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Text "$(ICONS_STARTMENU)" + WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Left "0" + WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Right "-1" + WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Top "40" + WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Bottom "50" + WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" State "1" +!ifdef MOZ_METRO + ${EndIf} +!endif ; Don't offer to install the quick launch shortcut on Windows 7 ${Unless} ${AtLeastWin7}