Archive: nsi file for a VB app.


Does anybody built a facility to convert a setup.lst file into a a .nsi file for a vb applications?

Any difficulties in installing VB app with SuperPiMP?


I'm using it for vb, just gotta include the runtimes and stuff. Works pretty damn good. Only 1 exe to distro, no more lst/ini/exe/cab.


Do you copy all of your LST into the nsi file?

Can you give a sample of a complete NSI file?


Not really. I recreated the nsi from scratch. Just use the File command for all your files and mkdir as you need to. Also its optional but you can regdll your .dll's and .ocx's, so your program wont have to do it on launch. Thats about it. You can check out the sample .nsi files the installer includes


new versions of ocx's
I have to wonder about newer version of OCX's that I might install, should I just set it to Overwrite, then register?

-ryan


Re: new versions of ocx's

Originally posted by rfb
I have to wonder about newer version of OCX's that I might install, should I just set it to Overwrite, then register?

-ryan
I think this might go down as the longest awaited reply ever...

take a look at http://forums.winamp.com/showthread.php?threadid=58619

i might be able to incorporate this into my nsis gui. sound like a good idea?


Mmm I'm still using the Microsoft distribution of the VB6 runtimes instead of a native NSIS install. Maybe I should make a VB6-Runtime install? With all the correct RegDLL/version checking/etc?


I did a native NSIS install for VB5 runtime libraries. I used SetOverwrite ifnewer instead and before I execute the script, I make sure that I have the latest versions. Here it is :

Section "Runtime Visual Basic 5.0 SP3"
SectionIn 23
SetOverwrite ifnewer
SetCompress Auto
SetDateSave On
SetOutPath "$SYSDIR"
File "C:\Windows\Bureau\mdinote-setup\Asycfilt.dll"
File "C:\Windows\Bureau\mdinote-setup\Comcat.dll"
File "C:\Windows\Bureau\mdinote-setup\Ctl3d32.dll"
File "C:\Windows\Bureau\mdinote-setup\Msvbvm50.dll"
File "C:\Windows\Bureau\mdinote-setup\Oleaut32.dll"
File "C:\Windows\Bureau\mdinote-setup\Olepro32.dll"
File "C:\Windows\Bureau\mdinote-setup\Vb5fr.dll"
RegDLL "$SYSDIR\Comcat.dll"
RegDLL "$SYSDIR\msvbvm50.dll"
RegDLL "$SYSDIR\oleaut32.dll"
RegDLL "$SYSDIR\olepro32.dll"
SectionEnd


But does that work if the OLE files need to be updated?
I created the following yesterday (I have a few notes to make, scroll down):


Section "Visual Basic 6 Runtimes"
;OLEAUT32.DLL is always in use! Most of the time, a reboot is needed.
SetOverwrite on
SetOutPath $SYSDIR
CompareDLLVersions /STOREFROM OLEAUT32.NEW $SYSDIR\OLEAUT32.DLL oleaut32_1newer oleaut32_2newer
goto oleaut32_2newer
oleaut32_1newer:
File OLEAUT32.NEW
Rename OLEAUT32.NEW OLEAUT32.DLL
IfErrors 0 oleaut32_noreboot
Rename /REBOOTOK OLEAUT32.NEW OLEAUT32.DLL
MessageBox MB_OK "Reboot needed"
oleaut32_noreboot:
RegDLL "$SYSDIR\OLEAUT32.DLL"
oleaut32_2newer:

; do I need this?
;OLEPRO32.DLL is always in use! Most of the time, a reboot is needed.
CompareDLLVersions /STOREFROM OLEPRO32.NEW $SYSDIR\OLEPRO32.DLL olepro32_1newer olepro32_2newer
goto olepro32_2newer
olepro32_1newer:
File OLEPRO32.NEW
Rename OLEPRO32.NEW OLEPRO32.DLL
IfErrors 0 olepro32_noreboot
Rename /REBOOTOK OLEPRO32.NEW OLEPRO32.DLL
MessageBox MB_OK "Reboot needed"
olepro32_noreboot:
RegDLL "$SYSDIR\OLEPRO32.DLL"
olepro32_2newer:

;ASYCFILT.DLL
CompareDLLVersions /STOREFROM ASYCFILT.DLL $SYSDIR\ASYCFILT.DLL asycfilt_1newer asycfilt_2newer
goto asycfilt_2newer
asycfilt_1newer:
File ASYCFILT.DLL
asycfilt_2newer:

;STDOLE2.TLB
CompareDLLVersions /STOREFROM STDOLE2.TLB $SYSDIR\STDOLE2.TLB stdole_1newer stdole_2newer
goto stdole_2newer
stdole_1newer:
File STDOLE2.TLB
stdole_2newer:

;MSVBVM60.DLL
CompareDLLVersions /STOREFROM MSVBVM60.DLL $SYSDIR\MSVBVM60.DLL MSVBVM60_1newer MSVBVM60_2newer
goto MSVBVM60_2newer
MSVBVM60_1newer:
File MSVBVM60.DLL
MSVBVM60_2newer:

;COMCAT.DLL
CompareDLLVersions /STOREFROM COMCAT.DLL $SYSDIR\COMCAT.DLL COMCAT_1newer COMCAT_2newer
goto COMCAT_2newer
COMCAT_1newer:
File COMCAT.DLL
COMCAT_2newer:

;an OCX registration example
CompareDLLVersions /STOREFROM comdlg32.ocx $SYSDIR\comdlg32.ocx comdlg32_1newer comdlg32_2newer
goto comdlg32_2newer
comdlg32_1newer:
File comdlg32.ocx
RegDLL "$SYSDIR\comdlg32.ocx"
comdlg32_2newer:
SectionEnd

A few notes:
1) Do you actually need all those files? My application only needs MSVBVM60.DLL and OLEAUT32.DLL, but I'm afraid to leave out the rest.
2) This NSIS installer is bigger than the Microsoft distribution. If you use the Microsoft one with the /Q flag, you're saving 150 KB. So I'm probably sticking with that.

If anyone can tell me if you can leave out some of these files, that'd help.