# HG changeset patch # User Daniel Atallah # Date 1116183203 0 # Node ID 6a8440e9edba946960a004cd22cc5391820dbbdb # Parent 9695281b1aa18493fa483d6ac68fb1fcd82bcd0e [gaim-migrate @ 12686] Apparently automatically placing an icon on the Desktop, and putting a link to the uninstaller on the Start Menu goes against the MS Application guidelines. I suppose it makes sense, so why not give the user an option. Also some other changes that were made in oldstatus but not here. committer: Tailor Script diff -r 9695281b1aa1 -r 6a8440e9edba gaim-installer.nsi --- a/gaim-installer.nsi Sun May 15 18:16:20 2005 +0000 +++ b/gaim-installer.nsi Sun May 15 18:53:23 2005 +0000 @@ -1,7 +1,7 @@ ; Installer script for win32 Gaim ; Herman Bloggs -; NOTE: this .NSI script is intended for NSIS 2.0 (finale release). +; NOTE: this .NSI script is intended for NSIS 2.0 (final release). ; ;-------------------------------- @@ -52,7 +52,7 @@ !define GAIM_UNINST_EXE "gaim-uninst.exe" !define GAIM_REG_LANG "Installer Language" -!define GTK_VERSION "2.4.7" +!define GTK_VERSION "2.6.2" !define GTK_REG_KEY "SOFTWARE\GTK\2.0" !define PERL_REG_KEY "SOFTWARE\Perl" !define PERL_DLL "perl58.dll" @@ -445,14 +445,22 @@ perl_done: - CreateDirectory "$SMPROGRAMS\Gaim" - CreateShortCut "$SMPROGRAMS\Gaim\Gaim.lnk" "$INSTDIR\gaim.exe" - CreateShortCut "$DESKTOP\Gaim.lnk" "$INSTDIR\gaim.exe" + ; If this is under NT4, delete the SILC support stuff + ; there is a bug that will prevent any account from connecting + ; See https://lists.silcnet.org/pipermail/silc-devel/2005-January/001588.html + Call GetWindowsVersion + Pop $R2 + StrCmp $R2 "NT 4.0" 0 nt4_done + Delete "$INSTDIR\plugins\libsilc.dll" + Delete "$INSTDIR\silcclient.dll" + Delete "$INSTDIR\silc.dll" + + nt4_done: + SetOutPath "$INSTDIR" ; If we don't have install rights.. we're done StrCmp $R0 "NONE" done - CreateShortCut "$SMPROGRAMS\Gaim\Uninstall.lnk" "$INSTDIR\${GAIM_UNINST_EXE}" SetOverwrite off ; Write out installer language @@ -473,6 +481,23 @@ SectionEnd ; end of default Gaim section ;-------------------------------- +;Shortcuts + +SubSection /e $(GAIM_SHORTCUTS_SECTION_TITLE) SecShortcuts + Section /o $(GAIM_DESKTOP_SHORTCUT_SECTION_TITLE) SecDesktopShortcut + SetOverwrite on + CreateShortCut "$DESKTOP\Gaim.lnk" "$INSTDIR\gaim.exe" + SetOverwrite off + SectionEnd + Section $(GAIM_STARTMENU_SHORTCUT_SECTION_TITLE) SecStartMenuShortcut + SetOverwrite on + CreateDirectory "$SMPROGRAMS\Gaim" + CreateShortCut "$SMPROGRAMS\Gaim\Gaim.lnk" "$INSTDIR\gaim.exe" + SetOverwrite off + SectionEnd +SubSectionEnd + +;-------------------------------- ;GTK+ Themes SubSection /e $(GTK_THEMES_SECTION_TITLE) SecGtkThemes @@ -586,6 +611,7 @@ Delete "$INSTDIR\plugins\liboscar.dll" Delete "$INSTDIR\plugins\libtoc.dll" Delete "$INSTDIR\plugins\libyahoo.dll" + Delete "$INSTDIR\plugins\libsilc.dll" Delete "$INSTDIR\plugins\perl.dll" Delete "$INSTDIR\plugins\relnot.dll" Delete "$INSTDIR\plugins\spellchk.dll" @@ -614,6 +640,8 @@ Delete "$INSTDIR\nssckbi.dll" Delete "$INSTDIR\plc4.dll" Delete "$INSTDIR\plds4.dll" + Delete "$INSTDIR\silc.dll" + Delete "$INSTDIR\silcclient.dll" Delete "$INSTDIR\softokn3.dll" Delete "$INSTDIR\ssl3.dll" Delete "$INSTDIR\${GAIM_UNINST_EXE}" @@ -655,7 +683,7 @@ $(GTK_SECTION_DESCRIPTION) !endif !insertmacro MUI_DESCRIPTION_TEXT ${SecGtkThemes} \ - $(GTK_THEMES_SECTION_DESCRIPTION) + $(GTK_THEMES_SECTION_DESCRIPTION) !insertmacro MUI_DESCRIPTION_TEXT ${SecGtkNone} \ $(GTK_NO_THEME_DESC) !insertmacro MUI_DESCRIPTION_TEXT ${SecGtkWimp} \ @@ -664,6 +692,14 @@ $(GTK_BLUECURVE_THEME_DESC) !insertmacro MUI_DESCRIPTION_TEXT ${SecGtkLighthouseblue} \ $(GTK_LIGHTHOUSEBLUE_THEME_DESC) + + + !insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} \ + $(GAIM_SHORTCUTS_SECTION_DESCRIPTION) + !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktopShortcut} \ + $(GAIM_DESKTOP_SHORTCUT_DESC) + !insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenuShortcut} \ + $(GAIM_STARTMENU_SHORTCUT_DESC) !insertmacro MUI_FUNCTION_DESCRIPTION_END ;-------------------------------- @@ -1248,7 +1284,7 @@ FunctionEnd -; StrStr + ; StrStr ; input, top of stack = string to search for ; top of stack-1 = string to search in ; output, top of stack (replaces with the portion of the string remaining) @@ -1261,8 +1297,8 @@ ; Pop $R0 ; ($R0 at this point is "ass string") - Function StrStr - Exch $R1 ; st=haystack,old$R1, $R1=needle +Function StrStr + Exch $R1 ; st=haystack,old$R1, $R1=needle Exch ; st=old$R1,haystack Exch $R2 ; st=old$R1,old$R2, $R2=haystack Push $R3 @@ -1281,14 +1317,14 @@ StrCmp $R5 "" done IntOp $R4 $R4 + 1 Goto loop - done: + done: StrCpy $R1 $R2 "" $R4 Pop $R5 Pop $R4 Pop $R3 Pop $R2 Exch $R1 - FunctionEnd +FunctionEnd ; ; Parse the Command line @@ -1305,9 +1341,95 @@ Call StrStr Pop $R1 StrCmp $R1 "" next - StrCpy $R1 $R1 4 2 ; Strip first 2 chars of string - StrCpy $LANGUAGE $R1 - IntOp $LANG_IS_SET 0 + 1 + StrCpy $R1 $R1 4 2 ; Strip first 2 chars of string + StrCpy $LANGUAGE $R1 + IntOp $LANG_IS_SET 0 + 1 next: FunctionEnd +; GetWindowsVersion +; +; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/ +; Updated by Joost Verburg +; +; Returns on top of stack +; +; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003) +; or +; '' (Unknown Windows Version) +; +; Usage: +; Call GetWindowsVersion +; Pop $R0 +; +; at this point $R0 is "NT 4.0" or whatnot +Function GetWindowsVersion + + Push $R0 + Push $R1 + + ReadRegStr $R0 HKLM \ + "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion + + IfErrors 0 lbl_winnt + + ; we are not NT + ReadRegStr $R0 HKLM \ + "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber + + StrCpy $R1 $R0 1 + StrCmp $R1 '4' 0 lbl_error + + StrCpy $R1 $R0 3 + + StrCmp $R1 '4.0' lbl_win32_95 + StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98 + + lbl_win32_95: + StrCpy $R0 '95' + Goto lbl_done + + lbl_win32_98: + StrCpy $R0 '98' + Goto lbl_done + + lbl_win32_ME: + StrCpy $R0 'ME' + Goto lbl_done + + lbl_winnt: + StrCpy $R1 $R0 1 + + StrCmp $R1 '3' lbl_winnt_x + StrCmp $R1 '4' lbl_winnt_x + + StrCpy $R1 $R0 3 + + StrCmp $R1 '5.0' lbl_winnt_2000 + StrCmp $R1 '5.1' lbl_winnt_XP + StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error + + lbl_winnt_x: + StrCpy $R0 "NT $R0" 6 + Goto lbl_done + + lbl_winnt_2000: + Strcpy $R0 '2000' + Goto lbl_done + + lbl_winnt_XP: + Strcpy $R0 'XP' + Goto lbl_done + + lbl_winnt_2003: + Strcpy $R0 '2003' + Goto lbl_done + + lbl_error: + Strcpy $R0 '' + lbl_done: + + Pop $R1 + Exch $R0 +FunctionEnd + diff -r 9695281b1aa1 -r 6a8440e9edba src/win32/nsis/langmacros.nsh --- a/src/win32/nsis/langmacros.nsh Sun May 15 18:16:20 2005 +0000 +++ b/src/win32/nsis/langmacros.nsh Sun May 15 18:53:23 2005 +0000 @@ -6,7 +6,7 @@ !ifndef "${LABEL}" !define "${LABEL}" "${VALUE}" !ifdef INSERT_DEFAULT - !warning "${LANG} lang file mising ${LABEL}, using default.." + !warning "${LANG} lang file missing ${LABEL}, using default..." !endif !endif !macroend @@ -45,6 +45,9 @@ !insertmacro GAIM_MACRO_LANGSTRING_INSERT GTK_WIMP_SECTION_TITLE ${CUR_LANG} !insertmacro GAIM_MACRO_LANGSTRING_INSERT GTK_BLUECURVE_SECTION_TITLE ${CUR_LANG} !insertmacro GAIM_MACRO_LANGSTRING_INSERT GTK_LIGHTHOUSEBLUE_SECTION_TITLE ${CUR_LANG} + !insertmacro GAIM_MACRO_LANGSTRING_INSERT GAIM_SHORTCUTS_SECTION_TITLE ${CUR_LANG} + !insertmacro GAIM_MACRO_LANGSTRING_INSERT GAIM_DESKTOP_SHORTCUT_SECTION_TITLE ${CUR_LANG} + !insertmacro GAIM_MACRO_LANGSTRING_INSERT GAIM_STARTMENU_SHORTCUT_SECTION_TITLE ${CUR_LANG} !insertmacro GAIM_MACRO_LANGSTRING_INSERT GAIM_SECTION_DESCRIPTION ${CUR_LANG} !insertmacro GAIM_MACRO_LANGSTRING_INSERT GTK_SECTION_DESCRIPTION ${CUR_LANG} !insertmacro GAIM_MACRO_LANGSTRING_INSERT GTK_THEMES_SECTION_DESCRIPTION ${CUR_LANG} @@ -52,6 +55,9 @@ !insertmacro GAIM_MACRO_LANGSTRING_INSERT GTK_WIMP_THEME_DESC ${CUR_LANG} !insertmacro GAIM_MACRO_LANGSTRING_INSERT GTK_BLUECURVE_THEME_DESC ${CUR_LANG} !insertmacro GAIM_MACRO_LANGSTRING_INSERT GTK_LIGHTHOUSEBLUE_THEME_DESC ${CUR_LANG} + !insertmacro GAIM_MACRO_LANGSTRING_INSERT GAIM_SHORTCUTS_SECTION_DESCRIPTION ${CUR_LANG} + !insertmacro GAIM_MACRO_LANGSTRING_INSERT GAIM_DESKTOP_SHORTCUT_DESC ${CUR_LANG} + !insertmacro GAIM_MACRO_LANGSTRING_INSERT GAIM_STARTMENU_SHORTCUT_DESC ${CUR_LANG} ; GTK+ Directory Page !insertmacro GAIM_MACRO_LANGSTRING_INSERT GTK_UPGRADE_PROMPT ${CUR_LANG} diff -r 9695281b1aa1 -r 6a8440e9edba src/win32/nsis/translations/english.nsh --- a/src/win32/nsis/translations/english.nsh Sun May 15 18:16:20 2005 +0000 +++ b/src/win32/nsis/translations/english.nsh Sun May 15 18:53:23 2005 +0000 @@ -28,6 +28,9 @@ !insertmacro GAIM_MACRO_DEFAULT_STRING GTK_WIMP_SECTION_TITLE "Wimp Theme" !insertmacro GAIM_MACRO_DEFAULT_STRING GTK_BLUECURVE_SECTION_TITLE "Bluecurve Theme" !insertmacro GAIM_MACRO_DEFAULT_STRING GTK_LIGHTHOUSEBLUE_SECTION_TITLE "Light House Blue Theme" +!insertmacro GAIM_MACRO_DEFAULT_STRING GAIM_SHORTCUTS_SECTION_TITLE "Shortcuts" +!insertmacro GAIM_MACRO_DEFAULT_STRING GAIM_DESKTOP_SHORTCUT_SECTION_TITLE "Desktop" +!insertmacro GAIM_MACRO_DEFAULT_STRING GAIM_STARTMENU_SHORTCUT_SECTION_TITLE "Start Menu" !insertmacro GAIM_MACRO_DEFAULT_STRING GAIM_SECTION_DESCRIPTION "Core Gaim files and dlls" !insertmacro GAIM_MACRO_DEFAULT_STRING GTK_SECTION_DESCRIPTION "A multi-platform GUI toolkit, used by Gaim" !insertmacro GAIM_MACRO_DEFAULT_STRING GTK_THEMES_SECTION_DESCRIPTION "GTK+ Themes can change the look and feel of GTK+ applications." @@ -35,6 +38,9 @@ !insertmacro GAIM_MACRO_DEFAULT_STRING GTK_WIMP_THEME_DESC "GTK-Wimp (Windows impersonator) is a GTK+ theme that blends well into the Windows desktop environment." !insertmacro GAIM_MACRO_DEFAULT_STRING GTK_BLUECURVE_THEME_DESC "The Bluecurve theme." !insertmacro GAIM_MACRO_DEFAULT_STRING GTK_LIGHTHOUSEBLUE_THEME_DESC "The Lighthouseblue theme." +!insertmacro GAIM_MACRO_DEFAULT_STRING GAIM_SHORTCUTS_SECTION_DESCRIPTION "Shortcuts for starting Gaim" +!insertmacro GAIM_MACRO_DEFAULT_STRING GAIM_DESKTOP_SHORTCUT_DESC "Create a shortcut to Gaim on the Desktop" +!insertmacro GAIM_MACRO_DEFAULT_STRING GAIM_STARTMENU_SHORTCUT_DESC "Create a Start Menu entry for Gaim" ; GTK+ Directory Page !insertmacro GAIM_MACRO_DEFAULT_STRING GTK_UPGRADE_PROMPT "An old version of the GTK+ runtime was found. Do you wish to upgrade?$\rNote: Gaim may not work unless you do."