mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
installer: add the Metafile2EPS converter as it is now working on all Windows platforms
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27392 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0ff926b77b
commit
c1309f2fc2
@ -27,6 +27,9 @@ Function ConfigureLyX
|
||||
${if} $SVGPath != ""
|
||||
StrCpy $PathPrefix "$PathPrefix;$SVGPath"
|
||||
${endif}
|
||||
${if} $WMFPath != ""
|
||||
StrCpy $PathPrefix "$PathPrefix;$WMFPath"
|
||||
${endif}
|
||||
|
||||
# Create a batch file to start LyX with the environment variables set
|
||||
ClearErrors
|
||||
|
@ -33,6 +33,9 @@
|
||||
|
||||
# install Aiksaurus if not already installed
|
||||
Call Aiksaurus # function from InstallThirdPartyProgs.nsh
|
||||
|
||||
# install Metafile2eps if not already installed
|
||||
Call Metafile2eps # function from InstallThirdPartyProgs.nsh
|
||||
|
||||
!if ${INSTALLER_VERSION} == "Complete"
|
||||
# install GSview if not already installed and the user selected it
|
||||
|
@ -47,6 +47,7 @@ Function ImageMagick
|
||||
RMDir /r ${ImageMagickDir}
|
||||
# delete the "etc" folder when also the Ghostscript folder was deleted because it is then empty
|
||||
${if} $DelGSDir == "Yes"
|
||||
${andif} $DelWMFDir == "Yes"
|
||||
RMDir /r "$INSTDIR\etc"
|
||||
${endif}
|
||||
${endif}
|
||||
@ -72,6 +73,45 @@ FunctionEnd
|
||||
|
||||
# -------------------------------------------
|
||||
|
||||
!macro PrinterInit
|
||||
|
||||
${if} ${AtLeastWinVista}
|
||||
StrCpy $PrinterConf "printui.exe"
|
||||
${else}
|
||||
StrCpy $PrinterConf "rundll32.exe printui.dll,PrintUIEntry"
|
||||
${endif}
|
||||
|
||||
!macroend
|
||||
|
||||
Function Metafile2eps
|
||||
|
||||
# if Metafile2eps is not installed
|
||||
${if} $WMFPath == ""
|
||||
# delete printer
|
||||
ExecWait '$PrinterConf /q /dl /n "Metafile to EPS Converter"'
|
||||
# install printer and driver
|
||||
ExecWait '$PrinterConf /if /f "$WINDIR\inf\ntprint.inf" /b "Metafile to EPS Converter" /r "FILE:" /m "MS Publisher Imagesetter"'
|
||||
# restore DEVMODE with proper settings
|
||||
ExecWait '$PrinterConf /q /Sr /n "Metafile to EPS Converter" /a "$INSTDIR\metafile2eps.dat" g'
|
||||
# register printer
|
||||
WriteRegStr HKLM "Software\InkNote Selector" "" ${Metafile2epsDir}
|
||||
# register Metafile2eps
|
||||
Var /GLOBAL RegLocation
|
||||
StrCpy $RegLocation "Software\Microsoft\Windows\CurrentVersion\Uninstall\Metafile to EPS Converter"
|
||||
WriteRegStr HKLM "$RegLocation" "InstallLocation" "${Metafile2epsDir}"
|
||||
WriteRegStr HKLM "$RegLocation" "DisplayName" "Metafile to EPS Converter"
|
||||
WriteRegStr HKLM "$RegLocation" "OnlyWithLyX" "Yes${PRODUCT_VERSION_SHORT}" # special entry to tell the uninstaller that it was installed with LyX
|
||||
StrCpy $WMFPath "${Metafile2epsDir}"
|
||||
${else}
|
||||
# delete unnecessary files
|
||||
RMDir /r "${Metafile2epsDir}"
|
||||
StrCpy $DelWMFDir "Yes" # used later in function ImageMagick
|
||||
${endif}
|
||||
|
||||
FunctionEnd
|
||||
|
||||
# -------------------------------------------
|
||||
|
||||
!if ${INSTALLER_VERSION} == "Complete"
|
||||
|
||||
Function PostScript
|
||||
|
@ -35,27 +35,31 @@ CRCCheck force
|
||||
#--------------------------------
|
||||
# variables only used in this installer version
|
||||
|
||||
Var DelPythonFiles
|
||||
Var GhostscriptPath
|
||||
Var AiksaurusPath
|
||||
Var AspellPath
|
||||
Var Acrobat
|
||||
Var PSVPath
|
||||
Var DelGSDir
|
||||
Var EditorPath
|
||||
Var ImageEditorPath
|
||||
Var AiksaurusPath
|
||||
Var AppFiles
|
||||
Var AspellPath
|
||||
Var BibTeXEditorPath
|
||||
Var DelGSDir
|
||||
Var DelPythonFiles
|
||||
Var DelWMFDir
|
||||
Var EditorPath
|
||||
Var GhostscriptPath
|
||||
Var ImageEditorPath
|
||||
Var InstallGSview
|
||||
Var InstallJabRef
|
||||
Var LangEncoding
|
||||
Var LangSysEncoding
|
||||
Var MissedProg
|
||||
Var LaTeXName
|
||||
Var MiKTeXVersion
|
||||
Var MiKTeXUser
|
||||
Var MiKTeXPath
|
||||
Var InstallGSview
|
||||
Var InstallJabRef
|
||||
Var MissedProg
|
||||
Var PrinterConf
|
||||
Var PSVPath
|
||||
Var SVGPath
|
||||
Var AppFiles
|
||||
Var WMFPath
|
||||
|
||||
# Variables used by all installer versions
|
||||
!include "Variables.nsh"
|
||||
|
||||
@ -66,6 +70,7 @@ Var AppFiles
|
||||
!include "FileFunc.nsh"
|
||||
!include "StrFunc.nsh"
|
||||
!include "TextFunc.nsh"
|
||||
!include "WinVer.nsh"
|
||||
|
||||
# Set of various macros and functions
|
||||
!include "LyXUtils.nsh"
|
||||
@ -221,6 +226,9 @@ Function .onInit
|
||||
MessageBox MB_OK|MB_ICONSTOP "$(StillInstalled)"
|
||||
Abort
|
||||
${endif}
|
||||
|
||||
# printer settings, needed to install the Metafile2eps printer
|
||||
!insertmacro PrinterInit
|
||||
|
||||
# default settings
|
||||
# these can be reset to "all" in section SecAllUsers
|
||||
|
@ -35,25 +35,30 @@ CRCCheck force
|
||||
#--------------------------------
|
||||
# variables only used in this installer version
|
||||
|
||||
Var DelPythonFiles
|
||||
Var AppFiles
|
||||
|
||||
Var GhostscriptPath
|
||||
Var AiksaurusPath
|
||||
Var AspellPath
|
||||
Var Acrobat
|
||||
Var PSVPath
|
||||
Var BibTeXEditorPath
|
||||
Var DelGSDir
|
||||
Var DelPythonFiles
|
||||
Var DelWMFDir
|
||||
Var EditorPath
|
||||
Var ImageEditorPath
|
||||
Var BibTeXEditorPath
|
||||
Var LangEncoding
|
||||
Var LangSysEncoding
|
||||
Var MissedProg
|
||||
Var LaTeXName
|
||||
Var MiKTeXVersion
|
||||
Var MiKTeXUser
|
||||
Var MissedProg
|
||||
Var PrinterConf
|
||||
Var PSVPath
|
||||
Var State
|
||||
Var SVGPath
|
||||
Var AppFiles
|
||||
Var WMFPath
|
||||
|
||||
# Variables used by all installer versions
|
||||
!include "Variables.nsh"
|
||||
|
||||
@ -64,6 +69,7 @@ Var AppFiles
|
||||
!include "FileFunc.nsh"
|
||||
!include "StrFunc.nsh"
|
||||
!include "TextFunc.nsh"
|
||||
!include "WinVer.nsh"
|
||||
|
||||
# Set of various macros and functions
|
||||
!include "LyXUtils.nsh"
|
||||
@ -215,6 +221,9 @@ Function .onInit
|
||||
MessageBox MB_OK|MB_ICONSTOP "$(StillInstalled)"
|
||||
Abort
|
||||
${endif}
|
||||
|
||||
# printer settings, needed to install the Metafile2eps printer
|
||||
!insertmacro PrinterInit
|
||||
|
||||
# default settings
|
||||
# these can be reset to "all" in section SecAllUsers
|
||||
|
@ -149,6 +149,9 @@ Function MissingPrograms
|
||||
|
||||
# test if Inkscape is installed
|
||||
ReadRegStr $SVGPath HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Inkscape" "InstallLocation"
|
||||
|
||||
# test if metafile2eps is installed
|
||||
ReadRegStr $WMFPath HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Metafile to EPS Converter" "InstallLocation"
|
||||
|
||||
FunctionEnd
|
||||
|
||||
|
@ -71,6 +71,7 @@ BrandingText "LyXWinInstaller v4.${INSTALLER_SUBVERSION} - ${INSTALLER_VERSION}"
|
||||
!define ImageMagickDir "$INSTDIR\etc\ImageMagick"
|
||||
!define GhostscriptDir "$INSTDIR\etc\Ghostscript"
|
||||
!define GhostscriptVersion "8.63"
|
||||
!define Metafile2epsDir "$INSTDIR\etc\Metafile2eps"
|
||||
!define AiksaurusDir "$APPDATA\Aiksaurus"
|
||||
!define AiksaurusInstall "external\Aiksaurus"
|
||||
!define AspellDir "$APPDATA\Aspell"
|
||||
|
@ -34,6 +34,9 @@ Function un.onInit
|
||||
MessageBox MB_OK|MB_ICONEXCLAMATION "$(UnNotInRegistryLabel)"
|
||||
${endif}
|
||||
${endif}
|
||||
|
||||
# printer settings, needed to uninstall the Metafile2eps printer
|
||||
!insertmacro PrinterInit
|
||||
|
||||
# Macro to investigate name of LyX's preferences folders to be able remove them
|
||||
!insertmacro UnAppPreSuff $AppPre $AppSuff # macro from LyXUtils.nsh
|
||||
@ -157,6 +160,16 @@ Section "un.LyX" un.SecUnProgramFiles
|
||||
DeleteRegValue SHCTX "SOFTWARE\Classes\Applications" "AutoRun"
|
||||
DeleteRegKey SHCTX "SOFTWARE\ImageMagick"
|
||||
${endif}
|
||||
|
||||
# Metafile2eps
|
||||
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Metafile to EPS Converter" "OnlyWithLyX" # special entry to test if it was installed with LyX
|
||||
${if} $0 == "Yes${PRODUCT_VERSION_SHORT}"
|
||||
# Delete printer
|
||||
ExecWait '$PrinterConf /q /dl /n "Metafile to EPS Converter"'
|
||||
# unregister Metafile2eps
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Metafile to EPS Converter"
|
||||
DeleteRegKey HKLM "Software\InkNote Selector"
|
||||
${endif}
|
||||
|
||||
# Ghostscript and GSview
|
||||
ReadRegStr $0 HKLM "SOFTWARE\GPL Ghostscript" "OnlyWithLyX" # special entry to test if it was installed with LyX
|
||||
|
@ -6,8 +6,14 @@ Function UpdateModifiedFiles
|
||||
File "${PRODUCT_SOURCEDIR}\bin\tex2lyx.exe" # always here
|
||||
SetOutPath "$INSTDIR\Resources" # always here
|
||||
File /r "${PRODUCT_SOURCEDIR}\Resources\locale" # always here
|
||||
File "${PRODUCT_SOURCEDIR}\Resources\configure.py"
|
||||
SetOutPath "$INSTDIR\Resources\layouts"
|
||||
File "${PRODUCT_SOURCEDIR}\Resources\layouts\amsbook.layout"
|
||||
SetOutPath "$INSTDIR\Resources\lyx2lyx" # always here
|
||||
File "${PRODUCT_SOURCEDIR}\Resources\lyx2lyx\lyx2lyx_version.py" # always here
|
||||
File "${PRODUCT_SOURCEDIR}\Resources\lyx2lyx\lyx_1_6.py"
|
||||
SetOutPath "$INSTDIR\Resources\man\man1"
|
||||
File "${PRODUCT_SOURCEDIR}\Resources\man\man1\lyx.1"
|
||||
|
||||
FunctionEnd
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user