fixed eol-style

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5530 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2008-02-08 21:14:37 +00:00
parent 98b8b28f98
commit 6382320e35

View file

@ -1,90 +1,90 @@
/* /*
VB6RunTime.nsh VB6RunTime.nsh
Setup of Visual Basic 6.0 run-time files, including the Oleaut32.dll security update Setup of Visual Basic 6.0 run-time files, including the Oleaut32.dll security update
Copyright © 2008 Joost Verburg Copyright © 2008 Joost Verburg
To obtain the run-time files, download and extract To obtain the run-time files, download and extract
http://nsis.sourceforge.net/vb6runtime.zip http://nsis.sourceforge.net/vb6runtime.zip
Script code for installation: Script code for installation:
!insertmacro InstallVB6RunTime FOLDER ALREADY_INSTALLED !insertmacro InstallVB6RunTime FOLDER ALREADY_INSTALLED
in which FOLDER is the location of the run-time files and ALREADY_INSTALLED is the in which FOLDER is the location of the run-time files and ALREADY_INSTALLED is the
name of a variable that is empty when the application is installed for the first time name of a variable that is empty when the application is installed for the first time
and non-empty otherwise and non-empty otherwise
Script code for uninstallation: Script code for uninstallation:
!insertmacro UnInstallVB6RunTime !insertmacro UnInstallVB6RunTime
Remarks: Remarks:
* You may have to install additional files for such Visual Basic application to work, * You may have to install additional files for such Visual Basic application to work,
such as OCX files for user interface controls. such as OCX files for user interface controls.
* Installation of the run-time files requires Administrator or Power User privileges. * Installation of the run-time files requires Administrator or Power User privileges.
Use the Multi-User header file to verify whether these privileges are available. Use the Multi-User header file to verify whether these privileges are available.
* Add a Modern UI finish page or another check (see IfRebootFlag in the NSIS Users * Add a Modern UI finish page or another check (see IfRebootFlag in the NSIS Users
Manual) to allow the user to restart the computer when necessary. Manual) to allow the user to restart the computer when necessary.
*/ */
!ifndef VB6_INCLUDED !ifndef VB6_INCLUDED
!define VB6_INCLUDED !define VB6_INCLUDED
!verbose push !verbose push
!verbose 3 !verbose 3
!include Library.nsh !include Library.nsh
!include WinVer.nsh !include WinVer.nsh
!macro VB6RunTimeInstall FOLDER ALREADY_INSTALLED !macro VB6RunTimeInstall FOLDER ALREADY_INSTALLED
!insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_NOTPROTECTED "${FOLDER}\msvbvm60.dll" "$SYSDIR\msvbvm60.dll" "$SYSDIR" !insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_NOTPROTECTED "${FOLDER}\msvbvm60.dll" "$SYSDIR\msvbvm60.dll" "$SYSDIR"
;The files below will only be installed on Win9x/NT4 ;The files below will only be installed on Win9x/NT4
!insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_PROTECTED "${FOLDER}\olepro32.dll" "$SYSDIR\olepro32.dll" "$SYSDIR" !insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_PROTECTED "${FOLDER}\olepro32.dll" "$SYSDIR\olepro32.dll" "$SYSDIR"
!insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_PROTECTED "${FOLDER}\comcat.dll" "$SYSDIR\comcat.dll" "$SYSDIR" !insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_PROTECTED "${FOLDER}\comcat.dll" "$SYSDIR\comcat.dll" "$SYSDIR"
!insertmacro InstallLib DLL "${ALREADY_INSTALLED}" REBOOT_PROTECTED "${FOLDER}\asycfilt.dll" "$SYSDIR\asycfilt.dll" "$SYSDIR" !insertmacro InstallLib DLL "${ALREADY_INSTALLED}" REBOOT_PROTECTED "${FOLDER}\asycfilt.dll" "$SYSDIR\asycfilt.dll" "$SYSDIR"
!insertmacro InstallLib TLB "${ALREADY_INSTALLED}" REBOOT_PROTECTED "${FOLDER}\stdole2.tlb" "$SYSDIR\stdole2.tlb" "$SYSDIR" !insertmacro InstallLib TLB "${ALREADY_INSTALLED}" REBOOT_PROTECTED "${FOLDER}\stdole2.tlb" "$SYSDIR\stdole2.tlb" "$SYSDIR"
Push $R0 Push $R0
${if} ${IsNT} ${if} ${IsNT}
${if} ${IsWinNT4} ${if} ${IsWinNT4}
ReadRegStr $R0 HKLM "System\CurrentControlSet\Control" "ProductOptions" ReadRegStr $R0 HKLM "System\CurrentControlSet\Control" "ProductOptions"
${if} $R0 == "Terminal Server" ${if} $R0 == "Terminal Server"
!insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_NOTPROTECTED "${FOLDER}\NT4TS\oleaut32.dll" "$SYSDIR\oleaut32.dll" "$SYSDIR" !insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_NOTPROTECTED "${FOLDER}\NT4TS\oleaut32.dll" "$SYSDIR\oleaut32.dll" "$SYSDIR"
${else} ${else}
!insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_NOTPROTECTED "${FOLDER}\NT4\oleaut32.dll" "$SYSDIR\oleaut32.dll" "$SYSDIR" !insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_NOTPROTECTED "${FOLDER}\NT4\oleaut32.dll" "$SYSDIR\oleaut32.dll" "$SYSDIR"
${endif} ${endif}
${endif} ${endif}
${else} ${else}
;No Oleaut32.dll with the security update has been released for Windows 9x. ;No Oleaut32.dll with the security update has been released for Windows 9x.
;The NT4 version is used because NT4 and Win9x used to share the same 2.40 version ;The NT4 version is used because NT4 and Win9x used to share the same 2.40 version
;and version 2.40.4519.0 is reported to work fine on Win9x. ;and version 2.40.4519.0 is reported to work fine on Win9x.
!insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_NOTPROTECTED "${FOLDER}\NT4\oleaut32.dll" "$SYSDIR\oleaut32.dll" "$SYSDIR" !insertmacro InstallLib REGDLL "${ALREADY_INSTALLED}" REBOOT_NOTPROTECTED "${FOLDER}\NT4\oleaut32.dll" "$SYSDIR\oleaut32.dll" "$SYSDIR"
${endif} ${endif}
Pop $R0 Pop $R0
!macroend !macroend
!macro VB6RunTimeUnInstall !macro VB6RunTimeUnInstall
!insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\msvbvm60.dll" !insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\msvbvm60.dll"
!insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\oleaut32.dll" !insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\oleaut32.dll"
!insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\olepro32.dll" !insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\olepro32.dll"
!insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\comcat.dll" !insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\comcat.dll"
!insertmacro UnInstallLib DLL SHARED NOREMOVE "$SYSDIR\asycfilt.dll" !insertmacro UnInstallLib DLL SHARED NOREMOVE "$SYSDIR\asycfilt.dll"
!insertmacro UnInstallLib TLB SHARED NOREMOVE "$SYSDIR\stdole2.tlb" !insertmacro UnInstallLib TLB SHARED NOREMOVE "$SYSDIR\stdole2.tlb"
!macroend !macroend
!verbose pop !verbose pop
!endif !endif