]> git.lyx.org Git - features.git/commitdiff
locate local MiKTeX root and install dvipost
authorJoost Verburg <joostverburg@users.sourceforge.net>
Mon, 31 Mar 2008 15:31:09 +0000 (15:31 +0000)
committerJoost Verburg <joostverburg@users.sourceforge.net>
Mon, 31 Mar 2008 15:31:09 +0000 (15:31 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24074 a592a061-630c-0410-9148-cb99ea01b6c8

development/Win32/packaging/installer/include/declarations.nsh
development/Win32/packaging/installer/include/detection.nsh
development/Win32/packaging/installer/include/filelist.nsh
development/Win32/packaging/installer/lyx.nsi
development/Win32/packaging/installer/settings.nsh
development/Win32/packaging/installer/setup/configure.nsh
development/Win32/packaging/installer/setup/install.nsh

index 594f8b1d6d15f35defb8d6a59ee92e0b554bfc59..2ffe6c3a7aa9974296802ee624b940ad26098cac 100644 (file)
@@ -49,6 +49,7 @@ Standard header files, shared variables
 # Variables
 
 Var PathLaTeX
+Var PathLaTeXLocal
 Var PathImageMagick
 Var PathGhostscript
 
index 740b7ae67b5509ce8eeb0ba3832b44d3b56f3749..dcecc23e48ef454168f756dd0f9c4b9430761888 100644 (file)
@@ -15,7 +15,7 @@ FunctionEnd
 #--------------------------------
 # MiKTeX
 
-Var ProcessReturn
+Var ReportReturn
 Var CommandLineOutput
 Var LastChar
 Var PathLength
@@ -26,10 +26,11 @@ Var PathLength
   # Works for version 2.5 and later
   
   nsExec::ExecToStack "initexmf.exe --report"
-  Pop $ProcessReturn
+  Pop $ReportReturn
   Pop $CommandLineOutput
-  
+
   ${WordFind2X} $CommandLineOutput "BinDir: " "$\r" "+1" $PathLaTeX
+  ${WordFind2X} $CommandLineOutput "CommonData: " "$\r" "+1" $PathLaTeXLocal # Local root  
 
 !macroend
 
@@ -38,16 +39,22 @@ Var PathLength
   ReadRegStr $PathLaTeX ${ROOTKEY} "Software\MiK\MiKTeX\CurrentVersion\MiKTeX" "Install Root"
   
   ${If} $PathLaTeX != ""
-    StrCpy $LastChar $PathLaTeX 1 -1  
+    StrCpy $LastChar $PathLaTeX 1 -1
+    
     ${If} $LastChar == "\"
       # Trim backslash
       StrLen $PathLength $PathLaTeX
       IntOp $PathLength $PathLength - 1
       StrCpy $PathLaTeX $PathLaTeX $PathLength
     ${EndIf}
+    
     StrCpy $PathLaTeX "$PathLaTeX\miktex\bin"
+     
+    #Local root
+    ReadRegStr $PathLaTeXLocal ${ROOTKEY} "Software\MiK\MiKTeX\CurrentVersion\MiKTeX" "Local Root"
+    
   ${EndIf}
-  
+   
 !macroend
 
 Function SearchLaTeX
@@ -65,7 +72,7 @@ Function SearchLaTeX
   ${EndIf}
 
   ${IfNot} ${FileExists} "$PathLaTeX\${BIN_LATEX}"
-    StrCpy $PathLatex ""
+    StrCpy $PathLateX ""
   ${EndIf}
 
 FunctionEnd
index 0c84855593dadee6ae838403757fbe39e93c8bec..2d3fcf5bcb0670a476efa51110d5e956f3736ed2 100644 (file)
@@ -71,6 +71,12 @@ Lists of files to include in the installer
   
 !macroend
 
+!macro FileListDvipostBin COMMAND DIRECTORY
+
+  ${FILE}pplatex.exe"
+  
+!macroend
+
 !macro FileListPDFToolsBin COMMAND DIRECTORY
 
   ${FILE}pdfopen.exe"
index 334c7b3116533cb30e1053c2fc9a4a6ebbc892b9..d65487059dc296fa4937fa9e17d79465034d919e 100644 (file)
@@ -55,9 +55,9 @@ Licence details for all installer scripts can be found in the file COPYING
 #--------------------------------\r
 # Setup\r
 \r
-!include setup\configure.nsh\r
 !include setup\install.nsh\r
 !include setup\uninstall.nsh\r
+!include setup\configure.nsh\r
 \r
 #--------------------------------\r
 # User interface (wizard pages)\r
index 2d7526a477c732dd15414a0f98391fea43aaf8bd..c5afcc37f65844cdb4a8e03e87c8c40f169b9363 100644 (file)
@@ -49,6 +49,8 @@ SetCompressor /SOLID lzma
 !define FILES_NETPBM "${FILES_DEPS}\netpbm"\r
 !define FILES_DTL "${FILES_DEPS}\dtl"\r
 !define FILES_AIKSAURUS "${FILES_DEPS}\aiksaurus\"\r
+!define FILES_DVIPOST "${FILES_DEPS}\dvipost"\r
+!define FILES_DVIPOST_PKG "${FILES_DVIPOST}"\r
 !define FILES_PDFTOOLS "${FILES_DEPS}\pdftools"\r
 \r
 !define FILES_QT "${FILES_DEPS}\qt-4"\r
index 0d0ca74df825ad13a3646053f8eeae33370615ae..559dac228e83165a546020589178fd8b112a8aa7 100644 (file)
@@ -115,6 +115,29 @@ Section -Configure
 
 SectionEnd
 
+#--------------------------------
+# dvipost package
+
+Var UpdateFNDBReturn
+
+Section -dvipost
+
+  # Install package in local root
+
+  ${if} $PathLaTeXLocal != ""
+    SetOutPath "$PathLaTeXLocal\tex\latex\dvipost"
+    File "${FILES_DVIPOST_PKG}\dvipost.sty"
+  ${endif}
+
+  # Update file name database
+
+  ${if} $PathLaTeX != ""
+    nsExec::Exec '"$PathLaTeX\initexmf.exe" --update-fndb'
+    Pop $UpdateFNDBReturn # Return value
+  ${endif}
+
+SectionEnd
+
 #--------------------------------
 # Desktop shortcut
 
index 57d83a12507271bade24db5a4cff9aa88a1dc0a0..724bd78163fdbc4b817b5c42fea03f4c60731556 100644 (file)
@@ -35,6 +35,7 @@ Section -ProgramFiles SecProgramFiles
 
   !insertmacro FileListNetpbmBin File "${FILES_NETPBM}\"
   !insertmacro FileListDTLBin File "${FILES_DTL}\"
+  !insertmacro FileListDvipostBin File "${FILES_DVIPOST}\"
   !insertmacro FileListPDFViewBin File "${FILES_PDFVIEW}\"
   !insertmacro FileListPDFToolsBin File "${FILES_PDFTOOLS}\"