зеркало из https://github.com/mozilla/pjs.git
adding new files for the progress bar
This commit is contained in:
Родитель
da55b42344
Коммит
fe4aa6b017
|
@ -0,0 +1,141 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
// NewDialog.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "NewDialog.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CNewDialog dialog
|
||||
|
||||
|
||||
CNewDialog::CNewDialog(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CNewDialog::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CNewDialog)
|
||||
m_EditField = _T("");
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
|
||||
void CNewDialog::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CNewDialog)
|
||||
DDX_Text(pDX, IDC_EDIT1, m_EditField);
|
||||
DDV_INIFile(pDX, m_EditField);
|
||||
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
void CNewDialog::DDV_INIFile(CDataExchange* pDX, CString value)
|
||||
{
|
||||
if(pDX->m_bSaveAndValidate)
|
||||
{
|
||||
value.TrimRight();
|
||||
|
||||
if(value.IsEmpty())
|
||||
{
|
||||
CWnd nbox;
|
||||
nbox.MessageBox("Please enter a Configuration Name" ,"Error",MB_ICONEXCLAMATION);
|
||||
pDX->Fail();
|
||||
}
|
||||
|
||||
else if(value.Right(4) != ".nci")
|
||||
value = value +".nci";
|
||||
|
||||
myData = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CNewDialog, CDialog)
|
||||
//{{AFX_MSG_MAP(CNewDialog)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CNewDialog message handlers
|
||||
|
||||
BOOL CNewDialog::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
CRect tmpRect = CRect(7,7,173,13);
|
||||
|
||||
/*dlg = GetDlgItem(IDC_BASE_TEXT);
|
||||
dlg->SetWindowText("Customization is in Progress");
|
||||
dlg = GetDlgItem(IDC_TITLE_TEXT);
|
||||
dlg->ShowWindow(SW_HIDE);
|
||||
dlg = GetDlgItem(IDC_EDIT1);
|
||||
dlg->ShowWindow(SW_HIDE);
|
||||
dlg = GetDlgItem(IDOK);
|
||||
dlg->ShowWindow(SW_HIDE);
|
||||
dlg = GetDlgItem(IDCANCEL);
|
||||
dlg->ShowWindow(SW_HIDE);
|
||||
*/
|
||||
SetWindowText("Progress");
|
||||
CWnd * dlg;
|
||||
dlg= new CProgressCtrl;
|
||||
((CProgressCtrl*)dlg)->Create(WS_TABSTOP|PBS_VERTICAL, tmpRect, this, 12345);
|
||||
dlg->ShowWindow(SW_SHOW);
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
BOOL CNewDialog::OnCommand(WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
// TODO: Add your specialized code here and/or call the base class
|
||||
|
||||
return CDialog::OnCommand(wParam, lParam);
|
||||
}
|
||||
|
||||
|
||||
void CNewDialog::OnOK()
|
||||
{
|
||||
// TODO: Add extra validation here
|
||||
// UpdateData();
|
||||
// myData = m_EditField;
|
||||
CDialog::OnOK();
|
||||
}
|
||||
|
||||
void CNewDialog::OnCancel()
|
||||
{
|
||||
// TODO: Add extra cleanup here
|
||||
|
||||
CDialog::OnCancel();
|
||||
}
|
||||
|
||||
CString CNewDialog::GetData()
|
||||
{
|
||||
return myData;
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
#include "resource.h"
|
||||
// NewDialog.h : header file
|
||||
//
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CNewDialog dialog
|
||||
|
||||
class CNewDialog : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CNewDialog(CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CNewDialog)
|
||||
enum { IDD = IDD_NEW_DIALOG };
|
||||
CString m_DataField;
|
||||
CString m_EditField;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
CString myData;
|
||||
CString GetData();
|
||||
void DDV_INIFile(CDataExchange* pDX, CString value);
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CNewDialog)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CNewDialog)
|
||||
virtual BOOL OnInitDialog();
|
||||
virtual void OnOK();
|
||||
virtual void OnCancel();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
|
@ -5,7 +5,8 @@
|
|||
#include "comp.h"
|
||||
#include "ib.h"
|
||||
#include <afxtempl.h>
|
||||
|
||||
#include "resource.h"
|
||||
#include "NewDialog.h"
|
||||
#define MAX_SIZE 1024
|
||||
|
||||
int interpret(char *cmd);
|
||||
|
@ -397,11 +398,6 @@ int StartIB(CString parms, WIDGET *curWidget)
|
|||
char *fgetsrv;
|
||||
int rv = TRUE;
|
||||
char olddir[1024];
|
||||
// CRect tmpRect = CRect(100,100,200,200);
|
||||
// CProgressCtrl progressBar;
|
||||
// CWnd* wndhandle = AfxGetMainWnd();
|
||||
// progressBar.Create( PBS_SMOOTH, tmpRect, wndhandle, 3456 );
|
||||
|
||||
|
||||
rootPath = GetGlobal("Root");
|
||||
configName = GetGlobal("CustomizationList");
|
||||
|
@ -421,6 +417,10 @@ int StartIB(CString parms, WIDGET *curWidget)
|
|||
iniSrcPath = nscpxpiPath + "\\config.ini";
|
||||
|
||||
init_components();
|
||||
|
||||
CNewDialog newprog;
|
||||
newprog.Create(IDD_NEW_DIALOG,NULL );
|
||||
newprog.ShowWindow(SW_SHOW);
|
||||
|
||||
_mkdir((char *)(LPCTSTR) cdPath);
|
||||
_mkdir((char *)(LPCTSTR) tempPath);
|
||||
|
@ -526,6 +526,7 @@ int StartIB(CString parms, WIDGET *curWidget)
|
|||
ReplaceINIFile();
|
||||
|
||||
SetCurrentDirectory(olddir);
|
||||
newprog.DestroyWindow();
|
||||
|
||||
return rv;
|
||||
|
||||
|
|
|
@ -0,0 +1,145 @@
|
|||
//Microsoft Developer Studio 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 DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
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\r\n"
|
||||
"#include ""afxres.rc"" // Standard components\r\n"
|
||||
"#endif\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_NEWCONFIG_DIALOG DIALOG DISCARDABLE 0, 0, 266, 119
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Create New Configuration"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
EDITTEXT IDC_EDIT1,7,20,218,13,ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "Create New Configuration",IDOK,109,98,94,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,209,98,50,14
|
||||
LTEXT "Name of new configuration:",IDC_STATIC,7,7,173,13
|
||||
LTEXT "The CCK tool creates a new configuration directory in C:\\CCK\\Configs. Within your new configuration directory, the CCK tool creates a \\Workspace directory, for example, C:\\CCK\\Configs\\CustomBuild01\\Workspace.",
|
||||
IDC_STATIC1,7,39,253,26
|
||||
LTEXT "You can use the Workspace directory as a convenient place in which to store your custom files.",
|
||||
IDC_STATIC2,7,69,248,17
|
||||
END
|
||||
|
||||
IDD_NEW_DIALOG DIALOG DISCARDABLE 0, 0, 187, 95
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "New Dialog"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
EDITTEXT IDC_EDIT1,7,20,152,13,ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "Create",IDOK,77,74,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,130,74,50,14
|
||||
LTEXT "Please provide a name for the NCI file:",IDC_TITLE_TEXT,
|
||||
7,7,173,13
|
||||
LTEXT "Please note that the file name must end with .nci",
|
||||
IDC_BASE_TEXT,7,39,173,17
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_NEWCONFIG_DIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 259
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 112
|
||||
END
|
||||
|
||||
IDD_NEW_DIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 180
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 88
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#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
|
||||
#include "afxres.rc" // Standard components
|
||||
#endif
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
|
@ -27,9 +27,12 @@ LIBRARY_NAME=ibengine
|
|||
|
||||
MODULE=ib
|
||||
REQUIRES=
|
||||
MAPFILE=$(MODULE).map
|
||||
RESFILE=ib.res
|
||||
IS_COMPONENT = 1
|
||||
|
||||
OBJS= \
|
||||
.\$(OBJDIR)\NewDialog.obj \
|
||||
.\$(OBJDIR)\wizshell.obj \
|
||||
.\$(OBJDIR)\ib.obj \
|
||||
.\$(OBJDIR)\comp.obj \
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by WizardMachine.rc
|
||||
//
|
||||
#define IDM_ABOUTBOX 0x0010
|
||||
#define IDD_ABOUTBOX 100
|
||||
#define IDS_ABOUTBOX 101
|
||||
#define IDD_WIZARDMACHINE_DIALOG 102
|
||||
#define IDS_STRING102 102
|
||||
#define IDS_STRING103 103
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDD_BASE_DIALOG 129
|
||||
#define IDD_IMAGE_DIALOG 136
|
||||
#define IDD_DIALOG1 137
|
||||
#define IDD_CREATE_DIALOG 138
|
||||
#define IDD_NEW_DIALOG 140
|
||||
#define IDD_IMG_DLG 141
|
||||
#define IDR_ACCELERATOR1 142
|
||||
#define IDD_PROGRESS_DLG 146
|
||||
#define IDD_DIALOG112 153
|
||||
#define IDD_NEWCONFIG_DIALOG 159
|
||||
#define IDD_DIALOG131 161
|
||||
#define IDC_EDIT1 1001
|
||||
#define IDC_TITLE_TEXT 1003
|
||||
#define IDC_BASE_TEXT 1004
|
||||
#define IDC_HELP_BUTTON 1005
|
||||
#define IDC_BUTTON1 1007
|
||||
#define ID_HELP_EDIT 1007
|
||||
#define IDC_STATIC1 1008
|
||||
#define IDC_STATIC2 1009
|
||||
#define IDC_PROGRESS1 1036
|
||||
#define IDC_PROGESSTEXT_STATIC 1037
|
||||
#define IDD_HELP_DLG 1537
|
||||
#define IDD_SUMMARY 1538
|
||||
#define IDD_WIZ_HELP 1539
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 143
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1010
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
|
@ -38,7 +38,7 @@ void CreateRshell (void)
|
|||
ofstream rshell(Rsh);
|
||||
CString fvalue1=GetGlobal("ShellTitleText");
|
||||
CString fvalue2=GetGlobal("ShellBgBitmap");
|
||||
char *fvalue3=GetGlobal("ShellBelowTitleText");
|
||||
CString fvalue3=GetGlobal("ShellBelowTitleText");
|
||||
CString fvalue4=GetGlobal("ShellInstallTextFile");
|
||||
char jsprefname[200];
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче