]> git.lyx.org Git - features.git/commitdiff
Win installer: prepare for beta 1
authorUwe Stöhr <uwestoehr@lyx.org>
Mon, 8 Feb 2016 23:31:57 +0000 (00:31 +0100)
committerUwe Stöhr <uwestoehr@lyx.org>
Mon, 8 Feb 2016 23:31:57 +0000 (00:31 +0100)
- also add support to detect JabRef 3.x
- also add support to detect Pandoc
- some minor improvements

development/Win32/packaging/installer/ChangeLog.txt
development/Win32/packaging/installer/Packages.txt
development/Win32/packaging/installer/include/LaTeX.nsh
development/Win32/packaging/installer/include/LyXUtils.nsh
development/Win32/packaging/installer/include/detection.nsh
development/Win32/packaging/installer/include/init.nsh
development/Win32/packaging/installer/include/variables.nsh
development/Win32/packaging/installer/settings.nsh
development/Win32/packaging/installer/setup/configure.nsh
development/Win32/packaging/installer/setup/install.nsh

index 2f74e218f4433e11fec42ae52ac3812a896e18a9..2630bf41c5ccdd9339ef3b86a1deb870564918e0 100644 (file)
@@ -1,5 +1,7 @@
 Changelog for LyX.220-beta-1-1:
 - installs lyX 2.2.0 beta1
+- support for the document converter program Pandoc, see http://wiki.lyx.org/LyX/NewInLyX22#converters
+- support for JabRef 3.x
 - updated thesaurus for Slovenian
 - updated spell-checker dictionaries for Portuguese (PT) and English (GB and US)
 - new Brazilian translation of the installer messages
index 80c12b4a28686ca5ab351172a14f6db6dd27cd59..fe46a056f336f1e2fd96b0960aeaf172a26c59d1 100644 (file)
@@ -1,3 +1,4 @@
+unicode-data
 l3experimental
 l3kernel
 l3packages
@@ -56,17 +57,18 @@ babel-turkish
 babel-ukrainian
 babel-vietnamese
 babel-welsh
+beamerposter
 bibtopic
 booktabs
 braille
 breakurl
 cancel
+caption
 chemgreek
+chicago
 cjk
 covington
 csquotes
-cyrillic
-datetime
 endnotes
 enumitem
 environ
@@ -75,8 +77,10 @@ eso-pic
 fancybox
 fancyhdr
 filehook
-fmtcount
+footmisc
+forest
 framed
+frankenstein
 greek-inputenc
 harvard
 hyphenat
@@ -86,16 +90,18 @@ lettrine
 listings
 lithuanian
 genmisc
+mathtools
 mhchem
-chemgreek
 mongolian-babel
 miktex-hyph-mongolian
+mslapa
 natbib
 units
 nomencl
-polyglossia
+paralist
 pdfcomment
 pdfpages
+pgf
 prettyref
 preview
 refstyle
@@ -105,9 +111,9 @@ sectionbox
 serbianc
 miktex-hyph-serbian
 setspace
-shapepar
 soul
 splitindex
+stmaryrd
 subfig
 tcolorbox
 thailatex
@@ -116,34 +122,30 @@ turkmen
 ulem
 undertilde
 unicode-math
-units
 url
 vntex
+wallpaper
 wrapfig
 xargs
 xcolor
 xetex-def
 arydshln
-binhex
 braket
 cancel
-caption
 colortbl
 diagbox
 etoolbox
 fp
-koma-script
 makecmds
 marginnote
 picinpar
 pict2e
 sidecap
 was
-charter
-garamondx
-mathpazo
 bera
+binhex
 ccfonts
+charter
 classico
 cmbright
 concmath
@@ -154,74 +156,85 @@ eulervm
 feyn
 fontaxes
 fourier
+garamondx
 iwona
 kurier
 lh
 libertine
 lm-math
 luxi
+mathdesign
+mathpazo
 minion2newtx
-mslapa
 newtx
-stmaryrd
 symbol
 tex-gyre
-tfrupee
 tipa
 txfonts
-wasy
 zhmetrics
 ascii
 bbding
 ifsym
 marvosym
 textgreek
+tfrupee
 txfonts
+wasy
 wasysym
 a0poster
 aastex
 achemso
 aguplus
+answers
 apa6
 apacite
 apa
 arabtex
 beamer
-beamerposter
 bigfoot
+changebar
 changepage
 cite
 cleveref
+comment
 ctex
+datetime
 dinbrief
 dtk
+ebgaramond
 elsarticle
 elsevier
 endfloat
 epsf
+europasscv
 europecv
 extsizes
 fancyvrb
 filecontents
-footmisc
+fixme
+fmtcount
+fontawesome
 frletter
 g-brief
 harvard
 ieeetran
 ifmtarg
+jsclasses
 kluwer
+koma-script
+lambda-lists
 lastpage
+latex2html
 lettre
 lineno
 mciteplus
+mdwtools
 memoir
 microtype
 moderncv
 ms
 mwcls
 paper
-paralist
-pgf
 placeins
 powerdot
 pst-grad
@@ -232,28 +245,20 @@ sauerj
 savesym
 sciposter
 seminar
+shapepar
 simplecv
 skak
 spie
 sttools
+tabu
 textcase
 titlesec
+todonotes
+totpages
 tufte-latex
 tugboat
 type1cm
 ucs
 upquote
-wallpaper
 xecjk
-xifthen
-acrotex
-answers
-chicago
-ctablestack
-frankenstein
-jsclasses
-lambda-lists
-mathdesign
-mathtools
-pdfcrop
-sansmathaccent
\ No newline at end of file
+xifthen
\ No newline at end of file
index 7a0cef818760a7dafb32a2d31f5c0286bab15075..cb3d80a80f50768b5675ca2cfc14ca2a4b2c1009 100644 (file)
@@ -208,7 +208,14 @@ FunctionEnd
   ${if} $PathLaTeX == ""
    # launch MiKTeX's installer
    MessageBox MB_OK|MB_ICONINFORMATION "$(LatexInfo)" /SD IDOK
-   ExecWait ${MiKTeXInstall}
+   MessageBox MB_OK|MB_ICONINFORMATION "${MiKTeXInstall} --shared"
+   ${if} $MultiUser.Privileges != "Admin"
+   ${andif} $MultiUser.Privileges != "Power"
+    # call the non-admin version
+    ExecWait ${MiKTeXInstall}
+   ${else}
+    ExecWait "${MiKTeXInstall} --shared"
+   ${endif}
    # test if MiKTeX is installed
    Call LaTeXActions
    ${if} ${RunningX64}
index 6fbbbc8e6bf71c2269111b4651506fdec63ce9ab..f76c9c45724781e9ae0759aa392dcb83a2bff40b 100644 (file)
@@ -7,6 +7,12 @@
 #    RevStrPointer
 #    RevStrPoint
 #
+# - PATHCheck (checks for a path in a semicolon separated path list like the PATH variable), uses:
+#    StrPointer
+#    StrPoint
+#    RevStrPointer
+#    RevStrPoint
+#
 # - un.DelAppPathSub and UnAppPreSuff,
 #    (delete the folder ~\Documents and Settings\username\Application Data\LyX for all users), uses:
 #    un.GetParentA
@@ -273,7 +279,7 @@ FunctionEnd
  Push $1
  StrCpy $0 ""
  StrCpy $1 ""
- FileOpen $0 "${Filepath}\${FileName}" r
+ FileOpen $0 "${FilePath}\${FileName}" r
  ${if} $0 = ""
   StrCpy $1 "False"
  ${Else}
@@ -290,7 +296,7 @@ FunctionEnd
 
 Function LaTeXCheck
  # searches the string "$Search" in the string "$String" and extracts the path around it
- # the extracted path is checked if the file "latex.exe" is in it
+ # it is checked if the file "latex.exe" exists in the extracted path
 
    StartCheck:
    StrLen $3 $String
@@ -330,3 +336,40 @@ Function LaTeXCheck
 
 FunctionEnd
 
+#------------------------------------------
+
+!macro PATHCheck PathResult FileName
+ # searches the string "$Search" in the string "$String" and extracts the path around it
+ # it is checked if the given filename exists
+   !define ID ${__LINE__}
+   StrLen $3 $String
+   Call StrPoint
+   ${if} $Pointer == "-1" # if nothing was found
+    StrCpy ${PathResult} "False"
+    Goto EndPATHCheck_${ID}
+   ${endif}
+   IntOp $3 $3 - $Pointer
+   StrCpy $4 $String $3 "-$3" # $4 is now the part behind the $Search string
+   StrCpy $String $String $Pointer # $String is now the part before the $Search string
+   StrCpy $Search ":" # search for the ":" after the first previous drive letter
+   Call RevStrPoint
+   IntOp $Pointer $Pointer - 1 # jump before the ":" to the drive letter
+   StrCpy $Pointer $Pointer "" 1 # cut of the "-" sign
+   StrCpy ${PathResult} $String $Pointer "-$Pointer"
+   StrCpy $String $4
+   StrCpy $Search ";" # search for the following ";" that separates the different paths
+   Call StrPoint
+   ${if} $Pointer != "-1" # if something was found
+    StrCpy $String $String $Pointer
+   ${endif}
+   StrCpy ${PathResult} "${PathResult}$String"
+   # check if the FileName exists in the ${Result} folder
+   !insertmacro FileCheck $R5 ${FileName} ${PathResult}
+   ${if} $R5 == "False"
+    StrCpy ${PathResult} "False"
+   ${endif}
+   EndPATHCheck_${ID}:
+   !undef ID
+
+!macroend
index b0d4be742fba299920941d403e16420490a23216..5599dc4807eae8bb46f06350eed7cb8445c9e989 100644 (file)
@@ -141,12 +141,20 @@ Function MissingPrograms
     StrCpy $ImageEditorPath $0
    ${endif}
   ${endif}
-  
+
   # test if and where the BibTeX-editor JabRef is installed
   ReadRegStr $PathBibTeXEditor HKCU "Software\JabRef" "Path"
   ${if} $PathBibTeXEditor == ""
    ReadRegStr $PathBibTeXEditor HKLM "Software\JabRef" "Path"
   ${endif}
+  # since JabRef 3.x the pathes are different
+  # there is currently a bug in the Jabref installer that prevents to install it without admin permissions
+  # therefore only check the admin installation
+  ${if} $PathBibTeXEditor == ""
+   ReadRegStr $PathBibTeXEditor HKCR "JabRef\shell\open\command" ""
+   StrCpy $PathBibTeXEditor $PathBibTeXEditor -17 # remove '\JabRef.exe" "%1"'
+   StrCpy $PathBibTeXEditor $PathBibTeXEditor "" 1 # remove the leading quote
+  ${endif}
 
   ${ifnot} ${FileExists} "$PathBibTeXEditor\${BIN_BIBTEXEDITOR}"
    StrCpy $PathBibTeXEditor ""
@@ -154,13 +162,13 @@ Function MissingPrograms
   ${else}
    StrCpy $JabRefInstalled == "Yes"
   ${endif}
-  
+
   # test if and where LilyPond is installed
   ReadRegStr $LilyPondPath HKLM "Software\LilyPond" "Install_Dir"
   ${if} $LilyPondPath != ""
    StrCpy $LilyPondPath "$LilyPondPath\usr\bin" # add "\usr\bin"
   ${endif}
-  
+
   # test if Inkscape is installed
   ReadRegStr $SVGPath HKLM "SOFTWARE\Classes\inkscape.svg\DefaultIcon" ""
   ${if} $SVGPath != ""
@@ -180,6 +188,26 @@ Function MissingPrograms
    StrCpy $GnumericPath $0
   ${endif}
 
+  # test if Pandoc is installed
+  # HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\John MacFarlane\Pandoc
+  ${if} ${RunningX64}
+   SetRegView 64 # the PATH is in the 64bit registry section
+  ${endif}
+  # check for the path to the pandoc.exe in Window's PATH variable
+  StrCpy $5 ""
+  StrCpy $Search "pandoc"
+  ReadRegStr $String HKCU "Environment" "PATH"
+  !insertmacro PATHCheck $5 "pandoc.exe" # macro from LyXUtils.nsh
+  # if it is not in the user-specific PATH it might be in the global PATH
+  ${if} $5 == "False"
+   ReadRegStr $String HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path"
+   !insertmacro PATHCheck $5 "pandoc.exe" # macro from LyXUtils.nsh
+  ${endif}
+  SetRegView 32
+  ${if} $5 != "False"
+   StrCpy $PandocPath $5
+  ${endif}
+
 FunctionEnd
 
 # ---------------------------------------
index d01ec8d66aed26e4d5eac3e734524c7025c83a83..f4ceacbfa22bec0f59c31c912c76333f2b256490 100644 (file)
@@ -48,12 +48,15 @@ Section "!${APP_NAME}" SecCore
  SectionIn RO
 SectionEnd
 
+# FIXME: set this to true when LyX 2.2.0 final is released
 Section "$(SecFileAssocTitle)" SecFileAssoc
- StrCpy $CreateFileAssociations "true" 
+ SectionIn RO
+ StrCpy $CreateFileAssociations "false" 
 SectionEnd
 
 Section "$(SecDesktopTitle)" SecDesktop
- StrCpy $CreateDesktopIcon "true"
+ SectionIn RO
+ StrCpy $CreateDesktopIcon "false"
 SectionEnd
 
 !if ${SETUPTYPE} == BUNDLE
@@ -597,11 +600,13 @@ SectionGroupEnd
 # the selection states of the dictionary sections
 Function .onInit
 
-  ${IfNot} ${IsNT}
-  ${OrIfNot} ${AtLeastWinXP}
-    MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} ${APP_VERSION} requires Windows XP or later." /SD IDOK
+  ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
+  ${if} $R0 == "5.0" # 2000
+  ${orif} $R0 == "5.1" # XP
+  ${orif} $R0 == "5.2" # 2003
+    MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} ${APP_VERSION} requires Windows Vista or newer." /SD IDOK
     Quit
-  ${EndIf}
+  ${endif}
   
   # check that the installer is not currently running
   System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${BundleExeFile}.Instance") i .r1 ?e'
@@ -626,6 +631,11 @@ Function .onInit
   # Abort
   #${endif}
   
+  # read the use and computer name
+  ReadRegStr $ComputerName HKLM "System\CurrentControlSet\Control\ComputerName\ActiveComputerName" "ComputerName"
+  System::Call "advapi32::GetUserName(t .r0, *i ${NSIS_MAX_STRLEN} r1) i.r2"
+  StrCpy $UserName $0  
+  
   !insertmacro MULTIUSER_INIT
   
   # check if this LyX version is already installed
index 38e030bd8f0894e7e0baea96676e24d5d3f9770b..8fe77d2dd9c7f52051055b3e70fb53b7a06b0d4e 100644 (file)
@@ -14,6 +14,7 @@ Var APPDATemp
 Var AppPre
 var AppSubfolder
 Var AppSuff
+Var ComputerName
 Var CreateDesktopIcon
 Var CreateFileAssociations
 Var DictCode
@@ -36,6 +37,7 @@ Var LilyPondPath
 Var MiKTeXUser
 Var MiKTeXVersion
 Var OldVersionNumber
+Var PandocPath
 Var Pointer
 Var PSVPath
 Var PythonPath
@@ -50,6 +52,7 @@ Var ThesCode
 Var ThesCodes
 Var UpdateFNDBReturn
 Var UserList
+Var UserName
 
 Var LangName
 
index 8fbd9522e352ef8ec7c4d494612ff3b59c996590..e3a73f0fac231aa3d944ca5c9fc93f19cc34fc04 100644 (file)
@@ -10,11 +10,11 @@ These typically need to be modified for each LyX release
 # Version number
 
 !define APP_VERSION_MAJOR 2
-!define APP_VERSION_MINOR 1
-!define APP_VERSION_REVISION 4
-!define APP_VERSION_EMERGENCY "" # use "1" for an emergency release of LyX otherwise ""
-!define APP_EMERGENCY_DOT "" # use "." for an emergency release of LyX otherwise ""
-!define APP_VERSION_BUILD 4 # Start with 1 for the installer releases of each version
+!define APP_VERSION_MINOR 2
+!define APP_VERSION_REVISION 0
+!define APP_VERSION_EMERGENCY "beta-1" # use "1" for an emergency release of LyX otherwise ""
+!define APP_EMERGENCY_DOT "." # use "." for an emergency release of LyX otherwise ""
+!define APP_VERSION_BUILD 1 # Start with 1 for the installer releases of each version
 
 !define APP_VERSION "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_REVISION}${APP_EMERGENCY_DOT}${APP_VERSION_EMERGENCY}" # Version to display
 
@@ -37,28 +37,28 @@ These typically need to be modified for each LyX release
 # File locations
 # !!! you need to adjust them to the folders in your Windows system !!!
 
-!define FILES_LYX "D:\LyXPackage2.1\LyX"
+!define FILES_LYX "D:\LyXPackage2.2\LyX"
 !define FILES_DEPS "D:\LyXGit\Master\lyx-windows-deps-msvc2010"
-!define FILES_QT "C:\Qt\4.8.7"
+!define FILES_QT "C:\Qt\Qt5-5-1-2010\5.5\msvc2010"
 !define ClassFileDir "${FILES_LYX}\Resources\tex"
 !define DVIPostFileDir "${FILES_DEPS}\tex"
 
 #--------------------------------
-# MiKTeX
+# MiKTeX and JabRef
 # Sizes in KB
 
 # it seems that some companies block ftp access by default, therefore http access is preferred here
 !define MiKTeXRepo "http://ftp.fernuni-hagen.de/ftp-dir/pub/mirrors/www.ctan.org/systems/win32/miktex/tm/packages/"
 #!define MiKTeXRepo "ftp://ftp.tu-chemnitz.de/pub/tex/systems/win32/miktex/tm/packages/"
 
-!define JabRefVersion "2.10"
+!define JabRefVersion "2.11.1"
 !define MiKTeXDeliveredVersion "2.9"
-!define ImageMagickVersion "6.9.2"
+!define ImageMagickVersion "6.9.3"
  
 # definitions for the Complete installer
 !if ${SETUPTYPE} == BUNDLE
- !define JabRefInstall "external\JabRef-2.10-setup.exe"
- !define SIZE_JABREF 14100
- !define MiKTeXInstall "$INSTDIR\external\basic-miktex-2.9.5721.exe"
+ !define JabRefInstall "external\JabRef-2.11.1-setup.exe"
+ !define SIZE_JABREF 18514
+ !define MiKTeXInstall "$INSTDIR\external\basic-miktex-2.9.5872.exe"
 !endif
 
index 3b5a152368cc5367de08f48a4516c98434a9ddaf..3974364fe046b0a6af012c691481bd3f9fe0643e 100644 (file)
@@ -145,6 +145,9 @@ Section -Configure
   ${if} $PathBibTeXEditor != ""
     StrCpy $PathPrefix "$PathPrefix;$PathBibTeXEditor"
   ${EndIf}
+  ${if} $PandocPath != ""
+   StrCpy $PathPrefix "$PathPrefix;$PandocPath"
+  ${endif}
   ${if} $LilyPondPath != ""
    StrCpy $PathPrefix "$PathPrefix;$LilyPondPath"
   ${endif}
@@ -167,7 +170,13 @@ Section -Configure
                 \format "pdf3" "pdf" "PDF (dvipdfm)" "m" "pdfview" "" "document,vector,menu=export" "application/pdf"$\r$\n\
                 \format "pdf2" "pdf" "PDF (pdflatex)" "F" "pdfview" "" "document,vector,menu=export" "application/pdf"$\r$\n\
                 \format "pdf" "pdf" "PDF (ps2pdf)" "P" "pdfview" "" "document,vector,menu=export" "application/pdf"$\r$\n'
-
+  
+  # use Inkscape to edit PDF and EPS images
+  ${if} $SVGPath != ""
+   FileWrite $R1 '\format "pdf6" "pdf" "PDF (graphics)" "" "auto" "inkscape" "vector" "application/pdf"$\r$\n\
+                                 \format "eps" "eps" "EPS" "" "auto" "inkscape" "vector" "image/x-eps"$\r$\n'
+  ${endif}
+  
   # if Inkscape is not available Imagemagick will be used to convert WMF/EMF files
   # We need to specify a resolution for the converter otherwise 1024 dpi are used and
   # eps2pdf takes ages. 300 dpi are a good compromise for speed and size.
index c8f58b055127d9176c39a10385c5e4b6cec7a988..939b990df6516713b5dafb177a28bec37e2374e5 100644 (file)
@@ -132,8 +132,9 @@ Section -ProgramFiles SecProgramFiles
   
   !if ${SETUPTYPE} == BUNDLE
    
-   # install JabRef if not already installed and the user selected it
-   # if no BibTeX editor is installed
+   # install JabRef if not already installed, the user selected it
+   # and if no BibTeX editor is installed
+   # due to an installer bug in the installer of JabRef version 3.x, we still install JabRef 2.11.1
    ${if} $PathBibTeXEditor == ""
    ${andif} $InstallJabRef == "true"
     # launch installer
@@ -162,7 +163,7 @@ Section -ProgramFiles SecProgramFiles
      ${else}
       WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX" "Yes${APP_SERIES_KEY}"
      ${endif}
-    ${endif} 
+    ${endif}
    ${endif} # end if PathBibTeXEditor
   !endif # end if BUNDLE