mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
installer:
- infrastructures: merge the InstallActions file as requested by Christian - updated documentation and structure graphic - some more changes due to update to MiKTeX 2.6 - updates git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18357 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
daf8c932ce
commit
975fca2f74
@ -30,7 +30,6 @@ FunctionEnd
|
|||||||
|
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
|
|
||||||
|
|
||||||
!if ${INSTALLER_TYPE} == "NotUpdate" # only for Small and Complete installer
|
!if ${INSTALLER_TYPE} == "NotUpdate" # only for Small and Complete installer
|
||||||
|
|
||||||
Function DownloadDictionary
|
Function DownloadDictionary
|
||||||
@ -106,11 +105,16 @@ FunctionEnd
|
|||||||
|
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
|
|
||||||
|
|
||||||
!if ${INSTALLER_TYPE} == "NotUpdate" # only for Small and Complete installer
|
!if ${INSTALLER_TYPE} == "NotUpdate" # only for Small and Complete installer
|
||||||
|
|
||||||
Function InstallAspellDictionary
|
Function InstallAspellDictionary
|
||||||
|
# install Aspell dictionaries
|
||||||
|
|
||||||
|
# we only have a norwegian dictionary available
|
||||||
|
${if} $LangCode == "nb_NO"
|
||||||
|
StrCpy $LangCode "no_NO"
|
||||||
|
${endif}
|
||||||
|
|
||||||
StrCpy $AspellInstallYes ""
|
StrCpy $AspellInstallYes ""
|
||||||
|
|
||||||
# install the english dictionary if not already installed
|
# install the english dictionary if not already installed
|
||||||
|
@ -109,6 +109,33 @@ Function ConfigureLyX
|
|||||||
# this folder is automatically created by LyX when it is first started but we want to start LyX with a specific session file,
|
# this folder is automatically created by LyX when it is first started but we want to start LyX with a specific session file,
|
||||||
# so we create this folder before LyX starts and copy there the session file
|
# so we create this folder before LyX starts and copy there the session file
|
||||||
Call CreateAppPathSub # function from LyXUtils.nsh
|
Call CreateAppPathSub # function from LyXUtils.nsh
|
||||||
|
|
||||||
|
# delete unnecessary files
|
||||||
|
${if} $DelPythonFiles == "True"
|
||||||
|
Delete $INSTDIR\bin\python.exe
|
||||||
|
Delete $INSTDIR\bin\python25.dll
|
||||||
|
Delete $INSTDIR\bin\Python-License.txt
|
||||||
|
RMDir /r $INSTDIR\bin\Lib
|
||||||
|
RMDir /r $INSTDIR\bin\DLLs
|
||||||
|
${endif}
|
||||||
|
RMDir /r $INSTDIR\external
|
||||||
|
|
||||||
|
# create a bat-file to start configure in a console window so that the user see the progress
|
||||||
|
# of the configuration and to have a signal when the configuration is ready to start LyX
|
||||||
|
# this is important when LyX is installed together with MiKTeX or when LyX is installed for the first
|
||||||
|
# time on a computer, because the installation of missing LaTeX-files required by LyX could last minutes
|
||||||
|
# a batch file is needed because simply calling
|
||||||
|
# ExecWait '"$PythonPath\python.exe" "$INSTDIR\Resources\configure.py"'
|
||||||
|
# creates the config files in $PythonPath
|
||||||
|
${if} $PythonPath == ""
|
||||||
|
StrCpy $PythonPath "$INSTDIR\bin"
|
||||||
|
${endif}
|
||||||
|
StrCpy $1 $INSTDIR 2 # get drive letter
|
||||||
|
FileOpen $R1 "$INSTDIR\Resources\configLyX.bat" w
|
||||||
|
FileWrite $R1 '$1$\r$\n\
|
||||||
|
cd $INSTDIR\Resources\$\r$\n\
|
||||||
|
"$PythonPath\python.exe" configure.py'
|
||||||
|
FileClose $R1
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
@ -0,0 +1,124 @@
|
|||||||
|
# this file contains the main installer sections
|
||||||
|
|
||||||
|
!if ${INSTALLER_VERSION} == "Complete"
|
||||||
|
|
||||||
|
# The '-' makes the section invisible.
|
||||||
|
Section "-Installation actions" SecInstallation
|
||||||
|
|
||||||
|
# dummy actions to avoid NSIS warnings
|
||||||
|
StrCpy $FileName ""
|
||||||
|
StrCpy $NewString ""
|
||||||
|
StrCpy $OldString ""
|
||||||
|
|
||||||
|
# extract all files
|
||||||
|
SetOutPath "$INSTDIR"
|
||||||
|
File /r "${PRODUCT_SOURCEDIR}\bin"
|
||||||
|
File /r "${PRODUCT_SOURCEDIR}\etc"
|
||||||
|
File /r "${PRODUCT_SOURCEDIR}\Resources"
|
||||||
|
File /r "${PRODUCT_SOURCEDIR}\external"
|
||||||
|
|
||||||
|
# install MiKTeX if not already installed
|
||||||
|
Call InstallMiKTeX # function from LaTeX.nsh
|
||||||
|
|
||||||
|
# install Ghostscript if not already installed
|
||||||
|
Call Ghostscript # function from InstallThirdPartyProgs.nsh
|
||||||
|
|
||||||
|
# install ImageMagick if not already installed
|
||||||
|
Call ImageMagick # function from InstallThirdPartyProgs.nsh
|
||||||
|
|
||||||
|
# install Aspell if not already installed
|
||||||
|
Call InstallAspell # function from Aspell.nsh
|
||||||
|
|
||||||
|
# install Aiksaurus if not already installed
|
||||||
|
Call Aiksaurus # function from InstallThirdPartyProgs.nsh
|
||||||
|
|
||||||
|
# install GSview if not already installed and the user selected it
|
||||||
|
Call PostScript # function from InstallThirdPartyProgs.nsh
|
||||||
|
|
||||||
|
# install JabRef if not already installed and the user selected it
|
||||||
|
Call BibTeX # function from InstallThirdPartyProgs.nsh
|
||||||
|
|
||||||
|
# install the LaTeX class files that are delivered with LyX
|
||||||
|
# and enable MiKTeX's automatic package installation
|
||||||
|
Call ConfigureMiKTeX # Function from LaTeX.nsh
|
||||||
|
|
||||||
|
# install Aspell dictionaries
|
||||||
|
Call InstallAspellDictionary # function from Aspell.nsh
|
||||||
|
|
||||||
|
# configure LyX
|
||||||
|
Call ConfigureLyX # Function from ConfigLyX.nsh
|
||||||
|
|
||||||
|
# refresh shell, update the environment variables otherwise the first
|
||||||
|
# configure run will fail when MiKTeX was just installed
|
||||||
|
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
|
||||||
|
|
||||||
|
# create Uninstaller
|
||||||
|
WriteUninstaller "${PRODUCT_UNINSTALL_EXE}"
|
||||||
|
|
||||||
|
# run LyX's configure script
|
||||||
|
MessageBox MB_OK|MB_ICONINFORMATION "$(LatexConfigInfo)"
|
||||||
|
ExecWait '"$INSTDIR\Resources\configLyX.bat"'
|
||||||
|
Delete "$INSTDIR\Resources\configLyX.bat"
|
||||||
|
|
||||||
|
# ask to update MiKTeX
|
||||||
|
Call UpdateMiKTeX # function from latex.nsh
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
!endif # endif ${INSTALLER_VERSION} == "Complete"
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
!if ${INSTALLER_VERSION} == "Small"
|
||||||
|
|
||||||
|
# The '-' makes the section invisible.
|
||||||
|
Section "-Installation actions" SecInstallation
|
||||||
|
|
||||||
|
# dummy actions to avoid NSIS warnings
|
||||||
|
StrCpy $FileName ""
|
||||||
|
StrCpy $NewString ""
|
||||||
|
StrCpy $OldString ""
|
||||||
|
|
||||||
|
# extract all files
|
||||||
|
SetOutPath "$INSTDIR"
|
||||||
|
File /r "${PRODUCT_SOURCEDIR}\bin"
|
||||||
|
File /r "${PRODUCT_SOURCEDIR}\etc"
|
||||||
|
File /r "${PRODUCT_SOURCEDIR}\Resources"
|
||||||
|
|
||||||
|
# install GhostScript if not already installed
|
||||||
|
Call Ghostscript # function from InstallThirdPartyProgs.nsh
|
||||||
|
|
||||||
|
# install ImageMagick if not already installed
|
||||||
|
Call ImageMagick # function from InstallThirdPartyProgs.nsh
|
||||||
|
|
||||||
|
# install Aspell if not already installed
|
||||||
|
Call InstallAspell # function from Aspell.nsh
|
||||||
|
|
||||||
|
# install Aiksaurus if not already installed
|
||||||
|
Call Aiksaurus # function from InstallThirdPartyProgs.nsh
|
||||||
|
|
||||||
|
# install the LaTeX class files that are delivered with LyX
|
||||||
|
# and enable MiKTeX's automatic package installation
|
||||||
|
Call ConfigureMiKTeX # Function from LaTeX.nsh
|
||||||
|
|
||||||
|
# install Aspell dictionaries
|
||||||
|
Call InstallAspellDictionary # function from Aspell.nsh
|
||||||
|
|
||||||
|
# configure LyX
|
||||||
|
Call ConfigureLyX # Function from ConfigLyX.nsh
|
||||||
|
|
||||||
|
# create Uninstaller
|
||||||
|
WriteUninstaller "${PRODUCT_UNINSTALL_EXE}"
|
||||||
|
|
||||||
|
# run LyX's configure script
|
||||||
|
MessageBox MB_OK|MB_ICONINFORMATION "$(LatexConfigInfo)"
|
||||||
|
ExecWait '"$INSTDIR\Resources\configLyX.bat"'
|
||||||
|
Delete "$INSTDIR\Resources\configLyX.bat"
|
||||||
|
|
||||||
|
# ask to update MiKTeX
|
||||||
|
Call UpdateMiKTeX # function from latex.nsh
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
!endif # endif ${INSTALLER_VERSION} == "Small"
|
||||||
|
|
@ -1,157 +0,0 @@
|
|||||||
# this file contains the main installer section
|
|
||||||
|
|
||||||
# The '-' makes the section invisible.
|
|
||||||
Section "-Installation actions" SecInstallation
|
|
||||||
|
|
||||||
# dummy actions to avoid NSIS warnings
|
|
||||||
StrCpy $FileName ""
|
|
||||||
StrCpy $NewString ""
|
|
||||||
StrCpy $OldString ""
|
|
||||||
|
|
||||||
# extract all files
|
|
||||||
SetOutPath "$INSTDIR"
|
|
||||||
File /r "${PRODUCT_SOURCEDIR}\bin"
|
|
||||||
File /r "${PRODUCT_SOURCEDIR}\etc"
|
|
||||||
File /r "${PRODUCT_SOURCEDIR}\Resources"
|
|
||||||
|
|
||||||
# install GhostScript if not already installed
|
|
||||||
Call Ghostscript
|
|
||||||
|
|
||||||
# install ImageMagick if not already installed
|
|
||||||
Call ImageMagick
|
|
||||||
|
|
||||||
# install Aspell if not already installed
|
|
||||||
Call InstallAspell # function from Aspell.nsh
|
|
||||||
|
|
||||||
# install Aiksaurus if not already installed
|
|
||||||
Call Aiksaurus
|
|
||||||
|
|
||||||
# install the LaTeX class files that are delivered with LyX
|
|
||||||
# and enable MiKTeX's automatic package installation
|
|
||||||
Call ConfigureMiKTeX # Function from LaTeX.nsh
|
|
||||||
|
|
||||||
# install Aspell dictionaries
|
|
||||||
${if} $LangCode == "nb_NO"
|
|
||||||
StrCpy $LangCode "no_NO" # we only have a norwegian dictionary available
|
|
||||||
${endif}
|
|
||||||
Call InstallAspellDictionary # function from Aspell.nsh
|
|
||||||
|
|
||||||
# configure LyX
|
|
||||||
Call ConfigureLyX # Function from ConfigLyX.nsh
|
|
||||||
|
|
||||||
# delete unnecessary files
|
|
||||||
${if} $DelPythonFiles == "True"
|
|
||||||
Delete $INSTDIR\bin\python.exe
|
|
||||||
Delete $INSTDIR\bin\python25.dll
|
|
||||||
Delete $INSTDIR\bin\Python-License.txt
|
|
||||||
RMDir /r $INSTDIR\bin\Lib
|
|
||||||
RMDir /r $INSTDIR\bin\DLLs
|
|
||||||
${endif}
|
|
||||||
RMDir /r $INSTDIR\external
|
|
||||||
|
|
||||||
# create Uninstaller
|
|
||||||
WriteUninstaller "${PRODUCT_UNINSTALL_EXE}"
|
|
||||||
|
|
||||||
# run LyX's configure script
|
|
||||||
# create a bat-file to start configure in a console window so that the user see the progress
|
|
||||||
# of the configuration and to have a signal when the configuration is ready to start LyX
|
|
||||||
# this is important when LyX is installed together with MiKTeX or when LyX is installed for the first
|
|
||||||
# time on a computer, because the installation of missing LaTeX-files required by LyX could last minutes
|
|
||||||
# a batch file is needed because simply calling ExecWait '"$PythonPath\python.exe" "$INSTDIR\Resources\configure.py"'
|
|
||||||
# creates the config files in $PythonPath
|
|
||||||
${if} $PythonPath == ""
|
|
||||||
StrCpy $PythonPath "$INSTDIR\bin"
|
|
||||||
${endif}
|
|
||||||
StrCpy $1 $INSTDIR 2 # get drive letter
|
|
||||||
FileOpen $R1 "$INSTDIR\Resources\configLyX.bat" w
|
|
||||||
FileWrite $R1 '$1$\r$\n\
|
|
||||||
cd $INSTDIR\Resources\$\r$\n\
|
|
||||||
"$PythonPath\python.exe" configure.py'
|
|
||||||
FileClose $R1
|
|
||||||
MessageBox MB_OK|MB_ICONINFORMATION "$(LatexConfigInfo)"
|
|
||||||
ExecWait '"$INSTDIR\Resources\configLyX.bat"'
|
|
||||||
Delete "$INSTDIR\Resources\configLyX.bat"
|
|
||||||
|
|
||||||
# ask to update MiKTeX
|
|
||||||
${if} $MiKTeXInstalled == "yes"
|
|
||||||
MessageBox MB_YESNO|MB_ICONINFORMATION "$(MiKTeXInfo)" IDYES UpdateNow IDNO UpdateLater
|
|
||||||
UpdateNow:
|
|
||||||
StrCpy $0 $LaTeXPath -4 # remove "\bin"
|
|
||||||
ExecWait '"$LaTeXPath\copystart.exe" "$0\config\update.dat"' # run MiKTeX's update wizard
|
|
||||||
UpdateLater:
|
|
||||||
${endif}
|
|
||||||
|
|
||||||
# save MiKTeX's install path to be able to remove LyX's LaTeX-files in the uninstaller
|
|
||||||
FileOpen $R1 "$INSTDIR\Resources\uninstallPaths.dat" w
|
|
||||||
FileWrite $R1 '$LaTeXPath'
|
|
||||||
FileClose $R1
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
# -------------------------------------------
|
|
||||||
|
|
||||||
Function Ghostscript
|
|
||||||
|
|
||||||
# if GhostScript is not installed
|
|
||||||
${if} $GhostscriptPath == ""
|
|
||||||
# register Ghostscript
|
|
||||||
WriteRegStr HKLM "SOFTWARE\GPL Ghostscript\${GhostscriptVersion}" "GS_DLL" "${GhostscriptDir}\bin\gsdll32.dll"
|
|
||||||
WriteRegStr HKLM "SOFTWARE\GPL Ghostscript\${GhostscriptVersion}" "GS_LIB" "${GhostscriptDir}\lib;${GhostscriptDir}\fonts;${GhostscriptDir}\Resource"
|
|
||||||
|
|
||||||
WriteRegStr HKLM "SOFTWARE\GPL Ghostscript" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
|
|
||||||
StrCpy $GhostscriptPath "${GhostscriptDir}\bin"
|
|
||||||
${else}
|
|
||||||
# delete unnecessary files
|
|
||||||
RMDir /r ${GhostscriptDir}
|
|
||||||
${endif}
|
|
||||||
|
|
||||||
FunctionEnd
|
|
||||||
|
|
||||||
# -------------------------------------------
|
|
||||||
|
|
||||||
Function ImageMagick
|
|
||||||
|
|
||||||
# if ImageMagick is not installed
|
|
||||||
${if} $ImageMagickPath == ""
|
|
||||||
# register ImageMagick
|
|
||||||
WriteRegStr HKLM "SOFTWARE\Classes\Applications" "AutoRun" "${ImageMagickDir}\convert.exe $$"
|
|
||||||
WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "BinPath" "${ImageMagickDir}"
|
|
||||||
WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "CoderModulesPath" "${ImageMagickDir}\modules\coders"
|
|
||||||
WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "ConfigurePath" "${ImageMagickDir}\config"
|
|
||||||
WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "FilterModulesPath" "${ImageMagickDir}\modules\filters"
|
|
||||||
WriteRegStr HKLM "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "LibPath" "${ImageMagickDir}"
|
|
||||||
|
|
||||||
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "BinPath" "${ImageMagickDir}"
|
|
||||||
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "CoderModulesPath" "${ImageMagickDir}\modules\coders"
|
|
||||||
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "ConfigurePath" "${ImageMagickDir}\config"
|
|
||||||
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "FilterModulesPath" "${ImageMagickDir}\modules\filters"
|
|
||||||
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "LibPath" "${ImageMagickDir}"
|
|
||||||
WriteRegDWORD HKLM "SOFTWARE\ImageMagick\Current" "QuantumDepth" 0x00000010
|
|
||||||
WriteRegStr HKLM "SOFTWARE\ImageMagick\Current" "Version" "${ImageMagickVersion}"
|
|
||||||
|
|
||||||
WriteRegStr HKLM "Software\ImageMagick" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
|
|
||||||
StrCpy $ImageMagickPath ${ImageMagickDir}
|
|
||||||
${else}
|
|
||||||
# delete unnecessary files
|
|
||||||
RMDir /r ${ImageMagickDir}
|
|
||||||
${endif}
|
|
||||||
|
|
||||||
FunctionEnd
|
|
||||||
|
|
||||||
# -------------------------------------------
|
|
||||||
|
|
||||||
Function Aiksaurus
|
|
||||||
|
|
||||||
# if Aiksaurus is not installed
|
|
||||||
${if} $AiksaurusPath == ""
|
|
||||||
# extract Aiksaurus' program files
|
|
||||||
SetOutPath "$INSTDIR\external"
|
|
||||||
File /r "${PRODUCT_SOURCEDIR}\${AiksaurusInstall}"
|
|
||||||
# copy the files and register Aiksaurus
|
|
||||||
CopyFiles "$INSTDIR\${AiksaurusInstall}" "$APPDATA"
|
|
||||||
# WriteRegStr HKLM "Software\Aiksaurus" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
|
|
||||||
# WriteRegStr HKLM "Software\Aiksaurus" "Data Path" "${AiksaurusDir}"
|
|
||||||
${endif}
|
|
||||||
|
|
||||||
FunctionEnd
|
|
||||||
|
|
@ -1,104 +1,4 @@
|
|||||||
# this file contains the main installer section
|
# this file contains the installation actions for the third-party programs
|
||||||
|
|
||||||
# The '-' makes the section invisible.
|
|
||||||
Section "-Installation actions" SecInstallation
|
|
||||||
|
|
||||||
# dummy actions to avoid NSIS warnings
|
|
||||||
StrCpy $FileName ""
|
|
||||||
StrCpy $NewString ""
|
|
||||||
StrCpy $OldString ""
|
|
||||||
|
|
||||||
# extract all files
|
|
||||||
SetOutPath "$INSTDIR"
|
|
||||||
File /r "${PRODUCT_SOURCEDIR}\bin"
|
|
||||||
File /r "${PRODUCT_SOURCEDIR}\etc"
|
|
||||||
File /r "${PRODUCT_SOURCEDIR}\Resources"
|
|
||||||
File /r "${PRODUCT_SOURCEDIR}\external"
|
|
||||||
|
|
||||||
# install MiKTeX if not already installed
|
|
||||||
Call InstallMiKTeX # function from LaTeX.nsh
|
|
||||||
|
|
||||||
# install Ghostscript if not already installed
|
|
||||||
Call Ghostscript
|
|
||||||
|
|
||||||
# install ImageMagick if not already installed
|
|
||||||
Call ImageMagick
|
|
||||||
|
|
||||||
# install Aspell if not already installed
|
|
||||||
Call InstallAspell # function from Aspell.nsh
|
|
||||||
|
|
||||||
# install Aiksaurus if not already installed
|
|
||||||
Call Aiksaurus
|
|
||||||
|
|
||||||
# install GSview if not already installed and the user selected it
|
|
||||||
Call PostScript
|
|
||||||
|
|
||||||
# install JabRef if not already installed and the user selected it
|
|
||||||
Call BibTeX
|
|
||||||
|
|
||||||
# install the LaTeX class files that are delivered with LyX
|
|
||||||
# and enable MiKTeX's automatic package installation
|
|
||||||
Call ConfigureMiKTeX # Function from LaTeX.nsh
|
|
||||||
|
|
||||||
# install Aspell dictionaries
|
|
||||||
${if} $LangCode == "nb_NO"
|
|
||||||
StrCpy $LangCode "no_NO" # we only have a norwegian dictionary available
|
|
||||||
${endif}
|
|
||||||
Call InstallAspellDictionary # function from Aspell.nsh
|
|
||||||
|
|
||||||
# configure LyX
|
|
||||||
Call ConfigureLyX # Function from ConfigLyX.nsh
|
|
||||||
|
|
||||||
# delete unnecessary files
|
|
||||||
${if} $DelPythonFiles == "True"
|
|
||||||
Delete $INSTDIR\bin\python.exe
|
|
||||||
Delete $INSTDIR\bin\python25.dll
|
|
||||||
Delete $INSTDIR\bin\Python-License.txt
|
|
||||||
RMDir /r $INSTDIR\bin\Lib
|
|
||||||
RMDir /r $INSTDIR\bin\DLLs
|
|
||||||
${endif}
|
|
||||||
RMDir /r $INSTDIR\external
|
|
||||||
|
|
||||||
# create Uninstaller
|
|
||||||
WriteUninstaller "${PRODUCT_UNINSTALL_EXE}"
|
|
||||||
|
|
||||||
# run LyX's configure script
|
|
||||||
# create a bat-file to start configure in a console window so that the user see the progress
|
|
||||||
# of the configuration and to have a signal when the configuration is ready to start LyX
|
|
||||||
# this is important when LyX is installed together with MiKTeX or when LyX is installed for the first
|
|
||||||
# time on a computer, because the installation of missing LaTeX-files required by LyX could last minutes
|
|
||||||
# a batch file is needed because simply calling ExecWait '"$PythonPath\python.exe" "$INSTDIR\Resources\configure.py"'
|
|
||||||
# creates the config files in $PythonPath
|
|
||||||
${if} $PythonPath == ""
|
|
||||||
StrCpy $PythonPath "$INSTDIR\bin"
|
|
||||||
${endif}
|
|
||||||
StrCpy $1 $INSTDIR 2 # get drive letter
|
|
||||||
FileOpen $R1 "$INSTDIR\Resources\configLyX.bat" w
|
|
||||||
FileWrite $R1 '$1$\r$\n\
|
|
||||||
cd $INSTDIR\Resources\$\r$\n\
|
|
||||||
"$PythonPath\python.exe" configure.py'
|
|
||||||
FileClose $R1
|
|
||||||
MessageBox MB_OK|MB_ICONINFORMATION "$(LatexConfigInfo)"
|
|
||||||
ExecWait '"$INSTDIR\Resources\configLyX.bat"'
|
|
||||||
Delete "$INSTDIR\Resources\configLyX.bat"
|
|
||||||
|
|
||||||
# ask to update MiKTeX
|
|
||||||
${if} $MiKTeXInstalled == "yes"
|
|
||||||
MessageBox MB_YESNO|MB_ICONINFORMATION "$(MiKTeXInfo)" IDYES UpdateNow IDNO UpdateLater
|
|
||||||
UpdateNow:
|
|
||||||
StrCpy $0 $LaTeXPath -4 # remove "\bin"
|
|
||||||
ExecWait '"$LaTeXPath\copystart.exe" "$0\config\update.dat"' # run MiKTeX's update wizard
|
|
||||||
UpdateLater:
|
|
||||||
${endif}
|
|
||||||
|
|
||||||
# save MiKTeX's install path to be able to remove LyX's LaTeX-files in the uninstaller
|
|
||||||
FileOpen $R1 "$INSTDIR\Resources\uninstallPaths.dat" w
|
|
||||||
FileWrite $R1 '$LaTeXPath'
|
|
||||||
FileClose $R1
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
# -------------------------------------------
|
|
||||||
|
|
||||||
Function Ghostscript
|
Function Ghostscript
|
||||||
|
|
||||||
@ -167,9 +67,11 @@ FunctionEnd
|
|||||||
|
|
||||||
# -------------------------------------------
|
# -------------------------------------------
|
||||||
|
|
||||||
Function PostScript
|
!if ${INSTALLER_VERSION} == "Complete"
|
||||||
|
|
||||||
# if no PostScript viewer is installed
|
Function PostScript
|
||||||
|
|
||||||
|
# if no PostScript viewer is installed
|
||||||
${if} $PSVPath == ""
|
${if} $PSVPath == ""
|
||||||
${if} $InstallGSview == "true"
|
${if} $InstallGSview == "true"
|
||||||
# launch installer
|
# launch installer
|
||||||
@ -184,13 +86,17 @@ Function PostScript
|
|||||||
${endif}
|
${endif}
|
||||||
${endif}
|
${endif}
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
!endif # endif ${INSTALLER_VERSION} == "Complete"
|
||||||
|
|
||||||
# -------------------------------------------
|
# -------------------------------------------
|
||||||
|
|
||||||
Function BibTeX
|
!if ${INSTALLER_VERSION} == "Complete"
|
||||||
|
|
||||||
# if no BibTeX editor is installed
|
Function BibTeX
|
||||||
|
|
||||||
|
# if no BibTeX editor is installed
|
||||||
${if} $BibTeXEditorPath == ""
|
${if} $BibTeXEditorPath == ""
|
||||||
${if} $InstallJabRef == "true"
|
${if} $InstallJabRef == "true"
|
||||||
# launch installer
|
# launch installer
|
||||||
@ -207,5 +113,7 @@ Function BibTeX
|
|||||||
${endif}
|
${endif}
|
||||||
${endif}
|
${endif}
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
!endif # endif ${INSTALLER_VERSION} == "Complete"
|
||||||
|
|
@ -103,6 +103,10 @@ Function LaTeXActions
|
|||||||
${andif} $LaTeXName != "MiKTeX 2.6"
|
${andif} $LaTeXName != "MiKTeX 2.6"
|
||||||
StrCpy $LaTeXName "TeXLive"
|
StrCpy $LaTeXName "TeXLive"
|
||||||
${endif}
|
${endif}
|
||||||
|
|
||||||
|
${if} $LatexPath == ""
|
||||||
|
StrCpy $MissedProg "True"
|
||||||
|
${endif}
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
@ -237,4 +241,24 @@ Function ConfigureMiKTeX
|
|||||||
# File /r "${LaTeXPackagesDir}"
|
# File /r "${LaTeXPackagesDir}"
|
||||||
${endif} # end ${if} $Pointer
|
${endif} # end ${if} $Pointer
|
||||||
|
|
||||||
|
# save MiKTeX's install path to be able to remove LyX's LaTeX-files in the uninstaller
|
||||||
|
FileOpen $R1 "$INSTDIR\Resources\uninstallPaths.dat" w
|
||||||
|
FileWrite $R1 '$LaTeXPath'
|
||||||
|
FileClose $R1
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
Function UpdateMiKTeX
|
||||||
|
# installs the LaTeX class files that are delivered with LyX
|
||||||
|
|
||||||
|
# ask to update MiKTeX
|
||||||
|
${if} $MiKTeXInstalled == "yes"
|
||||||
|
MessageBox MB_YESNO|MB_ICONINFORMATION "$(MiKTeXInfo)" IDYES UpdateNow IDNO UpdateLater
|
||||||
|
UpdateNow:
|
||||||
|
StrCpy $0 $LaTeXPath -4 # remove "\bin"
|
||||||
|
ExecWait '"$LaTeXPath\copystart.exe" "$0\config\update.dat"' # run MiKTeX's update wizard
|
||||||
|
UpdateLater:
|
||||||
|
${endif}
|
||||||
|
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
@ -109,6 +109,9 @@ Var UserName
|
|||||||
# Function to configure LyX
|
# Function to configure LyX
|
||||||
!include "ConfigLyX.nsh"
|
!include "ConfigLyX.nsh"
|
||||||
|
|
||||||
|
# Function to configure needed third-party programs
|
||||||
|
!include "InstallThirdPartyProgs.nsh"
|
||||||
|
|
||||||
# Function for page to install Aspell dictionaries
|
# Function for page to install Aspell dictionaries
|
||||||
!include "Aspell.nsh"
|
!include "Aspell.nsh"
|
||||||
|
|
||||||
@ -246,7 +249,7 @@ SectionEnd
|
|||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||||
|
|
||||||
# the installation section
|
# the installation section
|
||||||
!include "InstallActions-complete.nsh"
|
!include "InstallActions-complete-small.nsh"
|
||||||
|
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
# This hook function is called internally by NSIS on installer startup
|
# This hook function is called internally by NSIS on installer startup
|
||||||
@ -319,7 +322,13 @@ FunctionEnd
|
|||||||
#--------------------------------
|
#--------------------------------
|
||||||
|
|
||||||
Function LaunchProduct
|
Function LaunchProduct
|
||||||
Exec ${PRODUCT_BAT}
|
# call the lyx.exe and not the lyx.bat to show the console window. This is
|
||||||
|
# necessary because sometimes LyX's configure run that is started by the
|
||||||
|
# installer fails when MiKTeX was installed together with this installer.
|
||||||
|
# Showing the console gives the user feedback otherwise he would wonder why
|
||||||
|
# LyX won't start for minutes while it is downloading LaTeX-packages in the
|
||||||
|
# background
|
||||||
|
Exec ${PRODUCT_EXE}
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
|
@ -110,6 +110,9 @@ Var UserName
|
|||||||
# Function to configure LyX
|
# Function to configure LyX
|
||||||
!include "ConfigLyX.nsh"
|
!include "ConfigLyX.nsh"
|
||||||
|
|
||||||
|
# Function to configure needed third-party programs
|
||||||
|
!include "InstallThirdPartyProgs.nsh"
|
||||||
|
|
||||||
# Function for page to install Aspell dictionaries
|
# Function for page to install Aspell dictionaries
|
||||||
!include "Aspell.nsh"
|
!include "Aspell.nsh"
|
||||||
|
|
||||||
@ -240,7 +243,7 @@ SectionEnd
|
|||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||||
|
|
||||||
# the installation section
|
# the installation section
|
||||||
!include "InstallActions-small.nsh"
|
!include "InstallActions-complete-small.nsh"
|
||||||
|
|
||||||
#--------------------------------
|
#--------------------------------
|
||||||
# This hook function is called internally by NSIS on installer startup
|
# This hook function is called internally by NSIS on installer startup
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
Function MissingPrograms
|
Function MissingPrograms
|
||||||
|
# check if third-party programs are installed
|
||||||
|
|
||||||
# initialize variable, is later set to True when a program was not found
|
# initialize variable, is later set to True when a program was not found
|
||||||
StrCpy $MissedProg "False"
|
${if} $MissedProg != "True" # is already True when LaTeX is missing
|
||||||
|
StrCpy $MissedProg "False"
|
||||||
|
${endif}
|
||||||
|
|
||||||
# test if Ghostscript is installed
|
# test if Ghostscript is installed
|
||||||
GSloop:
|
GSloop:
|
||||||
@ -120,9 +123,9 @@ FunctionEnd
|
|||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
|
|
||||||
Function MissingProgramsPage
|
Function MissingProgramsPage
|
||||||
|
# generate the page showing the missing programs that will be installed
|
||||||
|
|
||||||
# generate the installer page - re-read empty page first
|
StrCpy $0 "2" # start value for the dynamical item numbering
|
||||||
StrCpy $0 "2"
|
|
||||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "io_missing_progs.ini"
|
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "io_missing_progs.ini"
|
||||||
!insertmacro MUI_HEADER_TEXT "$(MissProgHeader)" ""
|
!insertmacro MUI_HEADER_TEXT "$(MissProgHeader)" ""
|
||||||
|
|
||||||
@ -157,15 +160,15 @@ FunctionEnd
|
|||||||
|
|
||||||
Function MissingProgramsPage_LeaveFunction
|
Function MissingProgramsPage_LeaveFunction
|
||||||
|
|
||||||
# this function is needed for the installer page
|
# this empty function is needed for the installer page
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
|
|
||||||
Function EditorCheck
|
Function EditorCheck
|
||||||
|
|
||||||
# test if an editor with syntax-highlighting for LaTeX-files is installed
|
# test if an editor with syntax-highlighting for LaTeX-files is installed
|
||||||
|
|
||||||
# (check for jEdit, PSPad, WinShell, ConTEXT, Crimson Editor, Vim, TeXnicCenter, LaTeXEditor, WinEdt, LEd, WinTeX)
|
# (check for jEdit, PSPad, WinShell, ConTEXT, Crimson Editor, Vim, TeXnicCenter, LaTeXEditor, WinEdt, LEd, WinTeX)
|
||||||
StrCpy $EditorPath ""
|
StrCpy $EditorPath ""
|
||||||
StrCpy $0 ""
|
StrCpy $0 ""
|
||||||
|
@ -14,6 +14,7 @@ Function UpdateModifiedFiles
|
|||||||
File "${PRODUCT_SOURCEDIR}\Resources\languages"
|
File "${PRODUCT_SOURCEDIR}\Resources\languages"
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\unicodesymbols"
|
File "${PRODUCT_SOURCEDIR}\Resources\unicodesymbols"
|
||||||
File /r "${PRODUCT_SOURCEDIR}\Resources\images"
|
File /r "${PRODUCT_SOURCEDIR}\Resources\images"
|
||||||
|
File /r "${PRODUCT_SOURCEDIR}\Resources\layouts"
|
||||||
File /r "${PRODUCT_SOURCEDIR}\Resources\locale" # always here
|
File /r "${PRODUCT_SOURCEDIR}\Resources\locale" # always here
|
||||||
SetOutPath "$INSTDIR\Resources\doc"
|
SetOutPath "$INSTDIR\Resources\doc"
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\doc\EmbeddedObjects.lyx"
|
File "${PRODUCT_SOURCEDIR}\Resources\doc\EmbeddedObjects.lyx"
|
||||||
@ -33,10 +34,6 @@ Function UpdateModifiedFiles
|
|||||||
File "${PRODUCT_SOURCEDIR}\Resources\examples\fr\simplecv.lyx"
|
File "${PRODUCT_SOURCEDIR}\Resources\examples\fr\simplecv.lyx"
|
||||||
SetOutPath "$INSTDIR\Resources\images"
|
SetOutPath "$INSTDIR\Resources\images"
|
||||||
File /r "${PRODUCT_SOURCEDIR}\Resources\images\math"
|
File /r "${PRODUCT_SOURCEDIR}\Resources\images\math"
|
||||||
SetOutPath "$INSTDIR\Resources\layouts"
|
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\layouts\beamer.layout"
|
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\layouts\simplecv.layout"
|
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\layouts\stdcounters.inc"
|
|
||||||
SetOutPath "$INSTDIR\Resources\lyx2lyx"
|
SetOutPath "$INSTDIR\Resources\lyx2lyx"
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\lyx2lyx\LyX.py"
|
File "${PRODUCT_SOURCEDIR}\Resources\lyx2lyx\LyX.py"
|
||||||
File "${PRODUCT_SOURCEDIR}\Resources\lyx2lyx\lyx_1_5.py"
|
File "${PRODUCT_SOURCEDIR}\Resources\lyx2lyx\lyx_1_5.py"
|
||||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user