wansisIntroductionwansis is a NSIS plugin which allows you to skin your NSIS installer like in Winamp.
wansis uses the same skins that Winamp uses except it only uses the gen.bmp and genex.bmp bitmaps. It also adds two new functionalities to the installer:
How to useThis does not try to be a tutorial. It only gives you the facts about wansis. Using the included macro system, it should be a walk in the park to skin your NSIS installer. Macro system!include "wansis.nsh" Rigging itIn your .onInit callback function, extract the skin bitmaps using the INCLUDESKIN macro. Function .onInit
; This includes the skin bitmaps.
; You only need to pass the skin name.
; The macro appends _gen.bmp and _genex.bmp to it.
${INCLUDESKIN} nonstep
FunctionEnd
If you got the skin bitmaps located outside you script dir, then you must !define INCLUDESKIN_PATH with the path. !define INCLUDESKIN_PATH myskins Making it shineIn the .onGUIInit callback function it is time to let wansis do the work. Function .onGUIInit
${SKINIT} nonstep
FunctionEnd
Tweaking itIf you don't want to put an Opacity submenu on the system menu of the installer and/or let the installer snap to the screen edges you can use the SKINCONFIG macro. ; Leave Oapcity menu as it is but don't snap to edges of screen
${SKINCONFIG} 1 0
; No snapping and no opacity submenu
${SKINCONFIG} 0 0
If you still didn't figure this out, here goes: ${SKINCONFIG} [opacity submenu flag] [snap flag]
Shutting downIn the .onGUIEnd callback function it is time to kill wansis. Function .onGUIEnd
${UNSKINIT}
FunctionEnd
Skin specs
Included skinsWhen you installed wansis, you could choose whether to install a skin pack or not.
ZmAn3 also contributed some themes (includes matching wizard, header bitmaps and icons as well): I reserved the right to extract the gen.bmp and genex.bmp bitmaps from the Winamp 2.x skins with the same names. All honour to the respective authors. Skin selection dialogUsing the LangDLL's LangDialog function you can present a nice dialog to the user where he/she can select a skin. ; Using the powers of LangDLL to select skin. Whoaw!!
LangDLL::LangDialog "Select skin???" \
"Select the skin you would like the installer \
to have (leave empty to use no skin):" \
A \
"NSIS" "nsis" \
"Winamp 2.x style" "winamp" \
"Nucleo N-Log" "nlog" \
"Majestic" "majestic" \
"Nonstep" "nonstep" \
"Linkin Park (Blue)" "linkinpark" \
"Nemish" "nemish" \
"GG Error" "ggerror" \
"Akura Isotanium" "akuraisotanium" \
"Kyaela" "kyaela" \
"Steel" "steel" \
"Do not skin" "none" \
"" ;end
Pop $0
StrCmp $0 "cancel" 0 +3
Abort
StrCmp $0 "" end 0
StrCmp $0 "none" end 0
${SKINIT} $0
end:
The code above must be place in the .onGUIInit function. You must ofcourse use the INCLUDESKIN macro to include all the skins in your installer. DownloadDownload wansis here: http://saivertweb.no-ip.com/nsis/wansis/wansis.7z Version history
Known bugs list
CreditsWritten by Saivert LicensePortions Copyright © 2002-2003: - Nullsoft, Inc. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any distribution. |