Install script fixes. .onSelChange is now called after installation type change too
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1866 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
42b1615bbf
commit
3e0bfbd21f
2 changed files with 192 additions and 143 deletions
|
@ -221,6 +221,7 @@ Section "nsExec" SecContribnsExec
|
||||||
File ..\Plugins\nsExec.dll
|
File ..\Plugins\nsExec.dll
|
||||||
SetOutPath $INSTDIR\Contrib\nsExec
|
SetOutPath $INSTDIR\Contrib\nsExec
|
||||||
File ..\Contrib\nsExec\*.txt
|
File ..\Contrib\nsExec\*.txt
|
||||||
|
File ..\Contrib\nsExec\*.nsi
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Splash" SecContribSplash
|
Section "Splash" SecContribSplash
|
||||||
|
@ -338,13 +339,16 @@ Section "NSIS Source Code" SecSrcNSIS
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
SubSection "Contrib" SecSrcContrib
|
SubSection "Contrib" SecSrcContrib
|
||||||
Section "ExDLL Source" SecSrcEx
|
# required for other plugins sources
|
||||||
|
# text changes in .onSelChange
|
||||||
|
Section "ExDLL Source (required)" SecSrcEx
|
||||||
SectionIn 1
|
SectionIn 1
|
||||||
SetOutPath $INSTDIR\Contrib\ExDLL
|
SetOutPath $INSTDIR\Contrib\ExDLL
|
||||||
File ..\Contrib\exdll\exdll.c
|
File ..\Contrib\exdll\exdll.c
|
||||||
File ..\Contrib\exdll\exdll.dpr
|
File ..\Contrib\exdll\exdll.dpr
|
||||||
File ..\Contrib\exdll\exdll.dsp
|
File ..\Contrib\exdll\exdll.dsp
|
||||||
File ..\Contrib\exdll\exdll.dsw
|
File ..\Contrib\exdll\exdll.dsw
|
||||||
|
File ..\Contrib\exdll\exdll.h
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "MakeNSISW Source" SecSrcMNW
|
Section "MakeNSISW Source" SecSrcMNW
|
||||||
|
@ -357,7 +361,12 @@ Section "MakeNSISW Source" SecSrcMNW
|
||||||
File ..\Contrib\Makensisw\*.dsp
|
File ..\Contrib\Makensisw\*.dsp
|
||||||
File ..\Contrib\Makensisw\*.rc
|
File ..\Contrib\Makensisw\*.rc
|
||||||
File ..\Contrib\Makensisw\*.bmp
|
File ..\Contrib\Makensisw\*.bmp
|
||||||
|
File ..\Contrib\Makensisw\*.ico
|
||||||
|
File ..\Contrib\Makensisw\*.psp
|
||||||
#File ..\Contrib\Makensisw\Makefile
|
#File ..\Contrib\Makensisw\Makefile
|
||||||
|
SetOutPath $INSTDIR\Contrib\Makensisw\jnetlib
|
||||||
|
File ..\Contrib\Makensisw\jnetlib\*.cpp
|
||||||
|
File ..\Contrib\Makensisw\jnetlib\*.h
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "UI Holder Source" SecContribUIHolderS
|
Section "UI Holder Source" SecContribUIHolderS
|
||||||
|
@ -484,6 +493,7 @@ Section "Zip2Exe Source" SecContribZ2ES
|
||||||
File ..\Contrib\zip2exe\*.rc
|
File ..\Contrib\zip2exe\*.rc
|
||||||
File ..\Contrib\zip2exe\*.dsw
|
File ..\Contrib\zip2exe\*.dsw
|
||||||
File ..\Contrib\zip2exe\*.dsp
|
File ..\Contrib\zip2exe\*.dsp
|
||||||
|
File ..\Contrib\zip2exe\*.xml
|
||||||
SetOutPath $INSTDIR\Contrib\zip2exe\zlib
|
SetOutPath $INSTDIR\Contrib\zip2exe\zlib
|
||||||
File ..\Contrib\zip2exe\zlib\*.*
|
File ..\Contrib\zip2exe\zlib\*.*
|
||||||
SetDetailsPrint both
|
SetDetailsPrint both
|
||||||
|
@ -492,6 +502,38 @@ SectionEnd
|
||||||
SubSectionEnd
|
SubSectionEnd
|
||||||
SubSectionEnd
|
SubSectionEnd
|
||||||
|
|
||||||
|
!define SF_SELECTED 1
|
||||||
|
|
||||||
|
!macro secSelected SEC
|
||||||
|
SectionGetFlags ${SEC} $R7
|
||||||
|
IntOp $R7 $R7 & ${SF_SELECTED}
|
||||||
|
StrCmp $R7 ${SF_SELECTED} 0 +2
|
||||||
|
IntOp $R0 $R0 + 1
|
||||||
|
!macroend
|
||||||
|
|
||||||
|
Function .onSelChange
|
||||||
|
StrCpy $R0 0
|
||||||
|
!insertmacro secSelected ${SecContribSplashTS}
|
||||||
|
!insertmacro secSelected ${SecContribBannerS}
|
||||||
|
!insertmacro secSelected ${SecContribBgImageS}
|
||||||
|
!insertmacro secSelected ${SecContribIOS}
|
||||||
|
!insertmacro secSelected ${SecContribLangDLLS}
|
||||||
|
!insertmacro secSelected ${SecContribnsExecS}
|
||||||
|
!insertmacro secSelected ${SecContribNSISdlS}
|
||||||
|
!insertmacro secSelected ${SecContribSplashS}
|
||||||
|
!insertmacro secSelected ${SecContribStartMenuS}
|
||||||
|
!insertmacro secSelected ${SecContribUserInfoS}
|
||||||
|
SectionGetFlags ${SecSrcEx} $R7
|
||||||
|
StrCmp $R0 0 notRequired
|
||||||
|
IntOp $R7 $R7 | ${SF_SELECTED}
|
||||||
|
SectionSetFlags ${SecSrcEx} $R7
|
||||||
|
SectionSetText ${SecSrcEx} "ExDLL Source (required)"
|
||||||
|
Goto done
|
||||||
|
notRequired:
|
||||||
|
SectionSetText ${SecSrcEx} "ExDLL Source"
|
||||||
|
done:
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
Function .onInit
|
Function .onInit
|
||||||
!insertmacro MUI_WELCOMEFINISHPAGE_INIT
|
!insertmacro MUI_WELCOMEFINISHPAGE_INIT
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
|
@ -1116,54 +1116,13 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
||||||
g_inst_section[hItem.lParam].flags|=SF_SELECTED;
|
g_inst_section[hItem.lParam].flags|=SF_SELECTED;
|
||||||
CheckTreeItem(hwndTree1,&hItem,1);
|
CheckTreeItem(hwndTree1,&hItem,1);
|
||||||
}
|
}
|
||||||
#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_COMPONENTPAGE)
|
lParam = 0;
|
||||||
{
|
|
||||||
ExecuteCodeSegment(g_inst_header->code_onSelChange,NULL);
|
|
||||||
}
|
|
||||||
#endif//NSIS_SUPPORT_CODECALLBACKS && NSIS_CONFIG_COMPONENTPAGE
|
|
||||||
{
|
|
||||||
int r,x;
|
|
||||||
// check to see which install type we are
|
|
||||||
for (r = 0; r < m_num_insttypes; r ++)
|
|
||||||
{
|
|
||||||
HTREEITEM *ht=hTreeItems;
|
|
||||||
section *t=g_inst_section;
|
|
||||||
x=num_sections;
|
|
||||||
while (x--)
|
|
||||||
{
|
|
||||||
if (t->name_ptr && !(t->flags&(SF_SUBSEC|SF_SUBSECEND)))
|
|
||||||
{
|
|
||||||
TV_ITEM hItem;
|
|
||||||
hItem.hItem=*ht;
|
|
||||||
if (g_inst_header->no_custom_instmode_flag==1)
|
|
||||||
{
|
|
||||||
CheckTreeItem(hwndTree1,&hItem,(t->install_types>>m_whichcfg)&1);
|
|
||||||
}
|
|
||||||
else if (!(t->flags&SF_RO))
|
|
||||||
{
|
|
||||||
hItem.mask=TVIF_STATE;
|
|
||||||
TreeView_GetItem(hwndTree1,&hItem);
|
|
||||||
if (!(t->install_types&(1<<r)) != !((hItem.state>>12)>1 )) break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
t++;
|
|
||||||
ht++;
|
|
||||||
}
|
|
||||||
if (x < 0) break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!g_inst_header->no_custom_instmode_flag)
|
|
||||||
{
|
|
||||||
SendMessage(hwndCombo1,CB_SETCURSEL,r,0);
|
|
||||||
m_whichcfg=r;
|
|
||||||
}
|
|
||||||
} // end of typecheckshit
|
|
||||||
uMsg = WM_IN_UPDATEMSG;
|
uMsg = WM_IN_UPDATEMSG;
|
||||||
} // not ro
|
} // not ro
|
||||||
} // was valid click
|
} // was valid click
|
||||||
} // was click or hack
|
} // was click or hack
|
||||||
#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_ENHANCEDUI_SUPPORT)
|
#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_ENHANCEDUI_SUPPORT)
|
||||||
if (lpnmh->code == TVN_SELCHANGED) {
|
if (lpnmh && lpnmh->code == TVN_SELCHANGED) {
|
||||||
SendMessage(hwndTree1, WM_USER+0x19, 0, ((LPNMTREEVIEW)lpnmh)->itemNew.lParam);
|
SendMessage(hwndTree1, WM_USER+0x19, 0, ((LPNMTREEVIEW)lpnmh)->itemNew.lParam);
|
||||||
}
|
}
|
||||||
#endif//NSIS_SUPPORT_CODECALLBACKS && NSIS_CONFIG_ENHANCEDUI_SUPPORT
|
#endif//NSIS_SUPPORT_CODECALLBACKS && NSIS_CONFIG_ENHANCEDUI_SUPPORT
|
||||||
|
@ -1211,7 +1170,9 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
||||||
ht++;
|
ht++;
|
||||||
}
|
}
|
||||||
SendMessage(hwndTree1,WM_VSCROLL,SB_TOP,0);
|
SendMessage(hwndTree1,WM_VSCROLL,SB_TOP,0);
|
||||||
|
lParam = 0;
|
||||||
}
|
}
|
||||||
|
else lParam = 1;
|
||||||
uMsg = WM_IN_UPDATEMSG;
|
uMsg = WM_IN_UPDATEMSG;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1225,6 +1186,52 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
||||||
}
|
}
|
||||||
if (uMsg == WM_IN_UPDATEMSG)
|
if (uMsg == WM_IN_UPDATEMSG)
|
||||||
{
|
{
|
||||||
|
if (!lParam)
|
||||||
|
{
|
||||||
|
#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_COMPONENTPAGE)
|
||||||
|
{
|
||||||
|
ExecuteCodeSegment(g_inst_header->code_onSelChange,NULL);
|
||||||
|
}
|
||||||
|
#endif//NSIS_SUPPORT_CODECALLBACKS && NSIS_CONFIG_COMPONENTPAGE
|
||||||
|
{
|
||||||
|
int r,x;
|
||||||
|
// check to see which install type we are
|
||||||
|
for (r = 0; r < m_num_insttypes; r ++)
|
||||||
|
{
|
||||||
|
HTREEITEM *ht=hTreeItems;
|
||||||
|
section *t=g_inst_section;
|
||||||
|
x=num_sections;
|
||||||
|
while (x--)
|
||||||
|
{
|
||||||
|
if (t->name_ptr && !(t->flags&(SF_SUBSEC|SF_SUBSECEND)))
|
||||||
|
{
|
||||||
|
TV_ITEM hItem;
|
||||||
|
hItem.hItem=*ht;
|
||||||
|
if (g_inst_header->no_custom_instmode_flag==1)
|
||||||
|
{
|
||||||
|
CheckTreeItem(hwndTree1,&hItem,(t->install_types>>m_whichcfg)&1);
|
||||||
|
}
|
||||||
|
else if (!(t->flags&SF_RO))
|
||||||
|
{
|
||||||
|
hItem.mask=TVIF_STATE;
|
||||||
|
TreeView_GetItem(hwndTree1,&hItem);
|
||||||
|
if (!(t->install_types&(1<<r)) != !((hItem.state>>12)>1 )) break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t++;
|
||||||
|
ht++;
|
||||||
|
}
|
||||||
|
if (x < 0) break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!g_inst_header->no_custom_instmode_flag)
|
||||||
|
{
|
||||||
|
SendMessage(hwndCombo1,CB_SETCURSEL,r,0);
|
||||||
|
m_whichcfg=r;
|
||||||
|
}
|
||||||
|
} // end of typecheckshit
|
||||||
|
}
|
||||||
|
|
||||||
if (g_inst_header->no_custom_instmode_flag==2)
|
if (g_inst_header->no_custom_instmode_flag==2)
|
||||||
{
|
{
|
||||||
int c=(m_whichcfg == m_num_insttypes && m_num_insttypes)<<3;// SW_SHOWNA=8, SW_HIDE=0
|
int c=(m_whichcfg == m_num_insttypes && m_num_insttypes)<<3;// SW_SHOWNA=8, SW_HIDE=0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue