Old 7th February 2018, 15:37   #1
Muby
Junior Member
 
Join Date: Apr 2004
Posts: 3
Smile Visual Studio Style Installer

Hi,

I'm looking a way to make an installer like visual studio

I didn't find anything on web regarding a way to create my custom plugin to do it.

Does anyone have a idea ?

Thanks
Muby is offline   Reply With Quote
Old 7th February 2018, 22:15   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,891
Edit ${NSISDIR}\Contrib\UIs\modern.exe with Resource Hacker and apply with MUI_UI/ChangeUI. This will only change the UI layout. You can use SetCtlColor to change control colors but you are never going to get exactly what you have in that screenshot because that is probably a custom MSI UI.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 8th February 2018, 00:26   #3
Nutzzz
Junior Member
 
Join Date: May 2007
Location: Orange County, CA, U.S.A.
Posts: 49
I use UltraModernUI for NSIS, which leverages the SkinnedControls plugin, and made a modern flat look UI, with custom buttons and scrollbars etc. But it was quite a bit of work to skin almost everything (message boxes still aren't skinned).

There's also Graphical Installer,
and SkinCrafter (the latter has issues with 2.46+, apparently).

None are perfect. If you use plugins to generate any content, you'll need to use SetCtlColors.

I'd show you a screenshot, but it's made for a third party.
Nutzzz is offline   Reply With Quote
Old 8th February 2018, 03:00   #4
sfx09
Junior Member
 
Join Date: Jul 2017
Posts: 27
It's MSI-based UI - 'Surface'. Very cool, but not free. I hope it will be in NSIS in the future, or more kewl GUI.

https://www.advancedinstaller.com/gallery.html
sfx09 is offline   Reply With Quote
Old 8th February 2018, 11:14   #5
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 519
Send a message via ICQ to T.Slappy
Graphical Installer

Quote:
Originally Posted by Nutzzz View Post
There's also Graphical Installer,
and SkinCrafter (the latter has issues with 2.46+, apparently).
This exact feature (creating Visual Studio like installers) was implemented in Graphical Installer some time ago.





Check this link for more info: http://graphical-installer.com/jooml...ws/153-news-39

Cool looking skinned Graphical Installers: www.graphical-installer.com
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsignedsw.com
Develop NSIS projects in Visual Studio 2005-2017: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.2 Tokyo: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 9th February 2018, 06:54   #6
Muby
Junior Member
 
Join Date: Apr 2004
Posts: 3
Hi,

thanks all for replying.

I a look a little bit on GraphicalInstaller, but it's still a commercial product.

I was looking for a opensource or free method.


I will look on ultraModern to test what's Nutzzz tell me.


Is there some tutorial to make my own "ultraModern", "ModernUi" ?

Thanks
Muby is offline   Reply With Quote
Old 10th February 2018, 18:02   #7
Nutzzz
Junior Member
 
Join Date: May 2007
Location: Orange County, CA, U.S.A.
Posts: 49
No tutorials that I know of, but here's a quick and dirty one to get you started:

After you install UMUI, make a copy of one of the skin .nsh files in C:\Program Files (x86)\NSIS\Contrib\UltraModernUI\Skins and copy the corresponding folder of images, and move them to your installer folder. Grab Paint.NET or Gimp and change the buttons and scrollbars to a flat color, and use a slightly different color as a border. Take a screenshot of one you want to duplicate and use the eyedropper tool to get the exact color if you want. Don't bother making the background/header/bottom, etc. a single color; you can just disable those. If you use the components page, you probably want to make new checkboxes too. Copy and edit one of the ones from C:\Program Files (x86)\NSIS\Contrib\Graphics\Checks, and specify the new image with MUI_COMPONENTSPAGE_CHECKBITMAP.

!import the skin's .nsh file into your installer, and tweak it to remove the images you don't want and to change the paths to your new versions, tweak the colors as necessary. I'd suggest specifying the following in the .nsh:
code:
!define MUI_COMPONENTSPAGE_SMALLDESC
!define UMUI_NOLEFTIMAGE
!define MUI_ABORTWARNING
!define MUI_UNABORTWARNING
!define UMUI_USE_ALTERNATE_PAGE
!define UMUI_USE_UNALTERNATE_PAGE


Note that some defines start with UMUI_ for UltraModern as they're UMUI only, others with MUI_ as they're shared with Modern UI 2.

Check out the examples in C:\Program Files (x86)\NSIS\Examples\UltraModernUI (there are some new pages you can play with for a more modern feel, though they mostly duplicate InstallShield behavior).

The readme is great, but very dense as there are tons of options (hit Expand All at the top if you want to do searches): C:\Program Files (x86)\NSIS\Docs\UltraModernUI\Readme.html
Nutzzz is offline   Reply With Quote
Old 13th February 2018, 16:02   #8
Coby
Junior Member
 
Join Date: Feb 2016
Posts: 48
I recently discovered this configuration for NSIS

PHP Code:
Name "Setup"
OutFile "Setup.exe"
InstallDir "$PROGRAMFILES\Setup"

SetCompressor /SOLID /FINAL lzma

!include "MUI2.nsh"
!include "WinCore.nsh"
!include "LogicLib.nsh"
!include "WinMessages.nsh"
!include "FileFunc.nsh"

RequestExecutionLevel Admin

ShowInstDetails hide
ShowInstDetails nevershow
ShowUnInstDetails nevershow
XPStyle off

BrandingText 
/TRIMRIGHT " "

Icon "Icons\appicon.ico"
!define MUI_ICON "Icons\appicon.ico"
!define MUI_UNICON "Icons\Uninstall.ico"
UninstallIcon "Icons\Uninstall.ico"

!define MUI_PAGE_CUSTOMFUNCTION_SHOW "PageWelcome" 
!insertmacro MUI_PAGE_INSTFILES

!define MUI_PAGE_CUSTOMFUNCTION_SHOW "un.ModifyUnConfirm" 
!insertmacro MUI_UNPAGE_INSTFILES

!insertmacro MUI_LANGUAGE "English"

Function ".onInit"
  
InitPluginsDir
  SetOverwrite 
try
  
AllowSkipFiles off
  File 
"/ONAME=$PLUGINSDIR\DuiLib.dll" "Install\DuiLib.dll"
  
File "/oname=$PLUGINSDIR\inst.ui" "Install\inst.ui"
  
File "/ONAME=$PLUGINSDIR\installer-helper.dll" "Install\installer-helper.dll"
  
IfSilent +2 0
  Push install
  CallInstDLL $PLUGINSDIR
\installer-helper.dll /NOUNLOAD InitUI
  IfAbort 0 
+2
  Abort
  CallInstDLL $PLUGINSDIR
\installer-helper.dll /NOUNLOAD SetInstDir
  IfAbort 0 
+2
  Abort
FunctionEnd

Function "PageWelcome"
  
CallInstDLL $PLUGINSDIR\installer-helper.dll /NOUNLOAD ShowUI
  IfAbort 0 
+2
  Abort
  CallInstDLL $PLUGINSDIR
\installer-helper.dll /NOUNLOAD GetUIControlCode
  IfAbort 0 
+2
  Abort
  CallInstDLL $PLUGINSDIR
\installer-helper.dll /NOUNLOAD GetInstDir
  IfAbort 0 
+2
  Abort
  Push 1
  CallInstDLL $PLUGINSDIR
\installer-helper.dll /NOUNLOAD SetNSISControlCode
  CallInstDLL $PLUGINSDIR
\installer-helper.dll /NOUNLOAD GetUIControlCode
FunctionEnd

Section 
""
  
ClearErrors
  SetShellVarContext 
"all"
  
SetOutPath "$INSTDIR"
  
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Setup" "DisplayName" "Setup"
  
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Setup" "UninstallString" "$INSTDIR\uninst.exe"
  
WriteUninstaller "$INSTDIR\uninst.exe"
  
SetAutoClose True
SectionEnd

Function ".onGUIEnd"
  
SetOutPath $PLUGINSDIR
FunctionEnd

Function "un.onInit"
  
InitPluginsDir
  SetOverwrite 
try
  
AllowSkipFiles off
  File 
"/ONAME=$PLUGINSDIR\DuiLib.dll" "Uninstall\DuiLib.dll"
  
File "/oname=$PLUGINSDIR\inst.ui" "Uninstall\inst.ui"
  
File "/ONAME=$PLUGINSDIR\installer-helper.dll" "Uninstall\installer-helper.dll"
  
SetShellVarContext all
  IfSilent 
+2 0
  Push uninstall
  CallInstDLL $PLUGINSDIR
\installer-helper.dll /NOUNLOAD InitUI
  IfAbort 0 
+2
  Abort
FunctionEnd

Function "un.ModifyUnConfirm"
  
IfSilent 0 +2
  Quit
  CallInstDLL $PLUGINSDIR
\installer-helper.dll /NOUNLOAD ShowUI
  IfAbort 0 
+2
  Abort
  CallInstDLL $PLUGINSDIR
\installer-helper.dll /NOUNLOAD GetUIControlCode
  IfAbort 0 
+2
  Abort
  CallInstDLL $PLUGINSDIR
\installer-helper.dll /NOUNLOAD GetInstDir
  IfAbort 0 
+2
  Abort
  Push 1
  CallInstDLL $PLUGINSDIR
\installer-helper.dll /NOUNLOAD SetNSISControlCode
  CallInstDLL $PLUGINSDIR
\installer-helper.dll /NOUNLOAD GetUIControlCode
FunctionEnd

Section 
"Uninstall"
  
ClearErrors
  SetShellVarContext 
"all"
  
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Setup"
  
SetShellVarContext "all"
  
RMDir /"$INSTDIR"
  
SetAutoClose true
SectionEnd

Function "Un.onGUIEnd"
  
SetOutPath $PLUGINSDIR
FunctionEnd 
Attached Files
File Type: 7z Setup UI.7z (552.1 KB, 49 views)
Coby is offline   Reply With Quote
Old 13th February 2018, 17:49   #9
Nutzzz
Junior Member
 
Join Date: May 2007
Location: Orange County, CA, U.S.A.
Posts: 49
@Coby: Where does installer-helper.dll come from? It's not default NSIS...
Nutzzz is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump