updated documentation: new system for DLL/TLB library setup, useful script code, history, credits, intro, tutorial

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3602 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
joostverburg 2004-08-06 22:06:27 +00:00
parent 4e4b0e8420
commit 7615a25883
9 changed files with 434 additions and 403 deletions

View file

@ -80,102 +80,6 @@ Some of the following values will not be used by older Windows versions.
If both NoModify and NoRepair are set to 1, the button displays "Remove" instead of "Modify/Remove".
\H{usefulvb6_runtime} How to install the VB6 runtimes
The best way to install the VB6 runtimes is to use the \R{upgradedll}{UpgradeDLL macro} to upgrade the DLL files and the \R{addshareddll}{AddSharedDLL function} to increment the shared DLL count.
Use the Modern UI with a Finish page to ask for a reboot if required or use \R{IfRebootFlag}{IfRebootFlag} and make your own page or messagebox.
To get the VB6 runtime files, you can extract the files from vbrun60sp5.exe using any archiver that supports CAB compression or, if you have installed the latest version, copy the the files from the System folder. You need the following files:
Asycfilt.dll \\<br\\>
Comcat.dll \\<br\\>
Msvbvm60.dll \\<br\\>
Oleaut32.dll \\<br\\>
Olepro32.dll \\<br\\>
Stdole2.tlb \\<br\\>
During the uninstallation, use the un.DecrementSharedDLL function below to decrement the shared DLL count (never remove the files, because the shared DLL count is not reliable enough for such imporant files).
\c !include "UpgradeDLL.nsh"
\c
\c !define VBFILESDIR "C:\Windows\System" ;Location of VB6 runtime files
\c
\c Section "Install VB DLLs"
\c
\c !insertmacro UpgradeDLL ${VBFILESDIR}\Comcat.dll $SYSDIR\Comcat.dll $SYSDIR
\c !insertmacro UpgradeDLL ${VBFILESDIR}\Msvbvm60.dll $SYSDIR\Msvbvm60.dll $SYSDIR
\c !insertmacro UpgradeDLL ${VBFILESDIR}\Oleaut32.dll $SYSDIR\Oleaut32.dll $SYSDIR
\c !insertmacro UpgradeDLL ${VBFILESDIR}\Olepro32.dll $SYSDIR\Olepro32.dll $SYSDIR
\c
\c !define UPGRADEDLL_NOREGISTER
\c !insertmacro UpgradeDLL ${VBFILESDIR}\Asycfilt.dll $SYSDIR\Asycfilt.dll $SYSDIR
\c !insertmacro UpgradeDLL ${VBFILESDIR}\Stdole2.tlb $SYSDIR\Stdole2.tlb $SYSDIR
\c !undef UPGRADEDLL_NOREGISTER
\c
\c ;Only iease DLL count on new installation
\c ;Replace myprog.exe or use another detection method
\c IfFileExists $INSTDIR\myprog.exe skipAddSharedDLL
\c Push $SYSDIR\Asycfilt.dll
\c Call AddSharedDLL
\c Push $SYSDIR\Comcat.dll
\c Call AddSharedDLL
\c Push $SYSDIR\Msvbvm60.dll
\c Call AddSharedDLL
\c Push $SYSDIR\Oleaut32.dll
\c Call AddSharedDLL
\c Push $SYSDIR\Olepro32.dll
\c Call AddSharedDLL
\c Push $SYSDIR\Stdole2.tlb
\c Call AddSharedDLL
\c skipAddSharedDLL:
\c
\c SectionEnd
\c
\c Section "Uninstall"
\c
\c Push $SYSDIR\Asycfilt.dll
\c Call un.DecrementSharedDLL
\c Push $SYSDIR\Comcat.dll
\c Call un.DecrementSharedDLL
\c Push $SYSDIR\Msvbvm60.dll
\c Call un.DecrementSharedDLL
\c Push $SYSDIR\Oleaut32.dll
\c Call un.DecrementSharedDLL
\c Push $SYSDIR\Olepro32.dll
\c Call un.DecrementSharedDLL
\c Push $SYSDIR\Stdole2.tlb
\c Call un.DecrementSharedDLL
\c
\c SectionEnd
\c
\c Function AddSharedDLL
\c Exch $R1
\c Push $R0
\c ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
\c IntOp $R0 $R0 + 1
\c WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
\c Pop $R0
\c Pop $R1
\c FunctionEnd
\c
\c Function un.DecrementSharedDLL
\c Exch $R1
\c Push $R0
\c ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
\c StrCmp $R0 "" done
\c IntOp $R0 $R0 - 1
\c IntCmp $R0 0 rk rk uk
\c rk:
\c DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
\c Goto done
\c uk:
\c WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
\c done:
\c Pop $R0
\c Pop $R1
\c FunctionEnd
\H{useful_system_plugin} Calling an external DLL using the System.dll plugin
Some install processes are required to call functions contained inside third party DLLs. A prime example of this is when installing a Palm(TM) conduit.