1
This commit is contained in:
50
utils/vmpi/vmpi_services_watch/PatchTimeout.cpp
Normal file
50
utils/vmpi/vmpi_services_watch/PatchTimeout.cpp
Normal file
@ -0,0 +1,50 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
// PatchTimeout.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "PatchTimeout.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPatchTimeout dialog
|
||||
|
||||
|
||||
CPatchTimeout::CPatchTimeout(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CPatchTimeout::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CPatchTimeout)
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
|
||||
void CPatchTimeout::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CPatchTimeout)
|
||||
DDX_Text(pDX, IDC_COMMAND_LINE, m_PatchDirectory);
|
||||
DDX_Text(pDX, IDC_VMPI_TRANSFER_DIRECTORY, m_VMPITransferDirectory);
|
||||
DDX_Check(pDX, IDC_FORCE_PATCH, m_bForcePatch);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CPatchTimeout, CDialog)
|
||||
//{{AFX_MSG_MAP(CPatchTimeout)
|
||||
// NOTE: the ClassWizard will add message map macros here
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPatchTimeout message handlers
|
57
utils/vmpi/vmpi_services_watch/PatchTimeout.h
Normal file
57
utils/vmpi/vmpi_services_watch/PatchTimeout.h
Normal file
@ -0,0 +1,57 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
#if !defined(AFX_PATCHTIMEOUT_H__2D87CBF2_AC88_4F23_BB43_CC8A5C248B64__INCLUDED_)
|
||||
#define AFX_PATCHTIMEOUT_H__2D87CBF2_AC88_4F23_BB43_CC8A5C248B64__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
// PatchTimeout.h : header file
|
||||
//
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CPatchTimeout dialog
|
||||
|
||||
class CPatchTimeout : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CPatchTimeout(CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CPatchTimeout)
|
||||
enum { IDD = IDD_TIMEOUT };
|
||||
CString m_PatchDirectory;
|
||||
CString m_VMPITransferDirectory;
|
||||
int m_bForcePatch;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CPatchTimeout)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CPatchTimeout)
|
||||
// NOTE: the ClassWizard will add member functions here
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_PATCHTIMEOUT_H__2D87CBF2_AC88_4F23_BB43_CC8A5C248B64__INCLUDED_)
|
1161
utils/vmpi/vmpi_services_watch/ServicesDlg.cpp
Normal file
1161
utils/vmpi/vmpi_services_watch/ServicesDlg.cpp
Normal file
File diff suppressed because it is too large
Load Diff
150
utils/vmpi/vmpi_services_watch/ServicesDlg.h
Normal file
150
utils/vmpi/vmpi_services_watch/ServicesDlg.h
Normal file
@ -0,0 +1,150 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
#if !defined(AFX_SERVICESDLG_H__FD755233_0A7A_4CBB_BA5E_A5D0B3B5F830__INCLUDED_)
|
||||
#define AFX_SERVICESDLG_H__FD755233_0A7A_4CBB_BA5E_A5D0B3B5F830__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
// ServicesDlg.h : header file
|
||||
//
|
||||
|
||||
#include "iphelpers.h"
|
||||
#include "idle_dialog.h"
|
||||
#include "utllinkedlist.h"
|
||||
#include "resource.h"
|
||||
#include "window_anchor_mgr.h"
|
||||
#include "net_view_thread.h"
|
||||
#include "vmpi_defs.h"
|
||||
|
||||
|
||||
class CServiceInfo
|
||||
{
|
||||
public:
|
||||
|
||||
bool IsOff() const; // Returns true if the time since we've heard from this guy is too long.
|
||||
|
||||
|
||||
public:
|
||||
|
||||
CString m_ComputerName;
|
||||
CString m_MasterName;
|
||||
CString m_Password;
|
||||
int m_iState;
|
||||
|
||||
// Since the live time is always changing, we only update it every 10 seconds or so.
|
||||
DWORD m_LiveTimeMS; // How long the service has been running (in milliseconds).
|
||||
|
||||
DWORD m_WorkerAppTimeMS; // How long the worker app has been running (0 if it's not running).
|
||||
|
||||
DWORD m_LastPingTimeMS; // Last time we heard from this machine. Used to detect if the service
|
||||
// is off or not.
|
||||
|
||||
// Used to detect if we need to re-sort the list.
|
||||
const char *m_pLastStatusText;
|
||||
DWORD m_LastLiveTimeMS;
|
||||
CString m_LastMasterName;
|
||||
|
||||
int m_CPUPercentage;
|
||||
CString m_ExeName;
|
||||
CString m_MapName;
|
||||
int m_MemUsageMB;
|
||||
|
||||
// Last time we updated the service in the listbox.. used to make sure we update its on/off status
|
||||
// every once in a while.
|
||||
DWORD m_LastUpdateTime;
|
||||
|
||||
int m_ProtocolVersion; // i.e. the service's VMPI_SERVICE_PROTOCOL_VERSION.
|
||||
char m_ServiceVersion[32]; // Version string.
|
||||
|
||||
CIPAddr m_Addr;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CServicesDlg dialog
|
||||
|
||||
class CServicesDlg : public CIdleDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CServicesDlg(CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CServicesDlg)
|
||||
enum { IDD = IDD_SERVICES };
|
||||
CStatic m_NumServicesControl;
|
||||
CStatic m_NumDisabledServicesControl;
|
||||
CStatic m_NumWorkingServicesControl;
|
||||
CStatic m_NumWaitingServicesControl;
|
||||
CStatic m_NumOffServicesControl;
|
||||
CStatic m_PasswordDisplay;
|
||||
CListCtrl m_ServicesList;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CServicesDlg)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
void BuildVMPIPingPacket( CUtlVector<char> &out, char cPacketID, unsigned char cProtocolVersion=VMPI_PROTOCOL_VERSION, bool bIgnorePassword=false );
|
||||
|
||||
virtual void OnIdle();
|
||||
|
||||
|
||||
CServiceInfo* FindServiceByComputerName( const char *pComputerName );
|
||||
void SendToSelectedServices( const char *pData, int len );
|
||||
void UpdateServiceInListbox( CServiceInfo *pInfo );
|
||||
void UpdateServiceCountDisplay();
|
||||
void ResortItems();
|
||||
|
||||
void UpdateServicesFromNetMessages();
|
||||
void UpdateServicesFromNetView();
|
||||
void BuildClipboardText( CUtlVector<char> &clipboardText );
|
||||
|
||||
|
||||
ISocket *m_pServicesPingSocket;
|
||||
DWORD m_dwLastServicesPing; // Last time we pinged all the services.
|
||||
|
||||
// Restricts the password so we only see a particular set of VMPI services.
|
||||
CString m_Password;
|
||||
|
||||
CUtlLinkedList<CServiceInfo*, int> m_Services;
|
||||
CNetViewThread m_NetViewThread;
|
||||
|
||||
|
||||
CWindowAnchorMgr m_AnchorMgr;
|
||||
|
||||
bool m_bListChanged; // Used to detect if we need to re-sort the list.
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CServicesDlg)
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnPatchServices();
|
||||
afx_msg void OnStopServices();
|
||||
afx_msg void OnStopJobs();
|
||||
afx_msg void OnFilterByPassword();
|
||||
afx_msg void OnForcePassword();
|
||||
afx_msg void OnCopyToClipboard();
|
||||
afx_msg void OnDblclkServicesList(NMHDR* pNMHDR, LRESULT* pResult);
|
||||
afx_msg void OnSize(UINT nType, int cx, int cy);
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_SERVICESDLG_H__FD755233_0A7A_4CBB_BA5E_A5D0B3B5F830__INCLUDED_)
|
49
utils/vmpi/vmpi_services_watch/SetPasswordDlg.cpp
Normal file
49
utils/vmpi/vmpi_services_watch/SetPasswordDlg.cpp
Normal file
@ -0,0 +1,49 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
// SetPasswordDlg.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "SetPasswordDlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CSetPasswordDlg dialog
|
||||
|
||||
|
||||
CSetPasswordDlg::CSetPasswordDlg(int dlgID, CWnd* pParent /*=NULL*/)
|
||||
: CDialog(dlgID, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CSetPasswordDlg)
|
||||
m_Password = _T("");
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
|
||||
void CSetPasswordDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CSetPasswordDlg)
|
||||
DDX_Text(pDX, IDC_PASSWORD, m_Password);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CSetPasswordDlg, CDialog)
|
||||
//{{AFX_MSG_MAP(CSetPasswordDlg)
|
||||
// NOTE: the ClassWizard will add message map macros here
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CSetPasswordDlg message handlers
|
54
utils/vmpi/vmpi_services_watch/SetPasswordDlg.h
Normal file
54
utils/vmpi/vmpi_services_watch/SetPasswordDlg.h
Normal file
@ -0,0 +1,54 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
#if !defined(AFX_SETPASSWORDDLG_H__A349B943_49B8_4C7E_863B_BF1929AD5443__INCLUDED_)
|
||||
#define AFX_SETPASSWORDDLG_H__A349B943_49B8_4C7E_863B_BF1929AD5443__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
// SetPasswordDlg.h : header file
|
||||
//
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CSetPasswordDlg dialog
|
||||
|
||||
class CSetPasswordDlg : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CSetPasswordDlg(int dlgID, CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CSetPasswordDlg)
|
||||
CString m_Password;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CSetPasswordDlg)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CSetPasswordDlg)
|
||||
// NOTE: the ClassWizard will add member functions here
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_SETPASSWORDDLG_H__A349B943_49B8_4C7E_863B_BF1929AD5443__INCLUDED_)
|
15
utils/vmpi/vmpi_services_watch/StdAfx.cpp
Normal file
15
utils/vmpi/vmpi_services_watch/StdAfx.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// vmpi_browser_services.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
|
35
utils/vmpi/vmpi_services_watch/StdAfx.h
Normal file
35
utils/vmpi/vmpi_services_watch/StdAfx.h
Normal file
@ -0,0 +1,35 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#if !defined(AFX_STDAFX_H__BC4FB757_77BB_4E3A_8842_290307F41798__INCLUDED_)
|
||||
#define AFX_STDAFX_H__BC4FB757_77BB_4E3A_8842_290307F41798__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include "tier0/wchartypes.h"
|
||||
#include <afxwin.h> // MFC core and standard components
|
||||
#include <afxext.h> // MFC extensions
|
||||
#include <afxdisp.h> // MFC Automation classes
|
||||
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // MFC support for Windows Common Controls
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_STDAFX_H__BC4FB757_77BB_4E3A_8842_290307F41798__INCLUDED_)
|
BIN
utils/vmpi/vmpi_services_watch/res/vmpi.ico
Normal file
BIN
utils/vmpi/vmpi_services_watch/res/vmpi.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
BIN
utils/vmpi/vmpi_services_watch/res/vmpi_browser_services.ico
Normal file
BIN
utils/vmpi/vmpi_services_watch/res/vmpi_browser_services.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
13
utils/vmpi/vmpi_services_watch/res/vmpi_browser_services.rc2
Normal file
13
utils/vmpi/vmpi_services_watch/res/vmpi_browser_services.rc2
Normal file
@ -0,0 +1,13 @@
|
||||
//
|
||||
// VMPI_BROWSER_SERVICES.RC2 - resources Microsoft Visual C++ does not edit directly
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#error this file is not editable by Microsoft Visual C++
|
||||
#endif //APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Add manually edited resources here...
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
48
utils/vmpi/vmpi_services_watch/resource.h
Normal file
48
utils/vmpi/vmpi_services_watch/resource.h
Normal file
@ -0,0 +1,48 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by vmpi_browser_services.rc
|
||||
//
|
||||
#define IDD_VMPI_BROWSER_SERVICES_DIALOG 102
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDD_SET_PASSWORD 130
|
||||
#define IDD_SERVICES 133
|
||||
#define IDD_TIMEOUT 134
|
||||
#define IDD_FORCE_PASSWORD 135
|
||||
#define IDC_CURRENT_PASSWORD_LABEL 1000
|
||||
#define IDC_PASSWORD 1001
|
||||
#define IDC_NUM_SERVICES_LABEL 1001
|
||||
#define IDC_NUM_DISABLED_SERVICES_LABEL 1002
|
||||
#define IDC_COMMAND_LINE 1002
|
||||
#define IDC_NUM_WORKING_SERVICES_LABEL 1003
|
||||
#define IDC_VMPI_TRANSFER_DIRECTORY 1003
|
||||
#define IDC_NUM_WAITING_SERVICES_LABEL 1004
|
||||
#define IDC_CHECK1 1004
|
||||
#define IDC_FORCE_PATCH 1004
|
||||
#define IDC_TIMEOUT_SECONDS 1005
|
||||
#define IDC_NUM_OFF_SERVICES_LABEL 1005
|
||||
#define IDC_SERVICES_LIST 1009
|
||||
#define ID_PATCH_SERVICES 1010
|
||||
#define ID_STOP_SERVICES 1011
|
||||
#define ID_STOP_JOBS 1012
|
||||
#define ID_CHANGE_PASSWORD 1013
|
||||
#define ID_FILTER_BY_PASSWORD 1013
|
||||
#define IDC_CURRENT_PASSWORD 1014
|
||||
#define ID_COPY_TO_CLIPBOARD 1015
|
||||
#define IDC_NUM_SERVICES 1016
|
||||
#define IDC_NUM_DISABLED_SERVICES 1017
|
||||
#define IDC_NUM_WORKING_SERVICES 1018
|
||||
#define IDC_NUM_WAITING_SERVICES 1019
|
||||
#define IDC_NUM_OFF_SERVICES 1020
|
||||
#define ID_FORCE_PASSWORD 1022
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 129
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1005
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
81
utils/vmpi/vmpi_services_watch/vmpi_browser_services.cpp
Normal file
81
utils/vmpi/vmpi_services_watch/vmpi_browser_services.cpp
Normal file
@ -0,0 +1,81 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
// vmpi_browser_services.cpp : Defines the class behaviors for the application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "vmpi_browser_services.h"
|
||||
#include "ServicesDlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CVMPIBrowserServicesApp
|
||||
|
||||
BEGIN_MESSAGE_MAP(CVMPIBrowserServicesApp, CWinApp)
|
||||
//{{AFX_MSG_MAP(CVMPIBrowserServicesApp)
|
||||
// NOTE - the ClassWizard will add and remove mapping macros here.
|
||||
// DO NOT EDIT what you see in these blocks of generated code!
|
||||
//}}AFX_MSG
|
||||
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CVMPIBrowserServicesApp construction
|
||||
|
||||
CVMPIBrowserServicesApp::CVMPIBrowserServicesApp()
|
||||
{
|
||||
// TODO: add construction code here,
|
||||
// Place all significant initialization in InitInstance
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// The one and only CVMPIBrowserServicesApp object
|
||||
|
||||
CVMPIBrowserServicesApp theApp;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CVMPIBrowserServicesApp initialization
|
||||
|
||||
BOOL CVMPIBrowserServicesApp::InitInstance()
|
||||
{
|
||||
AfxEnableControlContainer();
|
||||
|
||||
// Standard initialization
|
||||
// If you are not using these features and wish to reduce the size
|
||||
// of your final executable, you should remove from the following
|
||||
// the specific initialization routines you do not need.
|
||||
|
||||
#ifdef _AFXDLL
|
||||
Enable3dControls(); // Call this when using MFC in a shared DLL
|
||||
#else
|
||||
Enable3dControlsStatic(); // Call this when linking to MFC statically
|
||||
#endif
|
||||
|
||||
CServicesDlg dlg;
|
||||
m_pMainWnd = &dlg;
|
||||
int nResponse = dlg.DoModal();
|
||||
if (nResponse == IDOK)
|
||||
{
|
||||
// TODO: Place code here to handle when the dialog is
|
||||
// dismissed with OK
|
||||
}
|
||||
else if (nResponse == IDCANCEL)
|
||||
{
|
||||
// TODO: Place code here to handle when the dialog is
|
||||
// dismissed with Cancel
|
||||
}
|
||||
|
||||
// Since the dialog has been closed, return FALSE so that we exit the
|
||||
// application, rather than start the application's message pump.
|
||||
return FALSE;
|
||||
}
|
56
utils/vmpi/vmpi_services_watch/vmpi_browser_services.h
Normal file
56
utils/vmpi/vmpi_services_watch/vmpi_browser_services.h
Normal file
@ -0,0 +1,56 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
// vmpi_browser_services.h : main header file for the VMPI_BROWSER_SERVICES application
|
||||
//
|
||||
|
||||
#if !defined(AFX_VMPI_BROWSER_SERVICES_H__B03E2165_4E70_48AC_A991_EB0289A3471E__INCLUDED_)
|
||||
#define AFX_VMPI_BROWSER_SERVICES_H__B03E2165_4E70_48AC_A991_EB0289A3471E__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#ifndef __AFXWIN_H__
|
||||
#error include 'stdafx.h' before including this file for PCH
|
||||
#endif
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CVMPIBrowserServicesApp:
|
||||
// See vmpi_browser_services.cpp for the implementation of this class
|
||||
//
|
||||
|
||||
class CVMPIBrowserServicesApp : public CWinApp
|
||||
{
|
||||
public:
|
||||
CVMPIBrowserServicesApp();
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CVMPIBrowserServicesApp)
|
||||
public:
|
||||
virtual BOOL InitInstance();
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
|
||||
//{{AFX_MSG(CVMPIBrowserServicesApp)
|
||||
// NOTE - the ClassWizard will add and remove member functions here.
|
||||
// DO NOT EDIT what you see in these blocks of generated code !
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_VMPI_BROWSER_SERVICES_H__B03E2165_4E70_48AC_A991_EB0289A3471E__INCLUDED_)
|
249
utils/vmpi/vmpi_services_watch/vmpi_browser_services.rc
Normal file
249
utils/vmpi/vmpi_services_watch/vmpi_browser_services.rc
Normal file
@ -0,0 +1,249 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
|
||||
"#ifdef _WIN32\r\n"
|
||||
"LANGUAGE 9, 1\r\n"
|
||||
"#pragma code_page(1252)\r\n"
|
||||
"#endif //_WIN32\r\n"
|
||||
"#include ""res\\vmpi_browser_services.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
|
||||
"#include ""afxres.rc"" // Standard components\r\n"
|
||||
"#endif\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDR_MAINFRAME ICON "res\\vmpi.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904B0"
|
||||
BEGIN
|
||||
VALUE "FileDescription", "vmpi_browser_services MFC Application"
|
||||
VALUE "FileVersion", "1, 0, 0, 1"
|
||||
VALUE "InternalName", "vmpi_browser_services"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2003"
|
||||
VALUE "OriginalFilename", "vmpi_browser_services.EXE"
|
||||
VALUE "ProductName", "vmpi_browser_services Application"
|
||||
VALUE "ProductVersion", "1, 0, 0, 1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_SERVICES, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 791
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 246
|
||||
END
|
||||
|
||||
IDD_TIMEOUT, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 355
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 159
|
||||
END
|
||||
|
||||
IDD_SET_PASSWORD, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 212
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 91
|
||||
END
|
||||
|
||||
IDD_FORCE_PASSWORD, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 212
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 71
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_SERVICES DIALOGEX 0, 0, 798, 253
|
||||
STYLE DS_SETFONT | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
|
||||
CAPTION "VMPI Services"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
BEGIN
|
||||
CONTROL "List1",IDC_SERVICES_LIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,7,7,784,155
|
||||
DEFPUSHBUTTON "Filter By Password",ID_FILTER_BY_PASSWORD,715,166,76,14
|
||||
DEFPUSHBUTTON "Copy To Clipboard",ID_COPY_TO_CLIPBOARD,7,232,76,14
|
||||
DEFPUSHBUTTON "Force Password",ID_FORCE_PASSWORD,184,232,76,14
|
||||
DEFPUSHBUTTON "Stop Service(s)",ID_STOP_SERVICES,361,232,76,14
|
||||
DEFPUSHBUTTON "Stop Job(s)",ID_STOP_JOBS,538,232,76,14
|
||||
DEFPUSHBUTTON "Patch Services",ID_PATCH_SERVICES,715,232,76,14
|
||||
LTEXT "Filtering By Password:",IDC_CURRENT_PASSWORD_LABEL,128,169,70,8
|
||||
LTEXT "",IDC_CURRENT_PASSWORD,198,169,55,8
|
||||
LTEXT "# Machines:",IDC_NUM_SERVICES_LABEL,7,169,40,8
|
||||
LTEXT "2",IDC_NUM_SERVICES,47,169,55,8
|
||||
LTEXT "# Disabled:",IDC_NUM_DISABLED_SERVICES_LABEL,7,181,37,8
|
||||
LTEXT "2",IDC_NUM_DISABLED_SERVICES,47,181,55,8
|
||||
LTEXT "# Working:",IDC_NUM_WORKING_SERVICES_LABEL,7,192,36,8
|
||||
LTEXT "2",IDC_NUM_WORKING_SERVICES,47,192,55,8
|
||||
LTEXT "# Waiting:",IDC_NUM_WAITING_SERVICES_LABEL,7,203,34,8
|
||||
LTEXT "2",IDC_NUM_WAITING_SERVICES,47,203,55,8
|
||||
LTEXT "# Off:",IDC_NUM_OFF_SERVICES_LABEL,7,214,19,8
|
||||
LTEXT "2",IDC_NUM_OFF_SERVICES,47,214,55,8
|
||||
END
|
||||
|
||||
IDD_TIMEOUT DIALOGEX 0, 0, 362, 166
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Patch"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
BEGIN
|
||||
EDITTEXT IDC_COMMAND_LINE,93,78,262,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_VMPI_TRANSFER_DIRECTORY,93,98,262,14,ES_AUTOHSCROLL
|
||||
CONTROL "Force Patch (otherwise, the service will ignore the patch if the new version is not higher)",IDC_FORCE_PATCH,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,121,291,10
|
||||
DEFPUSHBUTTON "OK",IDOK,123,145,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,189,145,50,14
|
||||
LTEXT "This will setup all the selected services to be patched.",IDC_STATIC,7,7,348,11
|
||||
LTEXT "Patch Directory:",IDC_STATIC,7,81,52,8
|
||||
LTEXT "First, it will run vmpi_transfer from the VMPI_Transfer directory. This is kept separate because the vmpi_transfer.exe in that directory might be a different version than the new one in the patch directory.",IDC_STATIC,7,21,348,18
|
||||
LTEXT "VMPI_Transfer Directory:",IDC_STATIC,7,101,80,8
|
||||
LTEXT "The selected services will download the patch files, then run vmpi_service_install.",IDC_STATIC,7,42,348,13
|
||||
END
|
||||
|
||||
IDD_SET_PASSWORD DIALOGEX 0, 0, 219, 98
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Filter By Password"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
BEGIN
|
||||
EDITTEXT IDC_PASSWORD,7,56,205,14,ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,7,77,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,162,77,50,14
|
||||
LTEXT "This will cause the services browser to only show services that are using the specified password.\n\nIf you enter a blank password, then all services will be shown regardless of their password.",IDC_CURRENT_PASSWORD_LABEL,7,7,195,46
|
||||
END
|
||||
|
||||
IDD_FORCE_PASSWORD DIALOGEX 0, 0, 219, 78
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Force Password"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
BEGIN
|
||||
EDITTEXT IDC_PASSWORD,7,38,205,14,ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,7,57,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,162,57,50,14
|
||||
LTEXT "This will set the specified password on all selected services. VMPI jobs must run with -mpi_pw <password> to use those services.",IDC_CURRENT_PASSWORD_LABEL,7,7,195,27
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE 9, 1
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
#include "res\vmpi_browser_services.rc2" // non-Microsoft Visual C++ edited resources
|
||||
#include "afxres.rc" // Standard components
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
72
utils/vmpi/vmpi_services_watch/vmpi_services_watch.vpc
Normal file
72
utils/vmpi/vmpi_services_watch/vmpi_services_watch.vpc
Normal file
@ -0,0 +1,72 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// vmpi_services_watch.VPC
|
||||
//
|
||||
// Project Script
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
$Macro SRCDIR "..\..\.."
|
||||
$Macro OUTBINDIR "$SRCDIR\..\game\bin"
|
||||
$Macro OUTBINNAME "vmpi_services_watch"
|
||||
|
||||
$Include "$SRCDIR\vpc_scripts\source_exe_base.vpc"
|
||||
|
||||
$Configuration
|
||||
{
|
||||
$Compiler
|
||||
{
|
||||
$AdditionalIncludeDirectories "$BASE;.\;..\;..\..\common"
|
||||
$PreprocessorDefinitions "$BASE;PROTECTED_THINGS_DISABLE;WINVER=0x501;NO_WARN_MBCS_MFC_DEPRECATION"
|
||||
$EnableC++Exceptions "Yes (/EHsc)"
|
||||
}
|
||||
|
||||
$Linker
|
||||
{
|
||||
$AdditionalDependencies "$BASE ws2_32.lib"
|
||||
}
|
||||
}
|
||||
|
||||
$Project "vmpi_services_watch"
|
||||
{
|
||||
$Folder "Source Files"
|
||||
{
|
||||
-$File "$SRCDIR\public\tier0\memoverride.cpp"
|
||||
|
||||
$File "..\idle_dialog.cpp"
|
||||
$File "..\net_view_thread.cpp"
|
||||
$File "PatchTimeout.cpp"
|
||||
$File "ServicesDlg.cpp"
|
||||
$File "SetPasswordDlg.cpp"
|
||||
$File "..\vmpi_browser_helpers.cpp"
|
||||
$File "vmpi_browser_services.cpp"
|
||||
$File "vmpi_browser_services.rc"
|
||||
$File "..\win_idle.cpp"
|
||||
$File "..\window_anchor_mgr.cpp"
|
||||
$File "StdAfx.cpp"
|
||||
}
|
||||
|
||||
$Folder "Header Files"
|
||||
{
|
||||
$File "..\idle_dialog.h"
|
||||
$File "..\net_view_thread.h"
|
||||
$File "PatchTimeout.h"
|
||||
$File "Resource.h"
|
||||
$File "ServicesDlg.h"
|
||||
$File "SetPasswordDlg.h"
|
||||
$File "StdAfx.h"
|
||||
$File "vmpi_browser_services.h"
|
||||
$File "..\vmpi_defs.h"
|
||||
$File "..\win_idle.h"
|
||||
$File "..\window_anchor_mgr.h"
|
||||
}
|
||||
|
||||
$Folder "Resources"
|
||||
{
|
||||
$File "res\vmpi_browser_services.ico"
|
||||
$File "res\vmpi_browser_services.rc2"
|
||||
}
|
||||
|
||||
$Folder "Link Libraries"
|
||||
{
|
||||
$Lib vmpi
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user