Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 28th August 2014, 06:42   #1
AndyJoeB
Junior Member
 
Join Date: Jan 2014
Posts: 9
How to deal with install.log entries before $INSTDIR was choosen?

Hi,

User can choose $INSTPATH. Anything I log before, goes to the default $INSTPATH, i.e. %systemdrive%\program files\my app, but if the user chooses to install into d:\myapp, I get a second install.log created with the logging after that.

I would like to get the whole log in the right place, and not pollute the directory structure with a half-baked install.log...

Any ideas? Is it possible somehow to "collect" all the log entries but not write them, and then dump them in the install.log file when I finally know what $INSTDIR is?

Thanks
Andy
AndyJoeB is offline   Reply With Quote
Old 28th August 2014, 09:21   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
code:
Push $INSTDIR
StrCpy $INSTDIR $PLUGINSDIR
LogSet on
Pop $INSTDIR
...
LogSet off
CopyFiles /silent $PLUGINSDIR\install.log $INSTDIR\install.log

Not tested but it should work.

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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