From: Uwe Stöhr Date: Wed, 2 May 2007 23:06:01 +0000 (+0000) Subject: installer: get rid of all NSIS compiler warnings X-Git-Tag: 1.6.10~9902 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=43b9811909a21863e1d9bf2481ff5a0d3b8f9a45;p=lyx.git installer: get rid of all NSIS compiler warnings git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18181 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/development/Win32/packaging/installer/LyXWinInstaller/Aspell.nsh b/development/Win32/packaging/installer/LyXWinInstaller/Aspell.nsh index 4910a430ea..24acf69e80 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/Aspell.nsh +++ b/development/Win32/packaging/installer/LyXWinInstaller/Aspell.nsh @@ -1,5 +1,7 @@ # Aspell dictionaries +!if ${INSTALLER_TYPE} == "NotUpdate" # only for Small and Complete installer + Function DownloadDictionary FileOpen $R5 "$INSTDIR\Resources\AspellDictionaryNames.txt" r @@ -66,8 +68,12 @@ Function DownloadDictionary FunctionEnd +!endif # endif ${INSTALLER_TYPE} == "NotUpdate" + #-------------------------------- +!if ${INSTALLER_TYPE} == "NotUpdate" # only for Small and Complete installer + Function InstallAspellDictionary StrCpy $AspellInstallYes "" @@ -207,6 +213,8 @@ Function InstallAspellDictionary DownloadLater: FunctionEnd + +!endif # endif ${INSTALLER_TYPE} == "NotUpdate" #--------------------------- diff --git a/development/Win32/packaging/installer/LyXWinInstaller/InstallActions-update.nsh b/development/Win32/packaging/installer/LyXWinInstaller/InstallActions-update.nsh index 0a2e345f28..cddf0a8bd4 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/InstallActions-update.nsh +++ b/development/Win32/packaging/installer/LyXWinInstaller/InstallActions-update.nsh @@ -5,10 +5,13 @@ Section "-Installation actions" SecInstallation # dummy actions to avoid NSIS warnings StrCpy $AspellBaseReg "" + StrCpy $AspellMessage "" + StrCpy $DictCode "" StrCpy $LangCode "" StrCpy $LangCodeSys "" StrCpy $LangName "" StrCpy $LangNameSys "" + StrCpy $RunNumber "" # init, this variable is later only set to a value in function InstDirChange # when the $INSTDIR is changed diff --git a/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-complete.nsi b/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-complete.nsi index d6cf333d6b..a646adfeb6 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-complete.nsi +++ b/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-complete.nsi @@ -27,6 +27,7 @@ CRCCheck force !define INSTALLER_VERSION "Complete" !define INSTALLER2_VERSION "Small" !define INSTALLER3_VERSION "Update" +!define INSTALLER_TYPE "NotUpdate" # load the settings !include "Settings.nsh" @@ -93,10 +94,6 @@ Var UserName !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" diff --git a/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-small.nsi b/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-small.nsi index 77ef2736d1..ef05935d2c 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-small.nsi +++ b/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-small.nsi @@ -27,6 +27,7 @@ CRCCheck force !define INSTALLER_VERSION "Small" !define INSTALLER2_VERSION "Complete" !define INSTALLER3_VERSION "Update" +!define INSTALLER_TYPE "NotUpdate" # load the settings !include "Settings.nsh" @@ -91,10 +92,6 @@ Var UserName !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" diff --git a/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-update.nsi b/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-update.nsi index ee5e3f953a..5a18848ca0 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-update.nsi +++ b/development/Win32/packaging/installer/LyXWinInstaller/LyXInstaller-update.nsi @@ -27,6 +27,7 @@ SetCompressor lzma !define INSTALLER_VERSION "Update" !define INSTALLER2_VERSION "Small" !define INSTALLER3_VERSION "Complete" +!define INSTALLER_TYPE "Update" # load the settings !include "Settings.nsh" diff --git a/development/Win32/packaging/installer/LyXWinInstaller/LyXUtils.nsh b/development/Win32/packaging/installer/LyXWinInstaller/LyXUtils.nsh index e5df991c12..bf06616960 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/LyXUtils.nsh +++ b/development/Win32/packaging/installer/LyXWinInstaller/LyXUtils.nsh @@ -1,12 +1,14 @@ # This script contains the following functions: # -# - LaTeXCheck (check installed LaTeX-system), uses: +# - LaTeXCheck (check installed LaTeX-system), +# (only used by Small and Complete installer), uses: # StrPointer # StrPoint # RevStrPointer # RevStrPoint # -# - un.DelAppPathSub and UnAppPreSuff, (delete the folder ~\Documents and Settings\username\Application Data\LyX for all users), uses: +# - un.DelAppPathSub and UnAppPreSuff, +# (delete the folder ~\Documents and Settings\username\Application Data\LyX for all users), uses: # un.GetParentA # un.GetUsers # un.StrPoint @@ -14,7 +16,9 @@ # StrPoint # UnAppPreSuff # -# - CreateAppPathSub and AppPreSuff, (creates the folder ~\Documents and Settings\username\Application Data\LyX for all users), uses: +# - CreateAppPathSub and AppPreSuff, +# (creates the folder ~\Documents and Settings\username\Application Data\LyX for all users), +# (only used by Small and Complete installer), uses: # GetParentA # GetUsers # StrPointer @@ -97,9 +101,13 @@ FunctionEnd #-------------------------------- -Function RevStrPoint - !insertmacro RevStrPointer $String $Search $Pointer -FunctionEnd +!if ${INSTALLER_TYPE} == "NotUpdate" # only for Small and Complete installer + + Function RevStrPoint + !insertmacro RevStrPointer $String $Search $Pointer + FunctionEnd + +!endif # endif ${INSTALLER_TYPE} == "NotUpdate" #-------------------------------- @@ -311,7 +319,9 @@ FunctionEnd #-------------------------------- -Function CreateAppPathSub +!if ${INSTALLER_TYPE} == "NotUpdate" # only for Small and Complete installer + + Function CreateAppPathSub # creates a subfolder of the APPDATA path for all users # get folder names @@ -352,21 +362,29 @@ Function CreateAppPathSub CopyFiles "$INSTDIR\Resources\session" "$AppPath" Delete "$INSTDIR\Resources\session" # delete the session file in the INSTDIR because it is unneeded there -FunctionEnd + FunctionEnd + +!endif # endif ${INSTALLER_TYPE} == "NotUpdate" #-------------------------------- -Function ReplaceLineContent +!if ${INSTALLER_TYPE} == "Update" # only for Update installer + + Function ReplaceLineContent # replaces "$OldString" with "LyX $NewString" - ${WordReplace} '$R9' "$OldString" "$NewString" "+" '$R9' # macro from WordFunc.nsh - Push $0 + ${WordReplace} '$R9' "$OldString" "$NewString" "+" '$R9' # macro from WordFunc.nsh + Push $0 -FunctionEnd + FunctionEnd + +!endif # endif ${INSTALLER_TYPE} == "Update" #-------------------------------- -Function CheckAppPathPreferences +!if ${INSTALLER_TYPE} == "Update" # only for Update installer + + Function CheckAppPathPreferences # replaces a string "$OldString" with "$NewString" in a file "$FileName" # get folder names @@ -414,7 +432,9 @@ Function CheckAppPathPreferences ${LineFind} "$AppPath\$FileName" "" "1:-1" "ReplaceLineContent" doneB: -FunctionEnd + FunctionEnd + +!endif # endif ${INSTALLER_TYPE} == "Update" #-------------------------------- @@ -464,7 +484,9 @@ FunctionEnd #------------------------------------------ -Function LaTeXCheck +!if ${INSTALLER_TYPE} == "NotUpdate" # only for Small and Complete installer + + 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 @@ -504,5 +526,7 @@ Function LaTeXCheck Goto StartCheck ${endif} -FunctionEnd + FunctionEnd + +!endif # endif ${INSTALLER_TYPE} == "NotUpdate" diff --git a/development/Win32/packaging/installer/LyXWinInstaller/Updated.nsh b/development/Win32/packaging/installer/LyXWinInstaller/Updated.nsh index 804d274c00..a0a88268a7 100644 --- a/development/Win32/packaging/installer/LyXWinInstaller/Updated.nsh +++ b/development/Win32/packaging/installer/LyXWinInstaller/Updated.nsh @@ -14,6 +14,8 @@ Function UpdateModifiedFiles SetOutPath "$INSTDIR\Resources\doc\de" File "${PRODUCT_SOURCEDIR}\Resources\doc\de\TOC.lyx" # must be here when another \doc file has been changed File "${PRODUCT_SOURCEDIR}\Resources\doc\de\UserGuide.lyx" + SetOutPath "$INSTDIR\Resources\examples" + File "${PRODUCT_SOURCEDIR}\Resources\examples\armenian-article.lyx" SetOutPath "$INSTDIR\Resources\examples\de" File "${PRODUCT_SOURCEDIR}\Resources\examples\de\TabellenBeispiel.lyx" SetOutPath "$INSTDIR\Resources\layouts"