]> git.lyx.org Git - features.git/commitdiff
installer: enable to run it silently
authorUwe Stöhr <uwestoehr@lyx.org>
Tue, 18 Feb 2014 01:15:53 +0000 (02:15 +0100)
committerUwe Stöhr <uwestoehr@lyx.org>
Tue, 18 Feb 2014 01:15:53 +0000 (02:15 +0100)
development/Win32/packaging/installer/include/LaTeX.nsh
development/Win32/packaging/installer/include/init.nsh
development/Win32/packaging/installer/setup/configure.nsh
development/Win32/packaging/installer/setup/install.nsh

index 78833133c41ba0692c137f4dbadc9453f36314a2..70d50a8fe3de57d7f38fe9b7ef61cbe8d311fd24 100644 (file)
@@ -207,7 +207,7 @@ FunctionEnd
   
   ${if} $PathLaTeX == ""
    # launch MiKTeX's installer
-   MessageBox MB_OK|MB_ICONINFORMATION "$(LatexInfo)"
+   MessageBox MB_OK|MB_ICONINFORMATION "$(LatexInfo)" /SD IDOK
    ExecWait ${MiKTeXInstall}
    # test if MiKTeX is installed
    Call LaTeXActions
@@ -225,7 +225,7 @@ FunctionEnd
     StrCpy $LaTeXInstalled "MiKTeX"
     StrCpy $MiKTeXVersion ${MiKTeXDeliveredVersion}
    ${else}
-    MessageBox MB_OK|MB_ICONSTOP "$(LatexError1)"
+    MessageBox MB_OK|MB_ICONSTOP "$(LatexError1)" /SD IDOK
     SetOutPath $TEMP # to be able to delete the $INSTDIR
     RMDir /r $INSTDIR
     Abort
@@ -286,7 +286,7 @@ Function ConfigureMiKTeX
   ${andif} $MultiUser.Privileges != "Power"
    ${if} $0 == ""
     ${ifnot} ${FileExists} "$PathLaTeX\perl.exe"
-     MessageBox MB_OK|MB_ICONINFORMATION "$(MultipleIndexesNotAvailable)"
+     MessageBox MB_OK|MB_ICONINFORMATION "$(MultipleIndexesNotAvailable)" /SD IDOK
     ${endif}
    ${else}
     # ${FileExists} is disabled for now to repair existing LyX installations using 64bit MiKTeX
@@ -413,7 +413,7 @@ FunctionEnd
 Function UpdateMiKTeX
  # asks to update MiKTeX
 
-  MessageBox MB_YESNO|MB_ICONINFORMATION "$(MiKTeXInfo)" IDYES UpdateNow IDNO UpdateLater
+  MessageBox MB_YESNO|MB_ICONINFORMATION "$(MiKTeXInfo)" /SD IDNO IDYES UpdateNow IDNO UpdateLater
   UpdateNow:
   # the update wizard is started by the miktex-update.exe
   ${if} $MultiUser.Privileges != "Admin"
index 184e921b8b5cac15c71aefdedec11e4ead8e1cc9..eb5f7f1a0a1c3b823ea3f389cc8f487a45652119 100644 (file)
@@ -585,7 +585,7 @@ Function .onInit
 
   ${IfNot} ${IsNT}
   ${OrIfNot} ${AtLeastWinXP}
-    MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} ${APP_VERSION} requires Windows XP or later."
+    MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} ${APP_VERSION} requires Windows XP or later." /SD IDOK
     Quit
   ${EndIf}
   
@@ -593,13 +593,13 @@ Function .onInit
   System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${BundleExeFile}.Instance") i .r1 ?e'
   Pop $R0
   ${if} $R0 != "0"
-   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
+   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
    Abort
   ${endif}
   System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${ExeFile}.Instance") i .r1 ?e'
   Pop $R0
   ${if} $R0 != "0"
-   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
+   MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
    Abort
   ${endif}
   
@@ -626,7 +626,7 @@ Function .onInit
    ${endif}
   ${endif}
   ${if} $0 != ""
-   MessageBox MB_OK|MB_ICONSTOP "$(StillInstalled)"
+   MessageBox MB_OK|MB_ICONSTOP "$(StillInstalled)" /SD IDOK
    Abort
   ${endif}
   
@@ -659,7 +659,7 @@ Function .onInit
    # store the version number and reformat it temporarily for the error message
    StrCpy $R0 $OldVersionNumber
    StrCpy $OldVersionNumber $R5
-   MessageBox MB_OK|MB_ICONSTOP "$(NewerInstalled)"
+   MessageBox MB_OK|MB_ICONSTOP "$(NewerInstalled)" /SD IDOK
    StrCpy $OldVersionNumber $R0
    Abort
   ${endif}
@@ -1359,7 +1359,7 @@ Function un.onInit
   # Check that LyX is not currently running
   FindProcDLL::FindProc "lyx.exe"
   ${if} $R0 == "1"
-   MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)"
+   MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)" /SD IDOK
    Abort
   ${endif}
 
@@ -1377,14 +1377,14 @@ Function un.onInit
   ${if} $0 != ""
   ${andif} $MultiUser.Privileges != "Admin"
   ${andif} $MultiUser.Privileges != "Power"
-   MessageBox MB_OK|MB_ICONSTOP "$(UnNotAdminLabel)"
+   MessageBox MB_OK|MB_ICONSTOP "$(UnNotAdminLabel)" /SD IDOK
    Abort
   ${endif}
   # warning when LyX couldn't be found in the registry
   ${if} $0 == "" # check in HKCU
    ReadRegStr $0 HKCU "${APP_UNINST_KEY}" "DisplayVersion"
    ${if} $0 == ""
-     MessageBox MB_OK|MB_ICONEXCLAMATION "$(UnNotInRegistryLabel)"
+     MessageBox MB_OK|MB_ICONEXCLAMATION "$(UnNotInRegistryLabel)" /SD IDOK
    ${endif}
   ${endif}
   
@@ -1410,7 +1410,7 @@ Function un.onInit
   ${endif}
 
   # question message if the user really wants to uninstall LyX
-  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(UnReallyRemoveLabel)" IDYES +2 # continue if yes
+  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(UnReallyRemoveLabel)" /SD IDYES IDYES +2 # continue if yes
   Abort
 
 FunctionEnd
index 0601a1da90def58f931e273d61bec085224f9cd3..f8040ae9a9ae36b6abe8ec2492483d87268ba18e 100644 (file)
@@ -22,6 +22,8 @@ Section -InstallData
   
   # Start Menu shortcut
   SetOutPath "$INSTDIR\bin" # this is the folder in which the shortcut is executed
+  IfSilent 0 +2
+  StrCpy $StartmenuFolder "${APP_DIR}"
   CreateDirectory "$SMPROGRAMS\$StartmenuFolder"
   CreateShortCut "$SMPROGRAMS\$StartmenuFolder\${APP_NAME}.lnk" "$INSTDIR\${APP_RUN}" "" "$INSTDIR\${APP_RUN}" "" "" "" "${APP_INFO}"
   # Link to www.lyx.org and to the Wiki
@@ -170,7 +172,7 @@ Section -Configure
   ${endif}
   FileClose $R1
   IfErrors 0 +2
-   MessageBox MB_OK|MB_ICONEXCLAMATION "$(ModifyingConfigureFailed)"
+   MessageBox MB_OK|MB_ICONEXCLAMATION "$(ModifyingConfigureFailed)" /SD IDOK
   ClearErrors
 
 SectionEnd
@@ -187,7 +189,7 @@ Section -PSPrinter
    # Install printer and driver
    ExecWait '$PrinterConf /if /f "$WINDIR\inf\ntprint.inf" /b "Metafile to EPS Converter" /r "FILE:" /m "MS Publisher Imagesetter"'
   ${else}
-   MessageBox MB_OK|MB_ICONINFORMATION "$(MetafileNotAvailable)"
+   MessageBox MB_OK|MB_ICONINFORMATION "$(MetafileNotAvailable)" /SD IDOK
   ${endif}
 
 SectionEnd
index 27e5fba10ce06dba9b2106cc6c9baf9444d1e384..262fec5025ec5c5dbba353c975e4940923dbc54c 100644 (file)
@@ -114,7 +114,9 @@ Section -ProgramFiles SecProgramFiles
    ${if} $PathBibTeXEditor == ""
    ${andif} $InstallJabRef == "true"
     # launch installer
-    MessageBox MB_OK|MB_ICONINFORMATION "$(JabRefInfo)"
+    MessageBox MB_OK|MB_ICONINFORMATION "$(JabRefInfo)" /SD IDOK
+    IfSilent 0 +2
+    ExecWait "$INSTDIR\${JabRefInstall} /S"
     ExecWait "$INSTDIR\${JabRefInstall}"
     # test if JabRef is now installed
     StrCpy $PathBibTeXEditor ""
@@ -127,7 +129,7 @@ Section -ProgramFiles SecProgramFiles
      ReadRegStr $PathBibTeXEditor HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "StartMenu"
     ${endif}
     ${if} $PathBibTeXEditor == ""
-     MessageBox MB_OK|MB_ICONEXCLAMATION "$(JabRefError)"
+     MessageBox MB_OK|MB_ICONEXCLAMATION "$(JabRefError)" /SD IDOK
     ${else}
      # special entry that it was installed together with LyX
      # so that we can later uninstall it together with LyX