- Added "Service Dependencies" page
authorVictor Kirhenshtein <victor@netxms.org>
Tue, 1 Aug 2006 05:54:36 +0000 (05:54 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Tue, 1 Aug 2006 05:54:36 +0000 (05:54 +0000)
- Fixed bug in service creation

.gitattributes
src/server/tools/nxconfig/Makefile.am
src/server/tools/nxconfig/SrvDepsPage.cpp [new file with mode: 0644]
src/server/tools/nxconfig/SrvDepsPage.h [new file with mode: 0644]
src/server/tools/nxconfig/WizardWorker.cpp
src/server/tools/nxconfig/nxconfig.clw
src/server/tools/nxconfig/nxconfig.cpp
src/server/tools/nxconfig/nxconfig.dsp
src/server/tools/nxconfig/nxconfig.rc
src/server/tools/nxconfig/resource.h

index 22fd8cf..9cf615f 100644 (file)
@@ -1221,6 +1221,8 @@ src/server/tools/nxconfig/ProcessingPage.cpp -text
 src/server/tools/nxconfig/ProcessingPage.h -text
 src/server/tools/nxconfig/SMTPPage.cpp -text
 src/server/tools/nxconfig/SMTPPage.h -text
+src/server/tools/nxconfig/SrvDepsPage.cpp -text
+src/server/tools/nxconfig/SrvDepsPage.h -text
 src/server/tools/nxconfig/StdAfx.cpp -text
 src/server/tools/nxconfig/StdAfx.h -text
 src/server/tools/nxconfig/SummaryPage.cpp -text
index cedb5ca..ae89ac7 100644 (file)
@@ -23,6 +23,7 @@ EXTRA_DIST = \
        PollCfgPage.cpp PollCfgPage.h \
        ProcessingPage.cpp ProcessingPage.h \
        SMTPPage.cpp SMTPPage.h \
+       SrvDepsPage.cpp SrvDepsPage.h \
        StdAfx.cpp StdAfx.h \
        SummaryPage.cpp SummaryPage.h \
        WizardWorker.cpp \
diff --git a/src/server/tools/nxconfig/SrvDepsPage.cpp b/src/server/tools/nxconfig/SrvDepsPage.cpp
new file mode 100644 (file)
index 0000000..aa27fb2
--- /dev/null
@@ -0,0 +1,59 @@
+// SrvDepsPage.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "nxconfig.h"
+#include "SrvDepsPage.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CSrvDepsPage property page
+
+IMPLEMENT_DYNCREATE(CSrvDepsPage, CPropertyPage)
+
+CSrvDepsPage::CSrvDepsPage() : CPropertyPage(CSrvDepsPage::IDD)
+{
+       //{{AFX_DATA_INIT(CSrvDepsPage)
+               // NOTE: the ClassWizard will add member initialization here
+       //}}AFX_DATA_INIT
+}
+
+CSrvDepsPage::~CSrvDepsPage()
+{
+}
+
+void CSrvDepsPage::DoDataExchange(CDataExchange* pDX)
+{
+       CPropertyPage::DoDataExchange(pDX);
+       //{{AFX_DATA_MAP(CSrvDepsPage)
+       DDX_Control(pDX, IDC_LIST_SERVICES, m_wndListCtrl);
+       //}}AFX_DATA_MAP
+}
+
+
+BEGIN_MESSAGE_MAP(CSrvDepsPage, CPropertyPage)
+       //{{AFX_MSG_MAP(CSrvDepsPage)
+       //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CSrvDepsPage message handlers
+
+
+//
+// WM_INITDIALOG message handler
+//
+
+BOOL CSrvDepsPage::OnInitDialog() 
+{
+       CPropertyPage::OnInitDialog();
+       
+   m_wndListCtrl.SetExtendedStyle(LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP);
+       
+       return TRUE;
+}
diff --git a/src/server/tools/nxconfig/SrvDepsPage.h b/src/server/tools/nxconfig/SrvDepsPage.h
new file mode 100644 (file)
index 0000000..5d530b4
--- /dev/null
@@ -0,0 +1,49 @@
+#if !defined(AFX_SRVDEPSPAGE_H__1538FBD8_C1C1_495A_B35F_0371FA38F876__INCLUDED_)
+#define AFX_SRVDEPSPAGE_H__1538FBD8_C1C1_495A_B35F_0371FA38F876__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+// SrvDepsPage.h : header file
+//
+
+/////////////////////////////////////////////////////////////////////////////
+// CSrvDepsPage dialog
+
+class CSrvDepsPage : public CPropertyPage
+{
+       DECLARE_DYNCREATE(CSrvDepsPage)
+
+// Construction
+public:
+       CSrvDepsPage();
+       ~CSrvDepsPage();
+
+// Dialog Data
+       //{{AFX_DATA(CSrvDepsPage)
+       enum { IDD = IDD_SRV_DEPS };
+       CListCtrl       m_wndListCtrl;
+       //}}AFX_DATA
+
+
+// Overrides
+       // ClassWizard generate virtual function overrides
+       //{{AFX_VIRTUAL(CSrvDepsPage)
+       protected:
+       virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
+       //}}AFX_VIRTUAL
+
+// Implementation
+protected:
+       // Generated message map functions
+       //{{AFX_MSG(CSrvDepsPage)
+       virtual BOOL OnInitDialog();
+       //}}AFX_MSG
+       DECLARE_MESSAGE_MAP()
+
+};
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_SRVDEPSPAGE_H__1538FBD8_C1C1_495A_B35F_0371FA38F876__INCLUDED_)
index 42b688d..89b9747 100644 (file)
@@ -124,7 +124,7 @@ static BOOL InstallService(WIZARD_CFG_INFO *pc)
    {
       CloseServiceHandle(hService);
       bResult = TRUE;
-      _sntprintf(szCmdLine, MAX_PATH, _T("%s\\bin\\nxcore.dll"), pc->m_szInstallDir);
+      _sntprintf(szCmdLine, MAX_PATH, _T("%s\\bin\\libnxsrv.dll"), pc->m_szInstallDir);
    }
 
    CloseServiceHandle(hMgr);
index 8c937b6..c6ca3e3 100644 (file)
@@ -2,18 +2,18 @@
 
 [General Info]
 Version=1
-LastClass=CWinSrvPage
+LastClass=CSrvDepsPage
 LastTemplate=CPropertyPage
 NewFileInclude1=#include "stdafx.h"
 NewFileInclude2=#include "nxconfig.h"
 LastPage=0
 
-ClassCount=16
+ClassCount=17
 Class1=CNxconfigApp
 Class3=CMainFrame
 Class4=CAboutDlg
 
-ResourceCount=13
+ResourceCount=26
 Resource1=IDD_SELECT_DB (English (U.S.))
 Resource2=IDD_CFG_FILE (English (U.S.))
 Class2=CChildView
@@ -40,6 +40,20 @@ Class15=CLoggingPage
 Resource12=IDD_PROCESSING (English (U.S.))
 Class16=CWinSrvPage
 Resource13=IDD_SERVICE (English (U.S.))
+Resource14=IDD_PROCESSING
+Resource15=IDD_LOG_FILE
+Resource16=IDD_SELECT_DB
+Resource17=IDD_ODBC
+Resource18=IDD_SUMMARY
+Resource19=IDD_SERVICE
+Resource20=IDR_MAINFRAME
+Resource21=IDD_FINISH
+Resource22=IDD_INTRO
+Resource23=IDD_POLLING
+Resource24=IDD_SMTP
+Resource25=IDD_CFG_FILE
+Class17=CSrvDepsPage
+Resource26=IDD_SRV_DEPS
 
 [CLS:CNxconfigApp]
 Type=0
@@ -74,19 +88,9 @@ LastObject=CAboutDlg
 [MNU:IDR_MAINFRAME]
 Type=1
 Class=CMainFrame
-Command3=ID_FILE_SAVE
-Command4=ID_FILE_SAVE_AS
-Command5=ID_FILE_MRU_FILE1
-Command6=ID_APP_EXIT
-Command10=ID_EDIT_PASTE
-Command11=ID_VIEW_STATUS_BAR
-Command12=ID_APP_ABOUT
-CommandCount=12
-Command1=ID_FILE_NEW
-Command2=ID_FILE_OPEN
-Command7=ID_EDIT_UNDO
-Command8=ID_EDIT_CUT
-Command9=ID_EDIT_COPY
+Command1=ID_FILE_CFG_WIZARD
+Command2=ID_APP_EXIT
+CommandCount=2
 
 [MNU:IDR_MAINFRAME (English (U.S.))]
 Type=1
@@ -369,3 +373,166 @@ BaseClass=CPropertyPage
 Filter=D
 VirtualFilter=idWC
 
+[DLG:IDD_LOG_FILE]
+Type=1
+Class=CLoggingPage
+ControlCount=6
+Control1=IDC_RADIO_SYSLOG,button,1342373897
+Control2=IDC_RADIO_FILE,button,1342177289
+Control3=IDC_EDIT_FILE,edit,1350631552
+Control4=IDC_BUTTON_BROWSE,button,1342242816
+Control5=IDC_STATIC,static,1342177806
+Control6=IDC_STATIC,static,1342308352
+
+[DLG:IDD_SERVICE]
+Type=1
+Class=CWinSrvPage
+ControlCount=11
+Control1=IDC_RADIO_SYSTEM,button,1342373897
+Control2=IDC_RADIO_USER,button,1342242825
+Control3=IDC_EDIT_LOGIN,edit,1350631552
+Control4=IDC_EDIT_PASSWD1,edit,1350631584
+Control5=IDC_EDIT_PASSWD2,edit,1350631584
+Control6=IDC_STATIC,static,1342177806
+Control7=IDC_STATIC,static,1342308352
+Control8=IDC_STATIC,static,1342308352
+Control9=IDC_STATIC,static,1342308352
+Control10=IDC_ICON_WARNING,static,1342177283
+Control11=IDC_STATIC_WARNING,static,1342308352
+
+[DLG:IDD_ODBC]
+Type=1
+Class=CODBCPage
+ControlCount=5
+Control1=IDC_BUTTON_ODBC,button,1342242816
+Control2=IDC_STATIC,static,1342177806
+Control3=IDC_STATIC,static,1342308352
+Control4=IDC_STATIC,static,1342177283
+Control5=IDC_STATIC,static,1342308352
+
+[DLG:IDD_FINISH]
+Type=1
+Class=CFinishPage
+ControlCount=2
+Control1=IDC_STATIC,static,1342177806
+Control2=IDC_STATIC,static,1342308352
+
+[DLG:IDD_CFG_FILE]
+Type=1
+Class=CConfigFilePage
+ControlCount=5
+Control1=IDC_EDIT_FILE,edit,1350631552
+Control2=IDC_BUTTON_BROWSE,button,1342242816
+Control3=IDC_STATIC,static,1342177806
+Control4=IDC_STATIC,static,1342308352
+Control5=IDC_STATIC,static,1342308352
+
+[DLG:IDD_INTRO]
+Type=1
+Class=CIntroPage
+ControlCount=2
+Control1=IDC_STATIC,static,1342308352
+Control2=IDC_STATIC,static,1342177806
+
+[DLG:IDD_SELECT_DB]
+Type=1
+Class=CDBSelectPage
+ControlCount=23
+Control1=IDC_COMBO_DBENGINE,combobox,1344340227
+Control2=IDC_COMBO_DBDRV,combobox,1344340227
+Control3=IDC_EDIT_SERVER,edit,1350631552
+Control4=IDC_RADIO_NEWDB,button,1342373897
+Control5=IDC_RADIO_EXISTINGDB,button,1342177289
+Control6=IDC_CHECK_INITDB,button,1342242819
+Control7=IDC_EDIT_DBA_LOGIN,edit,1350631552
+Control8=IDC_EDIT_DBA_PASSWORD,edit,1350631584
+Control9=IDC_EDIT_DB_NAME,edit,1350631552
+Control10=IDC_EDIT_DB_LOGIN,edit,1350631552
+Control11=IDC_EDIT_DB_PASSWORD,edit,1350631584
+Control12=IDC_STATIC,static,1342177806
+Control13=IDC_STATIC,static,1342308352
+Control14=IDC_STATIC,static,1342308352
+Control15=IDC_STATIC_SERVER,static,1342308352
+Control16=IDC_STATIC,static,1342308352
+Control17=IDC_STATIC,static,1342308352
+Control18=IDC_STATIC_DBNAME,static,1342308352
+Control19=IDC_STATIC,static,1342308352
+Control20=IDC_STATIC,static,1342308352
+Control21=IDC_STATIC,static,1342177296
+Control22=IDC_STATIC,static,1342177296
+Control23=IDC_STATIC,static,1342177296
+
+[DLG:IDD_POLLING]
+Type=1
+Class=CPollCfgPage
+ControlCount=18
+Control1=IDC_CHECK_RUN_DISCOVERY,button,1342242819
+Control2=IDC_EDIT_INT_DP,edit,1350639744
+Control3=IDC_EDIT_NUM_SP,edit,1350631552
+Control4=IDC_EDIT_INT_SP,edit,1350639744
+Control5=IDC_EDIT_NUM_CP,edit,1350631552
+Control6=IDC_EDIT_INT_CP,edit,1350639744
+Control7=IDC_STATIC,static,1342177806
+Control8=IDC_STATIC,button,1342177287
+Control9=IDC_STATIC_DI,static,1342308352
+Control10=IDC_STATIC_SEC,static,1342308352
+Control11=IDC_STATIC,button,1342177287
+Control12=IDC_STATIC,static,1342308352
+Control13=IDC_STATIC,static,1342308352
+Control14=IDC_STATIC,static,1342308352
+Control15=IDC_STATIC,button,1342177287
+Control16=IDC_STATIC,static,1342308352
+Control17=IDC_STATIC,static,1342308352
+Control18=IDC_STATIC,static,1342308352
+
+[DLG:IDD_SMTP]
+Type=1
+Class=CSMTPPage
+ControlCount=13
+Control1=IDC_EDIT_SERVER,edit,1350631552
+Control2=IDC_EDIT_EMAIL,edit,1350631552
+Control3=IDC_STATIC,static,1342177806
+Control4=IDC_STATIC,static,1342308352
+Control5=IDC_STATIC,static,1342308352
+Control6=IDC_STATIC,static,1342308352
+Control7=IDC_COMBO_SMSDRV,combobox,1344340227
+Control8=IDC_STATIC_PORT,static,1342308352
+Control9=IDC_COMBO_PORT,combobox,1344340227
+Control10=IDC_STATIC,static,1342308352
+Control11=IDC_STATIC,static,1342177296
+Control12=IDC_STATIC,static,1342308352
+Control13=IDC_STATIC,static,1342177296
+
+[DLG:IDD_SUMMARY]
+Type=1
+Class=CSummaryPage
+ControlCount=3
+Control1=IDC_STATIC,static,1342177806
+Control2=IDC_STATIC,static,1342308352
+Control3=IDC_EDIT_SUMMARY,edit,1352665284
+
+[DLG:IDD_PROCESSING]
+Type=1
+Class=CProcessingPage
+ControlCount=3
+Control1=IDC_STATIC,static,1342177806
+Control2=IDC_STATIC_STATUS,static,1342308352
+Control3=IDC_LIST_STATUS,SysListView32,1342291969
+
+[DLG:IDD_SRV_DEPS]
+Type=1
+Class=CSrvDepsPage
+ControlCount=3
+Control1=IDC_STATIC,static,1342177806
+Control2=IDC_STATIC,static,1342308352
+Control3=IDC_LIST_SERVICES,SysListView32,1342259209
+
+[CLS:CSrvDepsPage]
+Type=0
+HeaderFile=SrvDepsPage.h
+ImplementationFile=SrvDepsPage.cpp
+BaseClass=CPropertyPage
+Filter=D
+VirtualFilter=idWC
+LastObject=CSrvDepsPage
+
index 5a9a68a..863231d 100644 (file)
@@ -15,6 +15,7 @@
 #include "ProcessingPage.h"
 #include "ConfigFilePage.h"
 #include "WinSrvPage.h"
+#include "SrvDepsPage.h"
 #include "LoggingPage.h"
 #include "FinishPage.h"
 
@@ -125,19 +126,14 @@ BOOL CNxconfigApp::InitInstance()
 #endif
 
        // Change the registry key under which our settings are stored.
-       // TODO: You should modify this string to be something appropriate
-       // such as the name of your company or organization.
-       SetRegistryKey(_T("Local AppWizard-Generated Applications"));
-
+       SetRegistryKey(_T("NetXMS"));
 
        // To create the main window, this code creates a new frame window
        // object and then sets it as the application's main window object.
-
        CMainFrame* pFrame = new CMainFrame;
        m_pMainWnd = pFrame;
 
        // create and load the frame with its resources
-
        pFrame->LoadFrame(IDR_MAINFRAME,
                WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
                NULL);
@@ -165,6 +161,7 @@ void CNxconfigApp::OnFileCfgWizard()
    CSMTPPage pgSMTP;
    CLoggingPage pgLogging;
    CWinSrvPage pgWinSrv;
+   CSrvDepsPage pgSrvDeps;
    CSummaryPage pgSummary;
    CProcessingPage pgProcessing;
    CFinishPage pgFinish;
@@ -178,6 +175,7 @@ void CNxconfigApp::OnFileCfgWizard()
    dlg.AddPage(&pgSMTP);
    dlg.AddPage(&pgLogging);
    dlg.AddPage(&pgWinSrv);
+   dlg.AddPage(&pgSrvDeps);
    dlg.AddPage(&pgSummary);
    dlg.AddPage(&pgProcessing);
    dlg.AddPage(&pgFinish);
index 228ef43..6602914 100644 (file)
@@ -232,6 +232,10 @@ SOURCE=.\SMTPPage.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=.\SrvDepsPage.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\StdAfx.cpp
 # ADD CPP /Yc"stdafx.h"
 # End Source File
@@ -325,6 +329,10 @@ SOURCE=.\SMTPPage.h
 # End Source File
 # Begin Source File
 
+SOURCE=.\SrvDepsPage.h
+# End Source File
+# Begin Source File
+
 SOURCE=.\StdAfx.h
 # End Source File
 # Begin Source File
index a0339c5..74e25b5 100644 (file)
@@ -104,7 +104,7 @@ BEGIN
 END
 
 IDD_FINISH DIALOGEX 0, 0, 319, 202
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
 CAPTION "Configuration Completed"
 FONT 8, "MS Sans Serif"
 BEGIN
@@ -264,6 +264,20 @@ BEGIN
                     IDC_STATIC_WARNING,125,147,187,29
 END
 
+IDD_SRV_DEPS DIALOGEX 0, 0, 319, 202
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Service Dependencies"
+FONT 8, "MS Sans Serif"
+BEGIN
+    CONTROL         131,IDC_STATIC,"Static",SS_BITMAP | SS_CENTERIMAGE,7,7,
+                    75,188,WS_EX_CLIENTEDGE
+    LTEXT           "Set NetXMS core service to be dependent on:",IDC_STATIC,
+                    89,7,147,8
+    CONTROL         "List1",IDC_LIST_SERVICES,"SysListView32",LVS_REPORT | 
+                    LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | WS_TABSTOP,89,
+                    19,223,176,WS_EX_CLIENTEDGE
+END
+
 
 #ifndef _MAC
 /////////////////////////////////////////////////////////////////////////////
@@ -406,6 +420,14 @@ BEGIN
         TOPMARGIN, 7
         BOTTOMMARGIN, 195
     END
+
+    IDD_SRV_DEPS, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 312
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 195
+    END
 END
 #endif    // APSTUDIO_INVOKED
 
index 28fc2f5..e0442a8 100644 (file)
@@ -22,6 +22,7 @@
 #define IDD_LOG_FILE                    144
 #define IDI_WARN                        145
 #define IDD_SERVICE                     146
+#define IDD_SRV_DEPS                    147
 #define IDC_COMBO_DBDRV                 1000
 #define IDC_COMBO_DBDRV2                1001
 #define IDC_COMBO_DBENGINE              1001
@@ -63,6 +64,7 @@
 #define IDC_EDIT_PASSWD2                1037
 #define IDC_ICON_WARNING                1038
 #define IDC_STATIC_WARNING              1039
+#define IDC_LIST_SERVICES               1040
 #define ID_FILE_CFG_WIZARD              32771
 
 // Next default values for new objects
@@ -70,9 +72,9 @@
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
-#define _APS_NEXT_RESOURCE_VALUE        147
+#define _APS_NEXT_RESOURCE_VALUE        148
 #define _APS_NEXT_COMMAND_VALUE         32772
-#define _APS_NEXT_CONTROL_VALUE         1040
+#define _APS_NEXT_CONTROL_VALUE         1041
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif