dipal
15th March 2012, 12:57
Masters
I am new to NSIS, Basically a web developer, given a task to make a Installer in NSIS.
It require rich function such as button colors ,fill all texts received from API response, few custom pages etc.
I googled, Find ExperienceUI and Resource Hacker to accomplish same.
Now i want to change buttons color with specified images. I try to do it with SkinnedControls. but if does not taking effect.
Please help to solved this.:rolleyes:
Here is my full stuff..
;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
!include "InstallOptions.nsh"
;--------------------------------
Name "Modern UI"
OutFile "ModernUI.exe"
Caption "Test Caption for all pages"
!define MUI_CUSTOMFUNCTION_GUIINIT myGUIInit
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_WELCOME
Function .onInit
InitPluginsDir
File "/oname=$PLUGINSDIR\button.bmp" "C:\button.bmp"
File "/oname=$PLUGINSDIR\scrollbar.bmp" "C:\screen.bmp"
FunctionEnd
Function myGUIInit
MessageBox MB_ICONEXCLAMATION|MB_OK "SkinnedControls error:"
SkinnedControls::skinit /NOUNLOAD \
/disabledtextcolor=808080 \
/selectedtextcolor=000080 \
/textcolor=000000 \
"/button=$PLUGINSDIR\button.bmp" \
"/scrollbar=$PLUGINSDIR\button.bmp"
Pop $0
StrCmp $0 "success" noerror
MessageBox MB_ICONEXCLAMATION|MB_OK "SkinnedControls error: $0"
noerror:
FunctionEnd
Function .onGUIEnd
; stop the plugin
SkinnedControls::unskinit
FunctionEnd
Section DummySection
!insertmacro MUI_LANGDLL_DISPLAY
SectionEnd
I am new to NSIS, Basically a web developer, given a task to make a Installer in NSIS.
It require rich function such as button colors ,fill all texts received from API response, few custom pages etc.
I googled, Find ExperienceUI and Resource Hacker to accomplish same.
Now i want to change buttons color with specified images. I try to do it with SkinnedControls. but if does not taking effect.
Please help to solved this.:rolleyes:
Here is my full stuff..
;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
!include "InstallOptions.nsh"
;--------------------------------
Name "Modern UI"
OutFile "ModernUI.exe"
Caption "Test Caption for all pages"
!define MUI_CUSTOMFUNCTION_GUIINIT myGUIInit
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_WELCOME
Function .onInit
InitPluginsDir
File "/oname=$PLUGINSDIR\button.bmp" "C:\button.bmp"
File "/oname=$PLUGINSDIR\scrollbar.bmp" "C:\screen.bmp"
FunctionEnd
Function myGUIInit
MessageBox MB_ICONEXCLAMATION|MB_OK "SkinnedControls error:"
SkinnedControls::skinit /NOUNLOAD \
/disabledtextcolor=808080 \
/selectedtextcolor=000080 \
/textcolor=000000 \
"/button=$PLUGINSDIR\button.bmp" \
"/scrollbar=$PLUGINSDIR\button.bmp"
Pop $0
StrCmp $0 "success" noerror
MessageBox MB_ICONEXCLAMATION|MB_OK "SkinnedControls error: $0"
noerror:
FunctionEnd
Function .onGUIEnd
; stop the plugin
SkinnedControls::unskinit
FunctionEnd
Section DummySection
!insertmacro MUI_LANGDLL_DISPLAY
SectionEnd