# COMPONENT can be LaTeX, ImageMagick and Ghostscript
!macro EXTERNAL_INIT COMPONENT
- # APP_REGKEY_SETUP = "Software\${APP_NAME}${APP_SERIES_KEY}\Setup"
- # where ${APP_NAME}${APP_SERIES_KEY} is something like LyX22
+ # APP_REGKEY_SETUP = "Software\${APP_NAME}\${APP_SERIES_KEY}\Setup"
+ # where ${APP_NAME}\${APP_SERIES_KEY} is something like LyX\220
ReadRegStr $ComponentPath SHELL_CONTEXT "${APP_REGKEY_SETUP}" "${COMPONENT} Path"
# BIN_LATEX etc are defined in settings.nsh
#--------------------------------
# visible installer sections
-Section "!${APP_NAME}" SecCore
- SectionIn RO
- !if ${SETUPTYPE} == BUNDLE
- # if no TeX was found MiKTeX will be installed which requires space
- !if $PathLaTeX == ""
- AddSize 1020000 # size in KB
- !endif
- !endif
-SectionEnd
-
Section "$(SecFileAssocTitle)" SecFileAssoc
StrCpy $CreateFileAssociations "true"
SectionEnd
SectionEnd
Section /o "العربية" SecDArabic
- StrCpy $DictCodes "ar_DZ,$DictCodes"
- AddSize 2500
+ StrCpy $DictCodes "ar_SA,$DictCodes"
+ AddSize 7304
SectionEnd
Section /o "հայերեն" SecDArmenian
Section /o "Brezhoneg" SecDBreton
StrCpy $DictCodes "br_FR,$DictCodes"
- AddSize 5510
+ AddSize 5556
SectionEnd
Section /o "български" SecDBulgarian
Section /o "English (AU)" SecDEnglishAU
StrCpy $DictCodes "en_AU,$DictCodes"
- AddSize 552
+ AddSize 557
SectionEnd
Section /o "English (CA)" SecDEnglishCA
StrCpy $DictCodes "en_CA,$DictCodes"
- AddSize 550
+ AddSize 557
SectionEnd
Section "English (GB)" SecDEnglishGB
# already installed by default
SectionIn RO
#StrCpy $DictCodes "en_GB,$DictCodes"
- AddSize 742
+ AddSize 1044
SectionEnd
Section /o "English (NZ)" SecDEnglishNZ
# already installed by default
SectionIn RO
#StrCpy $DictCodes "en_US,$DictCodes"
- AddSize 548
+ AddSize 551
SectionEnd
Section "Español (ES)" SecDSpanishES
AddSize 4850
SectionEnd
-Section /o "Farsi" SecDFarsi
+Section /o "فارسی" SecDFarsi
StrCpy $DictCodes "fa_IR,$DictCodes"
AddSize 6710
SectionEnd
AddSize 3911
SectionEnd
+Section /o "ქართული ენა" SecDGeorgian
+ StrCpy $DictCodes "ka_GE,$DictCodes"
+ AddSize 3952
+SectionEnd
+
Section /o "עִברִית" SecDHebrew
StrCpy $DictCodes "he_IL,$DictCodes"
AddSize 3120
AddSize 740
SectionEnd
-Section /o "Shqipe" SecDAlbanian
+Section /o "Shqip" SecDAlbanian
StrCpy $DictCodes "sq_AL,$DictCodes"
- AddSize 2400
+ AddSize 2612
SectionEnd
Section /o "Slovenšcina" SecDSlovenian
Section /o "Türkmençe" SecDTurkmen
StrCpy $DictCodes "tk_TM,$DictCodes"
- AddSize 950
+ AddSize 2797
SectionEnd
Section /o "Türkçe" SecDTurkish
Section /o "Українська" SecDUkrainian
StrCpy $DictCodes "uk_UA,$DictCodes"
- AddSize 5555
+ AddSize 6905
SectionEnd
Section /o "اردو" SecDUrdu
SectionGroup "$(SecThesaurus)" SecThesaurus
+Section /o "العربية" SecTArabic
+ StrCpy $ThesCodes "ar_SA,$ThesCodes"
+ AddSize 799
+SectionEnd
+
Section /o "български" SecTBulgarian
StrCpy $ThesCodes "bg_BG,$ThesCodes"
AddSize 3020
# Section descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-!insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "$(SecCoreDescription)"
!insertmacro MUI_DESCRIPTION_TEXT ${SecFileAssoc} "$(SecFileAssocDescription)"
!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} "$(SecDesktopDescription)"
!insertmacro MUI_DESCRIPTION_TEXT ${SecDictionaries} "$(SecDictionariesDescription)"
# the selection states of the dictionary sections
Function .onInit
+ !if ${APP_VERSION_ACHITECHTURE} = 64
+ ${IfNot} ${RunningX64}
+ MessageBox MB_OK|MB_ICONSTOP "Cannot install a 64 bit app on 32 bit Windows, please use the 32 bit installer" /SD IDOK
+ Abort
+ ${EndIf}
+ !EndIf
+
+ SetRegView ${APP_VERSION_ACHITECHTURE}
+
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
+ ${orif} $R0 == "6.0" # Vista
+ MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} ${APP_VERSION} requires Windows 7 or newer." /SD IDOK
Quit
${endif}
- # Fixme: the Unicode version of FindProcDLL::FindProc
- # reports always that it is already running
- # check that the installer is not currently running
- #FindProcDLL::FindProc "${BundleExeFile}"
- #${if} $R0 == "1"
- # MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
- # Abort
- #${endif}
- #FindProcDLL::FindProc "${ExeFile}"
- #${if} $R0 == "1"
- # MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
- # Abort
- #${endif}
- #System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${BundleExeFile}.Instance") i .r1 ?e'
- #Pop $R0
- #${if} $R0 != "0"
- # MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
- # Abort
- #${endif}
- #System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${ExeFile}.Instance") i .r1 ?e'
- #Pop $R0
- #${if} $R0 != "0"
- # MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
- # Abort
- #${endif}
-
# Check that LyX is not currently running
- FindProcDLL::FindProc "lyx.exe"
+ FindProcDLL::FindProc "${BIN_LYX}"
${if} $R0 == "1"
MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)" /SD IDOK
Abort
${endif}
- # read the user 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
# check if the uninstaller was acidentally deleted
# if so don't bother the user if he realy wants to install a new LyX over an existing one
# because he won't have a chance to deny this
- StrCpy $4 $0 -10 # remove '\bin\lyx,0'
+ StrCpy $4 $0 -12 # remove '\bin\lyx.exe'
# (for FileCheck the variables $0 and $1 cannot be used)
- !insertmacro FileCheck $5 "Uninstall-LyX.exe" "$4" # macro from LyXUtils.nsh
+ !insertmacro FileCheck $5 "Uninstall-${APP_NAME}.exe" "$4" # macro from LyXUtils.nsh
${if} $5 == "False"
Goto ForceInstallation
${endif}
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" "DisplayVersion"
# also check for an emergency release
${if} $0 == ""
- ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$51" "DisplayVersion"
+ ${For} $7 0 20
+ ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5$7" "DisplayVersion"
+ ${Next}
${endif}
${else}
ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5" "DisplayVersion"
# also check for an emergency release
${if} $0 == ""
- ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$51" "DisplayVersion"
+ ${For} $7 0 20
+ ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}${APP_VERSION_MAJOR}${APP_VERSION_MINOR}$5$7" "DisplayVersion"
+ ${Next}
${endif}
${endif}
${if} $0 != ""
Call SearchExternal
- #!if ${SETUPTYPE} == BUNDLE
- # # don't let the installer sections appear when the programs are already installed
- # ${if} $PathBibTeXEditor != ""
- # SectionSetText 3 "" # hides the corresponding uninstaller section, ${SecInstJabRef}
- # ${endif}
- #!endif
-
# select sections of already installed spell-checker dictionaries, make them read-only
# and set the necessary size to 0 bytes
StrCpy $String $FoundDict
SectionSetFlags ${SecDAfrikaans} $0
SectionSetSize ${SecDAfrikaans} 0
${endif}
- StrCpy $Search "ar_DZ"
+ StrCpy $Search "ar_SA"
Call StrPoint
${if} $Pointer != "-1"
IntOp $0 ${SF_SELECTED} | ${SF_RO}
SectionSetFlags ${SecDGalician} $0
SectionSetSize ${SecDGalician} 0
${endif}
+ StrCpy $Search "ka_GE"
+ Call StrPoint
+ ${if} $Pointer != "-1"
+ IntOp $0 ${SF_SELECTED} | ${SF_RO}
+ SectionSetFlags ${SecDGeorgian} $0
+ SectionSetSize ${SecDGeorgian} 0
+ ${endif}
StrCpy $Search "he_IL"
Call StrPoint
${if} $Pointer != "-1"
# select sections of already installed thesaurus dictionaries, make them read-only
# and set the necessary size to 0 bytes
StrCpy $String $FoundThes
- StrCpy $Search "bg_BG"
+ StrCpy $Search "ar_SA"
Call StrPoint # function from LyXUtils.nsh
+ ${if} $Pointer != "-1"
+ IntOp $0 ${SF_SELECTED} | ${SF_RO}
+ SectionSetFlags ${SecTArabic} $0
+ SectionSetSize ${SecTArabic} 0
+ ${endif}
+ StrCpy $Search "bg_BG"
+ Call StrPoint
${if} $Pointer != "-1"
IntOp $0 ${SF_SELECTED} | ${SF_RO}
SectionSetFlags ${SecTBulgarian} $0
# this function is called at first after starting the uninstaller
Function un.onInit
+ SetRegView ${APP_VERSION_ACHITECHTURE}
+
!insertmacro MULTIUSER_UNINIT
# Check that LyX is not currently running
- FindProcDLL::FindProc "lyx.exe"
+ FindProcDLL::FindProc "${BIN_LYX}"
${if} $R0 == "1"
MessageBox MB_OK|MB_ICONSTOP "$(UnInstallRunning)" /SD IDOK
Abort