NSIS: Install a folder based on 32/64 bits -
i'm working on installer script needs install 1 of 2 folders based on os bits. selection occurs fine far reason see 1 folder within resulting installer.
the relevant sections below:
;windows 32 or 64 bit version !include "x64.nsh" section "jre 64 bit" section5 sectionin ro ;use right java version detailprint "jre extraction..." setoutpath "$instdir\${appdir}\jre" file /a /r "${srcdir}\..\..\jre\jre_64\jre\*.*" detailprint "jre extraction complete!" sectionend section "jre 32 bit" section6 sectionin ro ;use right java version detailprint "jre extraction..." setoutpath "$instdir\${appdir}\jre" file /a /r "${srcdir}\..\..\jre\jre_32\jre\*.*" detailprint "jre extraction complete!" sectionend function .oninit #determine bitness of os , enable correct section intop $0 ${sf_selected} | ${sf_ro} ${if} ${runningx64} sectionsetflags ${section5} $0 sectionsetflags ${section6} ${section_off} ${else} sectionsetflags ${section5} ${section_off} sectionsetflags ${section6} $0 ${endif} functionend
both folders exists there no warning. instead of seeing 2 folders (jre_64 , jre_32) see 1 jre folder within installer.
is expected behavior? i'm using nsis 2.51. resulting instaler can found here.
you can see full script here.
i guess it's because of delta compression, 2 jre directories should have quite similar contents. structure when viewing using 7-zip doesn't represent internal structure of installer, seems quite opaque.
i tried find tool "properly" unpack installer (like innounp inno setup), without success. confirms nsis installer structure should opaque.
did manual testing determine if installer works expected in both cases?
Comments
Post a Comment