aboutsummaryrefslogtreecommitdiff
path: root/Src/installer/shared
diff options
context:
space:
mode:
Diffstat (limited to 'Src/installer/shared')
-rw-r--r--Src/installer/shared/scripts/log.nsh18
-rw-r--r--Src/installer/shared/scripts/nx.nsh11
-rw-r--r--Src/installer/shared/scripts/syslink.nsh55
-rw-r--r--Src/installer/shared/scripts/system.nsh431
-rw-r--r--Src/installer/shared/scripts/textRect.nsh186
-rw-r--r--Src/installer/shared/scripts/windowRect.nsh401
-rw-r--r--Src/installer/shared/scripts/windowText.nsh37
-rw-r--r--Src/installer/shared/ui/miniui/miniui.exebin0 -> 5120 bytes
-rw-r--r--Src/installer/shared/ui/miniui/miniui.rc100
-rw-r--r--Src/installer/shared/ui/miniui/miniui.sln20
-rw-r--r--Src/installer/shared/ui/miniui/miniui.vcxproj117
-rw-r--r--Src/installer/shared/ui/miniui/resource.h45
-rw-r--r--Src/installer/shared/ui/miniui/ui.c91
13 files changed, 1512 insertions, 0 deletions
diff --git a/Src/installer/shared/scripts/log.nsh b/Src/installer/shared/scripts/log.nsh
new file mode 100644
index 00000000..3767ba72
--- /dev/null
+++ b/Src/installer/shared/scripts/log.nsh
@@ -0,0 +1,18 @@
+!ifndef NULLSOFT_NX_LOG_NSIS_HEADER
+!define NULLSOFT_NX_LOG_NSIS_HEADER
+
+!macro NX_Log __string
+ System::Call "Kernel32::OutputDebugStringW(t s)" `${__string}`
+!macroend
+
+!define NX_Log "!insertmacro NX_Log"
+
+!macro NX_DLog __string
+ !ifdef _DEBUG
+ ${NX_Log} `${__string}`
+ !endif
+!macroend
+
+!define NX_DLog "!insertmacro NX_DLog"
+
+!endif ;NULLSOFT_NX_LOG_NSIS_HEADER \ No newline at end of file
diff --git a/Src/installer/shared/scripts/nx.nsh b/Src/installer/shared/scripts/nx.nsh
new file mode 100644
index 00000000..64b4e1d5
--- /dev/null
+++ b/Src/installer/shared/scripts/nx.nsh
@@ -0,0 +1,11 @@
+!ifndef NULLSOFT_NX_NSIS_HEADER
+!define NULLSOFT_NX_NSIS_HEADER
+
+!include "log.nsh"
+!include "syslink.nsh"
+!include "system.nsh"
+!include "textRect.nsh"
+!include "windowRect.nsh"
+!include "windowText.nsh"
+
+!endif ;NULLSOFT_NX_NSIS_HEADER \ No newline at end of file
diff --git a/Src/installer/shared/scripts/syslink.nsh b/Src/installer/shared/scripts/syslink.nsh
new file mode 100644
index 00000000..cd38120d
--- /dev/null
+++ b/Src/installer/shared/scripts/syslink.nsh
@@ -0,0 +1,55 @@
+!ifndef NULLSOFT_NX_SYSLINK_NSIS_HEADER
+!define NULLSOFT_NX_SYSLINK_NSIS_HEADER
+
+!define WC_LINK "SysLink"
+
+!define INVALID_LINK_INDEX -1
+!define MAX_LINKID_TEXT 48
+!define L_MAX_URL_LENGTH 2083
+
+!define LWS_TRANSPARENT 0x0001
+!define LWS_IGNORERETURN 0x0002
+!define LWS_NOPREFIX 0x0004
+!define LWS_USEVISUALSTYLE 0x0008
+!define LWS_USECUSTOMTEXT 0x0010
+!define LWS_RIGHT 0x0020
+
+!define LIF_ITEMINDEX 0x00000001
+!define LIF_STATE 0x00000002
+!define LIF_ITEMID 0x00000004
+!define LIF_URL 0x00000008
+
+!define LIS_FOCUSED 0x00000001
+!define LIS_ENABLED 0x00000002
+!define LIS_VISITED 0x00000004
+!define LIS_HOTTRACK 0x00000008
+!define LIS_DEFAULTCOLORS 0x00000010
+
+;typedef struct tagLITEM {
+; UINT mask;
+; int iLink;
+; UINT state;
+; UINT stateMask;
+; WCHAR szID[MAX_LINKID_TEXT];
+; WCHAR szUrl[L_MAX_URL_LENGTH];
+;} LITEM, *PLITEM;
+!define stLITEM '(i, i, i, i, &w${MAX_LINKID_TEXT}, &w${L_MAX_URL_LENGTH}) i'
+
+;typedef struct tagNMLINK
+;{
+; NMHDR hdr;
+; LITEM item ;
+;} NMLINK, *PNMLINK;
+!define stNMLINK '(i, i, i, i, i, i, i, &w${MAX_LINKID_TEXT}, &w${L_MAX_URL_LENGTH}) i'
+
+; SysLink notifications
+; NM_CLICK ;wParam: control ID, lParam: PNMLINK, ret: ignored.
+
+; LinkWindow messages
+!define /math LM_HITTEST ${WM_USER} + 0x300 ;wParam: n/a, lparam: PLHITTESTINFO, ret: BOOL
+!define /math LM_GETIDEALHEIGHT ${WM_USER} + 0x301 ;wParam: cxMaxWidth, lparam: n/a, ret: cy
+!define /math LM_SETITEM ${WM_USER} + 0x302 ;wParam: n/a, lparam: LITEM*, ret: BOOL
+!define /math LM_GETITEM ${WM_USER} + 0x303 ;wParam: n/a, lparam: LITEM*, ret: BOOL
+!define LM_GETIDEALSIZE ${LM_GETIDEALHEIGHT} ;wParam: cxMaxWidth, lparam: SIZE*, ret: cy
+
+!endif ; defined(NULLSOFT_NX_SYSLINK_NSIS_HEADER) \ No newline at end of file
diff --git a/Src/installer/shared/scripts/system.nsh b/Src/installer/shared/scripts/system.nsh
new file mode 100644
index 00000000..763e6419
--- /dev/null
+++ b/Src/installer/shared/scripts/system.nsh
@@ -0,0 +1,431 @@
+!ifndef NULLSOFT_NX_SYSTEM_NSIS_HEADER
+!define NULLSOFT_NX_SYSTEM_NSIS_HEADER
+
+; LONG left;
+; LONG top;
+; LONG right;
+; LONG bottom;
+; } RECT, *PRECT;
+!ifndef stRECT
+!define stRECT '(i, i, i, i) i'
+!endif
+
+;typedef struct tagSIZE
+;{
+; LONG cx;
+; LONG cy;
+;} SIZE, *PSIZE, *LPSIZE;
+!ifndef stSIZE
+!define stSIZE '(i, i) i'
+!endif
+
+; typedef struct tagBITMAP {
+; LONG bmType;
+; LONG bmWidth;
+; LONG bmHeight;
+; LONG bmWidthBytes;
+; WORD bmPlanes;
+; WORD bmBitsPixel;
+; LPVOID bmBits;
+; } BITMAP, *PBITMAP;
+!ifndef stBITMAP
+!define stBITMAP '(i, i, i, i, &i2, &i2, i) i'
+!endif
+
+;typedef struct _ICONINFO {
+; BOOL fIcon;
+; DWORD xHotspot;
+; DWORD yHotspot;
+; HBITMAP hbmMask;
+; HBITMAP hbmColor;
+;} ICONINFO, *PICONINFO;
+!ifndef stICONINFO
+!define stICONINFO '(i, i, i, i, i) i'
+!endif
+
+;typedef struct tagTEXTMETRICW
+;{
+; LONG tmHeight;
+; LONG tmAscent;
+; LONG tmDescent;
+; LONG tmInternalLeading;
+; LONG tmExternalLeading;
+; LONG tmAveCharWidth;
+; LONG tmMaxCharWidth;
+; LONG tmWeight;
+; LONG tmOverhang;
+; LONG tmDigitizedAspectX;
+; LONG tmDigitizedAspectY;
+; WCHAR tmFirstChar;
+; WCHAR tmLastChar;
+; WCHAR tmDefaultChar;
+; WCHAR tmBreakChar;
+; BYTE tmItalic;
+; BYTE tmUnderlined;
+; BYTE tmStruckOut;
+; BYTE tmPitchAndFamily;
+; BYTE tmCharSet;
+;} TEXTMETRICW
+!ifndef stTEXTMETRIC
+!define stTEXTMETRIC '(i, i, i, i, i, i, i, i, i, i, i, &i2, &i2, &i2, &i2, &i1, &i1, &i1, &i1, &i1) i'
+!endif
+
+;typedef struct tagLOGFONTW
+;{
+; LONG lfHeight;
+; LONG lfWidth;
+; LONG lfEscapement;
+; LONG lfOrientation;
+; LONG lfWeight;
+; BYTE lfItalic;
+; BYTE lfUnderline;
+; BYTE lfStrikeOut;
+; BYTE lfCharSet;
+; BYTE lfOutPrecision;
+; BYTE lfClipPrecision;
+; BYTE lfQuality;
+; BYTE lfPitchAndFamily;
+; WCHAR lfFaceName[LF_FACESIZE];
+;} LOGFONTW
+!ifndef stLOGFONT
+!define stLOGFONT '(i, i, i, i, i, &i1, &i1, &i1, &i1, &i1, &i1, &i1, &i1, &w32) i'
+!endif
+
+;typedef struct tagNMHDR {
+; HWND hwndFrom;
+; UINT_PTR idFrom;
+; UINT code;
+;} NMHDR;
+!ifndef stNMHDR
+!define stNMHDR '(i, i, i) i'
+!endif
+
+!ifndef NM_FIRST
+!define NM_FIRST 0
+!endif
+
+!ifndef NM_CLICK
+!define /math NM_CLICK ${NM_FIRST} - 2
+!endif
+
+!ifndef NM_RETURN
+!define /math NM_RETURN ${NM_FIRST} - 4
+!endif
+
+; BOOL GetWindowRect(HWND hWnd,
+; LPRECT lpRect)
+!define fnGetWindowRect \
+ 'User32::GetWindowRect(i, i) i'
+
+; int MapWindowPoints(HWND hWndFrom,
+; HWND hWndTo,
+; LPPOINT lpPoints,
+; UINT cPoints)
+!define fnMapWindowPoints \
+ 'User32::MapWindowPoints(i, i, i, i) i'
+
+
+; SetWindowPos() uFlags
+!define SWP_NOSIZE 0x0001
+!define SWP_NOMOVE 0x0002
+!define SWP_NOZORDER 0x0004
+!define SWP_NOREDRAW 0x0008
+!define SWP_NOACTIVATE 0x0010
+!define SWP_FRAMECHANGED 0x0020
+!define SWP_SHOWWINDOW 0x0040
+!define SWP_HIDEWINDOW 0x0080
+!define SWP_NOCOPYBITS 0x0100
+!define SWP_NOOWNERZORDER 0x0200
+!define SWP_NOSENDCHANGING 0x0400
+!define SWP_DRAWFRAME ${SWP_FRAMECHANGED}
+!define SWP_NOREPOSITION ${SWP_NOOWNERZORDER}
+!define SWP_DEFERERASE 0x2000
+!define SWP_ASYNCWINDOWPOS 0x4000
+
+; BOOL SetWindowPos(HWND hWnd,
+; HWND hWndInsertAfter,
+; int X,
+; int Y,
+; int cx,
+; int cy,
+; UINT uFlags)
+!define fnSetWindowPos \
+ 'User32::SetWindowPos(i, i, i, i, i, i, i) i'
+
+
+; GetAncestor() gaFlags
+!define GA_PARENT 1
+
+; HWND GetAncestor(HWND hwnd,
+; UINT gaFlags)
+!define fnGetAncestor \
+ 'User32::GetAncestor(i, i) i'
+
+; BOOL MapDialogRect(HWND hDlg,
+; LPRECT lpRect)
+!define fnMapDialogRect \
+ 'User32::MapDialogRect(i, i) i'
+
+; GetDCEx() flags
+!define DCX_WINDOW 0x00000001
+!define DCX_CACHE 0x00000002
+!define DCX_NORESETATTRS 0x00000004
+
+; HDC GetDCEx(HWND hWnd,
+; HRGN hrgnClip,
+; DWORD flags)
+!define fnGetDCEx \
+ 'User32::GetDCEx(i, i, i ) i'
+
+; DrawText uFormat
+!define DT_CALCRECT 0x00000400
+!define DT_LEFT 0x00000000
+!define DT_TOP 0x00000000
+!define DT_EDITCONTROL 0x00002000
+!define DT_NOPREFIX 0x00000800
+!define DT_SINGLELINE 0x00000020
+!define DT_WORDBREAK 0x00000010
+
+; int DrawText(HDC hDC,
+; LPCTSTR lpchText,
+; int nCount,
+; LPRECT lpRect,
+; UINT uFormat)
+!define fnDrawText \
+ 'User32::DrawText(i, t, i, i, i) i'
+
+; int ReleaseDC(HWND hWnd,
+; HDC hDC)
+!define fnReleaseDC \
+ 'User32::ReleaseDC(i, i) i'
+
+; GetWindowLong()/SetWindowLong() nIndex
+!define GWL_WNDPROC -4
+!define GWL_HINSTANCE -6
+!define GWL_HWNDPARENT -8
+!ifndef GWL_STYLE ; defined in nsDialogs
+!define GWL_STYLE -16
+!endif
+!ifndef GWL_EXSTYLE ; defined in nsDialogs
+!define GWL_EXSTYLE -16
+!endif
+!define GWL_USERDATA -21
+!define GWL_ID -12
+
+; LONG GetWindowLong(HWND hWnd,
+; int nIndex)
+!define fnGetWindowLong \
+ 'User32::GetWindowLong(i, i) i'
+
+; LONG SetWindowLong(HWND hWnd,
+; int nIndex
+; LONG dwNewLong)
+!define fnSetWindowLong \
+ 'User32::SetWindowLong(i, i, i) i'
+
+; int GetWindowText(HWND hWnd,
+; LPTSTR lpString,
+; int nMaxCount)
+!define fnGetWindowText \
+ 'User32::GetWindowText(i, t, i) i'
+
+; BOOL SetWindowText(HWND hWnd,
+; LPCTSTR lpString)
+!define fnSetWindowText \
+ 'User32::SetWindowText(i, t) i'
+
+;HGDIOBJ SelectObject(HDC hdc,
+; HGDIOBJ hgdiobj)
+!define fnSelectObject \
+ 'GDI32::SelectObject(i, i) i'
+
+;BOOL GetTextMetrics(HDC hdc,
+; LPTEXTMETRIC lptm)
+!define fnGetTextMetrics \
+ 'GDI32::GetTextMetricsW(i, i) i'
+
+; GetSystemMetrics()
+!define SM_CXSCREEN 0
+!define SM_CYSCREEN 1
+!define SM_CXVSCROLL 2
+!define SM_CYHSCROLL 3
+!define SM_CYCAPTION 4
+!define SM_CXBORDER 5
+!define SM_CYBORDER 6
+!define SM_CXDLGFRAME 7
+!define SM_CYDLGFRAME 8
+!define SM_CYVTHUMB 9
+!define SM_CXHTHUMB 10
+!define SM_CXICON 11
+!define SM_CYICON 12
+!define SM_CXCURSOR 13
+!define SM_CYCURSOR 14
+!define SM_CYMENU 15
+!define SM_CXFULLSCREEN 16
+!define SM_CYFULLSCREEN 17
+!define SM_CYKANJIWINDOW 18
+!define SM_MOUSEPRESENT 19
+!define SM_CYVSCROLL 20
+!define SM_CXHSCROLL 21
+!define SM_DEBUG 22
+!define SM_SWAPBUTTON 23
+!define SM_RESERVED1 24
+!define SM_RESERVED2 25
+!define SM_RESERVED3 26
+!define SM_RESERVED4 27
+!define SM_CXMIN 28
+!define SM_CYMIN 29
+!define SM_CXSIZE 30
+!define SM_CYSIZE 31
+!define SM_CXFRAME 32
+!define SM_CYFRAME 33
+!define SM_CXMINTRACK 34
+!define SM_CYMINTRACK 35
+!define SM_CXDOUBLECLK 36
+!define SM_CYDOUBLECLK 37
+!define SM_CXICONSPACING 38
+!define SM_CYICONSPACING 39
+!define SM_MENUDROPALIGNMENT 40
+!define SM_PENWINDOWS 41
+!define SM_DBCSENABLED 42
+!define SM_CMOUSEBUTTONS 43
+!define SM_CXFIXEDFRAME ${SM_CXDLGFRAME}
+!define SM_CYFIXEDFRAME ${SM_CYDLGFRAME}
+!define SM_CXSIZEFRAME ${SM_CXFRAME}
+!define SM_CYSIZEFRAME ${SM_CYFRAME}
+!define SM_SECURE 44
+!define SM_CXEDGE 45
+!define SM_CYEDGE 46
+!define SM_CXMINSPACING 47
+!define SM_CYMINSPACING 48
+!define SM_CXSMICON 49
+!define SM_CYSMICON 50
+!define SM_CYSMCAPTION 51
+!define SM_CXSMSIZE 52
+!define SM_CYSMSIZE 53
+!define SM_CXMENUSIZE 54
+!define SM_CYMENUSIZE 55
+!define SM_ARRANGE 56
+!define SM_CXMINIMIZED 57
+!define SM_CYMINIMIZED 58
+!define SM_CXMAXTRACK 59
+!define SM_CYMAXTRACK 60
+!define SM_CXMAXIMIZED 61
+!define SM_CYMAXIMIZED 62
+!define SM_NETWORK 63
+!define SM_CLEANBOOT 67
+!define SM_CXDRAG 68
+!define SM_CYDRAG 69
+!define SM_SHOWSOUNDS 70
+!define SM_CXMENUCHECK 71
+!define SM_CYMENUCHECK 72
+!define SM_SLOWMACHINE 73
+!define SM_MIDEASTENABLED 74
+!define SM_MOUSEWHEELPRESENT 75
+!define SM_XVIRTUALSCREEN 76
+!define SM_YVIRTUALSCREEN 77
+!define SM_CXVIRTUALSCREEN 78
+!define SM_CYVIRTUALSCREEN 79
+!define SM_CMONITORS 80
+!define SM_SAMEDISPLAYFORMAT 81
+!define SM_IMMENABLED 82
+!define SM_CXFOCUSBORDER 83
+;!define SM_TABLETPC 86
+;!define SM_MEDIACENTER 87
+;!define SM_STARTER 88
+;!define SM_SERVERR2 89
+!define SM_MOUSEHORIZONTALWHEELPRESENT 91
+!define SM_CXPADDEDBORDER 92
+!define SM_DIGITIZER 94
+!define SM_MAXIMUMTOUCHES 95
+!define SM_REMOTESESSION 0x1000
+!define SM_SHUTTINGDOWN 0x2000
+!define SM_REMOTECONTROL 0x2001
+!define SM_CARETBLINKINGENABLED 0x2002
+!define SM_CONVERTIBLESLATEMODE 0x2003
+!define SM_SYSTEMDOCKED 0x2004
+
+;int GetSystemMetrics(int nIndex)
+!define fnGetSystemMetrics \
+ 'User32::GetSystemMetrics(i) i'
+
+; Image types
+!ifndef IMAGE_BITMAP
+!define IMAGE_BITMAP 0
+!endif
+!ifndef IMAGE_ICON
+!define IMAGE_ICON 1
+!endif
+!ifndef IMAGE_CURSOR
+!define IMAGE_CURSOR 2
+!endif
+!ifndef IMAGE_ENHMETAFILE
+!define IMAGE_ENHMETAFILE 3
+!endif
+
+; Load Image Flags
+!ifndef LR_DEFAULTCOLOR
+!define LR_DEFAULTCOLOR 0x00000000
+!define LR_MONOCHROME 0x00000001
+!define LR_COLOR 0x00000002
+!define LR_COPYRETURNORG 0x00000004
+!define LR_COPYDELETEORG 0x00000008
+!define LR_LOADFROMFILE 0x00000010
+!define LR_LOADTRANSPARENT 0x00000020
+!define LR_DEFAULTSIZE 0x00000040
+!define LR_VGACOLOR 0x00000080
+!define LR_LOADMAP3DCOLORS 0x00001000
+!define LR_CREATEDIBSECTION 0x00002000
+!define LR_COPYFROMRESOURCE 0x00004000
+!define LR_SHARED 0x00008000
+!endif ; defined (LR_DEFAULTCOLOR)
+
+; HANDLE LoadImage(HINSTANCE hinst,
+; LPCTSTR lpszName,
+; UINT uType,
+; int cxDesired,
+; int cyDesired,
+; UINT fuLoad)
+!define fnLoadImage \
+ 'User32::LoadImage(i, t, i, i, i, i) i'
+
+;BOOL DeleteObject(HGDIOBJ hObject);
+!define fnDeleteObject \
+ 'GDI32::DeleteObject(i) i'
+
+;int GetObject(HGDIOBJ hgdiobj,
+; int cbBuffer,
+; LPVOID lpvObject);
+!define fnGetObject \
+ 'GDI32::GetObject(i, i, i) i'
+
+;BOOL GetIconInfo(HICON hIcon,
+; PICONINFO piconinfo)
+!define fnGetIconInfo \
+ 'User32::GetIconInfo(i, i) i'
+
+;BOOL DestroyIcon(HICON hIcon)
+!define fnDestroyIcon \
+ 'User32::DestroyIcon(i) i'
+
+;BOOL DestroyWindow(HWND hWnd)
+!define fnDestroyWindow \
+ 'User32::DestroyWindow(i) i'
+
+;HWND WINAPI CreateWindowEx(DWORD dwExStyle,
+; LPCTSTR lpClassName,
+; LPCTSTR lpWindowName,
+; DWORD dwStyle,
+; int x,
+; int y,
+; int nWidth,
+; int nHeight,
+; HWND hWndParent,
+; HMENU hMenu,
+; HINSTANCE hInstance,
+; LPVOID lpParam)
+!define fnCreateWindowEx \
+ 'User32::CreateWindowEx(i, t, t, i, i, i, i, i, i, i, i, i) i'
+
+!endif ; defined(NULLSOFT_NX_SYSTEM_NSIS_HEADER)
+
diff --git a/Src/installer/shared/scripts/textRect.nsh b/Src/installer/shared/scripts/textRect.nsh
new file mode 100644
index 00000000..fd23eb84
--- /dev/null
+++ b/Src/installer/shared/scripts/textRect.nsh
@@ -0,0 +1,186 @@
+!ifndef NULLSOFT_NX_TEXT_RECT_NSIS_HEADER
+!define NULLSOFT_NX_TEXT_RECT_NSIS_HEADER
+
+!include "util.nsh"
+!include "logicLib.nsh"
+!include "system.nsh"
+
+!macro NX_CalculateTextRectInternal
+ !define hwnd_ $R0
+ !define text_ $R1
+ !define style_ $R2
+ !define maxWidth_ $R3
+ !define hdc_ $R4
+ !define font_ $R5
+ !define previousFont_ $R6
+ !define width_ $R7
+ !define height_ $R8
+ !define averageCharWidth_ $R9
+
+ Exch ${hwnd_}
+ Exch 1
+ Exch ${text_}
+ Exch 2
+ Exch ${style_}
+ Exch 3
+ Exch ${maxWidth_}
+
+ Push ${hdc_}
+ Push ${font_}
+ Push ${previousFont_}
+ Push ${width_}
+ Push ${height_}
+ Push ${averageCharWidth_}
+
+ StrCpy ${width_} 0
+ StrCpy ${height_} 0
+ StrCpy ${averageCharWidth_} 0
+
+ System::Call "${fnGetDCEx}(${hwnd_}, 0, ${DCX_CACHE}|${DCX_NORESETATTRS}).s"
+ Pop ${hdc_}
+
+ SendMessage ${hwnd_} ${WM_GETFONT} 0 0 ${font_}
+ System::Call "${fnSelectObject}(${hdc_}, ${font_}).s"
+ Pop ${previousFont_}
+
+ ; Get Text Metrics (in case of empty line)
+ Push $0
+ Push $1
+ System::Call "*${stTEXTMETRIC} .r1"
+ System::Call "${fnGetTextMetrics}(${hdc_}, $1).r0"
+ ${If} $0 != 0
+ Push $2
+ System::Call "*$1${stTEXTMETRIC}(.r0, ., ., ., ., .r2, _)"
+ StrCpy ${height_} $0
+ StrCpy ${averageCharWidth_} $2
+ Pop $2
+ ${EndIf}
+
+ System::Free $1
+ Pop $1
+ Pop $0
+
+ ; Calculate Text Rect
+ Push $0
+ StrLen $0 ${text_}
+ ${If} $0 != 0
+ Push $1 ; rect
+ Push $2 ; text flags
+
+ ; build text flags
+ StrCpy $2 ${DT_CALCRECT}|${DT_LEFT}|${DT_TOP}
+ IntOp $2 $2 | ${style_}
+
+ System::Call "*${stRECT}(0, 0, ${maxWidth_}, $0) .r1"
+ System::Call "${fnDrawText}(${hdc_}, '${text_}', -1, $1, $2).r0"
+ ${if} $0 != 0
+ Push $3
+ Push $4
+ Push $5
+
+ System::Call "*$1${stRECT}(.r2, .r3, .r4, .r5)"
+ IntOp ${width_} $4 - $2
+ IntOp $3 $5 - $3
+ ${if} $3 > ${height_}
+ StrCpy ${height_} $3
+ ${EndIf}
+
+ IntOp $4 ${averageCharWidth_} / 2
+ IntOp ${width_} ${width_} + $4
+
+ Pop $5
+ Pop $4
+ Pop $3
+ ${EndIf}
+
+ System::Free $1
+ Pop $2 ; text flags
+ Pop $1 ; rect
+ ${EndIf}
+ Pop $0
+
+ ${If} ${previousFont_} != 0
+ System::Call "${fnSelectObject}(${hdc_}, ${previousFont_})"
+ ${EndIf}
+
+ System::Call "${fnReleaseDC}(${hwnd_}, ${hdc_})"
+
+ StrCpy ${style_} ${width_}
+ StrCpy ${text_} ${height_}
+
+ Pop ${averageCharWidth_}
+ Pop ${height_}
+ Pop ${width_}
+ Pop ${previousFont_}
+ Pop ${font_}
+ Pop ${hdc_}
+ Pop ${maxWidth_}
+ Pop ${hwnd_}
+ Exch ${text_}
+ Exch
+ Exch ${style_}
+
+ !undef hwnd_
+ !undef text_
+ !undef style_
+ !undef maxWidth_
+ !undef hdc_
+ !undef font_
+ !undef previousFont_
+ !undef width_
+ !undef height_
+ !undef averageCharWidth_
+!macroend
+
+!macro NX_CalculateTextRect __hwnd __text __style __maxWidth __width __height
+ Push "${__maxWidth}"
+ Push "${__style}"
+ Push "${__text}"
+ Push "${__hwnd}"
+ ${CallArtificialFunction} NX_CalculateTextRectInternal
+ Pop "${__width}"
+ Pop "${__height}"
+!macroend
+
+!define NX_CalculateTextRect `!insertmacro NX_CalculateTextRect`
+
+!macro NX_GetLabelIdealSize __hwnd __maxWidth __width __height
+ Push "${__maxWidth}"
+
+ System::Call "${fnGetWindowLong}(${__hwnd}, ${GWL_STYLE}).s"
+ Exch $0
+ Push $1
+ Push $2
+
+ StrCpy $2 0
+ IntOp $1 $0 & ${SS_EDITCONTROL}
+ ${If} $1 != 0
+ IntOp $2 $2 | ${DT_EDITCONTROL}
+ ${EndIf}
+
+ IntOp $1 $0 & ${SS_NOPREFIX}
+ ${If} $1 != 0
+ IntOp $2 $2 | ${DT_NOPREFIX}
+ ${EndIf}
+
+ IntOp $1 $0 & ${SS_SIMPLE}
+ ${If} $1 != 0
+ IntOp $2 $2 | ${DT_SINGLELINE}
+ ${Else}
+ IntOp $2 $2 | ${DT_WORDBREAK}
+ ${EndIf}
+
+ StrCpy $0 $2
+ Pop $2
+ Pop $1
+ Exch $0
+
+ System::Call "${fnGetWindowText}(${__hwnd}, .s, ${NSIS_MAX_STRLEN})"
+ Push "${__hwnd}"
+ ${CallArtificialFunction} NX_CalculateTextRectInternal
+ Pop "${__width}"
+ Pop "${__height}"
+!macroend
+!define NX_GetLabelIdealSize `!insertmacro NX_GetLabelIdealSize`
+
+!endif ; defined(NULLSOFT_NX_TEXT_RECT_NSIS_HEADER) \ No newline at end of file
diff --git a/Src/installer/shared/scripts/windowRect.nsh b/Src/installer/shared/scripts/windowRect.nsh
new file mode 100644
index 00000000..58e1f067
--- /dev/null
+++ b/Src/installer/shared/scripts/windowRect.nsh
@@ -0,0 +1,401 @@
+!ifndef NULLSOFT_NX_WINDOW_RECT_NSIS_HEADER
+!define NULLSOFT_NX_WINDOW_RECT_NSIS_HEADER
+
+!include "util.nsh"
+!include "logicLib.nsh"
+!include "system.nsh"
+
+!macro NX_GetWindowRectInternal
+ Exch $0
+
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+
+ Push $1
+ System::Call "*${stRECT} .r1"
+
+ System::Call "${fnGetWindowRect}($0, $1)"
+ System::Call "*$1${stRECT} (.r2, .r3, .r4, .r5)"
+ System::Free $1
+ Pop $1
+
+ Exch 4
+ Pop $0
+
+ Exch $5
+ Exch 3
+ Exch $2
+ Exch
+ Exch $4
+ Exch 2
+ Exch $3
+ Exch
+!macroend
+
+!macro NX_GetWindowRect __hwnd __left __top __right __bottom
+ Push "${__hwnd}"
+ ${CallArtificialFunction} NX_GetWindowRectInternal
+ Pop "${__left}"
+ Pop "${__top}"
+ Pop "${__right}"
+ Pop "${__bottom}"
+!macroend
+
+!define NX_GetWindowRect `!insertmacro NX_GetWindowRect`
+
+!macro NX_GetMappedWindowRectInternal
+ Exch $0
+ Exch
+ Exch $2
+
+ Push $3
+ Push $4
+ Push $5
+
+ Push $1
+ System::Call "*${stRECT} .r1"
+
+ System::Call "${fnGetWindowRect}(r0, r1)"
+ System::Call '${fnMapWindowPoints}(0, r2, r1, 2)'
+ System::Call "*$1${stRECT} (.r5, .r2, .r3, .r4)"
+ System::Free $1
+ Pop $1
+
+ Exch 4
+ Pop $0
+
+ Exch $4
+ Exch 3
+ Exch $5
+ Exch
+ Exch $3
+ Exch 2
+ Exch $2
+ Exch
+!macroend
+
+!macro NX_GetMappedWindowRect __hwnd __hwndParent __left __top __right __bottom
+ Push "${__hwndParent}"
+ Push "${__hwnd}"
+ ${CallArtificialFunction} NX_GetMappedWindowRectInternal
+ Pop "${__left}"
+ Pop "${__top}"
+ Pop "${__right}"
+ Pop "${__bottom}"
+!macroend
+
+!define NX_GetMappedWindowRect `!insertmacro NX_GetMappedWindowRect`
+
+!macro NX_GetWindowSizeInternal
+ Exch $0
+
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+
+ Push $1
+ System::Call "*${stRECT} .r1"
+
+ System::Call "${fnGetWindowRect} ($0, $1)"
+ System::Call "*$1${stRECT} (.r2, .r3, .r4, .r5)"
+ System::Free $1
+ Pop $1
+
+ IntOp $0 $4 - $2
+ IntOp $2 $5 - $3
+
+ Pop $5
+ Pop $4
+ Pop $3
+ Exch $2
+ Exch
+ Exch $0
+!macroend
+
+!macro NX_GetWindowSize __hwnd __width __height
+ Push "${__hwnd}"
+ ${CallArtificialFunction} NX_GetWindowSizeInternal
+ Pop "${__width}"
+ Pop "${__height}"
+!macroend
+
+!define NX_GetWindowSize `!insertmacro NX_GetWindowSize`
+
+!macro NX_GetWindowPosInternal
+ Exch $0
+
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+
+ Push $1
+ System::Call "*${stRECT} .r1"
+
+ System::Call "${fnGetWindowRect}($0, $1)"
+ System::Call "*$1${stRECT} (.r2, .r3, .r4, .r5)"
+ System::Free $1
+ Pop $1
+
+ StrCpy $0 $3
+
+ Pop $5
+ Pop $4
+ Pop $3
+ Exch $2
+ Exch
+ Exch $0
+ Exch
+!macroend
+
+!macro NX_GetWindowPos __hwnd __left __top
+ Push "${__hwnd}"
+ ${CallArtificialFunction} NX_GetWindowPosInternal
+ Pop "${__left}"
+ Pop "${__top}"
+!macroend
+!define NX_GetWindowPos `!insertmacro NX_GetWindowPos`
+
+!macro NX_GetMappedWindowPosInternal
+ Exch $0
+ Exch
+ Exch $2
+
+ Push $3
+ Push $4
+ Push $5
+
+ Push $1
+ System::Call "*${stRECT} .r1"
+
+ System::Call "${fnGetWindowRect}($0, $1)"
+ System::Call "${fnMapWindowPoints}(0, $2, r1, 1)"
+ System::Call "*$1${stRECT} (.r2, .r3, .r4, .r5)"
+ System::Free $1
+ Pop $1
+
+ StrCpy $0 $3
+
+ Pop $5
+ Pop $4
+ Pop $3
+ Exch $2
+ Exch
+ Exch $0
+ Exch
+!macroend
+
+!macro NX_GetMappedWindowPos __hwnd __hwndParent __left __top
+ Push "${__hwndParent}"
+ Push "${__hwnd}"
+ ${CallArtificialFunction} NX_GetMappedWindowPosInternal
+ Pop "${__left}"
+ Pop "${__top}"
+!macroend
+
+!define NX_GetMappedWindowPos `!insertmacro NX_GetMappedWindowPos`
+
+!macro NX_SetWindowPos __hwnd __left __top
+ System::Call "${fnSetWindowPos} \
+ (${__hwnd}, 0, ${__left}, ${__top}, 0, 0, \
+ ${SWP_NOACTIVATE}|${SWP_NOZORDER}|${SWP_NOSIZE})"
+!macroend
+
+!define NX_SetWindowPos `!insertmacro NX_SetWindowPos`
+
+!macro NX_SetWindowSize __hwnd __width __height
+ System::Call "${fnSetWindowPos} \
+ (${__hwnd}, 0, 0, 0, ${__width}, ${__height}, \
+ ${SWP_NOACTIVATE}|${SWP_NOZORDER}|${SWP_NOMOVE})"
+!macroend
+
+!define NX_SetWindowSize `!insertmacro NX_SetWindowSize`
+
+!macro NX_SetWindowPosAndSize __hwnd __left __top __width __height
+ System::Call "User32::SetWindowPos(i, i, i, i, i, i, i) b \
+ (${__hwnd}, 0, ${__left}, ${__top}, ${__width}, ${__height},\
+ ${SWP_NOACTIVATE}|${SWP_NOZORDER})"
+!macroend
+
+!define NX_SetWindowPosAndSize `!insertmacro NX_SetWindowPosAndSize`
+
+!macro NX_SetWindowOrder __hwnd __insertAfterWindow
+ System::Call "${fnSetWindowPos} \
+ (${__hwnd}, ${__insertAfterWindow}, 0, 0, 0, 0, \
+ ${SWP_NOACTIVATE}|${SWP_NOSIZE}|${SWP_NOMOVE})"
+!macroend
+
+!define NX_SetWindowOrder `!insertmacro NX_SetWindowOrder`
+
+!macro NX_OffsetWindowPosInternal
+ !define hwnd_ $R0
+ !define offsetX_ $R1
+ !define offsetY_ $R2
+
+ Exch ${offsetY_}
+ Exch
+ Exch ${offsetX_}
+ Exch 2
+ Exch ${hwnd_}
+
+ Push $0
+ Push $1
+ Push $2
+ Push $3
+ Push $4
+
+ System::Call "*${stRECT} .r4"
+ System::Call "${fnGetWindowRect} (${hwnd_}, r4)"
+ System::Call "${fnGetAncestor} (${hwnd_}, ${GA_PARENT}).r0"
+ ${If} $R0 != 0
+ System::Call "${fnMapWindowPoints} (0, r0, r4, 2)"
+ ${EndIf}
+ System::Call "*$4${stRECT} (.r0, .r1, .r2, .r3)"
+ System::Free $4
+
+ IntOp $0 $0 + ${offsetX_}
+ IntOp $1 $1 + ${offsetY_}
+
+ System::Call "${fnSetWindowPos} \
+ (${hwnd_}, 0, $0, $1, 0, 0, \
+ ${SWP_NOACTIVATE}|${SWP_NOZORDER}|${SWP_NOSIZE})"
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+
+ Pop ${hwnd_}
+ Pop ${offsetY_}
+ Pop ${offsetX_}
+
+ !undef hwnd_
+ !undef offsetX_
+ !undef offsetY_
+!macroend
+
+!macro NX_OffsetWindowPos __hwnd __offset_x __offset_y
+ Push "${__hwnd}"
+ Push "${__offset_x}"
+ Push "${__offset_y}"
+ ${CallArtificialFunction} NX_OffsetWindowPosInternal
+!macroend
+
+!define NX_OffsetWindowPos "!insertmacro 'NX_OffsetWindowPos'"
+
+!macro NX_IncreaseWindowSizeInternal
+ !define hwnd_ $R0
+ !define deltaCX_ $R1
+ !define deltaCY_ $R2
+
+ Exch ${deltaCY_}
+ Exch
+ Exch ${deltaCX_}
+ Exch 2
+ Exch ${hwnd_}
+
+ Push $0
+ Push $1
+ Push $2
+ Push $3
+ Push $4
+
+ System::Call "*${stRECT} .r4"
+ System::Call "${fnGetWindowRect}(${hwnd_}, r4)"
+ System::Call "*$4${stRECT} (.r0, .r1, .r2, .r3)"
+ System::Free $4
+
+ IntOp $0 $2 - $0
+ IntOp $1 $3 - $1
+ IntOp $0 $0 + ${deltaCX_}
+ IntOp $1 $1 + ${deltaCY_}
+
+ System::Call "${fnSetWindowPos}\
+ (${__hwnd}, 0, 0, 0, $0, $1, \
+ ${SWP_NOACTIVATE}|${SWP_NOZORDER}|${SWP_NOMOVE})"
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+
+ Pop ${hwnd_}
+ Pop ${deltaCY_}
+ Pop ${deltaCX_}
+
+ !undef hwnd_
+ !undef deltaCX_
+ !undef deltaCY_
+!macroend
+
+!macro NX_IncreaseWindowSize __hwnd __delta_cx __delta_cy
+ Push "${__hwnd}"
+ Push "${__delta_cx}"
+ Push "${__delta_cy}"
+ ${CallArtificialFunction} NX_IncreaseWindowSizeInternal
+!macroend
+
+!define NX_IncreaseWindowSize "!insertmacro 'NX_IncreaseWindowSize'"
+
+!macro NX_ConvertHorzDLUInternal
+ Exch $1 ; dlu
+ Exch
+ Exch $0 ; hwnd
+ Push $2
+
+ System::Call "*${stRECT}($1, 0, 0, 0) .r2"
+ System::Call "${fnMapDialogRect}($0, $2).s"
+ Pop $1
+ ${If} $1 != 0
+ System::Call "*$2${stRECT} (.r1, _)"
+ ${EndIf}
+
+ System::Free $2
+
+ Pop $2
+ Pop $0
+ Exch $1
+!macroend
+
+!macro NX_ConvertHorzDLU __hwnd __dlu __px
+ Push "${__hwnd}"
+ Push "${__dlu}"
+ ${CallArtificialFunction} NX_ConvertHorzDLUInternal
+ Pop "${__px}"
+!macroend
+
+!define NX_ConvertHorzDLU `!insertmacro NX_ConvertHorzDLU`
+
+!macro NX_ConvertVertDLUInternal
+ Exch $1 ; dlu
+ Exch
+ Exch $0 ; hwnd
+ Push $2
+
+ System::Call "*${stRECT}(0, $1, 0, 0) .r2"
+ System::Call "${fnMapDialogRect}($0, $2).s"
+ Pop $1
+ ${If} $1 != 0
+ System::Call "*$2${stRECT} (., .r1, _)"
+ ${EndIf}
+
+ System::Free $2
+
+ Pop $2
+ Pop $0
+ Exch $1
+!macroend
+
+!macro NX_ConvertVertDLU __hwnd __dlu __px
+ Push "${__hwnd}"
+ Push "${__dlu}"
+ ${CallArtificialFunction} NX_ConvertVertDLUInternal
+ Pop "${__px}"
+!macroend
+
+!define NX_ConvertVertDLU `!insertmacro NX_ConvertVertDLU`
+
+!endif ; defined(NULLSOFT_NX_WINDOW_RECT_NSIS_HEADER) \ No newline at end of file
diff --git a/Src/installer/shared/scripts/windowText.nsh b/Src/installer/shared/scripts/windowText.nsh
new file mode 100644
index 00000000..aa9f3128
--- /dev/null
+++ b/Src/installer/shared/scripts/windowText.nsh
@@ -0,0 +1,37 @@
+!ifndef NULLSOFT_NX_WINDOW_TEXT_NSIS_HEADER
+!define NULLSOFT_NX_WINDOW_TEXT_NSIS_HEADER
+
+!include "system.nsh"
+
+!macro NX_SetWindowText __hwnd __text
+ System::Call "${fnSetWindowText}(${__hwnd}, '${__text}')"
+!macroend
+
+!define NX_SetWindowText "!insertmacro 'NX_SetWindowText'"
+
+!macro NX_GetWindowText __hwnd __textOut
+ System::Call "${fnGetWindowText}(${__hwnd}, ${__textOut}, ${NSIS_MAX_STRLEN})"
+!macroend
+
+!define NX_GetWindowText "!insertmacro 'NX_GetWindowText'"
+
+!macro NX_AppendWindowText __hwnd __text
+ Push ${__hwnd}
+ Push ${__text}
+ Exch $R0 ; text
+ Exch
+ Exch $R1 ; hwnd
+
+ Push $0
+ StrCpy $0 ""
+ ${NX_GetWindowText} $R1 $0
+ StrCpy $0 "$0$R0"
+ ${NX_SetWindowText} $R1 $0
+ Pop $0
+ Pop $R1
+ Pop $R0
+!macroend
+
+!define NX_AppendWindowText "!insertmacro 'NX_AppendWindowText'"
+
+!endif ;NULLSOFT_NX_WINDOW_TEXT_NSIS_HEADER \ No newline at end of file
diff --git a/Src/installer/shared/ui/miniui/miniui.exe b/Src/installer/shared/ui/miniui/miniui.exe
new file mode 100644
index 00000000..0c4dd9e3
--- /dev/null
+++ b/Src/installer/shared/ui/miniui/miniui.exe
Binary files differ
diff --git a/Src/installer/shared/ui/miniui/miniui.rc b/Src/installer/shared/ui/miniui/miniui.rc
new file mode 100644
index 00000000..91723bab
--- /dev/null
+++ b/Src/installer/shared/ui/miniui/miniui.rc
@@ -0,0 +1,100 @@
+#include "resource.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+IDD_LICENSE DIALOGEX 0, 0, 266, 70
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CONTROL "",IDC_ULICON,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_INTROTEXT,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_EDIT1,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+END
+
+IDD_DIR DIALOGEX 0, 0, 266, 70
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CONTROL "",IDC_DIR,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_BROWSE,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_ULICON,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_SELDIRTEXT,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_CHECK1,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_SPACEAVAILABLE,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_SPACEREQUIRED,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_INTROTEXT,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+END
+
+IDD_SELCOM DIALOGEX 0, 0, 266, 70
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CONTROL "",IDC_COMBO1,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_ULICON,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_TEXT2,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_TEXT1,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_SPACEREQUIRED,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_INTROTEXT,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_TREE1,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+END
+
+IDD_INST DIALOGEX 0, 0, 204, 64
+STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CONTROLPARENT | WS_EX_APPWINDOW
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CONTROL "",3,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",2,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",1,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_CHILDRECT,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_VERSTR,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+END
+
+IDD_INSTFILES DIALOGEX 0, 0, 204, 64
+STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CONTROL "",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH | WS_BORDER,4,28,196,11
+ CONTROL "",IDC_INTROTEXT,"Static",SS_LEFTNOWORDWRAP | SS_NOPREFIX | SS_ENDELLIPSIS,4,16,196,8
+ CONTROL "",IDC_LIST1,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_ULICON,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_SHOWDETAILS,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+END
+
+IDD_UNINST DIALOGEX 0, 0, 266, 70
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CONTROL "",IDC_ULICON,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_UNINSTFROM,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_EDIT1,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_INTROTEXT,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+END
+
+IDD_LICENSE_FSRB DIALOGEX 0, 0, 266, 70
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CONTROL "",IDC_ULICON,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_INTROTEXT,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_EDIT1,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_LICENSEAGREE,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_LICENSEDISAGREE,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+END
+
+IDD_LICENSE_FSCB DIALOGEX 0, 0, 266, 70
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CONTROL "",IDC_ULICON,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_INTROTEXT,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_EDIT1,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+ CONTROL "",IDC_LICENSEAGREE,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+END
+
+IDD_VERIFY DIALOGEX 0, 0, 162, 22
+STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CONTROL "",IDC_STR,"Static", NOT WS_VISIBLE | WS_DISABLED,0,0,0,0
+END \ No newline at end of file
diff --git a/Src/installer/shared/ui/miniui/miniui.sln b/Src/installer/shared/ui/miniui/miniui.sln
new file mode 100644
index 00000000..6a13d1d5
--- /dev/null
+++ b/Src/installer/shared/ui/miniui/miniui.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniui", "miniui.vcxproj", "{044E97C3-9BCF-4905-B3E0-2DCA18AAE57C}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {044E97C3-9BCF-4905-B3E0-2DCA18AAE57C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {044E97C3-9BCF-4905-B3E0-2DCA18AAE57C}.Debug|Win32.Build.0 = Debug|Win32
+ {044E97C3-9BCF-4905-B3E0-2DCA18AAE57C}.Release|Win32.ActiveCfg = Release|Win32
+ {044E97C3-9BCF-4905-B3E0-2DCA18AAE57C}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Src/installer/shared/ui/miniui/miniui.vcxproj b/Src/installer/shared/ui/miniui/miniui.vcxproj
new file mode 100644
index 00000000..4030ca51
--- /dev/null
+++ b/Src/installer/shared/ui/miniui/miniui.vcxproj
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{044E97C3-9BCF-4905-B3E0-2DCA18AAE57C}</ProjectGuid>
+ <RootNamespace>minui</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectName>miniui</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MinSpace</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib</AdditionalDependencies>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <EntryPointSymbol>WinMain</EntryPointSymbol>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <TargetMachine>MachineX86</TargetMachine>
+ <CLRThreadAttribute>DefaultThreadingAttribute</CLRThreadAttribute>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ResourceCompile Include="miniui.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="resource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="ui.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Src/installer/shared/ui/miniui/resource.h b/Src/installer/shared/ui/miniui/resource.h
new file mode 100644
index 00000000..baeee936
--- /dev/null
+++ b/Src/installer/shared/ui/miniui/resource.h
@@ -0,0 +1,45 @@
+#include <windows.h>
+
+#ifndef IDC_STATIC
+#define IDC_STATIC (-1)
+#endif
+
+#ifndef DS_SHELLFONT
+#define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS)
+#endif
+
+#define IDC_BACK 3
+#define IDD_LICENSE 102
+#define IDD_LICENSE_FSRB 108
+#define IDD_LICENSE_FSCB 109
+#define IDI_ICON2 103
+#define IDD_DIR 103
+#define IDD_SELCOM 104
+#define IDD_INST 105
+#define IDD_INSTFILES 106
+#define IDD_UNINST 107
+#define IDD_VERIFY 111
+#define IDB_BITMAP1 110
+#define IDC_EDIT1 1000
+#define IDC_BROWSE 1001
+#define IDC_PROGRESS 1004
+#define IDC_INTROTEXT 1006
+#define IDC_CHECK1 1008
+#define IDC_LIST1 1016
+#define IDC_COMBO1 1017
+#define IDC_CHILDRECT 1018
+#define IDC_DIR 1019
+#define IDC_SELDIRTEXT 1020
+#define IDC_TEXT1 1021
+#define IDC_TEXT2 1022
+#define IDC_SPACEREQUIRED 1023
+#define IDC_SPACEAVAILABLE 1024
+#define IDC_SHOWDETAILS 1027
+#define IDC_VERSTR 1028
+#define IDC_UNINSTFROM 1029
+#define IDC_STR 1030
+#define IDC_ULICON 1031
+#define IDC_TREE1 1032
+#define IDC_BRANDIMAGE 1033
+#define IDC_LICENSEAGREE 1034
+#define IDC_LICENSEDISAGREE 1035
diff --git a/Src/installer/shared/ui/miniui/ui.c b/Src/installer/shared/ui/miniui/ui.c
new file mode 100644
index 00000000..a426499d
--- /dev/null
+++ b/Src/installer/shared/ui/miniui/ui.c
@@ -0,0 +1,91 @@
+// ui.cpp : Defines the entry point for the application.
+//
+
+#include <windows.h>
+#include "resource.h"
+
+HINSTANCE g_hInstance;
+HWND m_curwnd;
+
+LPTSTR windows[] = {
+ MAKEINTRESOURCE(IDD_LICENSE),
+ MAKEINTRESOURCE(IDD_SELCOM),
+ MAKEINTRESOURCE(IDD_DIR),
+ MAKEINTRESOURCE(IDD_INSTFILES),
+ MAKEINTRESOURCE(IDD_UNINST)
+};
+
+BOOL CALLBACK GenericProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) {
+ static LOGBRUSH b = {BS_SOLID, RGB(255,0,0), 0};
+ static HBRUSH red;
+
+ if (!red)
+ red = CreateBrushIndirect(&b);
+
+ switch (uMsg) {
+ case WM_CTLCOLORSTATIC:
+ return (int)red;
+ }
+ return 0;
+}
+
+BOOL CALLBACK DialogProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) {
+ static int i = -1;
+ switch (uMsg) {
+ case WM_INITDIALOG:
+ ShowWindow(GetDlgItem(hwndDlg, IDC_CHILDRECT), SW_SHOW);
+ ShowWindow(hwndDlg, SW_SHOW);
+ break;
+ case WM_COMMAND:
+ switch (LOWORD(wParam)) {
+ case IDOK:
+ case IDC_BACK:
+ i+=(LOWORD(wParam)==IDOK)?1:-1;
+ if (i < 0) {
+ i++;
+ break;
+ }
+ if (i >= (int)sizeof(windows)/sizeof(char*)) {
+ i--;
+ break;
+ }
+ if (m_curwnd) DestroyWindow(m_curwnd);
+ m_curwnd=CreateDialog(g_hInstance,windows[i],hwndDlg,GenericProc);
+ if (m_curwnd)
+ {
+ RECT r;
+ GetWindowRect(GetDlgItem(hwndDlg,IDC_CHILDRECT),&r);
+ ScreenToClient(hwndDlg,(LPPOINT)&r);
+ SetWindowPos(m_curwnd,0,r.left,r.top,0,0,SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOZORDER);
+ ShowWindow(m_curwnd,SW_SHOWNA);
+ }
+ break;
+ default:
+ EndDialog(hwndDlg, 0);
+ PostQuitMessage(0);
+ break;
+ }
+ break;
+ }
+ return 0;
+}
+
+int APIENTRY WinMain(HINSTANCE hInstance,
+ HINSTANCE hPrevInstance,
+ LPSTR lpCmdLine,
+ int nCmdShow)
+{
+
+ g_hInstance = GetModuleHandle(0);
+
+ DialogBox(
+ g_hInstance,
+ MAKEINTRESOURCE(IDD_INST),
+ 0,
+ DialogProc
+ );
+
+ ExitProcess(0);
+
+ return 0;
+}