new "Update" installer: should now be close to ready

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17815 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2007-04-15 10:22:49 +00:00
parent 9cf5358d7d
commit a1b3803190
22 changed files with 255 additions and 146 deletions

View File

@ -253,9 +253,8 @@ Section "-Installation actions" SecInstallation
MessageBox MB_OK|MB_ICONEXCLAMATION "$(CreateCmdFilesFailed)"
; set the preferences file
; having one preferences file that is modified to fit the needs isn't possible because the command
; ${LineFind} "$INSTDIR\Resources\preferences" "" "-16:-11" "DeleteLines" ; macro from TextFunc.nsh
; removes the file permissions for Users, so that it can later not be read (bug in ${LineFind} of TextFunc.nsh)
; (having one preferences file that is modified to fit the needs is possible but not easy to maintain
; therefore simply delete the files that shouldn't be used)
; if not Acrobat or Adobe Reader is used
${if} $Acrobat == "None" ; clear the entries in the preferences file that define PDFViewWin7 or 8 as viewer
Rename "$INSTDIR\Resources\preferencesGSview" "$INSTDIR\Resources\preferences"
@ -263,12 +262,12 @@ Section "-Installation actions" SecInstallation
Delete "$INSTDIR\Resources\preferences8"
${endif}
; if Acrobat or Adobe Reader is used
${if} $Acrobat == "7" ; clear the entries in the preferences file that define PDFViewWin8 as viewer
${if} $Acrobat == "7" ; used for all Acrobat (Adobe Reader) versions <= 7
Rename "$INSTDIR\Resources\preferences7" "$INSTDIR\Resources\preferences"
Delete "$INSTDIR\Resources\preferences8"
Delete "$INSTDIR\Resources\preferencesGSview"
${endif}
${if} $Acrobat == "8" ; clear the entries in the preferences filethat define PDFViewWin7 as viewer
${if} $Acrobat == "8"
Rename "$INSTDIR\Resources\preferences8" "$INSTDIR\Resources\preferences"
Delete "$INSTDIR\Resources\preferences7"
Delete "$INSTDIR\Resources\preferencesGSview"

View File

@ -187,9 +187,8 @@ Section "-Installation actions" SecInstallation
MessageBox MB_OK|MB_ICONEXCLAMATION "$(CreateCmdFilesFailed)"
; set the preferences file
; having one preferences file that is modified to fit the needs isn't possible because the command
; ${LineFind} "$INSTDIR\Resources\preferences" "" "-16:-11" "DeleteLines" ; macro from TextFunc.nsh
; removes the file permissions for Users, so that it can later not be read (bug in ${LineFind} of TextFunc.nsh)
; (having one preferences file that is modified to fit the needs is possible but not easy to maintain
; therefore simply delete the files that shouldn't be used)
; if not Acrobat or Adobe Reader is used
${if} $Acrobat == "None" ; clear the entries in the preferences file that define PDFViewWin7 or 8 as viewer
Rename "$INSTDIR\Resources\preferencesGSview" "$INSTDIR\Resources\preferences"
@ -197,12 +196,12 @@ Section "-Installation actions" SecInstallation
Delete "$INSTDIR\Resources\preferences8"
${endif}
; if Acrobat or Adobe Reader is used
${if} $Acrobat == "7" ; clear the entries in the preferences file that define PDFViewWin8 as viewer
${if} $Acrobat == "7" ; used for all Acrobat (Adobe Reader) versions <= 7
Rename "$INSTDIR\Resources\preferences7" "$INSTDIR\Resources\preferences"
Delete "$INSTDIR\Resources\preferences8"
Delete "$INSTDIR\Resources\preferencesGSview"
${endif}
${if} $Acrobat == "8" ; clear the entries in the preferences filethat define PDFViewWin7 as viewer
${if} $Acrobat == "8"
Rename "$INSTDIR\Resources\preferences8" "$INSTDIR\Resources\preferences"
Delete "$INSTDIR\Resources\preferences7"
Delete "$INSTDIR\Resources\preferencesGSview"

View File

@ -142,8 +142,10 @@ Var RunNumber
!include "LogicLib.nsh"
!include "FileFunc.nsh"
!include "StrFunc.nsh"
;!include "TextFunc.nsh"
;!insertmacro LineFind
!include "TextFunc.nsh"
!insertmacro LineFind
!include "WordFunc.nsh"
!insertmacro WordReplace
; Set of various macros and functions
!include "LyXUtils.nsh"
@ -370,13 +372,6 @@ Function LaunchProduct
Exec ${PRODUCT_BAT}
FunctionEnd
;--------------------------------
;Function DeleteLines
; StrCpy $0 SkipWrite
; Push $0
;FunctionEnd
;--------------------------------
; The Uninstaller

View File

@ -135,8 +135,10 @@ Var RunNumber
!include "LogicLib.nsh"
!include "FileFunc.nsh"
!include "StrFunc.nsh"
;!include "TextFunc.nsh"
;!insertmacro LineFind
!include "TextFunc.nsh"
!insertmacro LineFind
!include "WordFunc.nsh"
!insertmacro WordReplace
; Set of various macros and functions
!include "LyXUtils.nsh"
@ -354,13 +356,6 @@ Function LaunchProduct
Exec ${PRODUCT_BAT}
FunctionEnd
;--------------------------------
;Function DeleteLines
; StrCpy $0 SkipWrite
; Push $0
;FunctionEnd
;--------------------------------
; The Uninstaller

View File

@ -68,10 +68,12 @@ InstallDir "$PROGRAMFILES\${PRODUCT_NAME} ${PRODUCT_VERSION}"
Var LatexPath
Var EditorPath
Var PythonPath
Var ImageMagickPath
Var PathPrefix
Var Answer
Var UserName
Var CreateDesktopIcon
Var FileAssociation
Var StartmenuFolder
Var ProductRootKey
Var AppPre
@ -89,13 +91,19 @@ Var INSTDIR_NEW
!include "LogicLib.nsh"
!include "FileFunc.nsh"
!include "StrFunc.nsh"
!include "TextFunc.nsh"
!insertmacro LineFind
!include "WordFunc.nsh"
!insertmacro WordReplace
; Set of various macros and functions
!include "LyXUtils.nsh"
; Use the Abiword macros to help set up associations with the file extension in the Registry.
; Grabbed from
; http://abiword.pchasm.org/source/cvs/abiword-cvs/abi/src/pkg/win/setup/NSISv2/abi_util_fileassoc.nsh
!include "abi_util_fileassoc.nsh"
; list with modified files
!include "Updated.nsh"
@ -304,8 +312,11 @@ Section "-Installation actions" SecInstallation
; delete old registry entries
DeleteRegKey SHCTX "${PRODUCT_UNINST_KEY_OLD}"
DeleteRegKey SHCTX "${PRODUCT_UNINST_KEY_OLD}"
DeleteRegKey SHCTX "${PRODUCT_DIR_REGKEY}"
DeleteRegKey HKCR "Applications\lyx.bat"
; remove extension .lyx
${RemoveFileAssociation} "${PRODUCT_EXT}" "${PRODUCT_NAME}"
DeleteRegKey HKCR "${PRODUCT_NAME}"
; determine the new name of the install location,
; only when the user has used the default path settings of the previous LyX-version
@ -314,6 +325,7 @@ Section "-Installation actions" SecInstallation
StrLen $3 $String
Call StrPoint ; search the LaTeXPath for the phrase "${PRODUCT_VERSION_OLD}" (function from LyXUtils.nsh)
${if} $Pointer != "-1" ; if something was found
IntOp $Pointer $Pointer - 1 ; jump before the first "\" of "\${PRODUCT_VERSION_OLD}"
StrCpy $String $String "$Pointer" ; $String is now the part before "\${PRODUCT_VERSION_OLD}"
; rename the installation folder by copying LyX files
@ -323,17 +335,26 @@ Section "-Installation actions" SecInstallation
; delete the old folder
RMDir /r $INSTDIR
StrCpy $INSTDIR $INSTDIR_NEW
; read the PATH_PREFIX
FileOpen $R1 "$INSTDIR\Resources\lyxrc.dist" r
; set new PATH_PREFIX in the file lyxrc.dist
FileOpen $R1 "$INSTDIR\Resources\lyxrc.dist" a
FileRead $R1 $PathPrefix
${WordReplace} $PathPrefix "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $PathPrefix
FileClose $R1
; set the PATH_PREFIX according to the new folder
FileOpen $R1 "$INSTDIR\Resources\lyxrc.dist" w
FileSeek $R1 0 ; set file pointer to the beginning
FileWrite $R1 '\path_prefix "$PathPrefix"$\r$\n' ; overwrite the existing path with the actual one
FileWrite $R1 '$PathPrefix' ; overwrite the existing path with the actual one
FileClose $R1
${endif}
; set the new path to the preferences files for all users
Call CheckAppPathPreferences ; Function from LyXUtils.nsh
; set new path to ImageMagick
ReadRegStr $ImageMagickPath SHCTX "SOFTWARE\Classes\Applications" "AutoRun"
${if} $ImageMagickPath != ""
${WordReplace} $ImageMagickPath "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" $ImageMagickPath ; macro from WordFunc.nsh
WriteRegStr SHCTX "SOFTWARE\Classes\Applications" "AutoRun" "$ImageMagickPath"
${endif}
${endif} ; end ${if} $Pointer != "-1" (if the folder is renamed)
; register LyX
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "${PRODUCT_EXE}"
@ -350,7 +371,8 @@ Section "-Installation actions" SecInstallation
WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoModify" 0x00000001
WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoRepair" 0x00000001
; create start menu entry
; create start menu entry
MessageBox MB_OK "$SMPROGRAMS\$StartmenuFolder"
SetOutPath "$INSTDIR\bin"
CreateDirectory "$SMPROGRAMS\$StartmenuFolder"
CreateShortCut "$SMPROGRAMS\$StartmenuFolder\${PRODUCT_NAME}.lnk" "${PRODUCT_BAT}" "" "${PRODUCT_EXE}"
@ -362,6 +384,13 @@ Section "-Installation actions" SecInstallation
SetOutPath "$INSTDIR\bin"
CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "${PRODUCT_BAT}" "" "${PRODUCT_EXE}"
${endif}
; register the extension .lyx
ReadRegStr $FileAssociation HKCR "LyX\shell\open\command" ""
${if} $CreateFileAssociations != ""
${CreateApplicationAssociation} "${PRODUCT_NAME}" "${PRODUCT_NAME}" "$(FileTypeTitle)" "${PRODUCT_EXE}" "${PRODUCT_BAT}"
${CreateFileAssociation} "${PRODUCT_EXT}" "${PRODUCT_NAME}" "${PRODUCT_MIME_TYPE}"
${endif}
; test if Python is installed
; only use an existing python when it is version 2.5 because many Compaq and Dell PC are delivered
@ -388,7 +417,7 @@ Section "-Installation actions" SecInstallation
FileClose $R1
MessageBox MB_OK|MB_ICONINFORMATION "$(LatexConfigInfo)"
ExecWait '"$INSTDIR\Resources\configLyX.bat"'
;Delete "$INSTDIR\Resources\configLyX.bat"
Delete "$INSTDIR\Resources\configLyX.bat"
SectionEnd

View File

@ -1,38 +1,42 @@
# This script contains the following functions:
#
# - LaTeXCheck (check installed LaTeX-system), uses:
# StrPointer
# StrPoint
# RevStrPointer
# RevStrPoint
#
# - un.DelAppPathSub and UnAppPreSuff, (delete the folder ~\Documents and Settings\username\Application Data\LyX for all users), uses:
# un.GetParent
# un.GetUsers
# un.StrPoint
# StrPointer
# StrPoint
# UnAppPreSuff
#
# - CreateAppPathSub and AppPreSuff, (creates the folder ~\Documents and Settings\username\Application Data\LyX for all users), uses:
# GetParent
# GetUsers
# StrPointer
# StrPoint
# UnAppPreSuff
#
# - IsUserAdmin (checks if user is admin)
#
# - FileCheck (checks if a given file exists)
#
# - EditorCheck (check for installed editors)
#
#--------------------------
; This script contains the following functions:
;
; - LaTeXCheck (check installed LaTeX-system), 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
; un.GetUsers
; un.StrPoint
; StrPointer
; StrPoint
; UnAppPreSuff
;
; - CreateAppPathSub and AppPreSuff, (creates the folder ~\Documents and Settings\username\Application Data\LyX for all users), uses:
; GetParentA
; GetUsers
; StrPointer
; StrPoint
; UnAppPreSuff
;
; - CheckAppPathPreferences (replaces the old install folder name with the new one in the preferences files)
; (used by Update installer), uses:
; ReplaceLineContent
;
; - IsUserAdmin (checks if user is admin)
;
; - FileCheck (checks if a given file exists)
;
; - EditorCheck (check for installed editors)
;
;--------------------------
!macro StrPointer FindStr SearchStr Pointer
# searches for a string/character (SearchStr) in another string (FindStr)
# and returns the number of the character in the FindStr where the SearchStr was found (Pointer)
# if nothing was found or the search is impossible the Pointer is set to -1
; searches for a string/character (SearchStr) in another string (FindStr)
; and returns the number of the character in the FindStr where the SearchStr was found (Pointer)
; if nothing was found or the search is impossible the Pointer is set to -1
StrLen $R2 ${SearchStr}
StrLen $R4 ${FindStr}
@ -57,18 +61,18 @@
!macroend
#--------------------------------
;--------------------------------
Function StrPoint
!insertmacro StrPointer $String $Search $Pointer
FunctionEnd
#--------------------------------
;--------------------------------
!macro RevStrPointer FindStr SearchStr Pointer
# searches for a string/character (SearchStr) in another string (FindStr) in reverse order
# and returns the number of the character in the FindStr where the SearchStr was found (Pointer)
# if nothing was found or the search is impossible the Pointer is set to +1
; searches for a string/character (SearchStr) in another string (FindStr) in reverse order
; and returns the number of the character in the FindStr where the SearchStr was found (Pointer)
; if nothing was found or the search is impossible the Pointer is set to +1
StrLen $R2 ${SearchStr}
StrLen $R4 ${FindStr}
@ -93,19 +97,19 @@ FunctionEnd
!macroend
#--------------------------------
;--------------------------------
Function RevStrPoint
!insertmacro RevStrPointer $String $Search $Pointer
FunctionEnd
#--------------------------------
;--------------------------------
!macro AppPreSuff AppPre AppSuff
# the APPDATA path has always the following structure:
# C:\Documents and Settings\username\Application Data
# this macro saves the "C:\Documents and Settings\" substring into the variable "AppPre"
# and the "Application Data" substring into the variable "AppSuff"
; the APPDATA path has always the following structure:
; C:\Documents and Settings\username\Application Data
; this macro saves the "C:\Documents and Settings\" substring into the variable "AppPre"
; and the "Application Data" substring into the variable "AppSuff"
StrCpy $String "$APPDATA"
StrCpy $Search "\"
@ -124,11 +128,11 @@ FunctionEnd
!macroend
#--------------------------------
;--------------------------------
Function GetParent
# deletes a subfolder of the APPDATA path for all users
# used by the function "un.getUsers"
Function GetParentA
; deletes a subfolder of the APPDATA path for all users
; used by the function "un.getUsers"
Exch $R0
Push $R1
@ -151,14 +155,14 @@ Function GetParent
FunctionEnd
#--------------------------------
;--------------------------------
Function GetUsers
# reads the subfolders of the "Documents and Settings" folder to get a list of the users
; reads the subfolders of the "Documents and Settings" folder to get a list of the users
StrCpy $R3 ""
Push "$PROFILE"
Call GetParent
Call GetParentA
Pop $R2
StrCpy $R2 "$R2"
FindFirst $R0 $R1 "$R2\*"
@ -181,11 +185,11 @@ Function GetUsers
FunctionEnd
#--------------------------------
;--------------------------------
Function un.GetParent
# deletes a subfolder of the APPDATA path for all users
# used by the function "un.getUsers"
Function un.GetParentA
; deletes a subfolder of the APPDATA path for all users
; used by the function "un.getUsers"
Exch $R0
Push $R1
@ -208,14 +212,14 @@ Function un.GetParent
FunctionEnd
#--------------------------------
;--------------------------------
Function un.GetUsers
# reads the subfolders of the "Documents and Settings" folder to get a list of the users
; reads the subfolders of the "Documents and Settings" folder to get a list of the users
StrCpy $R3 ""
Push "$PROFILE"
Call un.GetParent
Call un.GetParentA
Pop $R2
StrCpy $R2 "$R2"
FindFirst $R0 $R1 "$R2\*"
@ -238,19 +242,19 @@ Function un.GetUsers
FunctionEnd
#--------------------------------
;--------------------------------
Function un.StrPoint
!insertmacro StrPointer $String $Search $Pointer
FunctionEnd
#--------------------------------
;--------------------------------
!macro UnAppPreSuff AppPre AppSuff
# the APPDATA path has always the following structure:
# C:\Documents and Settings\username\Application Data
# this macro saves the "C:\Documents and Settings\" substring into the variable "AppPre"
# and the "Application Data" substring into the variable "AppSuff"
; the APPDATA path has always the following structure:
; C:\Documents and Settings\username\Application Data
; this macro saves the "C:\Documents and Settings\" substring into the variable "AppPre"
; and the "Application Data" substring into the variable "AppSuff"
StrCpy $String "$APPDATA"
StrCpy $Search "\"
@ -269,12 +273,12 @@ FunctionEnd
!macroend
#--------------------------------
;--------------------------------
Function un.DelAppPathSub
# deletes a subfolder of the APPDATA path for all users
; deletes a subfolder of the APPDATA path for all users
# get list of all users
; get list of all users
Push $R0
Push $R1
Push $R2
@ -286,7 +290,7 @@ Function un.DelAppPathSub
Pop $R1
Pop $R0
# the usernames in the list of all users is separated by "|"
; the usernames in the list of all users is separated by "|"
loop:
StrCpy $String "$UserList"
StrCpy $Search "|"
@ -295,8 +299,8 @@ Function un.DelAppPathSub
StrCpy $0 $UserList $Pointer ; $0 contains now the username
IntOp $Pointer $Pointer + 1 ; jump after the "|"
StrCpy $UserList $UserList "" $Pointer ; cut off the first username in the list
# generate the string for the current user
# AppPre and AppSuff are generated in the macro "AppPreSuff"
; generate the string for the current user
; AppPre and AppSuff are generated in the macro "AppPreSuff"
StrCpy $AppPath "$AppPre\$0\$AppSuff\${PRODUCT_SUBFOLDER}"
RMDir /r $AppPath ; delete the folder
Goto loop
@ -307,15 +311,15 @@ Function un.DelAppPathSub
FunctionEnd
#--------------------------------
;--------------------------------
Function CreateAppPathSub
# creates a subfolder of the APPDATA path for all users
; creates a subfolder of the APPDATA path for all users
# get folder names
; get folder names
!insertmacro AppPreSuff $AppPre $AppSuff
# get list of all users
; get list of all users
Push $R0
Push $R1
Push $R2
@ -327,22 +331,23 @@ Function CreateAppPathSub
Pop $R1
Pop $R0
# the usernames in the list of all users is separated by "|"
; the usernames in the list of all users is separated by "|"
loop:
StrCpy $String "$UserList"
StrCpy $Search "|"
Call StrPoint ; search for the "|"
StrCmp $Pointer "-1" ready
StrCmp $Pointer "-1" ready ; the loop is finished when no "|" could be found
StrCpy $0 $UserList $Pointer ; $0 contains now the username
IntOp $Pointer $Pointer + 1 ; jump after the "|"
StrCpy $UserList $UserList "" $Pointer ; cut off the first username in the list
# generate the string for the current user
# AppPre and AppSuff are generated in the macro "AppPreSuff"
; generate the string for the current user
; AppPre and AppSuff are generated in the macro "AppPreSuff"
StrCpy $AppPath "$AppPre\$0\$AppSuff\${PRODUCT_SUBFOLDER}"
CreateDirectory $AppPath ; create the folder
CopyFiles "$INSTDIR\Resources\session" "$AppPath"
Goto loop
ready:
; now do the same for the last user name
StrCpy $0 $UserList
StrCpy $AppPath "$AppPre\$0\$AppSuff\${PRODUCT_SUBFOLDER}"
CreateDirectory $AppPath ; create the folder
@ -351,7 +356,69 @@ Function CreateAppPathSub
FunctionEnd
#--------------------------------
;--------------------------------
Function ReplaceLineContent
; replaces "${PRODUCT_VERSION_OLD}" with "LyX ${PRODUCT_VERSION}"
${WordReplace} '$R9' "${PRODUCT_VERSION_OLD}" "LyX ${PRODUCT_VERSION}" "+" '$R9' ; macro from WordFunc.nsh
Push $0
FunctionEnd
;--------------------------------
Function CheckAppPathPreferences
; modify the preferences file for all users
; get folder names
!insertmacro AppPreSuff $AppPre $AppSuff
; get list of all users
Push $R0
Push $R1
Push $R2
Push $R3
Call GetUsers
StrCpy $UserList $R3 "" 1 ; cut off the "|" at the end of the list
Pop $R3
Pop $R2
Pop $R1
Pop $R0
; the usernames in the list of all users is separated by "|"
loop:
StrCpy $String "$UserList"
StrCpy $Search "|"
Call StrPoint ; search for the "|"
StrCmp $Pointer "-1" ready ; the loop is finished when no "|" could be found
StrCpy $0 $UserList $Pointer ; $0 contains now the username
IntOp $Pointer $Pointer + 1 ; jump after the "|"
StrCpy $UserList $UserList "" $Pointer ; cut off the first username in the list
; generate the string for the current user
; AppPre and AppSuff are generated in the macro "AppPreSuff"
StrCpy $AppPath "$AppPre\$0\$AppSuff\${PRODUCT_SUBFOLDER}"
; read the preferences file to test if it exists
FileOpen $R1 "$AppPath\preferences" r
IfErrors doneA
FileClose $R1
; search for "${PRODUCT_VERSION_OLD}" and replace it with "LyX ${PRODUCT_VERSION}"
${LineFind} "$AppPath\preferences" "" "1:-1" "ReplaceLineContent" ; macro from TextFunc.nsh
doneA:
Goto loop
ready:
; now do the same for the last user name
StrCpy $0 $UserList
StrCpy $AppPath "$AppPre\$0\$AppSuff\${PRODUCT_SUBFOLDER}"
FileOpen $R1 "$AppPath\preferences" r
IfErrors doneB
FileClose $R1
${LineFind} "$AppPath\preferences" "" "1:-1" "ReplaceLineContent"
doneB:
FunctionEnd
;--------------------------------
!macro IsUserAdmin Result Name
@ -375,10 +442,10 @@ FunctionEnd
!macroend
#--------------------------------
;--------------------------------
!macro FileCheck Result FileName FilePath
# checks if a file exists, returns "True" or "False"
; checks if a file exists, returns "True" or "False"
Push $0
Push $1
@ -397,11 +464,11 @@ FunctionEnd
!macroend
#------------------------------------------
;------------------------------------------
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
; 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
StartCheck:
StrLen $3 $String
@ -425,7 +492,7 @@ Function LaTeXCheck
StrCpy $String $String $Pointer
${endif}
StrCpy $LatexPath "$LatexPath$String"
# check if the latex.exe exists in the $LatexPath folder
; check if the latex.exe exists in the $LatexPath folder
!insertmacro FileCheck $5 "latex.exe" "$LatexPath"
${if} $5 == "False" ; delete the entry with the wrong path to the latex.exe and try again
StrCpy $LatexPath ""
@ -441,88 +508,88 @@ Function LaTeXCheck
FunctionEnd
#------------------------------------------
;------------------------------------------
Function EditorCheck
# 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)
; 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)
StrCpy $EditorPath ""
StrCpy $0 ""
# check for jEdit
; check for jEdit
ReadRegStr $EditorPath HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\jEdit_is1" "InstallLocation"
${if} $EditorPath != ""
StrCpy $EditorPath $EditorPath -1 ; remove "\" from the end of the string
${endif}
# check for PSPad
; check for PSPad
StrCpy $0 ""
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\PSPad editor_is1" "InstallLocation"
${if} $0 != ""
StrCpy $0 $0 -1
StrCpy $EditorPath "$EditorPath;$0"
${endif}
# check for WinShell
; check for WinShell
StrCpy $0 ""
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinShell_is1" "InstallLocation"
${if} $0 != ""
StrCpy $0 $0 -1
StrCpy $EditorPath "$EditorPath;$0"
${endif}
# check for ConTEXT
; check for ConTEXT
StrCpy $0 ""
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ConTEXTEditor_is1" "InstallLocation"
${if} $0 != ""
StrCpy $0 $0 -1
StrCpy $EditorPath "$EditorPath;$0"
${endif}
# check for Crimson Editor
; check for Crimson Editor
StrCpy $0 ""
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Crimson Editor" "UninstallString"
${if} $0 != ""
StrCpy $0 $0 -14 ; remove "\uninstall.exe"
StrCpy $EditorPath "$EditorPath;$0"
${endif}
# check for Vim 6.x
; check for Vim 6.x
StrCpy $0 ""
ReadRegStr $0 HKLM "Software\Classes\Applications\gvim.exe\shell\edit\command" ""
${if} $0 != ""
StrCpy $0 $0 -13 ; remove "gvim.exe "%1""
StrCpy $EditorPath "$EditorPath;$0"
${endif}
# check for Vim 7.0
; check for Vim 7.0
StrCpy $0 ""
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Vim 7.0" "UninstallString"
${if} $0 != ""
StrCpy $0 $0 -18 ; remove "\uninstall-gui.exe"
StrCpy $EditorPath "$EditorPath;$0"
${endif}
# check for TeXnicCenter
; check for TeXnicCenter
StrCpy $0 ""
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TeXnicCenter_is1" "Inno Setup: App Path"
${if} $0 != ""
StrCpy $EditorPath "$EditorPath;$0"
${endif}
# check for LaTeXEditor
; check for LaTeXEditor
StrCpy $0 ""
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LaTeX Editor" "InstallLocation"
${if} $0 != ""
StrCpy $EditorPath "$EditorPath;$0"
${endif}
# check for WinEdt
; check for WinEdt
StrCpy $0 ""
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinEdt_is1" "InstallLocation"
${if} $0 != ""
StrCpy $0 $0 -1
StrCpy $EditorPath "$EditorPath;$0"
${endif}
# check for LEd
; check for LEd
StrCpy $0 ""
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LEd_is1" "InstallLocation"
${if} $0 != ""
StrCpy $0 $0 -1
StrCpy $EditorPath "$EditorPath;$0"
${endif}
# check for WinTeX
; check for WinTeX
StrCpy $0 ""
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinTeX XP" "DisplayIcon"
${if} $0 != ""

View File

@ -8,8 +8,11 @@ Function UpdateModifiedFiles
File "${PRODUCT_SOURCEDIR}\bin\pdfopen.exe"
File "${PRODUCT_SOURCEDIR}\bin\PDFView.cmd"
SetOutPath "$INSTDIR\Resources"
File /r "${PRODUCT_SOURCEDIR}\Resources\fonts"
File "${PRODUCT_SOURCEDIR}\Resources\preferences7"
File "${PRODUCT_SOURCEDIR}\Resources\CREDITS"
SetOutPath "$INSTDIR\Resources\bind"
File "${PRODUCT_SOURCEDIR}\Resources\bind\aqua.bind"
SetOutPath "$INSTDIR\Resources\images"
File "${PRODUCT_SOURCEDIR}\Resources\images\dialog-show_mathdelimiter.xpm"
File "${PRODUCT_SOURCEDIR}\Resources\images\dialog-show_mathmatrix.xpm"
@ -18,6 +21,13 @@ Function UpdateModifiedFiles
File "${PRODUCT_SOURCEDIR}\Resources\images\math\sqrt.xpm"
File "${PRODUCT_SOURCEDIR}\Resources\images\math\cases.xpm"
File "${PRODUCT_SOURCEDIR}\Resources\images\math\root.xpm"
SetOutPath "$INSTDIR\Resources\layouts"
File "${PRODUCT_SOURCEDIR}\Resources\layouts\europecv.layout"
File "${PRODUCT_SOURCEDIR}\Resources\layouts\moderncv.layout"
File "${PRODUCT_SOURCEDIR}\Resources\layouts\g-brief2.layout"
File "${PRODUCT_SOURCEDIR}\Resources\layouts\beamer.layout"
SetOutPath "$INSTDIR\Resources\templates"
File "${PRODUCT_SOURCEDIR}\Resources\templates\g-brief2.lyx"
SetOutPath "$INSTDIR\Resources\doc\es"
File "${PRODUCT_SOURCEDIR}\Resources\doc\es\EmbeddedObjects.lyx"
File "${PRODUCT_SOURCEDIR}\Resources\doc\es\Extended.lyx"

View File

@ -113,6 +113,7 @@ LangString MiKTeXInfo "${LYX_LANG}" 'LaTeX-distributionen "MiKTeX" vil blive bru
før LyX startes for første gang.$\r$\n\
Vil du tjekke om der findes MiKTeX opdateringer?'
LangString UpdateNotAllowed "${LYX_LANG}" "This update package can only update LyX ${PRODUCT_UPDATE_ALLOWED}!"
LangString ModifyingConfigureFailed "${LYX_LANG}" "Forsoget på at indstille 'path_prefix' i konfigurationen mislykkedes"
LangString CreateCmdFilesFailed "${LYX_LANG}" "Kunne ikke oprette lyx.bat"
LangString RunConfigureFailed "${LYX_LANG}" "Mislykket forsog på at afvikle konfigurations-scriptet"

View File

@ -112,7 +112,8 @@ LangString MiKTeXInfo "${LYX_LANG}" 'LyX gebruikt de LaTeX softare "MiKTeX".$\r$
Het is aanbevolen MiKTeX-updates te installeren via de "MiKTeX Update Wizard"$\r$\n\
voordat u LyX voor de eerste keer gebruikt.$\r$\n\
Wilt u controleren of er updates voor MiKTeX beschikbaar zijn?'
LangString UpdateNotAllowed "${LYX_LANG}" "This update package can only update LyX ${PRODUCT_UPDATE_ALLOWED}!"
LangString ModifyingConfigureFailed "${LYX_LANG}" "Mislukte poging om 'path_prefix' te registreren tijdens de configuratie"
LangString CreateCmdFilesFailed "${LYX_LANG}" "lyx.bat kon niet worden aangemaakt"
LangString RunConfigureFailed "${LYX_LANG}" "Mislukte configuratie poging"

View File

@ -112,7 +112,8 @@ LangString MiKTeXInfo "${LYX_LANG}" 'The LaTeX-distribution "MiKTeX" will be use
It is recommended to install available MiKTeX-updates using the program "MiKTeX Update Wizard"$\r$\n\
before you use LyX for the first time.$\r$\n\
Would you now check for MiKTeX updates?'
LangString UpdateNotAllowed "${LYX_LANG}" "This update package can only update LyX ${PRODUCT_UPDATE_ALLOWED}!"
LangString ModifyingConfigureFailed "${LYX_LANG}" "Could not set 'path_prefix' in the configure script"
LangString CreateCmdFilesFailed "${LYX_LANG}" "Could not create lyx.bat"
LangString RunConfigureFailed "${LYX_LANG}" "Could not execute the configure script"

View File

@ -112,7 +112,8 @@ LangString MiKTeXInfo "${LYX_LANG}" 'La distribution LaTeX "MiKTeX" sera utilis
Il est recommandé d$\'installer les mises à jour en utilisant l$\'application "MiKTeX Update Wizard"$\r$\n\
avant d$\'utiliser LyX pour la première fois.$\r$\n\
Voulez-vous vérifier maintenant les mises à jour de MiKTeX ?'
LangString UpdateNotAllowed "${LYX_LANG}" "This update package can only update LyX ${PRODUCT_UPDATE_ALLOWED}!"
LangString ModifyingConfigureFailed "${LYX_LANG}" "Échec de l'allocation 'path_prefix' lors de la configuration."
LangString CreateCmdFilesFailed "${LYX_LANG}" "Création de lyx.bat impossible."
LangString RunConfigureFailed "${LYX_LANG}" "Échec de la tentative de configuration initiale de LyX."

View File

@ -113,6 +113,7 @@ LangString MiKTeXInfo "${LYX_LANG}" 'Xunto co LyX vai-se empregar a distribuci
do MiKTeX co instalador "MiKTeX Update Wizard"$\r$\n\
Desexa comprovar agora se ha actualizacións do MiKTeX?'
LangString UpdateNotAllowed "${LYX_LANG}" "This update package can only update LyX ${PRODUCT_UPDATE_ALLOWED}!"
LangString ModifyingConfigureFailed "${LYX_LANG}" "Non se puido engadir o 'path_prefix' no script de configuración"
LangString CreateCmdFilesFailed "${LYX_LANG}" "Non se deu criado o lyx.bat"
LangString RunConfigureFailed "${LYX_LANG}" "Non se deu executado o script de configuración"

View File

@ -113,6 +113,7 @@ LangString MiKTeXInfo "${LYX_LANG}" 'Die LaTeX-Distribution "MiKTeX" wird zusamm
installieren, bevor sie LyX das erste Mal benutzen.$\r$\n\
Möchten Sie jetzt nach Updates für MiKTeX suchen?'
LangString UpdateNotAllowed "${LYX_LANG}" "Dieses Update-Paket kann nur LyX ${PRODUCT_UPDATE_ALLOWED} updaten!"
LangString ModifyingConfigureFailed "${LYX_LANG}" 'Der "PATH_präfix" (Liste mit Programmpfaden) konnte nicht im Konfigurationsskript gesetzt werden.'
LangString CreateCmdFilesFailed "${LYX_LANG}" "Konnte die Datei lyx.bat nicht erzeugen."
LangString RunConfigureFailed "${LYX_LANG}" "Konnte das Konfigurationsskript nicht ausführen."

View File

@ -112,6 +112,7 @@ LangString MiKTeXInfo "${LYX_LANG}" 'A "MiKTeX" LaTeX-disztib
a LyX elsõ indítása elõtt.$\r$\n\
Szeretné egy ilyen frissítést most?'
LangString UpdateNotAllowed "${LYX_LANG}" "This update package can only update LyX ${PRODUCT_UPDATE_ALLOWED}!"
LangString ModifyingConfigureFailed "${LYX_LANG}" "Nem tudom beállítani a 'path_prefix'-et a configure parancsfájlban!"
LangString CreateCmdFilesFailed "${LYX_LANG}" "Nem tudom letrehozni a lyx.bat fájlt."
LangString RunConfigureFailed "${LYX_LANG}" "Nem tudom végrehajtani a configure parancsfájlt!"

View File

@ -113,6 +113,7 @@ LangString MiKTeXInfo "${LYX_LANG}" 'La distribuzione di LaTeX "MiKTeX" verr
prima di usare LyX per la prima volta.$\r$\n\
Vuoi controllare ora la presenza di aggiornamenti per MiKTeX?'
LangString UpdateNotAllowed "${LYX_LANG}" "This update package can only update LyX ${PRODUCT_UPDATE_ALLOWED}!"
LangString ModifyingConfigureFailed "${LYX_LANG}" "Fallito tentativo di aggiornare 'path_prefix' nello script di configurazione"
LangString CreateCmdFilesFailed "${LYX_LANG}" "Non è possibile creare lyx.bat"
LangString RunConfigureFailed "${LYX_LANG}" "Fallito tentativo di eseguire lo script di configurazione"

View File

@ -112,7 +112,8 @@ LangString MiKTeXInfo "${LYX_LANG}" 'The LaTeX-distribution "MiKTeX" will be use
It is recommended to install available MiKTeX-updates using the program "MiKTeX Update Wizard"$\r$\n\
before you use LyX for the first time.$\r$\n\
Would you now check for MiKTeX updates?'
LangString UpdateNotAllowed "${LYX_LANG}" "This update package can only update LyX ${PRODUCT_UPDATE_ALLOWED}!"
LangString ModifyingConfigureFailed "${LYX_LANG}" "Forsøket på å stille inn 'path_prefix' i konfigurasjonsscriptet mislyktes"
LangString CreateCmdFilesFailed "${LYX_LANG}" "Fikk ikke opprettet lyx.bat"
LangString RunConfigureFailed "${LYX_LANG}" "Fikk ikke kjørt konfigurasjonsscriptet"

View File

@ -112,7 +112,8 @@ LangString MiKTeXInfo "${LYX_LANG}" 'The LaTeX-distribution "MiKTeX" will be use
It is recommended to install available MiKTeX-updates using the program "MiKTeX Update Wizard"$\r$\n\
before you use LyX for the first time.$\r$\n\
Would you now check for MiKTeX updates?'
LangString UpdateNotAllowed "${LYX_LANG}" "This update package can only update LyX ${PRODUCT_UPDATE_ALLOWED}!"
LangString ModifyingConfigureFailed "${LYX_LANG}" "Nieudana próba ustawienia zmiennej 'path_prefix' w pliku skryptu konfigracyjnego"
LangString CreateCmdFilesFailed "${LYX_LANG}" "Niedana próba utworzenia plików lyx.bat"
LangString RunConfigureFailed "${LYX_LANG}" "Niedana próba wykonania skryptu konfiguracyjnego"

View File

@ -113,6 +113,7 @@ LangString MiKTeXInfo "${LYX_LANG}" 'Junto com o LyX vai-se utilizar a distribui
do MiKTeX com o instalador "MiKTeX Update Wizard"$\r$\n\
Deseja comprovar agora se há actualizações do MiKTeX?'
LangString UpdateNotAllowed "${LYX_LANG}" "This update package can only update LyX ${PRODUCT_UPDATE_ALLOWED}!"
LangString ModifyingConfigureFailed "${LYX_LANG}" "Não conseguimos establecer o 'path_prefix' no script de configuração"
LangString CreateCmdFilesFailed "${LYX_LANG}" "Não foi possível criar o lyx.bat"
LangString RunConfigureFailed "${LYX_LANG}" "Não foi possível executar o script de configuração"

View File

@ -114,6 +114,7 @@ LangString MiKTeXInfo "${LYX_LANG}" 'LaTeX distrib
pred prvým používaním LyXu.$\r$\n\
Chcete teraz testova<76> MiKTeX aktualizácie?'
LangString UpdateNotAllowed "${LYX_LANG}" "This update package can only update LyX ${PRODUCT_UPDATE_ALLOWED}!"
LangString ModifyingConfigureFailed "${LYX_LANG}" "Nemohol uvies<65> v platnost 'path_prefix' (zoznam s cestami programu) v konfiguraènom skripte"
LangString CreateCmdFilesFailed "${LYX_LANG}" "Nemohol prípravi<76> lyx.bat"
LangString RunConfigureFailed "${LYX_LANG}" "Nemohol vykona<6E> konfiguraèný skript"

View File

@ -113,6 +113,7 @@ LangString MiKTeXInfo "${LYX_LANG}" 'Junto con LyX se va usar la distribuci
de MiKTeX con el instalador "MiKTeX Update Wizard"$\r$\n\
¿Desea comprobar ahora si hay actualizaciones de MiKTeX?'
LangString UpdateNotAllowed "${LYX_LANG}" "This update package can only update LyX ${PRODUCT_UPDATE_ALLOWED}!"
LangString ModifyingConfigureFailed "${LYX_LANG}" "Error al intentar añadir 'path_prefix' durante la ejecución del programa de configuración"
LangString CreateCmdFilesFailed "${LYX_LANG}" "No se pudo crear lyx.bat"
LangString RunConfigureFailed "${LYX_LANG}" "Error al intentar ejecutar el programa de configuración"

View File

@ -112,7 +112,8 @@ LangString MiKTeXInfo "${LYX_LANG}" 'LaTeX-distributionen "MiKTeX" kommer att an
Det rekommenderas att installera tillgängliga uppdateringar av MiKTeX med hjälp av programmet "MiKTeX Update Wizard".$\r$\n\
innan du använder LyX för första gången.$\r$\n\
Vill du kontrollera om det finns uppdateringar tillgängliga för MiKTeX nu?'
LangString UpdateNotAllowed "${LYX_LANG}" "This update package can only update LyX ${PRODUCT_UPDATE_ALLOWED}!"
LangString ModifyingConfigureFailed "${LYX_LANG}" "Misslyckades med att sätta 'path_prefix' i konfigurationsskriptet"
LangString CreateCmdFilesFailed "${LYX_LANG}" "Kunde inte skapa filen (kommandoskriptet) lyx.bat"
LangString RunConfigureFailed "${LYX_LANG}" "Misslyckades med att köra konfigurationsskriptet"

View File

@ -112,7 +112,8 @@ LangString MiKTeXInfo "${LYX_LANG}" 'The LaTeX-distribution "MiKTeX" will be use
It is recommended to install available MiKTeX-updates using the program "MiKTeX Update Wizard"$\r$\n\
before you use LyX for the first time.$\r$\n\
Would you now check for MiKTeX updates?'
LangString UpdateNotAllowed "${LYX_LANG}" "This update package can only update LyX ${PRODUCT_UPDATE_ALLOWED}!"
LangString ModifyingConfigureFailed "${LYX_LANG}" "Yapýlandýrma programýnda 'path_prefix' ayarlanamadý"
LangString CreateCmdFilesFailed "${LYX_LANG}" "lyx.bat oluþturulamadý"
LangString RunConfigureFailed "${LYX_LANG}" "Yapýlandýrma programý çalýþtýrýlamadý"