user12990603
user12990603

Reputation:

NSIS: Changing colors of the installer

I've been working with NSIS to make installers for some of my stuff experimentally. I do not know the correct syntax for how to change colors on the installer. I've tried using help on other websites but they do nothing. Does anyone know the right syntax and !insertmacro that I'd have to use in order to change colors? EDIT: Also, I do not know what to !include and !define in order to get to that point. I want to change not only the background but maybe the progress bar and button colors. EDIT2: I need to find macros and data for progress bar and buttons. Not just the background.

Upvotes: 0

Views: 748

Answers (3)

Nutty
Nutty

Reputation: 83

You mention recoloring buttons, which isn't normally possible. I suggest you check out UltraModernUI, which includes skins. The included SkinnedControls plugin is what allows you to reskin your buttons and scrollbars. Note the included skins are variations on InstallShield ones that were modern 15 years ago, but there's a lot of flexibility, and a modern flat look is very easy to replicate, if that's what you're going for. It's also got some extra pages and other features that MUI2 lacks.

If you're willing to pay for it, Graphical Installer (for NSIS and Inno) has even more skinning features.

Upvotes: 0

Anders
Anders

Reputation: 101764

NSIS tries to uses the system colors as much as possible. If you are using the Modern UI then there are a couple of defines you can set to control the colors but mostly just for the "wizard" areas.

!define MUI_BGCOLOR 000000
!define MUI_TEXTCOLOR ffffff
!define MUI_LICENSEPAGE_BGCOLOR 445566
!define MUI_DIRECTORYPAGE_BGCOLOR 556677
;define MUI_STARTMENUPAGE_BGCOLOR ...
!define MUI_INSTFILESPAGE_COLORS 123456
!define MUI_INSTFILESPAGE_PROGRESSBAR colored
;define MUI_FINISHPAGE_LINK_COLOR ...
!include MUI2.nsh
...

The SetCtlColors instruction can be used to change to color of some other UI elements but if you want to create a installer with custom colors on everything then you must use one of the 3rd-party skinning plug-ins because that is the only way to change the color of buttons.

Upvotes: 1

sportzpikachu
sportzpikachu

Reputation: 961

You can use

!define MUI_BGCOLOR "your color here"
!include MUI2.nsh

Taken from original answer by Anders here

Upvotes: 0

Related Questions