Archive: wansis - Skinned NSIS


wansis - Skinned NSIS
This is very old code which I recently found on my harddrive. I made it a while back.

It's basically a plug-in for NSIS which will apply a winamp based skin on your installer (hence wansis).

You can download the installer (which will set up shortcuts and copy files to your NSIS directory) or a 7-zip archive.

Installer: wansis_setup.exe (201 KB)

7-zip archive: wansis.7z

You might also be interested in this unzip plug-in I made. I know there already is one, but I had to make my own. My unzip plug-in (named nsisunz) will output extract progress to installer log window.
nsisunz.7z


Cool!

Seems like your installer doesn't use unskinit and so the plug-in is not deleted from after the installer quits.


So cool...! Go nice tips from your example also, thanks.


I get !include: could not find: "wansis.nsh" when trying to compile the example and i dont see this file extracted during install


it is in the zip pack thou also is it possible to skin the scroll bar


The installer is broken. Sorry for that one. I will delete it and just go with the 7z (7-zip) archive. Easier that way. Anyone here knows how to extract and copy files anyway.

Scroll bars can be skinned, but only under Windows 2000/XP. I think I will have to use code from the AlbumList (by Safai Ma) plug-in for Winamp to do that one.

I'm happy that you guys like it. But since the source code is included, you can work on it too. Isn't that what code sharing is about??


Isn't that what code sharing is about??

the NSIS scripting code is hard enough ;)


Since your inbox is full and the message won't send I'll have to respond to your private msg here.

I never could figure out C ,So I do what I can, I make
header graphics Wizard Bmps and crap.
[/quote]http://zman3.deviantart.com/
answered a few posts ect..




[quote]

saivert wrote on 07-09-2005 06:27 AM:
So you think NSIS is hard, huh?
Well... my friend (at least I hope so).

I think NSIS is pretty easy to learn, except that in some situations you want extra power and then NSIS can be a bit hard to deal with. You must certainly use your imagination when working with NSIS scripts.

I assume many of the visitors on the NSIS forums also know their fair share of C, C++, Delphi and other high-level programming languages. This is a forum for discussing the development of plug-ins as well. Not just a joint for you freebie script hungry guys.

Give some back!


this is very cool....
except, where is the wansis.nsh ?
the prospect of creating your own skins is very exciting

also, is it possible with a little C jiggering to make custom shapes instead of the standard box ?
g


This is great! Now I can make a custom installer look for my installers. Now I have to learn how to make winamp skins.:winamp: :)


I made a complete new directory structure layout for the new release of my archive.
Now you can extract it right in your NSIS folder and it should go along with the new NSIS v2.7 directory layout.
You will find the examples in examples\wansis, the skins in contrib\wansis\skins, the extractskin utility program in contrib\wansis, the documentation in docs\wansis, the plug-in itself in plugins as usual and the alleged missing include file in includes this time.
I really hope this helps. You can compile the examples without having extracted the archive in NSIS directory since the exmaples use !addplugindir and !addincludedir appropriately.
If any of the moderators here can remove the link to the installer in the post that starts this topic I will be glad. The installer is broken and I suggest people to download the 7z file instead. I can post a link to a zip file if people don't manage to install 7-zip. It's not that hard.

Here is the 7z archive with wansis and wansis.nsh included:
wansis.7z ( 168.89 Kb )

and if you guys are afraid of triggering my download hits counter then use this direct link:
http://saivert.inthegray.com/uploads/nsis/wansis.7z

and the zip version for you 7-zip phobics out there:
wansis.zip (195.19 Kb)

Again in a direct link version (which does not trigger a PHP script to track downloads):
http://saivert.inthegray.com/uploads/nsis/wansis.zip


heres a forum colors skin and header and checkbox bmps


When I clicked the direct link for the wansis zip file above, this is the page I saw:

High security alert!!!

You are not permitted to download the file "wansis.zip" because it is infected with the virus "Adware/Beginto.DR".

URL = http://saivert.inthegray.com/uploads/nsis/wansis.zip

File quarantined as:

http://www.fortinet.com/VirusEncyclo...e%2FBeginto.DR
:rolleyes: The 7-zip direct link works. Just giving the heads up to everyone, including saivert.

JasonFriday13,
I downloaded the same zip file from the link you listed above and I don't get any warning. I even manually scanned the files before and after extracting. Still nothing.

The warning you got might be a false positive in the virus scanner you are using. (I'm using AVG with the lastest signatures as of 7/11/2005)


okay
Yup. It must be false positives. I have Norman Internet control (a firewall and av software package) and did not get any warnings. I archived it on a 100% virus free computer as well.

Nice skins. Hope you make some good use of it. Maybe in a real-world installer soon. Did the new directory layout make more sense?

I have repackaged the "Winamp forum theme" skin and included another example using the new skin.

Download: wansis-waforum-theme.7z (115.72 Kb)


Pretty slick saivert. This skinning stuff is awesome.


can anybody upload a screenshot please?


Screenshots and new version out!
Yes! you heard it. New version on the run.

In version 1.2 (wich this one is named) you got skinned scrollbars baby! And I have fixed the display issue with a blue underlined text appearing on some of the buttons (especially on InstallOptions pages).

Download wansis 1.2:
wansis.7z 191KB

Download Winamp forum skin and example:
wansis_waforum_theme.7z 130KB

Screenshots of wansis:

Screenshot #1 34,4KB
Screenshot #2 31,8KB
Screenshot #3 27,5KB


if your gonna be working on this i have a request can you do somthing about the close min button ect of course then it will take it a way from the winamp skins


Hello,

I can see in the screenhot :http://home.no.net/nxs/nsis/wansis/s...creenshot3.jpg

that you have succeeds in putting images in the background of the buttons, how did you make?

That made several months that I search.


It would be possible to have the sourcecode of your plugin?


At this point, the skins seem pretty vector'y and non 3D.
Is that a constraint of winamp skins or can you make XP/OS X like skins that are more in the 'eye candy' territory...
;
probably a stupid question but I thought I'd ask
g


wansis source code
In wansis I'm only mimicing the skinning engine used in Winamp classic skins (2.x style). I'm not planning on making freeform skin plug-in for NSIS as that would require me to replace the NSIS UI entirely. Now wansis is only owner-drawing the controls and customizing the colors.

The source code for the latest version of wansis is located here:

wansis-source.7z 75KB
This 7-zip archive contains a Microsoft Visual Studio .NET 2003 project and solution file.
And remember: The code isn't pretty. It just works.

I hope you can learn how wansis really works from this. Inspect my code thoroughly.

@grahama: And I think the flat fixed skinning of Winamp 2.x is pretty eye-candy. It's just the imagination which sets the boundaries.

@SuperPat: If you read up on the BS_OWNERDRAW style of the BUTTON control class in the Win32 API you will lear how to draw the buttons and so on. Most controls in Win32 support customized drawing code, except scrollbars which require some more heavier coding (detours library is nice).

EDIT: Created wiki page --> http://nsis.sourceforge.net/wiki/Wansis


cool plugin, though i'm afraid to see more bad examples of using it. think i gotta get back to skinning :)


yes, aesthetics is definitely and eye of the beholder thing :)
;
maybe, I'll take a stab at making one this week.
guess what I am looking for is XP or Mac OS X like graphic skins...Could be fantastic for incroporating the client's branding colors....
g


Thanks for the sourcecode, I will study it. The aim is to extract the portion of code which makes it possible to change the skin button.


Givin the current state of the plugin i think this is about as close to a osx type theme as I can get at the moment.


There is a problem when you use the directory page before installing. The button "Install" becomes a non-skinned button if I click on "..." button to select an installation directory or if I change the path manually.


the show details button also does that


A lcd type theme / skin
this also comes with a resource hacked modern ui .exe file so i could make as many controls flat as possible (Anyone know a way to make the progress bar flat?) so they dont have the 3d border looking crap and the script has some code to enable the description text by default so its not the disabled 3D looking crap.


July 17th 2005
@ZmAn3: I'm working on wansis to make it do what you did manually using resource editor, and so one can just use the default dialog resources.

Currently I'm having trouble with the code for the unskinit function (not the macro, but the plug-in function itself). I can't get it to unskin NSIS properly. I have tried a lot, but the NSIS dialog doesn't have the correct size and some of the controls look messed up. I hav undone everything I have done in the skinit function (like unsubclassing, setting BS_PUSHBUTTON for buttons previously BS_OWNERDRAW, fixing the colors back to the windows defaults and so on).

Here is the latest source code, hope someone will take a look:
wansis_source_july_17th_2005.7z 70,1 KB
I'm not releasing the binary of this source code as it is buggy.

I will also implement Desktop Alpha Blending feature (with a nice drop shadow effect) if I can get UpdateLayeredWindow to work. Must be making a 32 bit BMP with Alpha channel.


that sounds cool :)


thanks for the OS X skin :)
For myself, I am going to wait a bit and see how the plug develops. Kudos to all for pushing it forward as this is an extremely relevant direction....
g


saivert
what are you using as a compiler so i can get it? version ect


July 19th 2005
@ZmAn3: I'm using Microsoft Visual Studio .NET 2003
You can also compile using the compiler that is included in Platform SDK but you should also get the standalone compiler pack from Microsoft since the platform one only is for IA64 and not for x86 architecture (I lost you there didn't I??).
Actually any C compiler for Win32 should work. Try Bloodshed Dev-C++ which is an IDE bundled with MinGW (minimalistic GNU for Windows).


Some questions:
1. Should I start using the term "theme" instead of "Skin"?
2. Can I only expect to see themers/skinners around here and no programmers whatsoever? I really like the themes, but I need some help with the programming as well. I don't want credit for it all alone. Nothing good comes out of that.
3. I'm thinking about the button that suddenly isn't skinned anymore. This is because NSIS itself resets the window style of the button in order to set it as the default button (the one that is automagically clicked when someone hits enter).
I will NOT check up on this button each 25 ms either (think of the CPU use). SO I will have to use some other method.

Kudos to all that has showed interest in this.

New version is also out:
Download: wansis.7z 332 KB
Latest source: wansis-source.7z 94,8 KB

Changes in this release:
Added: Included all the themes made by ZmAn3. Also fixed the example scripts and modified ZmAn3's custom UI. Renamed it to "flatui.exe" though, and using this custom UI in the example script for the forum and OSX themes.

Bugfix: The plug-in should now unload properly so the $PLUGINSDIR folder can be deleted.

Bugfix: The install button on the directory page now remains skinned even after clicking the browse button. Also fixed a similar problem on the instfiles page when clicking Show Details button.

EDIT: Online documentation


I found an other bug:

in the install dir page, if you change the insttall dir without use the browse button, the next button unskinnit itself.
Solution, add this code in your ChildDlgProc function:

/* Same lame fix for the Next button unskinning itself after changing the install dir */
if (uMsg == WM_COMMAND && LOWORD(wParam)==1019/*IDC_???*/)
{
FixMainControls();
}


I found an other bug,

The Show inst Détail button is unskinned throughout all installation. It is skinned only at the end of the installation.


@superpat: I will fix that for the next release.

Some treats for you while you wait:

Steam theme:
wansis_steam_theme.7z 59,7 KB

A new theme. Taken from the Z-Axis Winamp skin. Looks kinda cool.
new_theme.7z 73,2 KB (includes compiled sample installer)


i think it should be called a skin if its the 2 base graphics for the plugin but if you make a icon header and wizard bitmap then it's more of a theme


is it possible to change the text in the caption?


Archive: wansis - Skinned NSIS


July 20th 2005
@ZmAn3: Exactly what conclusion I came to as well.

@Yathosho: Change the text in the caption?? Isn't this already possible? PLease don't post newbie questions about NSIS in here. Use the other forums for that. But to answer quickly you should be using the Name and Caption installer attributes. wansis will faithfully use the caption of the installer itself. Some skins has bugs in them (altough Winamp copes better with these bugs it seems) which means the caption of the installer gets screwed a bit. Try to shift the block of letters in your gen.bmp image to the left or right just one pixel.

A note to skinners: Please use fuchsia = RGB(255,0,255) for the background (or matte) color of the skin bitmaps. I know most people use whatever color they want here and include copyright texts (which is fine) and so on.

Expect a new release to come out within the next three days.


There is an other bug:

The "Back" buttons of the next page unskin itself then I am in the STARTMENU page an I clic "Next".


The "Back" buttons of the back page unskin itself then I am in the STARTMENU page an I clic "Back".


The background of the STARTMENU page keep the default windows color.


I know that there are some issues with 3rd party plug-ins like StartMenu. I have not yet been able to resolve this. I think I will try to fix incompatibility bugs with both InstallOptions and StartMenu, by modifying both of these plug-ins. I will then distribute updated InstallOptions and StartMenu plug-ins with wansis. I have fixed most of the issues with the InstallOptions plug-in though. But the StartMenu plug-in does something else it seems.


OK, It will be necessary that I deliver modified these versions with UltraModernUI in this case.


Re: July 20th 2005

Originally posted by saivert
@Yathosho: Change the text in the caption?? Isn't this already possible? PLease don't post newbie questions about NSIS in here. Use the other forums for that.
a simple answer would've helped more. all shown screenshots had NSIS WITH WINAMP LOOK as caption, that's why i asked.

@Yathosho: Yes! I also answered you the best I could don't you think? And you should have guessed that I used the title "NSIS WITH WINAMP LOOK" for demonstration purposes only.

I lost internet for extended perios this night (I'm a GMT +0100 guy) so I was unable to do certain things.


Sorry!
Sorry for being late with the release. Here I will explain some:

In the next release of wansis, it will also do proper skinning of checkboxes and radiobuttons. Tabcontrol skinning is also added to the todo list but will probably take some longer time. I will probably be using C++ for the next release of wansis as I can use a pointer list class to store the controls that is being skinned. The reason for why I need to have a list is becuase I am subclassing a lot of controls and keeping the old window pointer in a Window property or userdata field is too messy. This way I can clean up some code and improve the overall speed of the plug-in. Maybe it can help make the DLL smaller in filesize.

The current version is still available here:
http://saivertweb.no-ip.com/nsis/wansis/wansis.7z

Thank you!


hey man can you tell me the line in the source code that draws the background color from the one pixel in the bmp as well as tells it how wide to make it or whatever?


one pretty thing to look at ^)
Hi there,

Just want to share the thing I've found today. Free tool to make nsis installers look great:
http://nsis.sourceforge.net/wiki/NSI...Crafter_Plugin

The thing is that there is quite a number of ready to use nice skins at skincrafter gallery.

I have tested it and the results were even above I could expect...

Hope this info would be interesting and useful.

Cheers,
Patrick


NSIS crafter is very splandid!!!

It's a pity that the sources are not available.


I tried the NSIS skincrafter...
once the example is launched, I get the 'sample exe has generated errors and will be closed by windows....'
I am using Win2k
anyone seen the same thing?
The plugin is huge in filesize, btw :(


i cant even get the sample script to compile. plus the image format is what?


grahama,
yeah.. that really did not worked at win2k (at least when running tests at fresh Win install)

I have asked a support about this case, and they have already uploaded a hotfix.

Now, it seems to work nicely..

Anyway, I like their Amazonite skin, I always prefered green themes :)


NSIS skincrafter isn't exactly the same was wansis. I wrote wansis a long time ago and just recently started working on it again. I guess other programmers can do much better work on it. At least all my work is open-source (it's not like I can earn a buck on it either). I follow the GPL license.

I'm working on a Winamp plug-in now. In fact that is my primary interest. NSIS comes second. I don't use wansis myself in any of my installers (it really makes the installer bigger and isn't suitable for small packages like my Winamp plug-ins. Maybe for a big project or Media Player. My dream is that wansis is used in the Winamp installer (with the ripped Winamp 5 classified skin).

I will try to get out a new release. I did some fixing to SuperPats skinned buttons plug-in as well and made a makefile for Microsoft Visual C++ (nmake).


hey theres code somewhere that makes the window bigger then the default non skinnned one ,wheres that at?


nevermind got it
ok now how can i change the color of the borders on the controls ? also is there anyway to make the progress bar control flat


@ZmAn3: You mean making the scrollbar smooth style? Isn't this possible with some installer attributes? I can add a feature which will draw a border on all control in a specific color, but how should I implement this? Any tips?

I said I never used wansis in my installers. This is now a lie. I am using wansis in my new Winamp plug-in called NxS Skinned Menus. I am using the Forum theme by ZmAn3. But this is only on the installer I posted on the Winamp forum.

@ZmAn3: You can message me using MSN if you want. I'm on from 16:00 to 01:00 everyday (I'm between jobs as they say and school start from mid of August).


for future information about this nsis plugin you'll need to contact the author since as some of you may or may not have noticed yet, he's been banned (the last series of posts made flaming people about their forum name, plugins, mods, etc etc meant there was no choice but for this to happen and in all honesty this had been coming for some time).

i've posted this here since i know quite a few people who venture into this forum don't look at the other ones.

-daz


Good Morning,

I read the preceding message well, but I could not obtain his mail because I am not a member.

saivert, if you see this message,

I saw that in the last version of wansis, you corrected the problem of the button "Show Detail" which remained unskinned during the files copy.

Wishing to defer this correction on my plugin, SkinnedButton, I thus sought, in your source code, but I'm not found the code lines which corrected problem.

Can you indicate to me what are the code lines that correcting the problem.

Thank you in advance,

SuperPat (guerin45@free.fr)


ExperienceUI "Bryce" M1 and later now support WAnsis. As of when this was posted, ExperienceUI 1.1 was still in a non-public alpha stage, and there are 3 spots left for beta testing. Public alpha should be out in ~2 weeks.

To beta-test, e-mail me.

-dandaman32


SuperPat: there's a contact option on his site so not being a user doesn't matter (can be found from signature links to the site)

-daz


I fixed the problem with the crash upon SendMessage(hwnd, 0x0408, -1, 0) successfully. Anybody interested in this? :)


This is great plugin, yet, there are a couple of issues I can't handle. First in my script I use http://nsis.sourceforge.net/wiki/Go_to_a_NSIS_Page to jump on a page but it seems not to work when skinned. Second, HideWindow destroys the skin without hiding the window. Is there any way to make it?


Red Wine, please post a sample script I can test with. Additionally, a complete installer exe (can be a dud one as long as the bug is reproduceable) would be helpful.

I'll get a hold on the wansis source an apply the same fixes as for the skinnedbutton plugin. I already saw that the two share a lot of problems as one is based on the other ;)


thanks for the instant reply!
here is the script, when unskinned everything works fine.


oops sorry!
I forgot the ini for the custom page! here it comes. the complete installer handles 3 mb. is it allowed to upload here?


While I have a look at it, you may try my just compiled version of wansis. I'll attach it here. 3MB is too much to attach it here, but you can send it to my by email if you like. I hope my wansis version works, I didn't have time to test it at all. :) The usage is the same as for the old version, only internal changes were done. Please report if that one behaves different from the old one. And while I am confident that it works at least a bit better, I know that not all bugs have been fixed :)


well done OldGrumpy!
the page jump issue is fixed and works fine for me with the last version of the dll.
the HideWindow issue not yet, keep on the nice work plz!
thanks

p.s. it seems i can't mail you since i'm not a member here


Originally posted by Red Wine
p.s. it seems i can't mail you since i'm not a member here
Well, you can sign up here for free and with a disposable email address you won't have any spam troubles :) And even if you are not a member, you can still send me a PM on this board with your email, and I'll reply with my email address :)

My enhanced version of the skinnedbutton plugin has some additional issues, too - much more work to get everything working properly :)

Thanks for the feedback!

Well, you can sign up here for free and with a disposable email address you won't have any spam troubles And even if you are not a member, you can still send me a PM on this board with your email, and I'll reply with my email address
Well, i've done all the above. thanks

I realized that wansis is not working properly with the color pixels used to control the colors and background of the gen windows (genex.bmp file). Pixel 48 manages the color of item background (edits, listtviews...) and works fine in default pages, but in custom pages it is not working, the pixel 52 color is managing all items.
(edit):same problem with pixel 50 (item foreground), pixel 56 (window text color) is taking control of all text colors in custom pages.


Geez, more and more work each day :) My real life is starting to calm down a bit but there is still much to do before I'll have some spare time for NSIS again. I'm sorry that everything takes longer than expected :(


Oops... I made a mistake, sorry. I was testing wansis with InstallOptions textboxes with READONLY flags and then I thought it was not handling the color pixels. Custom pages colors are working fine with wansis, but I don't know why READONLY flag changes background and text colors inside text boxes.


WANSIS ReadMe
Hi, is it possible for someone to please post the readme on how to use the wansis plugin? The only link in this post that worked did not include the readme.


here you go. looks like all the wansis files are offline now.. links in the wiki don't work


wansis is temporarily available on my webserver


Thanks so much! I really appreciate it. :)


How would I find the bmp's in the winamp skins? While there are a lot of skins included with the plugin, I would like to use a different skin.


rename any winamp skin (.wsz) to .zip and extract the files


Thank You :)


Archive: wansis - Skinned NSIS


Thanks for all of your help Yathosho. I have an issue that I hope you or someone knows something about. I've got my installer working fine with the skin, except for that on the install details page, the details portion of the page is not skinned. I have tried this with a couple of skins, is this a problem in my implementation? Or is this a known bug?


i noticed problems using wansis on windows 7 (64-bit). the buttons aren't skinned and i get a white space next to my link on the finish-page. while i do not really expect an update, i thought i'd post about it.


screenshot attached


i think UMUI uses this same plugin so you could try using the fixed version from http://forums.winamp.com/showthread....64#post2531064 (should be easy enough to pick out the relevant code changes from SuperPat's repository for the plugin).

-daz


attached file contains a fixed wansis.dll for the button issue on Vista/Win7 - well it works on both of my x64 Vista & Win7 installs.

-daz