mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
installer: enable to run it silently
This commit is contained in:
parent
59828e02bc
commit
2dc0ec25d3
@ -207,7 +207,7 @@ FunctionEnd
|
|||||||
|
|
||||||
${if} $PathLaTeX == ""
|
${if} $PathLaTeX == ""
|
||||||
# launch MiKTeX's installer
|
# launch MiKTeX's installer
|
||||||
MessageBox MB_OK|MB_ICONINFORMATION "$(LatexInfo)"
|
MessageBox MB_OK|MB_ICONINFORMATION "$(LatexInfo)" /SD IDOK
|
||||||
ExecWait ${MiKTeXInstall}
|
ExecWait ${MiKTeXInstall}
|
||||||
# test if MiKTeX is installed
|
# test if MiKTeX is installed
|
||||||
Call LaTeXActions
|
Call LaTeXActions
|
||||||
@ -225,7 +225,7 @@ FunctionEnd
|
|||||||
StrCpy $LaTeXInstalled "MiKTeX"
|
StrCpy $LaTeXInstalled "MiKTeX"
|
||||||
StrCpy $MiKTeXVersion ${MiKTeXDeliveredVersion}
|
StrCpy $MiKTeXVersion ${MiKTeXDeliveredVersion}
|
||||||
${else}
|
${else}
|
||||||
MessageBox MB_OK|MB_ICONSTOP "$(LatexError1)"
|
MessageBox MB_OK|MB_ICONSTOP "$(LatexError1)" /SD IDOK
|
||||||
SetOutPath $TEMP # to be able to delete the $INSTDIR
|
SetOutPath $TEMP # to be able to delete the $INSTDIR
|
||||||
RMDir /r $INSTDIR
|
RMDir /r $INSTDIR
|
||||||
Abort
|
Abort
|
||||||
@ -286,7 +286,7 @@ Function ConfigureMiKTeX
|
|||||||
${andif} $MultiUser.Privileges != "Power"
|
${andif} $MultiUser.Privileges != "Power"
|
||||||
${if} $0 == ""
|
${if} $0 == ""
|
||||||
${ifnot} ${FileExists} "$PathLaTeX\perl.exe"
|
${ifnot} ${FileExists} "$PathLaTeX\perl.exe"
|
||||||
MessageBox MB_OK|MB_ICONINFORMATION "$(MultipleIndexesNotAvailable)"
|
MessageBox MB_OK|MB_ICONINFORMATION "$(MultipleIndexesNotAvailable)" /SD IDOK
|
||||||
${endif}
|
${endif}
|
||||||
${else}
|
${else}
|
||||||
# ${FileExists} is disabled for now to repair existing LyX installations using 64bit MiKTeX
|
# ${FileExists} is disabled for now to repair existing LyX installations using 64bit MiKTeX
|
||||||
@ -413,7 +413,7 @@ FunctionEnd
|
|||||||
Function UpdateMiKTeX
|
Function UpdateMiKTeX
|
||||||
# asks to update MiKTeX
|
# 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:
|
UpdateNow:
|
||||||
# the update wizard is started by the miktex-update.exe
|
# the update wizard is started by the miktex-update.exe
|
||||||
${if} $MultiUser.Privileges != "Admin"
|
${if} $MultiUser.Privileges != "Admin"
|
||||||
|
@ -585,7 +585,7 @@ Function .onInit
|
|||||||
|
|
||||||
${IfNot} ${IsNT}
|
${IfNot} ${IsNT}
|
||||||
${OrIfNot} ${AtLeastWinXP}
|
${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
|
Quit
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
@ -593,13 +593,13 @@ Function .onInit
|
|||||||
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${BundleExeFile}.Instance") i .r1 ?e'
|
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${BundleExeFile}.Instance") i .r1 ?e'
|
||||||
Pop $R0
|
Pop $R0
|
||||||
${if} $R0 != "0"
|
${if} $R0 != "0"
|
||||||
MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
|
MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
|
||||||
Abort
|
Abort
|
||||||
${endif}
|
${endif}
|
||||||
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${ExeFile}.Instance") i .r1 ?e'
|
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${ExeFile}.Instance") i .r1 ?e'
|
||||||
Pop $R0
|
Pop $R0
|
||||||
${if} $R0 != "0"
|
${if} $R0 != "0"
|
||||||
MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)"
|
MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
|
||||||
Abort
|
Abort
|
||||||
${endif}
|
${endif}
|
||||||
|
|
||||||
@ -626,7 +626,7 @@ Function .onInit
|
|||||||
${endif}
|
${endif}
|
||||||
${endif}
|
${endif}
|
||||||
${if} $0 != ""
|
${if} $0 != ""
|
||||||
MessageBox MB_OK|MB_ICONSTOP "$(StillInstalled)"
|
MessageBox MB_OK|MB_ICONSTOP "$(StillInstalled)" /SD IDOK
|
||||||
Abort
|
Abort
|
||||||
${endif}
|
${endif}
|
||||||
|
|
||||||
@ -659,7 +659,7 @@ Function .onInit
|
|||||||
# store the version number and reformat it temporarily for the error message
|
# store the version number and reformat it temporarily for the error message
|
||||||
StrCpy $R0 $OldVersionNumber
|
StrCpy $R0 $OldVersionNumber
|
||||||
StrCpy $OldVersionNumber $R5
|
StrCpy $OldVersionNumber $R5
|
||||||
MessageBox MB_OK|MB_ICONSTOP "$(NewerInstalled)"
|
MessageBox MB_OK|MB_ICONSTOP "$(NewerInstalled)" /SD IDOK
|
||||||
StrCpy $OldVersionNumber $R0
|
StrCpy $OldVersionNumber $R0
|
||||||
Abort
|
Abort
|
||||||
${endif}
|
${endif}
|
||||||
@ -1359,7 +1359,7 @@ Function un.onInit
|
|||||||
# Check that LyX is not currently running
|
# Check that LyX is not currently running
|
||||||
FindProcDLL::FindProc "lyx.exe"
|
FindProcDLL::FindProc "lyx.exe"
|
||||||
${if} $R0 == "1"
|
${if} $R0 == "1"
|
||||||
MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)"
|
MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)" /SD IDOK
|
||||||
Abort
|
Abort
|
||||||
${endif}
|
${endif}
|
||||||
|
|
||||||
@ -1377,14 +1377,14 @@ Function un.onInit
|
|||||||
${if} $0 != ""
|
${if} $0 != ""
|
||||||
${andif} $MultiUser.Privileges != "Admin"
|
${andif} $MultiUser.Privileges != "Admin"
|
||||||
${andif} $MultiUser.Privileges != "Power"
|
${andif} $MultiUser.Privileges != "Power"
|
||||||
MessageBox MB_OK|MB_ICONSTOP "$(UnNotAdminLabel)"
|
MessageBox MB_OK|MB_ICONSTOP "$(UnNotAdminLabel)" /SD IDOK
|
||||||
Abort
|
Abort
|
||||||
${endif}
|
${endif}
|
||||||
# warning when LyX couldn't be found in the registry
|
# warning when LyX couldn't be found in the registry
|
||||||
${if} $0 == "" # check in HKCU
|
${if} $0 == "" # check in HKCU
|
||||||
ReadRegStr $0 HKCU "${APP_UNINST_KEY}" "DisplayVersion"
|
ReadRegStr $0 HKCU "${APP_UNINST_KEY}" "DisplayVersion"
|
||||||
${if} $0 == ""
|
${if} $0 == ""
|
||||||
MessageBox MB_OK|MB_ICONEXCLAMATION "$(UnNotInRegistryLabel)"
|
MessageBox MB_OK|MB_ICONEXCLAMATION "$(UnNotInRegistryLabel)" /SD IDOK
|
||||||
${endif}
|
${endif}
|
||||||
${endif}
|
${endif}
|
||||||
|
|
||||||
@ -1410,7 +1410,7 @@ Function un.onInit
|
|||||||
${endif}
|
${endif}
|
||||||
|
|
||||||
# question message if the user really wants to uninstall LyX
|
# 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
|
Abort
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
@ -22,6 +22,8 @@ Section -InstallData
|
|||||||
|
|
||||||
# Start Menu shortcut
|
# Start Menu shortcut
|
||||||
SetOutPath "$INSTDIR\bin" # this is the folder in which the shortcut is executed
|
SetOutPath "$INSTDIR\bin" # this is the folder in which the shortcut is executed
|
||||||
|
IfSilent 0 +2
|
||||||
|
StrCpy $StartmenuFolder "${APP_DIR}"
|
||||||
CreateDirectory "$SMPROGRAMS\$StartmenuFolder"
|
CreateDirectory "$SMPROGRAMS\$StartmenuFolder"
|
||||||
CreateShortCut "$SMPROGRAMS\$StartmenuFolder\${APP_NAME}.lnk" "$INSTDIR\${APP_RUN}" "" "$INSTDIR\${APP_RUN}" "" "" "" "${APP_INFO}"
|
CreateShortCut "$SMPROGRAMS\$StartmenuFolder\${APP_NAME}.lnk" "$INSTDIR\${APP_RUN}" "" "$INSTDIR\${APP_RUN}" "" "" "" "${APP_INFO}"
|
||||||
# Link to www.lyx.org and to the Wiki
|
# Link to www.lyx.org and to the Wiki
|
||||||
@ -170,7 +172,7 @@ Section -Configure
|
|||||||
${endif}
|
${endif}
|
||||||
FileClose $R1
|
FileClose $R1
|
||||||
IfErrors 0 +2
|
IfErrors 0 +2
|
||||||
MessageBox MB_OK|MB_ICONEXCLAMATION "$(ModifyingConfigureFailed)"
|
MessageBox MB_OK|MB_ICONEXCLAMATION "$(ModifyingConfigureFailed)" /SD IDOK
|
||||||
ClearErrors
|
ClearErrors
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
@ -187,7 +189,7 @@ Section -PSPrinter
|
|||||||
# Install printer and driver
|
# Install printer and driver
|
||||||
ExecWait '$PrinterConf /if /f "$WINDIR\inf\ntprint.inf" /b "Metafile to EPS Converter" /r "FILE:" /m "MS Publisher Imagesetter"'
|
ExecWait '$PrinterConf /if /f "$WINDIR\inf\ntprint.inf" /b "Metafile to EPS Converter" /r "FILE:" /m "MS Publisher Imagesetter"'
|
||||||
${else}
|
${else}
|
||||||
MessageBox MB_OK|MB_ICONINFORMATION "$(MetafileNotAvailable)"
|
MessageBox MB_OK|MB_ICONINFORMATION "$(MetafileNotAvailable)" /SD IDOK
|
||||||
${endif}
|
${endif}
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
@ -114,7 +114,9 @@ Section -ProgramFiles SecProgramFiles
|
|||||||
${if} $PathBibTeXEditor == ""
|
${if} $PathBibTeXEditor == ""
|
||||||
${andif} $InstallJabRef == "true"
|
${andif} $InstallJabRef == "true"
|
||||||
# launch installer
|
# 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}"
|
ExecWait "$INSTDIR\${JabRefInstall}"
|
||||||
# test if JabRef is now installed
|
# test if JabRef is now installed
|
||||||
StrCpy $PathBibTeXEditor ""
|
StrCpy $PathBibTeXEditor ""
|
||||||
@ -127,7 +129,7 @@ Section -ProgramFiles SecProgramFiles
|
|||||||
ReadRegStr $PathBibTeXEditor HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "StartMenu"
|
ReadRegStr $PathBibTeXEditor HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "StartMenu"
|
||||||
${endif}
|
${endif}
|
||||||
${if} $PathBibTeXEditor == ""
|
${if} $PathBibTeXEditor == ""
|
||||||
MessageBox MB_OK|MB_ICONEXCLAMATION "$(JabRefError)"
|
MessageBox MB_OK|MB_ICONEXCLAMATION "$(JabRefError)" /SD IDOK
|
||||||
${else}
|
${else}
|
||||||
# special entry that it was installed together with LyX
|
# special entry that it was installed together with LyX
|
||||||
# so that we can later uninstall it together with LyX
|
# so that we can later uninstall it together with LyX
|
||||||
|
Loading…
Reference in New Issue
Block a user