Old 21st September 2017, 12:39   #1
Pawel
Moderator
 
Pawel's Avatar
 
Join Date: Aug 2004
Location: Poland
Posts: 499
Send a message via ICQ to Pawel
Section Size problem

NSIS displays approximate size of sections on Directory Page...
http://www.meggamusic.co.uk/shup/1505997197/ddd.png

It works fine, but not in the following case:

PHP Code:
Section "Section" SEC_IDX
   
${If} ${RunningX64}
      ; 
64 bit code
      SetOutPath 
"$INSTDIR\MY_APP"
      
File /"C:\MY_APP\x64\*.*"
   
${Else}
      ; 
32 bit code
      SetOutPath 
"$INSTDIR\MY_APP"
      
File /"C:\MY_APP\x86\*.*"
   
${EndIf}
SectionEnd 
Above example code will install 64 bit version of my app on 64 bit machine and 32 bit version of my app on 32 bit machine...
The problem is that NSIS will display "double" size of this section (there are 2 "File" commands, so NSIS will add size of files in both commands).

What should I do in that case? I would like to see real size of installed files...

Should I use SectionSetSize command and manually change it? Or there is some other smart solution?

-Pawel
Pawel is offline   Reply With Quote
Old 21st September 2017, 16:12   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,589
Use two sections. Hide (empty name) and uncheck the one that does not match the system type in .onInit.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 21st September 2017, 17:58   #3
Pawel
Moderator
 
Pawel's Avatar
 
Join Date: Aug 2004
Location: Poland
Posts: 499
Send a message via ICQ to Pawel
That is the solution... Thanks!
What if I can not use 2 sections (to much work)?
Pawel 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