- A message box with timeout informing about successful installation and restart.

svn path=/trunk/; revision=8829
This commit is contained in:
Filip Navara 2004-03-21 14:37:19 +00:00
parent c4a7a3aa63
commit 722728fd5c
7 changed files with 155 additions and 15 deletions

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.5 2004/01/23 10:34:23 ekohl Exp $
# $Id: Makefile,v 1.6 2004/03/21 14:37:18 navaraf Exp $
PATH_TO_TOP = ../..
@ -8,20 +8,18 @@ TARGET_NAME = syssetup
TARGET_BASE = 0x74A30000
TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a gdi32.a user32.a samlib.a userenv.a
# comctl32.a
TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a gdi32.a user32.a samlib.a userenv.a comctl32.a
TARGET_CFLAGS = -Wall -Werror -fno-builtin
# require os code to explicitly request A/W version of structs/functions
TARGET_CFLAGS += -D_DISABLE_TIDENTS
TARGET_CFLAGS += -D__USE_W32API -D_WIN32_IE=0x0500
TARGET_RCFLAGS += -D__USE_W32API -D_WIN32_IE=0x0500
TARGET_LFLAGS = -nostartfiles -nostdlib
TARGET_OBJECTS = dllmain.o install.o logfile.o
# wizard.o
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: dllmain.c,v 1.1 2003/05/02 18:07:55 ekohl Exp $
/* $Id: dllmain.c,v 1.2 2004/03/21 14:37:19 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -28,11 +28,10 @@
/* INCLUDES *****************************************************************/
#include <windows.h>
#include <commctrl.h>
/* GLOBALS *******************************************************************/
/* FUNCTIONS *****************************************************************/
BOOL STDCALL
@ -40,8 +39,10 @@ DllMain (HINSTANCE hInstance,
DWORD dwReason,
LPVOID lpReserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
InitCommonControls();
return TRUE;
return TRUE;
}
/* EOF */

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: install.c,v 1.8 2004/01/23 16:51:41 navaraf Exp $
/* $Id: install.c,v 1.9 2004/03/21 14:37:19 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -29,11 +29,14 @@
#include <ntos.h>
#include <windows.h>
#include <commctrl.h>
#include <stdio.h>
#include <samlib.h>
#include <syssetup.h>
#include "resource.h"
// #define NO_GUI
#if 0
@ -132,6 +135,44 @@ AppendRidToSid (PSID *Dst,
Dst);
}
INT_PTR CALLBACK
RestartDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg)
{
case WM_INITDIALOG:
SendDlgItemMessage(hWnd, IDC_RESTART_PROGRESS, PBM_SETRANGE, 0,
MAKELPARAM(0, 300));
SetTimer(hWnd, 0, 50, NULL);
return TRUE;
case WM_TIMER:
{
INT Position;
HWND hWndProgress;
hWndProgress = GetDlgItem(hWnd, IDC_RESTART_PROGRESS);
Position = SendMessage(hWndProgress, PBM_GETPOS, 0, 0);
if (Position == 300)
EndDialog(hWnd, 0);
else
SendMessage(hWndProgress, PBM_SETPOS, Position + 1, 0);
}
return TRUE;
case WM_COMMAND:
switch (wParam)
{
case IDOK:
case IDCANCEL:
EndDialog(hWnd, 0);
return TRUE;
}
break;
}
return FALSE;
}
DWORD STDCALL
InstallReactOS (HINSTANCE hInstance)
@ -225,12 +266,16 @@ InstallReactOS (HINSTANCE hInstance)
RtlFreeSid (AdminSid);
RtlFreeSid (DomainSid);
DebugPrint ("System setup successful\n");
#if 0
Wizard ();
#endif
DialogBox(
GetModuleHandle(TEXT("syssetup.dll")),
MAKEINTRESOURCE(IDD_RESTART),
NULL,
RestartDlgProc);
return 0;
}

View file

@ -0,0 +1,25 @@
/*
* Copyright (C) 2004 Filip Navara
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef RESOURCE_H
#define RESOURCE_H
#define IDD_RESTART 1001
#define IDC_RESTART_PROGRESS 1002
#endif /* RESOURCE_H */

View file

@ -1,7 +1,8 @@
#include <defines.h>
#include <windows.h>
#include <reactos/resource.h>
#include "resource.h"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
VS_VERSION_INFO VERSIONINFO
FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD
@ -36,3 +37,11 @@ BEGIN
END
END
/*
* Everything specific to any language goes in one of the specific
* files. Note that you can and may override resources which also have
* a neutral version. This is to get localized bitmaps for example.
*/
#include "syssetup_En.rc"
#include "syssetup_Cz.rc"

View file

@ -0,0 +1,31 @@
/*
* Copyright (C) 2004 Filip Navara
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
IDD_RESTART DIALOG 6, 18, 245, 116
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION
CAPTION "Instatalace ReactOSu"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Instalace ReactOSu byla úspìšnì dokonèena.", -1, 13, 12, 212, 16
LTEXT "Pro pokraèování potøebuje instalaèní program restartovat Váš poèítaè. Poèítaè bude automaticky restartován za 15 sekund nebo zmáèknete-li tlaèítko Restartovat.", -1, 13, 33, 212, 32
/* GROUPBOX "", -1, 7, 3, 231, 106 */
CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 13, 70, 212, 8
PUSHBUTTON "&Restartovat", IDOK, 98, 87, 50, 14
END

View file

@ -0,0 +1,31 @@
/*
* Copyright (C) 2004 Filip Navara
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
IDD_RESTART DIALOG 6, 18, 245, 116
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION
CAPTION "ReactOS Installation"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Installation of ReactOS was successfully completed.", -1, 13, 12, 212, 16
LTEXT "In order to continue, the installation program needs to restart your computer. The computer will be automatically restarted in 15 seconds or if you press the Restart button.", -1, 13, 33, 212, 32
/* GROUPBOX "", -1, 7, 3, 231, 106 */
CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 13, 70, 212, 8
PUSHBUTTON "&Restart", IDOK, 98, 87, 50, 14
END