From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- Src/installer/shared/ui/miniui/miniui.exe | Bin 0 -> 5120 bytes Src/installer/shared/ui/miniui/miniui.rc | 100 ++++++++++++++++++++++ Src/installer/shared/ui/miniui/miniui.sln | 20 +++++ Src/installer/shared/ui/miniui/miniui.vcxproj | 117 ++++++++++++++++++++++++++ Src/installer/shared/ui/miniui/resource.h | 45 ++++++++++ Src/installer/shared/ui/miniui/ui.c | 91 ++++++++++++++++++++ 6 files changed, 373 insertions(+) create mode 100644 Src/installer/shared/ui/miniui/miniui.exe create mode 100644 Src/installer/shared/ui/miniui/miniui.rc create mode 100644 Src/installer/shared/ui/miniui/miniui.sln create mode 100644 Src/installer/shared/ui/miniui/miniui.vcxproj create mode 100644 Src/installer/shared/ui/miniui/resource.h create mode 100644 Src/installer/shared/ui/miniui/ui.c (limited to 'Src/installer/shared/ui') 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 Binary files /dev/null and b/Src/installer/shared/ui/miniui/miniui.exe 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 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {044E97C3-9BCF-4905-B3E0-2DCA18AAE57C} + minui + Win32Proj + miniui + + + + Application + Unicode + true + + + Application + Unicode + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + $(SolutionDir) + $(Configuration)\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + true + Windows + MachineX86 + + + + + MinSpace + true + Size + true + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + true + + + Level3 + ProgramDatabase + CompileAsC + + + kernel32.lib;user32.lib;gdi32.lib + true + false + Windows + true + true + WinMain + false + MachineX86 + DefaultThreadingAttribute + + + + + + + + + + + + + + + \ 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 + +#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 +#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; +} -- cgit