Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 12th August 2004, 12:02   #1
vharun
Junior Member
 
Join Date: Aug 2004
Posts: 3
Is it possible not to embed all files in exe

Hello,

I am trying to prepare a setup with nsis. My setup files' total size is nearly 300MB. So I don't want to embed all files in setup exe. Instead I want to call them externally and copy them to the install directory during installation. Is there a way to this in nsis and how?

Thanks in advance.
vharun is offline   Reply With Quote
Old 12th August 2004, 12:14   #2
scully13
Senior Member
 
Join Date: Apr 2004
Posts: 130
Use CopyFiles instead of File in your install.

[/SILENT] [/FILESONLY] filespec_on_destsys destination_path [size_of_files_in_kb]
scully13 is offline   Reply With Quote
Old 12th August 2004, 13:14   #3
vharun
Junior Member
 
Join Date: Aug 2004
Posts: 3
Thanks scully

I am not so clear how to use this command. My install section is like below. Can you give an example how to I do this?

Section "Main Istall" MainInstall

SetOutPath "$INSTDIR"

;Copy Project Files
File "dummy1.exe";
File "dummy2.exe";
File "dummy3.txt";

;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"

;Create start menu shortcuts
CreateDirectory "$SMPROGRAMS\MyPrg"
CreateShortCut "$SMPROGRAMS\MyPrg\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
CreateShortCut "$SMPROGRAMS\MyPrg\MyPrg.lnk" "$INSTDIR\dummy1.exe"

;Create desktop shortcuts
CreateShortCut "$DESKTOP\MyPrg.lnk" "$INSTDIR\dummy1.exe"

SectionEnd
vharun is offline   Reply With Quote
Old 12th August 2004, 13:26   #4
scully13
Senior Member
 
Join Date: Apr 2004
Posts: 130
Something like this:

SetOutPath "$INSTDIR"

;Copy Project Files
CopyFiles "$EXEDIR\dummy1.exe" "$INSTDIR"
CopyFiles "$EXEDIR\dummy2.exe" "$INSTDIR"
CopyFiles "$EXEDIR\dummy3.txt" "$INSTDIR"

You should read the paragraph in the documentation though about the /SILENT and /FILESONLY flag because you can also use CopyFiles to just copy an entire directory. So, you may not want the Windows copy dialog popping up on you. You can also put the size on the end of the line.

CopyFiles /SILENT /FILESONLY "$EXEDIR\file.exe" "$INSTDIR" 0
scully13 is offline   Reply With Quote
Old 12th August 2004, 13:53   #5
vharun
Junior Member
 
Join Date: Aug 2004
Posts: 3
Thanks scully13

It is ok.
vharun is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump