WinGui: Add support for performing a silent install. (Patch by cookie23 - Jeremy...
authorsr55 <sr55.hb@outlook.com>
Thu, 11 Aug 2011 12:32:37 +0000 (12:32 +0000)
committersr55 <sr55.hb@outlook.com>
Thu, 11 Aug 2011 12:32:37 +0000 (12:32 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4166 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/Installer/Installer.nsi
win/CS/Installer/Installer64.nsi
win/CS/Installer/MakeNightly.nsi.tmpl
win/CS/Installer/MakeNightly64.nsi.tmpl

index 3436a804f70006e7e00a3d5241c3b5020dbe828e..2437b8ba94c4cf5033f7afea59bf68061d8d9037 100644 (file)
@@ -70,7 +70,7 @@ Function .onInit
   Pop $R0\r
 \r
   StrCmp $R0 0 +3\r
-  MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."\r
+  MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running." /SD IDOK\r
   Abort\r
 \r
   ;Remove previous version\r
@@ -81,13 +81,16 @@ Function .onInit
 \r
   MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \\r
   "${PRODUCT_NAME} is already installed. $\n$\nClick `OK` to remove the \\r
-  previous version or `Cancel` to continue." \\r
+  previous version or `Cancel` to continue." /SD IDOK \\r
   IDOK uninst\r
   goto done\r
 \r
  ;Run the uninstaller\r
   uninst:\r
+   IfSilent +3\r
    Exec $INSTDIR\uninst.exe\r
+   goto done\r
+   Exec '"$INSTDIR\uninst.exe" /S'\r
   done:\r
 FunctionEnd\r
 \r
@@ -100,7 +103,7 @@ Section "Handbrake" SEC01
   Call CheckFramework\r
      StrCmp $0 "1" +3\r
         StrCpy $InstallDotNET "Yes"\r
-      MessageBox MB_OK|MB_ICONINFORMATION "${PRODUCT_NAME} requires that the .NET Framework 4.0 is installed. The latest .NET Framework will be downloaded and installed automatically during installation of ${PRODUCT_NAME}."\r
+      MessageBox MB_OK|MB_ICONINFORMATION "${PRODUCT_NAME} requires that the .NET Framework 4.0 is installed. The latest .NET Framework will be downloaded and installed automatically during installation of ${PRODUCT_NAME}." /SD IDOK\r
      Pop $0\r
 \r
   ; Get .NET if required\r
@@ -171,11 +174,11 @@ SectionEnd
 \r
 Function un.onUninstSuccess\r
   HideWindow\r
-  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."\r
+  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." /SD IDOK\r
 FunctionEnd\r
 \r
 Function un.onInit\r
-  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2\r
+  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" /SD IDYES IDYES +2\r
   Abort\r
 FunctionEnd\r
 \r
index f055e15cb9e5c35f1cd1e994d3b8f46ff27dee6f..a21b4e0932750b469c57a627228fbb67c76d85e9 100644 (file)
@@ -70,7 +70,7 @@ Function .onInit
   Pop $R0\r
 \r
   StrCmp $R0 0 +3\r
-  MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."\r
+  MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running." /SD IDOK\r
   Abort\r
 \r
   ;Remove previous version\r
@@ -81,13 +81,16 @@ Function .onInit
 \r
   MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \\r
   "${PRODUCT_NAME} is already installed. $\n$\nClick `OK` to remove the \\r
-  previous version or `Cancel` to continue." \\r
+  previous version or `Cancel` to continue." /SD IDOK \\r
   IDOK uninst\r
   goto done\r
 \r
  ;Run the uninstaller\r
   uninst:\r
+   IfSilent +3\r
    Exec $INSTDIR\uninst.exe\r
+   goto done\r
+   Exec '"$INSTDIR\uninst.exe" /S'\r
   done:\r
 FunctionEnd\r
 \r
@@ -100,7 +103,7 @@ Section "Handbrake" SEC01
   Call CheckFramework\r
      StrCmp $0 "1" +3\r
         StrCpy $InstallDotNET "Yes"\r
-      MessageBox MB_OK|MB_ICONINFORMATION "${PRODUCT_NAME} requires that the .NET Framework 4.0 is installed. The latest .NET Framework will be downloaded and installed automatically during installation of ${PRODUCT_NAME}."\r
+      MessageBox MB_OK|MB_ICONINFORMATION "${PRODUCT_NAME} requires that the .NET Framework 4.0 is installed. The latest .NET Framework will be downloaded and installed automatically during installation of ${PRODUCT_NAME}." /SD IDOK\r
      Pop $0\r
 \r
   ; Get .NET if required\r
@@ -171,11 +174,11 @@ SectionEnd
 \r
 Function un.onUninstSuccess\r
   HideWindow\r
-  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."\r
+  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." /SD IDOK\r
 FunctionEnd\r
 \r
 Function un.onInit\r
-  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2\r
+  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" /SD IDYES IDYES +2\r
   Abort\r
 FunctionEnd\r
 \r
index bdcd4d7c8ce7248add9f173160012d7fd5975780..ea12bad1159996524d137e64659f405020749b46 100644 (file)
@@ -70,7 +70,7 @@ Function .onInit
   Pop $R0\r
 \r
   StrCmp $R0 0 +3\r
-  MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."\r
+  MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running." /SD IDOK\r
   Abort\r
 \r
   ;Remove previous version\r
@@ -81,13 +81,16 @@ Function .onInit
 \r
   MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \\r
   "${PRODUCT_NAME} is already installed. $\n$\nClick `OK` to remove the \\r
-  previous version or `Cancel` to continue." \\r
+  previous version or `Cancel` to continue." /SD IDOK \\r
   IDOK uninst\r
   goto done\r
 \r
  ;Run the uninstaller\r
   uninst:\r
+   IfSilent +3\r
    Exec $INSTDIR\uninst.exe\r
+   goto done\r
+   Exec '"$INSTDIR\uninst.exe" /S'\r
   done:\r
 FunctionEnd\r
 \r
@@ -100,7 +103,7 @@ Section "Handbrake" SEC01
   Call CheckFramework\r
      StrCmp $0 "1" +3\r
         StrCpy $InstallDotNET "Yes"\r
-      MessageBox MB_OK|MB_ICONINFORMATION "${PRODUCT_NAME} requires that the .NET Framework 4.0 is installed. The latest .NET Framework will be downloaded and installed automatically during installation of ${PRODUCT_NAME}."\r
+      MessageBox MB_OK|MB_ICONINFORMATION "${PRODUCT_NAME} requires that the .NET Framework 4.0 is installed. The latest .NET Framework will be downloaded and installed automatically during installation of ${PRODUCT_NAME}." /SD IDOK\r
      Pop $0\r
 \r
   ; Get .NET if required\r
@@ -163,11 +166,11 @@ SectionEnd
 \r
 Function un.onUninstSuccess\r
   HideWindow\r
-  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."\r
+  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." /SD IDOK\r
 FunctionEnd\r
 \r
 Function un.onInit\r
-  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2\r
+  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" /SD IDYES IDYES +2\r
   Abort\r
 FunctionEnd\r
 \r
index 40e8b3cf3e083c11ed731ff24a45d199e0a900fe..8d476685795f76a78a060e5a577051f53d8f42ba 100644 (file)
@@ -70,7 +70,7 @@ Function .onInit
   Pop $R0\r
 \r
   StrCmp $R0 0 +3\r
-  MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."\r
+  MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running." /SD IDOK\r
   Abort\r
 \r
   ;Remove previous version\r
@@ -81,13 +81,16 @@ Function .onInit
 \r
   MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \\r
   "${PRODUCT_NAME} is already installed. $\n$\nClick `OK` to remove the \\r
-  previous version or `Cancel` to continue." \\r
+  previous version or `Cancel` to continue." /SD IDOK \\r
   IDOK uninst\r
   goto done\r
 \r
  ;Run the uninstaller\r
   uninst:\r
+   IfSilent +3\r
    Exec $INSTDIR\uninst.exe\r
+   goto done\r
+   Exec '"$INSTDIR\uninst.exe" /S'\r
   done:\r
 FunctionEnd\r
 \r
@@ -100,7 +103,7 @@ Section "Handbrake" SEC01
   Call CheckFramework\r
      StrCmp $0 "1" +3\r
         StrCpy $InstallDotNET "Yes"\r
-      MessageBox MB_OK|MB_ICONINFORMATION "${PRODUCT_NAME} requires that the .NET Framework 4.0 is installed. The latest .NET Framework will be downloaded and installed automatically during installation of ${PRODUCT_NAME}."\r
+      MessageBox MB_OK|MB_ICONINFORMATION "${PRODUCT_NAME} requires that the .NET Framework 4.0 is installed. The latest .NET Framework will be downloaded and installed automatically during installation of ${PRODUCT_NAME}." /SD IDOK\r
      Pop $0\r
 \r
   ; Get .NET if required\r
@@ -163,11 +166,11 @@ SectionEnd
 \r
 Function un.onUninstSuccess\r
   HideWindow\r
-  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."\r
+  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." /SD IDOK\r
 FunctionEnd\r
 \r
 Function un.onInit\r
-  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2\r
+  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" /SD IDYES IDYES +2\r
   Abort\r
 FunctionEnd\r
 \r