[dia/dia-0-97] Improved Control Panel info, optional desktop shortcut.



commit 2549e866c5b84d8f1a1811ea087fc9ffa28b9add
Author: Steffen Macke <sdteffen sdteffen de>
Date:   Thu Mar 27 18:00:23 2014 +0100

    Improved Control Panel info, optional desktop shortcut.

 installer/win32/dia.nsi            |   51 +++++++++++++++++++++++++++--------
 installer/win32/gennsh.c           |    9 +++++-
 installer/win32/locale/english.nsh |    2 +
 3 files changed, 49 insertions(+), 13 deletions(-)
---
diff --git a/installer/win32/dia.nsi b/installer/win32/dia.nsi
index c13568b..610a652 100644
--- a/installer/win32/dia.nsi
+++ b/installer/win32/dia.nsi
@@ -101,6 +101,7 @@ SetDateSave on
 !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
 
 XPStyle On
+CRCCheck On
   
 VIAddVersionKey "ProductName" "Dia for Windows"
 VIAddVersionKey "CompanyName" "The Dia Developers"
@@ -226,9 +227,18 @@ Section $(DIA_SECTION_TITLE) SecDia
     WriteRegStr HKLM "${HKLM_CMD_PATHS_KEY}" "Path" "$R1\bin;$GTKBIN"
     WriteRegStr HKLM ${DIA_REG_KEY} "" "$INSTDIR"
     WriteRegStr HKLM ${DIA_REG_KEY} "Version" "${DIA_VERSION}"
-    WriteRegStr HKLM "${DIA_UNINSTALL_KEY}" "DisplayName" $(DIA_UNINSTALL_DESC)
+    WriteRegStr HKLM "${DIA_UNINSTALL_KEY}" "DisplayName" "Dia"
     WriteRegStr HKLM "${DIA_UNINSTALL_KEY}" "UninstallString" "$INSTDIR\${DIA_UNINST_EXE}"
-    WriteRegStr HKLM "${DIA_UNINSTALL_KEY}" "DisplayIcon" "$INSTDIR\${DIA_UNINST_EXE}"
+       WriteRegStr HKLM "${DIA_UNINSTALL_KEY}" "QuietUninstallString" "$\"$INSTDIR\${DIA_UNINST_EXE}$\" /S"
+    WriteRegStr HKLM "${DIA_UNINSTALL_KEY}" "DisplayIcon" "$INSTDIR\bin\dia.exe"
+       WriteRegStr HKLM "${DIA_UNINSTALL_KEY}" "InstallLocation" "$INSTDIR"
+       WriteRegStr HKLM "${DIA_UNINSTALL_KEY}" "URLInfoAbout" "http://dia-installer.de";
+       WriteRegStr HKLM "${DIA_UNINSTALL_KEY}" "DisplayVersion" "${DIA_VERSION}"
+       WriteRegDWORD HKLM "${DIA_UNINSTALL_KEY}" "NoModify" 1
+       WriteRegDWORD HKLM "${DIA_UNINSTALL_KEY}" "NoRepair" 1
+       WriteRegDWORD HKLM "${DIA_UNINSTALL_KEY}" "EstimatedSize" 70000
+       WriteRegStr HKLM "${DIA_UNINSTALL_KEY}" "Publisher" "The Dia Development Community"
+       
     ; Sets scope of the desktop and Start Menu entries for all users.
     SetShellVarContext "all"
     Goto dia_install_files
@@ -236,9 +246,17 @@ Section $(DIA_SECTION_TITLE) SecDia
   dia_hkcu:
     WriteRegStr HKCU ${DIA_REG_KEY} "" "$INSTDIR"
     WriteRegStr HKCU ${DIA_REG_KEY} "Version" "${DIA_VERSION}"
-    WriteRegStr HKCU "${DIA_UNINSTALL_KEY}" "DisplayName" $(DIA_UNINSTALL_DESC)
+    WriteRegStr HKCU "${DIA_UNINSTALL_KEY}" "DisplayName" "Dia"
     WriteRegStr HKCU "${DIA_UNINSTALL_KEY}" "UninstallString" "$INSTDIR\${DIA_UNINST_EXE}"
-    WriteRegStr HKCU "${DIA_UNINSTALL_KEY}" "DisplayIcon" "$INSTDIR\${DIA_UNINST_EXE}"
+       WriteRegStr HKCU "${DIA_UNINSTALL_KEY}" "QuietUninstallString" "$\"$INSTDIR\${DIA_UNINST_EXE}$\" /S"
+    WriteRegStr HKCU "${DIA_UNINSTALL_KEY}" "DisplayIcon" "$INSTDIR\bin\dia.exe"
+       WriteRegStr HKCU "${DIA_UNINSTALL_KEY}" "InstallLocation" "$INSTDIR"
+       WriteRegStr HKCU "${DIA_UNINSTALL_KEY}" "URLInfoAbout" "http://dia-installer.de";
+       WriteRegStr HKCU "${DIA_UNINSTALL_KEY}" "DisplayVersion" "${DIA_VERSION}"
+       WriteRegDWORD HKCU "${DIA_UNINSTALL_KEY}" "NoModify" 1
+       WriteRegDWORD HKCU "${DIA_UNINSTALL_KEY}" "NoRepair" 1
+       WriteRegDWORD HKCU "${DIA_UNINSTALL_KEY}" "EstimatedSize" 70000
+       WriteRegStr HKCU "${DIA_UNINSTALL_KEY}" "Publisher" "The Dia Development Community"
 
     Goto dia_install_files
 
@@ -282,8 +300,6 @@ ${File} "..\..\data\" "dia-splash.png"
 ${File} "..\..\" "COPYING"
 
 ${SetOutPath} "$INSTDIR\bin"
-; jEdit replacement: (^.*\\)(.*)$ 
-; \${File} "$1" "$2"
 ${File} "..\..\app\" "dia.exe"
 ${File} "..\..\app\" "diaw.exe"
 ${File} "..\..\app\" "dia-win-remote.exe"
@@ -3356,6 +3372,15 @@ ${File} "..\..\..\share\locale\zh_TW\LC_MESSAGES\" "gtk20.mo"
   
 SectionEnd
 
+Section /o $(DESKTOP_SECTION_TITLE) SecDesktop
+  SectionIn 2
+  ClearErrors
+  SetOverWrite On
+  ReadRegStr $0 HKU ".DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "My 
Pictures"
+  SetOutPath "$0"
+  CreateShortCut "$DESKTOP\Dia.lnk" "$INSTDIR\bin\diaw.exe" "--integrated"
+SectionEnd
+
 Section /o $(PYTHON_SECTION_TITLE) SecPython
   SectionIn RO
   ClearErrors
@@ -3487,6 +3512,8 @@ Section Uninstall
     RMDir "$SMPROGRAMS\Dia\French"
     RMDir "$SMPROGRAMS\Dia"
 
+       Delete "$DESKTOP\Dia.lnk"
+       
     ; File generated by installer
        Delete "$INSTDIR\etc\gtk-2.0\gdk-pixbuf.loaders"
        
@@ -4028,6 +4055,8 @@ Section Uninstall
        RMDir /REBOOTOK "$INSTDIR\samples\Fig"
        RMDir /REBOOTOK "$INSTDIR\samples"
        RMDir /REBOOTOK "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0\loaders"
+       RMDir /REBOOTOK "$INSTDIR\lib\gdk-pixbuf-2.0\2.10.0"
+       RMDir /REBOOTOK "$INSTDIR\lib\gdk-pixbuf-2.0"
        RMDir /REBOOTOK "$INSTDIR\lib\gtk-2.0\2.10.0\engines"
        RMDir /REBOOTOK "$INSTDIR\lib\gtk-2.0\2.10.0"
        RMDir /REBOOTOK "$INSTDIR\lib\gtk-2.0"
@@ -4071,12 +4100,10 @@ SectionEnd ; end of uninstall section
 ;--------------------------------
 ;Descriptions
 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-!insertmacro MUI_DESCRIPTION_TEXT ${SecDia} \
-       $(DIA_SECTION_DESCRIPTION)
-!insertmacro MUI_DESCRIPTION_TEXT ${SecTranslations} \
-       $(TRANSLATIONS_SECTION_DESCRIPTION)     
-!insertmacro MUI_DESCRIPTION_TEXT ${SecPython} \
-        $(PYTHON_SECTION_DESCRIPTION)     
+!insertmacro MUI_DESCRIPTION_TEXT ${SecDia} $(DIA_SECTION_DESCRIPTION)
+!insertmacro MUI_DESCRIPTION_TEXT ${SecTranslations} $(TRANSLATIONS_SECTION_DESCRIPTION)       
+!insertmacro MUI_DESCRIPTION_TEXT ${SecPython} $(PYTHON_SECTION_DESCRIPTION)
+!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} $(DESKTOP_SECTION_DESCRIPTION)                 
 
 !insertmacro MUI_FUNCTION_DESCRIPTION_END
 
diff --git a/installer/win32/gennsh.c b/installer/win32/gennsh.c
index fa48d16..becf78f 100755
--- a/installer/win32/gennsh.c
+++ b/installer/win32/gennsh.c
@@ -2,7 +2,7 @@
  * Copyright (C) 1998 Alexander Larsson
  *
  * gennsh.c
- * Copyright (C) 2009,2011,2013 Steffen Macke <sdteffen sdteffen de>
+ * Copyright (C) 2009,2011,2013, 2014 Steffen Macke <sdteffen sdteffen de>
  *
  * gennsh is a program that allows to generate locale file for the
  * Dia for Windows installer
@@ -65,6 +65,13 @@ int main(int argc, char *argv[])
   /* Installer message: Component description */
   printf("!define PYTHON_SECTION_DESCRIPTION \"%s\"\n", _("Support for the Python Scripting Language 2.3. Do 
not select this if Python is not installed."));
 
+  /* Installer message: Component name */
+  printf("!define DESKTOP_SECTION_TITLE \"%s\"\n", _("Desktop Shortcut"));
+
+  /* Installer message: Component description */
+  printf("!define DESKTOP_SECTION_DESCRIPTION \"%s\"\n", _("Create a shortcut on the Desktop."));
+
+
   /* Installer message: hyperlink text on finish page */
   printf("!define DIA_FINISH_VISIT_WEB_SITE \"%s\"\n", _("Visit the Dia for Windows Web Page"));
 
diff --git a/installer/win32/locale/english.nsh b/installer/win32/locale/english.nsh
index fad1b35..c1614fe 100644
--- a/installer/win32/locale/english.nsh
+++ b/installer/win32/locale/english.nsh
@@ -28,6 +28,8 @@
 !insertmacro DIA_MACRO_DEFAULT_STRING DIA_SECTION_DESCRIPTION          "Core Dia files and dlls"
 !insertmacro DIA_MACRO_DEFAULT_STRING PYTHON_SECTION_TITLE              "Python plug-in"
 !insertmacro DIA_MACRO_DEFAULT_STRING PYTHON_SECTION_DESCRIPTION              "Support for the Python 
Scripting Language 2.3. Do not select this if Python is not installed."
+!insertmacro DIA_MACRO_DEFAULT_STRING DESKTOP_SECTION_TITLE                    "Desktop Shortcut"
+!insertmacro DIA_MACRO_DEFAULT_STRING DESKTOP_SECTION_DESCRIPTION      "Create a Shortcut on the Desktop"
 
 ; Installer Finish Page
 !insertmacro DIA_MACRO_DEFAULT_STRING DIA_FINISH_VISIT_WEB_SITE                "Visit the Dia for Windows 
Web Page"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]