Remove CMakeSetup. Long live cmake-gui, start building Qt now.

This commit is contained in:
Bill Hoffman 2009-09-03 17:01:07 -04:00
parent 766f6608bf
commit 1554265aa6
28 changed files with 9 additions and 4477 deletions

View File

@ -18,14 +18,9 @@ if(CPACK_GENERATOR MATCHES "NSIS")
"doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/ctest.html" "CTest Help"
"doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake-modules.html" "CMake Modules Help"
"doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake-commands.html" "CMake Commands Help"
"doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/CMakeSetup.html" "CMakeSetup Help"
"doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cpack.html" "CPack Help"
"http://www.cmake.org" "CMake Web Site"
)
# tell cpack the executables you want in the start menu as links
SET(CPACK_PACKAGE_EXECUTABLES "CMakeSetup" "CMakeSetup(deprecated)" )
# tell cpack to create a desktop link to CMakeSetup
SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\CMakeSetup.exe")
SET(CPACK_NSIS_DISPLAY_NAME "CMake @CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@ a cross-platform, open-source build system")
SET(CPACK_NSIS_PACKAGE_NAME "CMake @CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@")
SET(CPACK_NSIS_HELP_LINK "http://www.cmake.org")

View File

@ -76,55 +76,12 @@ ENDMACRO(CMAKE_HANDLE_SYSTEM_LIBRARIES)
#-----------------------------------------------------------------------
# a macro to check for MFC and setup to build the MFC Dialog
# simply to improve readability of the main script
#-----------------------------------------------------------------------
MACRO(CMAKE_TEST_FOR_MFC)
SET(CMAKE_BUILD_ON_VISUAL_STUDIO 0)
IF(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
SET(CMAKE_BUILD_ON_VISUAL_STUDIO 1)
ENDIF(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW )
IF(CMAKE_BUILD_ON_VISUAL_STUDIO)
IF("CMake_HAVE_MFC" MATCHES "^CMake_HAVE_MFC$")
SET(CHECK_INCLUDE_FILE_VAR "afxwin.h")
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx)
MESSAGE(STATUS "Looking for MFC")
TRY_COMPILE(CMake_HAVE_MFC
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx
CMAKE_FLAGS
-DCMAKE_MFC_FLAG:STRING=2
-DCOMPILE_DEFINITIONS:STRING=-D_AFXDLL
OUTPUT_VARIABLE OUTPUT)
IF(CMake_HAVE_MFC)
MESSAGE(STATUS "Looking for MFC - found")
SET(CMake_HAVE_MFC 1 CACHE INTERNAL "Have MFC?")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if MFC exists passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(CMake_HAVE_MFC)
MESSAGE(STATUS "Looking for MFC - not found")
SET(CMake_HAVE_MFC 0 CACHE INTERNAL "Have MFC?")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if MFC exists failed with the following output:\n"
"${OUTPUT}\n\n")
ENDIF(CMake_HAVE_MFC)
ENDIF("CMake_HAVE_MFC" MATCHES "^CMake_HAVE_MFC$")
IF(CMake_HAVE_MFC)
OPTION(BUILD_MFCDialog "Whether to build the CMakeSetup MFC dialog." ON)
ELSE(CMake_HAVE_MFC)
SET(BUILD_MFCDialog 0)
ENDIF(CMake_HAVE_MFC)
ELSE(CMAKE_BUILD_ON_VISUAL_STUDIO)
SET(BUILD_MFCDialog 0)
ENDIF(CMAKE_BUILD_ON_VISUAL_STUDIO)
ENDMACRO(CMAKE_TEST_FOR_MFC)
#-----------------------------------------------------------------------
# a macro to determine the generator and ctest executable to use
@ -447,9 +404,6 @@ IF (UNIX)
ENDIF (UNIX)
# should we build the MFC dialog? (a macro defined in this file)
CMAKE_TEST_FOR_MFC()
# add the uninstall support
CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"

View File

@ -469,12 +469,6 @@ IF(BUILD_CursesDialog)
INCLUDE(${CMake_SOURCE_DIR}/Source/CursesDialog/CMakeLists.txt)
ENDIF(BUILD_CursesDialog)
# MFC GUI
# MFC libraries are only available on Visual Studio
IF(BUILD_MFCDialog)
SUBDIRS(MFCDialog)
ENDIF(BUILD_MFCDialog)
# Qt GUI
OPTION(BUILD_QtDialog "Build Qt dialog for CMake" FALSE)
IF(BUILD_QtDialog)

View File

@ -1 +0,0 @@
Debug

View File

@ -1,142 +0,0 @@
// CMakeCommandLineInfo.cpp : command line arguments
//
#include "stdafx.h"
#include "CMakeCommandLineInfo.h"
#include "cmSystemTools.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
///////////////////////////////////////////////////////////////
// CMakeCommandLineInfo
CMakeCommandLineInfo::CMakeCommandLineInfo()
{
this->m_WhereSource = _T("");
this->m_WhereBuild = _T("");
this->m_AdvancedValues = FALSE;
this->m_GeneratorChoiceString = _T("");
this->m_LastUnknownParameter = _T("");
// Find the path to the CMakeSetup executable.
char fname[4096];
::GetModuleFileName(0, fname, 4096);
m_Argv0 = fname;
m_Argv.push_back(m_Argv0.c_str());
}
CMakeCommandLineInfo::~CMakeCommandLineInfo()
{
}
int CMakeCommandLineInfo::GetBoolValue(const CString& v) {
CString value = v;
value.MakeLower();
if (value == "1" ||
value == "on" ||
value == "true" ||
value == "yes")
{
return 1;
}
else if (value == "0" ||
value == "off" ||
value == "false" ||
value == "no")
{
return -1;
}
return 0;
}
///////////////////////////////////////////////////////////////
// Parse param
void CMakeCommandLineInfo::ParseParam(LPCTSTR lpszParam, BOOL bFlag, BOOL bLast)
{
// Construct the full name of the argument.
cmStdString param = lpszParam;
cmStdString value;
if(bFlag)
{
// Since bFlag is set, either a - or a / was removed from the
// parameter value. Assume it was a - unless the second character
// was a / which indicates a network path argument.
if(param.length() > 0 && param[0] == '/')
{
value = "/";
}
else
{
value = "-";
}
}
value += param;
// Add the argument and reset the argv table in case strings were
// moved.
m_Arguments.push_back(value);
m_Argv.clear();
m_Argv.push_back(m_Argv0.c_str());
for(unsigned int i=0; i < m_Arguments.size(); ++i)
{
m_Argv.push_back(m_Arguments[i].c_str());
}
// Look for known flags.
if(!bFlag)
{
this->m_LastUnknownParameter = lpszParam;
}
else
{
CString sParam(lpszParam);
// Single letter valued flag like /B=value or /B:value
CString value;
if (sParam[1] == '=' || sParam[1] == ':')
{
value = sParam.Right(sParam.GetLength() - 2);
}
else
{
value = sParam.Right(sParam.GetLength()-1);
}
int res;
switch (sParam[0])
{
case 'A':
res = CMakeCommandLineInfo::GetBoolValue(value);
if (res == 1)
{
this->m_AdvancedValues = TRUE;
}
else if (res == -1)
{
this->m_AdvancedValues = FALSE;
}
break;
case 'B':
{
std::string path = cmSystemTools::CollapseFullPath((const char*)value);
this->m_WhereBuild = path.c_str();
break;
}
case 'G':
this->m_GeneratorChoiceString = value;
break;
case 'H':
{
std::string path = cmSystemTools::CollapseFullPath((const char*)value);
this->m_WhereSource = path.c_str();
break;
}
}
}
// Call the base class to ensure proper command line processing
CCommandLineInfo::ParseParam(lpszParam, bFlag, bLast);
}

View File

@ -1,70 +0,0 @@
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
// CMakeCommandLineInfo.h : main header file for the command line arguments
//
#if !defined(CMAKECOMMANDLINEINFO_H)
#define CMAKECOMMANDLINEINFO_H
#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 "../cmStandardIncludes.h"
///////////////////////////////////////////////////////////////
// CMakeCommandLineInfo:
// See CMakeCommandLineInfo.cpp for the implementation of this class
//
class CMakeCommandLineInfo : public CCommandLineInfo
{
// Construction
public:
CMakeCommandLineInfo();
// Attributes
public:
CString m_WhereSource;
CString m_WhereBuild;
BOOL m_AdvancedValues;
CString m_GeneratorChoiceString;
CString m_LastUnknownParameter;
int GetArgC() { return static_cast<int>(m_Argv.size()); }
const char*const* GetArgV() { return &*m_Argv.begin(); }
std::string m_Argv0;
std::vector<cmStdString> m_Arguments;
std::vector<const char*> m_Argv;
// Operations
public:
void ParseParam(const TCHAR* pszParam, BOOL bFlag, BOOL bLast);
// Implementation
public:
virtual ~CMakeCommandLineInfo();
protected:
static int GetBoolValue(const CString&);
};
#endif // !defined(CMAKECOMMANDLINEINFO_H)

View File

@ -1,122 +0,0 @@
// CMakeGenDialog.cpp : implementation file
//
#include "stdafx.h"
#include "CMakeSetup.h"
#include "CMakeGenDialog.h"
#include "../cmake.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCMakeGenDialog dialog
CCMakeGenDialog::CCMakeGenDialog(CWnd* pParent /*=NULL*/)
: CDialog(CCMakeGenDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CCMakeGenDialog)
//}}AFX_DATA_INIT
}
void CCMakeGenDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCMakeGenDialog)
DDX_Control(pDX, IDC_BuildForLabel, m_BuildForLabel);
DDX_Control(pDX, IDC_Generator, m_GeneratorChoice);
DDX_CBStringExact(pDX, IDC_Generator, m_GeneratorChoiceString);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CCMakeGenDialog, CDialog)
//{{AFX_MSG_MAP(CCMakeGenDialog)
// NOTE: the ClassWizard will add message map macros here
ON_CBN_EDITCHANGE(IDC_Generator, OnEditchangeGenerator)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CCMakeGenDialog message handler
void CCMakeGenDialog::OnEditchangeGenerator()
{
// TODO: Add your control notification handler code here
}
BOOL CCMakeGenDialog::OnInitDialog()
{
CDialog::OnInitDialog();
std::vector<std::string> names;
this->m_CMakeInstance->GetRegisteredGenerators(names);
for(std::vector<std::string>::iterator i = names.begin();
i != names.end(); ++i)
{
m_GeneratorChoice.AddString(i->c_str());
}
// we want to pick the best generator for their system first we check to
// see if they have run cmake before, if so we use that generator
std::string mp;
bool done = false;
// is the last generator set? If so use it
mp = "[HKEY_CURRENT_USER\\Software\\Kitware"
"\\CMakeSetup\\Settings\\StartPath;LastGenerator]";
cmSystemTools::ExpandRegistryValues(mp);
if(mp != "/registry")
{
m_GeneratorChoiceString = mp.c_str();
done = true;
}
struct regToGen
{
const char* Registry;
const char* GeneratorName;
};
regToGen installedGenerators[] = {
// VS 9
{ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft"
"\\VisualStudio\\9.0\\Setup;Dbghelp_path]", "Visual Studio 9 2008"},
// VS 8
{ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft"
"\\VisualStudio\\8.0\\Setup;Dbghelp_path]", "Visual Studio 8 2005"},
// VS 7.1
{"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft"
"\\VisualStudio\\7.1;InstallDir]", "Visual Studio 7 .NET 2003"},
// VS 7
{"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft"
"\\VisualStudio\\7.0;InstallDir]", "Visual Studio 7"},
{0,0}
};
for(regToGen* ptr = installedGenerators; ptr->Registry != 0 && !done; ptr++)
{
mp = ptr->Registry;
cmSystemTools::ExpandRegistryValues(mp);
if(mp != "/registry")
{
m_GeneratorChoiceString = ptr->GeneratorName;
done = true;
}
}
// if still not done just guess on VS 6
if (!done)
{
m_GeneratorChoiceString = "Visual Studio 6";
}
this->UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
}

View File

@ -1,70 +0,0 @@
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#if !defined(CMAKE_GEN_DIALOG_INCLUDED)
#define CMAKE_GEN_DIALOG_INCLUDED
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// CMakeGenDialog.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CCMakeGenDialog dialog
class cmake;
class CCMakeGenDialog : public CDialog
{
// Construction
public:
CCMakeGenDialog(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CCMakeGenDialog)
enum { IDD = IDD_GEN_DIALOG };
CStatic m_BuildForLabel;
CComboBox m_GeneratorChoice;
CString m_GeneratorChoiceString;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCMakeGenDialog)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CCMakeGenDialog)
virtual BOOL OnInitDialog();
afx_msg void OnEditchangeGenerator();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public:
cmake *m_CMakeInstance;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif

View File

@ -1,109 +0,0 @@
SET( SRCS
CMakeSetup.h
CMakeSetup.cpp
MakeHelp.h
MakeHelp.cpp
CMakeGenDialog.h
CMakeGenDialog.cpp
CMakeSetup.rc
CMakeSetupDialog.h
CMakeSetupDialog.cpp
PathDialog.h
PathDialog.cpp
PropertyList.cpp
StdAfx.h
StdAfx.cpp
resource.h
CMakeCommandLineInfo.cpp
)
# add stuff to use MFC in this executable
ADD_DEFINITIONS(-D_AFXDLL)
# Use of CMAKE_MFC_FLAG
# Values:
# 0: Use Standard Windows Libraries
# 1: Use MFC in a Static Library
# 2: Use MFC in a Shared DLL
SET(CMAKE_MFC_FLAG 2)
ADD_EXECUTABLE(CMakeSetup WIN32 ${SRCS})
TARGET_LINK_LIBRARIES(CMakeSetup CMakeLib)
ADD_DEPENDENCIES(CMakeSetup cmake)
# some older versions of cmake do not have
# a patch version set so we need to set it
# so that a later if will not fail, this has
# to be done all the time for all generators
# since if statements are evaluated even if
# inside a false if, they must still parse so for
# if (CMAKE_PATCH_VERSION GREATER 4) not to
# fail CMAKE_PATCH_VERSION must be set
IF(${CMAKE_MAJOR_VERSION} LESS 3)
IF(NOT DEFINED CMAKE_PATCH_VERSION)
SET(CMAKE_PATCH_VERSION 0)
ENDIF(NOT DEFINED CMAKE_PATCH_VERSION)
ENDIF(${CMAKE_MAJOR_VERSION} LESS 3)
# for MSVC greater than 71 assume mt is around
# for other versions allow for the cache to be
# seeded with a value for CMAKE_MT_EXECUTABLE
# this allows for MSVC71 to build CMakeSetup that
# will have the manifest stuff for windows vista
IF(MSVC AND NOT MSVC60 AND NOT MSVC70 AND NOT MSVC71)
SET(CMAKE_MT_EXECUTABLE mt)
ENDIF(MSVC AND NOT MSVC60 AND NOT MSVC70 AND NOT MSVC71)
IF(CMAKE_MT_EXECUTABLE)
SET(exe "${CMAKE_CFG_INTDIR}/CMakeSetup.exe")
IF(EXECUTABLE_OUTPUT_PATH)
SET(exe "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/CMakeSetup.exe")
ENDIF(EXECUTABLE_OUTPUT_PATH)
# VERBATIM flag should be avoided if building with Visual Studio.
# (OK to add the flag if ${CMAKE_CFG_INTDIR} is "." which is one
# indicator that you are not building with Visual Studio.)
#
SET(verbatim_flag)
IF(NOT CMAKE_CONFIGURATION_TYPES)
# VERBATIM flag should also be avoided if using an older CMake.
# VERBATIM flag support was added in CMake 2.4.5
#
IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} EQUAL 2.4)
IF(${CMAKE_PATCH_VERSION} GREATER 4)
SET(verbatim_flag "VERBATIM")
ENDIF(${CMAKE_PATCH_VERSION} GREATER 4)
ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} EQUAL 2.4)
IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
SET(verbatim_flag "VERBATIM")
ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
IF(NOT verbatim_flag)
MESSAGE("${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): warning
warning: The VERBATIM flag for ADD_CUSTOM_COMMAND may be required to execute mt correctly,
but you are using a CMake ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} which does not parse the VERBATIM flag.
Upgrade to CMake 2.4.5 or later to eliminate this warning.")
ENDIF(NOT verbatim_flag)
ENDIF(NOT CMAKE_CONFIGURATION_TYPES)
SET(_CMAKE_INPUT_RESOURCE "-inputresource:${exe};#1")
# if msvc71 then you can not replace the resource
# but you can add one, so set the input resource to empty
IF(MSVC71)
SET(_CMAKE_INPUT_RESOURCE )
ENDIF(MSVC71)
# Solve the "things named like *Setup prompt for admin privileges
# on Vista" problem by merging a manifest fragment that contains a
# requestedExecutionLevel element:
#
ADD_CUSTOM_COMMAND(TARGET CMakeSetup
POST_BUILD COMMAND mt
"${_CMAKE_INPUT_RESOURCE}"
-manifest "${CMAKE_CURRENT_SOURCE_DIR}/CMakeSetupManifest.xml"
"-outputresource:${exe};#1"
${verbatim_flag}
)
ENDIF(CMAKE_MT_EXECUTABLE)
INSTALL_TARGETS(/bin CMakeSetup)

View File

@ -1,158 +0,0 @@
// CMakeSetupdialog.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "CMakeSetup.h"
#include "CMakeSetupDialog.h"
#include "CMakeCommandLineInfo.h"
#include "../cmDocumentation.h"
#include "../cmake.h"
#include "../cmSystemTools.h"
//----------------------------------------------------------------------------
static const char * cmDocumentationName[][3] =
{
{0,
" CMakeSetup - CMake Windows GUI.", 0},
{0,0,0}
};
//----------------------------------------------------------------------------
static const char * cmDocumentationUsage[][3] =
{
{0,
" CMakeSetup [options]\n"
" CMakeSetup [options] <path-to-source>\n"
" CMakeSetup [options] <path-to-existing-build>", 0},
{0,0,0}
};
//----------------------------------------------------------------------------
static const char * cmDocumentationDescription[][3] =
{
{0,
"The \"CMakeSetup\" executable is the CMake Windows GUI. Project "
"configuration settings may be specified interactively. "
"Brief instructions are provided at the bottom of the "
"window when the program is running.", 0},
CMAKE_STANDARD_INTRODUCTION,
{0,0,0}
};
//----------------------------------------------------------------------------
static const char * cmDocumentationOptions[][3] =
{
{"-A[on|off]", "Enable/disable display of advanced cache values.",
"There are two categories of CMake cache values: non-advanced and "
"advanced. Most users will not need to change the advanced options. "
"The CMakeSetup GUI contains a checkbox to enable/disable display of "
"advanced options. This command line flag changes its default setting."},
{0,0,0}
};
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMakeSetup
BEGIN_MESSAGE_MAP(CMakeSetup, CWinApp)
//{{AFX_MSG_MAP(CMakeSetup)
// 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();
/////////////////////////////////////////////////////////////////////////////
// CMakeSetup construction
CMakeSetup::CMakeSetup()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CMakeSetup object
CMakeSetup theApp;
/////////////////////////////////////////////////////////////////////////////
// CMakeSetup initialization
BOOL CMakeSetup::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.
#if _MFC_VER <= 0x421
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
#endif
CMakeCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
cmSystemTools::FindExecutableDirectory(cmdInfo.GetArgV()[0]);
// Check for documentation options. If there are no arguments skip
// the check because the GUI should be displayed instead of showing
// usage in this case.
cmDocumentation doc;
if(cmdInfo.GetArgC() > 1 &&
doc.CheckOptions(cmdInfo.GetArgC(), cmdInfo.GetArgV()))
{
// Construct and print requested documentation.
cmake hcm;
hcm.AddCMakePaths();
doc.SetCMakeRoot(hcm.GetCacheDefinition("CMAKE_ROOT"));
std::vector<cmDocumentationEntry> commands;
std::vector<cmDocumentationEntry> compatCommands;
std::map<std::string,cmDocumentationSection *> propDocs;
std::vector<cmDocumentationEntry> generators;
hcm.GetCommandDocumentation(commands, true, false);
hcm.GetCommandDocumentation(compatCommands, false, true);
hcm.GetGeneratorDocumentation(generators);
hcm.GetPropertiesDocumentation(propDocs);
doc.SetName("cmake");
doc.SetSection("Name",cmDocumentationName);
doc.SetSection("Usage",cmDocumentationUsage);
doc.SetSection("Description",cmDocumentationDescription);
doc.AppendSection("Generators",generators);
doc.PrependSection("Options",cmDocumentationOptions);
doc.SetSection("Commands",commands);
doc.SetSection("Compatilbility Commands", compatCommands);
doc.SetSections(propDocs);
return (doc.PrintRequestedDocumentation(std::cout)? 0:1);
}
CMakeSetupDialog dlg(cmdInfo);
m_pMainWnd = &dlg;
INT_PTR 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;
}

View File

@ -1,65 +0,0 @@
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
// CMakeSetupdialog.h : main header file for the CMakeSetupDIALOG application
//
#if !defined(AFX_CMakeSetupDIALOG_H__AC17A6F4_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_)
#define AFX_CMakeSetupDIALOG_H__AC17A6F4_4634_11D4_8F21_00A0CC33FCD3__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
/////////////////////////////////////////////////////////////////////////////
// CMakeSetup:
// See CMakeSetupdialog.cpp for the implementation of this class
//
class CMakeSetup : public CWinApp
{
public:
CMakeSetup();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMakeSetup)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CMakeSetup)
// 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_CMakeSetupDIALOG_H__AC17A6F4_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_)

View File

@ -1,246 +0,0 @@
// 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\\CMakeSetupDialog.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\\CMakeSetupDialog.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About CMakeSetup"
BEGIN
ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20
LTEXT "CMakeSetup\nwww.cmake.org",IDC_STATIC,40,18,119,16
DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP
END
IDD_CMakeSetupDialog_DIALOG DIALOGEX 0, 0, 447, 255
STYLE DS_SETFONT | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_APPWINDOW
CAPTION "CMakeSetupDialog"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
RTEXT "Where is the source code:",IDC_STATIC,6,7,86,9
COMBOBOX IDC_WhereSource,96,6,169,12,CBS_SIMPLE | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Browse...",IDC_BROWSE_SOURCE,267,6,34,13
RTEXT "Where to build the binaries:",IDC_STATIC,5,27,90,9
COMBOBOX IDC_WhereBuild,96,26,169,68,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Browse...",IDC_BROWSE_BUILD,267,25,34,13
CONTROL "Show Advanced Values",IDC_AdvancedValues,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,321,9,98,9
DEFPUSHBUTTON "Configure",IDC_BuildProjects,84,221,51,15
PUSHBUTTON "OK",IDC_OK,141,221,51,15
PUSHBUTTON "Cancel",IDCANCEL,198,221,51,15
PUSHBUTTON "Help",IDC_HELP_BUTTON,312,221,51,15
LISTBOX IDC_LIST2,15,53,419,126,LBS_SORT | LBS_OWNERDRAWVARIABLE | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
GROUPBOX "Cache Values",IDC_FRAME,10,44,432,140
CTEXT "Right click on a cache value for additional options (delete, ignore, and help).\nPress Configure to update and display new values in red.\nPress OK to generate selected build files and exit.",IDC_MouseHelpCaption,0,191,442,27
LTEXT "Static",IDC_PROGRESS,2,240,442,12,SS_CENTERIMAGE | SS_SUNKEN
PUSHBUTTON "Delete Cache",IDC_DELETE_BUTTON,255,221,51,15
CONTROL "Suppress dev Warnings",IDC_SUPPRESS_DEV_WARNINGS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,321,28,108,10
END
IDD_CMAKE_HELP_DIALOG DIALOG 0, 0, 365, 183
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "CMake Help"
BEGIN
DEFPUSHBUTTON "OK",IDOK,155,159,50,14
EDITTEXT IDC_EDIT1,7,7,351,152,ES_MULTILINE | ES_READONLY | NOT WS_BORDER
END
IDD_GEN_DIALOG DIALOGEX 0, 0, 263, 86
STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Select Generator"
BEGIN
DEFPUSHBUTTON "OK",IDOK,70,65,50,14
PUSHBUTTON "Cancel",IDCANCEL,143,65,50,14
RTEXT "Build For:",IDC_BuildForLabel,7,45,34,11,SS_CENTERIMAGE
COMBOBOX IDC_Generator,52,45,204,117,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
CTEXT "Please select what build system you want CMake to generate files for.\nYou should select the tool that you will use to build the project.\nPress OK once you have made your selection.",IDC_MouseHelpCaption,7,7,245,36
END
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,2,0,0
PRODUCTVERSION 2,2,0,0
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", "CMakeSetup MFC Application"
VALUE "FileVersion", "2, 2, 0, 0"
VALUE "InternalName", "CMakeSetup"
VALUE "LegalCopyright", "Copyright (C) 2000"
VALUE "OriginalFilename", "CMakeSetup.EXE"
VALUE "ProductName", "CMakeSetup Application"
VALUE "ProductVersion", "2, 2, 0, 0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_ABOUTBOX, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 228
TOPMARGIN, 7
BOTTOMMARGIN, 48
END
IDD_CMakeSetupDialog_DIALOG, DIALOG
BEGIN
RIGHTMARGIN, 442
BOTTOMMARGIN, 252
END
IDD_CMAKE_HELP_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 358
TOPMARGIN, 7
BOTTOMMARGIN, 176
END
IDD_GEN_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 256
TOPMARGIN, 7
BOTTOMMARGIN, 79
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE
BEGIN
IDS_ABOUTBOX "&About CMakeSetup..."
IDS_CREATESHORTCUT "&Create shortcut"
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\CMakeSetupDialog.rc2" // non-Microsoft Visual C++ edited resources
#include "afxres.rc" // Standard components
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

File diff suppressed because it is too large Load Diff

View File

@ -1,152 +0,0 @@
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
// CMakeSetupDialogDlg.h : header file
//
#if !defined(AFX_CMakeSetupDialogDLG_H__AC17A6F6_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_)
#define AFX_CMakeSetupDialogDLG_H__AC17A6F6_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "PropertyList.h"
#include "CMakeGenDialog.h"
/////////////////////////////////////////////////////////////////////////////
// CMakeSetupDialog dialog
class CMakeCommandLineInfo;
class cmake;
class CMakeSetupDialog : public CDialog
{
// Construction
public:
CMakeSetupDialog(const CMakeCommandLineInfo& cmdInfo,
CWnd* pParent = NULL);
~CMakeSetupDialog();
// return the cmake that is currently being used
cmake *GetCMakeInstance() {
return m_CMakeInstance; }
protected:
//! Load cache file from m_WhereBuild and display in GUI editor
void LoadCacheFromDiskToGUI();
//! Save GUI values to cmCacheManager and then save to disk.
void SaveCacheFromGUI();
void SaveToRegistry();
void LoadFromRegistry();
bool Browse(CString&, const char* title);
void ReadRegistryValue(HKEY hKey,
CString *val,
const char *key,
const char *aadefault);
void ShowAdvancedValues();
void RemoveAdvancedValues();
// Dialog Data
//{{AFX_DATA(CMakeSetupDialog)
enum { IDD = IDD_CMakeSetupDialog_DIALOG };
CButton m_AdvancedValuesControl;
CButton m_SuppressDevWarningsControl;
CButton m_BrowseSource;
CButton m_BrowseBuild;
CButton m_HelpButton;
CButton m_DeleteButton;
CButton m_OKButton;
CButton m_CancelButton;
CString m_WhereSource;
CString m_WhereBuild;
CButton m_ListFrame;
bool m_BuildPathChanged;
CComboBox m_WhereSourceControl;
CComboBox m_WhereBuildControl;
CPropertyList m_CacheEntriesList;
CStatic m_MouseHelp;
CStatic m_StatusDisplay;
CButton m_Configure;
BOOL m_AdvancedValues;
BOOL m_SuppressDevValue;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMakeSetupDialog)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
void RunCMake(bool generateProjectFiles);
// copy from the cache manager to the cache edit list box
void FillCacheGUIFromCacheManager();
// copy from the list box to the cache manager
void FillCacheManagerFromCacheGUI();
// Create a shortcut on the desktop with the current Source/Build dir.
int CreateShortcut();
// Set initial directories from a file path.
void ChangeDirectoriesFromFile(const char* arg);
HICON m_hIcon;
CString m_RegistryKey;
CString m_PathToExecutable;
// Generated message map functions
//{{AFX_MSG(CMakeSetupDialog)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnCancel();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnBrowseWhereSource();
virtual void OnConfigure();
afx_msg void OnBrowseWhereBuild();
afx_msg void OnChangeWhereBuild();
afx_msg void OnSelendokWhereBuild();
afx_msg void OnChangeWhereSource();
afx_msg void OnSelendokWhereSource();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnGetMinMaxInfo( MINMAXINFO FAR* lpMMI );
afx_msg void OnOk();
afx_msg void OnHelpButton();
afx_msg void OnDeleteButton();
afx_msg void OnAdvancedValues();
afx_msg void OnDoubleclickedAdvancedValues();
afx_msg void OnSuppressDevValue();
afx_msg void OnDoubleclickedSuppressDevValue();
afx_msg void OnDropFiles(HDROP);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
int m_oldCX;
int m_oldCY;
float m_deltaXRemainder;
cmake *m_CMakeInstance;
HCURSOR m_Cursor;
bool m_RunningConfigure;
bool m_GeneratorPicked;
CCMakeGenDialog m_GeneratorDialog;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CMakeSetupDialogDLG_H__AC17A6F6_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_)

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View File

@ -1,43 +0,0 @@
// MakeHelp.cpp : implementation file
//
#include "stdafx.h"
#include "CMakeSetup.h"
#include "MakeHelp.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMakeHelp dialog
CMakeHelp::CMakeHelp(CWnd* pParent /*=NULL*/)
: CDialog(CMakeHelp::IDD, pParent)
{
//{{AFX_DATA_INIT(CMakeHelp)
m_HelpMessage = _T("CMake is used to configure and generate build files for software projects. The basic steps for configuring a project are as follows:\r\n\r\n1. Select the source directory for the project. This should contain the CMakeLists.txt files for the project.\r\n\r\n2. Select the build directory for the project. This is the directory where the project will be built. It can be the same or a different directory than the source directory. For easy clean up, a separate build directory is recommended. CMake will create the directory if it does not exist.\r\n\r\n3. Once the source and binary directories are selected, it is time to press the Configure button. This will cause CMake to read all of the input files and discover all the variables used by the project. The first time a variable is displayed it will be in Red. Users should inspect red variables making sure the values are correct. For some projects the Configure process can be iterative, so continue to press the Configure button until there are no longer red entries.\r\n\r\n4. Once there are no longer red entries, you should click the OK button. This will write the build files to the build directory and exit CMake.");
//}}AFX_DATA_INIT
}
void CMakeHelp::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMakeHelp)
DDX_Text(pDX, IDC_EDIT1, m_HelpMessage);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMakeHelp, CDialog)
//{{AFX_MSG_MAP(CMakeHelp)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMakeHelp message handlers

View File

@ -1,62 +0,0 @@
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#if !defined(AFX_MAKEHELP_H__DD327AED_1E65_43E8_A605_0933065D1757__INCLUDED_)
#define AFX_MAKEHELP_H__DD327AED_1E65_43E8_A605_0933065D1757__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MakeHelp.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CMakeHelp dialog
class CMakeHelp : public CDialog
{
// Construction
public:
CMakeHelp(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMakeHelp)
enum { IDD = IDD_CMAKE_HELP_DIALOG };
CString m_HelpMessage;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMakeHelp)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CMakeHelp)
// 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_MAKEHELP_H__DD327AED_1E65_43E8_A605_0933065D1757__INCLUDED_)

View File

@ -1,377 +0,0 @@
//////////////////////////////////////////////////////////////////////////
//PathDialog.h file
//
//Written by Nguyen Tan Hung <tanhung@yahoo.com>
//////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "PathDialog.h"
#include <io.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define IDC_FOLDERTREE 0x3741
#define IDC_TITLE 0x3742
#define IDC_STATUSTEXT 0x3743
#define IDC_NEW_EDIT_PATH 0x3744
// Class CDlgWnd
BEGIN_MESSAGE_MAP(CPathDialogSub, CWnd)
ON_BN_CLICKED(IDOK, OnOK)
ON_EN_CHANGE(IDC_NEW_EDIT_PATH, OnChangeEditPath)
END_MESSAGE_MAP()
void CPathDialogSub::OnOK()
{
::GetWindowText(::GetDlgItem(m_hWnd, IDC_NEW_EDIT_PATH),
m_pPathDialog->m_szPathName, MAX_PATH);
if(CPathDialog::MakeSurePathExists(m_pPathDialog->m_szPathName)==0)
{
m_pPathDialog->m_bGetSuccess=TRUE;
::EndDialog(m_pPathDialog->m_hWnd, IDOK);
}
else
{
::SetFocus(::GetDlgItem(m_hWnd, IDC_NEW_EDIT_PATH));
}
}
void CPathDialogSub::OnChangeEditPath()
{
::GetWindowText(::GetDlgItem(m_hWnd, IDC_NEW_EDIT_PATH),
m_pPathDialog->m_szPathName, MAX_PATH);
BOOL bEnableOKButton = (_tcslen(m_pPathDialog->m_szPathName)>0);
SendMessage(BFFM_ENABLEOK, 0, bEnableOKButton);
}
/////////////////////////////////////////////////////////////////////////////
// CPathDialog dialog
CPathDialog::CPathDialog(LPCTSTR lpszCaption,
LPCTSTR lpszTitle,
LPCTSTR lpszInitialPath,
CWnd* pParent)
{
m_hWnd=NULL;
m_PathDialogSub.m_pPathDialog= this;
m_bParentDisabled = FALSE;
// Get the true parent of the dialog
m_pParentWnd = CWnd::GetSafeOwner(pParent);
m_lpszCaption = lpszCaption;
m_lpszInitialPath = lpszInitialPath;
memset(&m_bi, 0, sizeof(BROWSEINFO) );
m_bi.hwndOwner = (m_pParentWnd==NULL)?NULL:m_pParentWnd->GetSafeHwnd();
m_bi.pszDisplayName = 0;
m_bi.pidlRoot = 0;
m_bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT;
m_bi.lpfn = BrowseCallbackProc;
m_bi.lpszTitle = lpszTitle;
}
/////////////////////////////////////////////////////////////////////////////
// CPathDialog message handlers
CString CPathDialog::GetPathName()
{
return CString(m_szPathName);
}
int CALLBACK CPathDialog::BrowseCallbackProc(HWND hwnd,UINT uMsg,LPARAM lParam, LPARAM pData)
{
CPathDialog* pDlg = (CPathDialog*)pData;
switch(uMsg)
{
case BFFM_INITIALIZED:
{
RECT rc;
HWND hEdit;
HFONT hFont;
pDlg->m_hWnd = hwnd;
if(pDlg->m_lpszCaption!=NULL)
{
::SetWindowText(hwnd, pDlg->m_lpszCaption);
}
VERIFY(pDlg->m_PathDialogSub.SubclassWindow(hwnd));
::ShowWindow(::GetDlgItem(hwnd, IDC_STATUSTEXT), SW_HIDE);
::GetWindowRect(::GetDlgItem(hwnd, IDC_FOLDERTREE), &rc);
rc.bottom = rc.top - 4;
rc.top = rc.bottom - 23;
::ScreenToClient(hwnd, (LPPOINT)&rc);
::ScreenToClient(hwnd, ((LPPOINT)&rc)+1);
hEdit = ::CreateWindowEx(WS_EX_CLIENTEDGE, _T("EDIT"), _T(""),
WS_CHILD|WS_TABSTOP|WS_VISIBLE|ES_AUTOHSCROLL,
rc.left, rc.top,
rc.right-rc.left, rc.bottom-rc.top,
hwnd, NULL, NULL, NULL);
::SetWindowLong(hEdit, GWL_ID, IDC_NEW_EDIT_PATH);
::ShowWindow(hEdit, SW_SHOW);
hFont = (HFONT)::SendMessage(hwnd, WM_GETFONT, 0, 0);
::SendMessage(hEdit, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0));
LPCTSTR lpszPath = pDlg->m_lpszInitialPath;
TCHAR szTemp[MAX_PATH];
if(lpszPath==NULL)
{
::GetCurrentDirectory(MAX_PATH, szTemp );
lpszPath = szTemp;
}
// WParam is TRUE since you are passing a path.
// It would be FALSE if you were passing a pidl.
::SendMessage(hwnd,BFFM_SETSELECTION,TRUE,
(LPARAM)lpszPath);
break;
}
case BFFM_SELCHANGED:
{
char szSelection[MAX_PATH];
if(!::SHGetPathFromIDList((LPITEMIDLIST)lParam, szSelection) ||
(szSelection[1] !=':' && szSelection[1] != '\\'))
{
szSelection[0] = '\0';
::SendMessage(hwnd, BFFM_ENABLEOK, 0, FALSE);
}
else
{
::SendMessage(hwnd, BFFM_ENABLEOK, 0, TRUE);
}
::SendMessage(hwnd,BFFM_SETSTATUSTEXT,0,(LPARAM)szSelection);
::SetWindowText(::GetDlgItem(hwnd, IDC_NEW_EDIT_PATH), szSelection);
break;
}
default:
break;
}
return 0;
}
int CPathDialog::DoModal()
{
/////////////////////////////////////////////////////////
TCHAR szPathTemp[MAX_PATH];
m_bi.lpfn = BrowseCallbackProc; // address of callback function
m_bi.lParam = (LPARAM)this; // pass address of object to callback function
m_bi.pszDisplayName = szPathTemp;
LPITEMIDLIST pidl;
LPMALLOC pMalloc;
int iResult=-1;
if(SUCCEEDED(SHGetMalloc(&pMalloc)))
{
m_bGetSuccess = FALSE;
pidl = SHBrowseForFolder(&m_bi);
if (pidl!=NULL)
{
#if defined(_WIN64) && defined(__INTEL_COMPILER)
# pragma warning ( disable : 167)
#endif
// In C++:
pMalloc->Free(pidl);
//In C:
//pMalloc->lpVtbl->Free(pMalloc,pidl);
//pMalloc->lpVtbl->Release(pMalloc);
}
if(m_bGetSuccess)
{
iResult = IDOK;
}
pMalloc->Release();
}
if(m_bParentDisabled && (m_pParentWnd!=NULL))
{
m_pParentWnd->EnableWindow(TRUE);
}
m_bParentDisabled=FALSE;
return iResult;
}
BOOL CPathDialog::IsFileNameValid(LPCTSTR /* lpFileName */)
{
return TRUE;
}
const TCHAR c_FolderDoesNotExist[] = _T(
"The folder:\n\n"
"%s\n\n"
"does not exist. Do you want the folder to be created?");
const TCHAR c_szErrInvalidPath[] = _T(
"The folder:"
"\n\n"
"%s\n\n"
"is invalid. Please reenter.");
const TCHAR c_szErrCreatePath[] = _T(
"The folder:"
"\n\n"
"%s"
"\n\ncan not be created. Please double check.");
//return -1: user break;
//return 0: no error
//return 1: lpPath is invalid
//return 2: can not create lpPath
int CPathDialog::MakeSurePathExists(LPCTSTR lpPath)
{
CString strMsg;
int iRet = -1;
try
{
//validate path
iRet=Touch(lpPath, TRUE);
if(iRet!=0)
{
throw iRet;
}
if(_taccess(lpPath, 0)==0)
{
return (int)0;
}
strMsg.Format(c_FolderDoesNotExist, lpPath);
if(AfxMessageBox(strMsg, MB_YESNO|MB_ICONQUESTION) == IDYES)
{
//create path
iRet=Touch(lpPath, FALSE);
if(iRet!=0)
{
throw iRet;
}
}
return 0;
}
catch(int nErrCode)
{
switch(nErrCode)
{
case 1:
strMsg.Format(c_szErrInvalidPath, lpPath);
break;
case 2:
default:
strMsg.Format(c_szErrCreatePath, lpPath);
break;
}
AfxMessageBox(strMsg, MB_OK|MB_ICONEXCLAMATION);
}
return iRet;
}
//return 0: no error
//return 1: lpPath is invalid
//return 2: lpPath can not be created(bValidate==FALSE)
int CPathDialog::Touch(LPCTSTR lpPath, BOOL bValidate)
{
if(lpPath==NULL)
{
return 1;
}
TCHAR szPath[MAX_PATH];
_tcscpy(szPath, lpPath);
size_t nLen = _tcslen(szPath);
int i;
if(nLen==3)
{
if(!bValidate)
{
if(_access(szPath, 0)!=0)
{
return 2;
}
}
return 0;
}
i = 3;
BOOL bLastOne=TRUE;
LPTSTR lpCurrentName;
while(szPath[i]!=0)
{
lpCurrentName = &szPath[i];
while( (szPath[i]!=0) && (szPath[i]!=_T('\\')) )
{
i++;
}
bLastOne =(szPath[i]==0);
szPath[i] = 0;
if(!bValidate)
{
CreateDirectory(szPath, NULL);
if(_taccess(szPath, 0)!=0)
{
return 2;
}
}
if(bLastOne)
{
break; //it's done
}
else
{
szPath[i] = _T('\\');
}
i++;
}
return (bLastOne?0:1);
}
//return 0: ok
//return 1: error
int CPathDialog::ConcatPath(LPTSTR lpRoot, LPCTSTR lpMorePath)
{
if(lpRoot==NULL)
{
return 1;
}
size_t nLen = _tcslen(lpRoot);
if(nLen<3)
{
return 1;
}
if(lpMorePath==NULL)
{
return 0;
}
if(nLen==3)
{
_tcscat(lpRoot, lpMorePath);
return 0;
}
_tcscat(lpRoot, _T("\\"));
_tcscat(lpRoot, lpMorePath);
return 0;
}

View File

@ -1,90 +0,0 @@
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
//////////////////////////////////////////////////////////////////////////
//PathDialog.h file
//
//Written by Nguyen Tan Hung <tanhung@yahoo.com>
//////////////////////////////////////////////////////////////////////////
#if !defined(AFX_PATHDIALOG_H__0F70BC86_11DB_11D4_B012_0000E8DD8DAA__INCLUDED_)
#define AFX_PATHDIALOG_H__0F70BC86_11DB_11D4_B012_0000E8DD8DAA__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// PathDialog.h : header file
//
#include "shlobj.h"
class CPathDialog;
// CPathDialogSub - intercepts messages from child controls
class CPathDialogSub : public CWnd
{
friend CPathDialog;
public:
CPathDialog* m_pPathDialog;
protected:
afx_msg void OnOK(); // OK button clicked
afx_msg void OnChangeEditPath();
DECLARE_MESSAGE_MAP()
private:
};
/////////////////////////////////////////////////////////////////////////////
// CPathDialog dialog
class CPathDialog
{
friend CPathDialogSub;
// Construction
public:
CPathDialog(LPCTSTR lpszCaption=NULL,
LPCTSTR lpszTitle=NULL,
LPCTSTR lpszInitialPath=NULL,
CWnd* pParent = NULL);
CString GetPathName();
virtual int DoModal();
static int Touch(LPCTSTR lpPath, BOOL bValidate=TRUE);
static int MakeSurePathExists(LPCTSTR lpPath);
static BOOL IsFileNameValid(LPCTSTR lpFileName);
static int ConcatPath(LPTSTR lpRoot, LPCTSTR lpMorePath);
private:
static int CALLBACK BrowseCallbackProc(HWND hwnd,UINT uMsg,LPARAM lParam, LPARAM pData);
LPCTSTR m_lpszCaption;
LPCTSTR m_lpszInitialPath;
TCHAR m_szPathName[MAX_PATH];
BROWSEINFO m_bi;
HWND m_hWnd;
CWnd* m_pParentWnd;
BOOL m_bParentDisabled;
BOOL m_bGetSuccess;
CPathDialogSub m_PathDialogSub;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PATHDIALOG_H__0F70BC86_11DB_11D4_B012_0000E8DD8DAA__INCLUDED_)

View File

@ -1,847 +0,0 @@
// PropertyList.cpp : implementation file
//
#include "stdafx.h"
#include "shellapi.h"
#include "CMakeSetup.h"
#include "CMakeSetupDialog.h"
#include "PathDialog.h"
#include "../cmCacheManager.h"
#include "../cmSystemTools.h"
#include "../cmake.h"
#define IDC_PROPCMBBOX 712
#define IDC_PROPEDITBOX 713
#define IDC_PROPBTNCTRL 714
#define IDC_PROPCHECKBOXCTRL 715
/////////////////////////////////////////////////////////////////////////////
// CPropertyList
CPropertyList::CPropertyList()
{
m_Dirty = false;
m_ShowAdvanced = false;
m_curSel = -1;
}
CPropertyList::~CPropertyList()
{
for(std::set<CPropertyItem*>::iterator i = m_PropertyItems.begin();
i != m_PropertyItems.end(); ++i)
{
delete *i;
}
}
BEGIN_MESSAGE_MAP(CPropertyList, CListBox)
//{{AFX_MSG_MAP(CPropertyList)
ON_WM_CREATE()
ON_WM_VSCROLL()
ON_CONTROL_REFLECT(LBN_SELCHANGE, OnSelchange)
ON_WM_LBUTTONUP()
ON_WM_KILLFOCUS()
ON_WM_LBUTTONDOWN()
ON_WM_RBUTTONUP()
ON_WM_MOUSEMOVE()
//}}AFX_MSG_MAP
ON_CBN_KILLFOCUS(IDC_PROPCMBBOX, OnKillfocusCmbBox)
ON_CBN_SELCHANGE(IDC_PROPCMBBOX, OnSelchangeCmbBox)
ON_EN_KILLFOCUS(IDC_PROPEDITBOX, OnKillfocusEditBox)
ON_EN_CHANGE(IDC_PROPEDITBOX, OnChangeEditBox)
ON_BN_CLICKED(IDC_PROPBTNCTRL, OnButton)
ON_BN_CLICKED(IDC_PROPCHECKBOXCTRL, OnCheckBox)
ON_COMMAND(42, OnDelete)
ON_COMMAND(43, OnHelp)
ON_COMMAND(44, OnIgnore)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPropertyList message handlers
BOOL CPropertyList::PreCreateWindow(CREATESTRUCT& cs)
{
if (!CListBox::PreCreateWindow(cs))
return FALSE;
cs.style &= ~(LBS_OWNERDRAWVARIABLE | LBS_SORT);
cs.style |= LBS_OWNERDRAWFIXED;
m_bTracking = FALSE;
m_nDivider = 0;
m_bDivIsSet = FALSE;
return TRUE;
}
void CPropertyList::MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct)
{
lpMeasureItemStruct->itemHeight = 20; //pixels
}
void CPropertyList::DrawItem(LPDRAWITEMSTRUCT lpDIS)
{
CDC dc;
dc.Attach(lpDIS->hDC);
CRect rectFull = lpDIS->rcItem;
CRect rect = rectFull;
if (m_nDivider==0)
m_nDivider = rect.Width() / 2;
rect.left = m_nDivider;
CRect rect2 = rectFull;
rect2.right = rect.left - 1;
UINT nIndex = lpDIS->itemID;
if (nIndex != (UINT) -1)
{
//get the CPropertyItem for the current row
CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(nIndex);
//draw two rectangles, one for each row column
if(pItem->m_NewValue)
{
dc.FillSolidRect(rect2,RGB(255,100, 100));
}
else
{
dc.FillSolidRect(rect2,RGB(192,192,192));
}
dc.DrawEdge(rect2,EDGE_SUNKEN,BF_BOTTOMRIGHT);
dc.DrawEdge(rect,EDGE_SUNKEN,BF_BOTTOM);
//write the property name in the first rectangle
dc.SetBkMode(TRANSPARENT);
dc.DrawText(pItem->m_propName,CRect(rect2.left+3,rect2.top+3,
rect2.right-3,rect2.bottom+3),
DT_LEFT | DT_SINGLELINE);
//write the initial property value in the second rectangle
dc.DrawText(pItem->m_curValue,CRect(rect.left+3,rect.top+3,
rect.right+3,rect.bottom+3),
DT_LEFT | DT_SINGLELINE);
}
dc.Detach();
}
int CPropertyList::AddItem(CString txt)
{
int nIndex = AddString(txt);
return nIndex;
}
// order = 0 sorted
// order = 1 add to top
// order = 2 add to bottom
int CPropertyList::AddPropItem(CPropertyItem* pItem, int order)
{
if(pItem->m_Advanced && ! m_ShowAdvanced)
{
m_PropertyItems.insert(pItem);
return 0;
}
this->HideControls();
int nIndex;
if(order)
{
if(order == 1)
{
order = 0;
}
if(order == 2)
{
order = -1;
}
nIndex = InsertString(order, _T(""));
}
else
{
nIndex = AddString(pItem->m_propName);
}
SetItemDataPtr(nIndex,pItem);
m_PropertyItems.insert(pItem);
return nIndex;
}
void CPropertyList::AddProperty(const char* name,
const char* value,
const char* helpString,
int type,
const char* comboItems,
bool reverseOrder,
bool advanced)
{
CPropertyItem* pItem = 0;
for(std::set<CPropertyItem*>::iterator i = m_PropertyItems.begin();
i != m_PropertyItems.end(); ++i)
{
CPropertyItem* item = *i;
if(item->m_propName == name)
{
pItem = item;
if(pItem->m_curValue != value)
{
pItem->m_curValue = value;
pItem->m_HelpString = helpString;
InvalidateList();
}
pItem->m_Advanced = advanced;
return;
}
}
// if it is not found, then create a new one
if(!pItem)
{
pItem = new CPropertyItem(name, value, helpString, type, comboItems);
pItem->m_NewValue = true;
}
pItem->m_Advanced = advanced;
int order = 0;
if(reverseOrder)
{
order = 1;
}
this->AddPropItem(pItem, order);
return;
}
int CPropertyList::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CListBox::OnCreate(lpCreateStruct) == -1)
return -1;
m_bDivIsSet = FALSE;
m_nDivider = 0;
m_bTracking = FALSE;
m_hCursorSize = AfxGetApp()->LoadStandardCursor(IDC_SIZEWE);
m_hCursorArrow = AfxGetApp()->LoadStandardCursor(IDC_ARROW);
m_SSerif8Font.CreatePointFont(80,_T("MS Sans Serif"));
return 0;
}
void CPropertyList::OnSelchange()
{
CRect rect;
CString lBoxSelText;
GetItemRect(m_curSel,rect);
rect.left = m_nDivider;
CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
if (m_btnCtrl)
m_btnCtrl.ShowWindow(SW_HIDE);
if (m_CheckBoxControl)
m_CheckBoxControl.ShowWindow(SW_HIDE);
if (pItem->m_nItemType==CPropertyList::COMBO)
{
//display the combo box. If the combo box has already been
//created then simply move it to the new location, else create it
m_nLastBox = 0;
if (m_cmbBox)
m_cmbBox.MoveWindow(rect);
else
{
rect.bottom += 100;
m_cmbBox.Create(CBS_DROPDOWNLIST
| CBS_NOINTEGRALHEIGHT | WS_VISIBLE
| WS_CHILD | WS_BORDER,
rect,this,IDC_PROPCMBBOX);
m_cmbBox.SetFont(&m_SSerif8Font);
}
//add the choices for this particular property
CString cmbItems = pItem->m_cmbItems;
lBoxSelText = pItem->m_curValue;
m_cmbBox.ResetContent();
int i,i2;
i=0;
while ((i2=cmbItems.Find('|',i)) != -1)
{
m_cmbBox.AddString(cmbItems.Mid(i,i2-i));
i=i2+1;
}
if(i != 0)
m_cmbBox.AddString(cmbItems.Mid(i));
m_cmbBox.ShowWindow(SW_SHOW);
m_cmbBox.SetFocus();
//jump to the property's current value in the combo box
int j = m_cmbBox.FindStringExact(0,lBoxSelText);
if (j != CB_ERR)
m_cmbBox.SetCurSel(j);
else
m_cmbBox.SetCurSel(0);
}
else if (pItem->m_nItemType==CPropertyList::EDIT)
{
//display edit box
m_nLastBox = 1;
m_prevSel = m_curSel;
rect.bottom -= 3;
if (m_editBox)
m_editBox.MoveWindow(rect);
else
{
m_editBox.Create(ES_LEFT | ES_AUTOHSCROLL | WS_VISIBLE
| WS_CHILD | WS_BORDER,
rect,this,IDC_PROPEDITBOX);
m_editBox.SetFont(&m_SSerif8Font);
}
lBoxSelText = pItem->m_curValue;
m_editBox.ShowWindow(SW_SHOW);
m_editBox.SetFocus();
//set the text in the edit box to the property's current value
m_editBox.SetWindowText(lBoxSelText);
}
else if (pItem->m_nItemType == CPropertyList::CHECKBOX)
{
rect.bottom -= 3;
if (m_CheckBoxControl)
m_CheckBoxControl.MoveWindow(rect);
else
{
m_CheckBoxControl.Create("check",BS_CHECKBOX
| BM_SETCHECK |BS_LEFTTEXT
| WS_VISIBLE | WS_CHILD,
rect,this,IDC_PROPCHECKBOXCTRL);
m_CheckBoxControl.SetFont(&m_SSerif8Font);
}
lBoxSelText = pItem->m_curValue;
m_CheckBoxControl.ShowWindow(SW_SHOW);
m_CheckBoxControl.SetFocus();
//set the text in the edit box to the property's current value
if(lBoxSelText == "ON")
{
m_CheckBoxControl.SetCheck(1);
}
else
{
m_CheckBoxControl.SetCheck(0);
}
}
else
{
DisplayButton(rect);
m_nLastBox = 1;
m_prevSel = m_curSel;
rect.bottom -= 3;
rect.right -= 25;
if (m_editBox)
{
m_editBox.MoveWindow(rect);
}
else
{
m_editBox.Create(ES_LEFT | ES_AUTOHSCROLL | WS_VISIBLE
| WS_CHILD | WS_BORDER,
rect,this,IDC_PROPEDITBOX);
m_editBox.SetFont(&m_SSerif8Font);
}
lBoxSelText = pItem->m_curValue;
m_editBox.ShowWindow(SW_SHOW);
m_editBox.SetFocus();
//set the text in the edit box to the property's current value
m_editBox.SetWindowText(lBoxSelText);
}
}
void CPropertyList::DisplayButton(CRect region)
{
//displays a button if the property is a file/color/font chooser
m_nLastBox = 2;
m_prevSel = m_curSel;
if (region.Width() > 25)
region.left = region.right - 25;
region.bottom -= 3;
if (m_btnCtrl)
m_btnCtrl.MoveWindow(region);
else
{
m_btnCtrl.Create("...",BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD,
region,this,IDC_PROPBTNCTRL);
m_btnCtrl.SetFont(&m_SSerif8Font);
}
m_btnCtrl.ShowWindow(SW_SHOW);
m_btnCtrl.SetFocus();
}
void CPropertyList::OnKillFocus(CWnd* pNewWnd)
{
//m_btnCtrl.ShowWindow(SW_HIDE);
CListBox::OnKillFocus(pNewWnd);
}
void CPropertyList::OnKillfocusCmbBox()
{
m_cmbBox.ShowWindow(SW_HIDE);
Invalidate();
}
void CPropertyList::OnKillfocusEditBox()
{
CString newStr;
m_editBox.ShowWindow(SW_HIDE);
Invalidate();
}
void CPropertyList::OnSelchangeCmbBox()
{
CString selStr;
if (m_cmbBox)
{
m_cmbBox.GetLBText(m_cmbBox.GetCurSel(),selStr);
CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
pItem->m_curValue = selStr;
m_Dirty = true;
}
}
void CPropertyList::OnChangeEditBox()
{
CString newStr;
m_editBox.GetWindowText(newStr);
CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
if(pItem->m_curValue != newStr)
{
pItem->m_curValue = newStr;
m_Dirty = true;
}
}
void CPropertyList::HideControls()
{
if(m_editBox)
{
m_editBox.ShowWindow(SW_HIDE);
}
if(m_cmbBox)
{
m_cmbBox.ShowWindow(SW_HIDE);
}
if(m_CheckBoxControl)
{
m_CheckBoxControl.ShowWindow(SW_HIDE);
}
if(m_btnCtrl)
{
m_btnCtrl.ShowWindow(SW_HIDE);
}
}
void CPropertyList::OnVScroll( UINT nSBCode, UINT nPos, CScrollBar* pScrollBar )
{
this->HideControls();
CListBox::OnVScroll(nSBCode, nPos, pScrollBar);
}
void CPropertyList::OnCheckBox()
{
CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
if(m_CheckBoxControl.GetCheck())
{
pItem->m_curValue = "ON";
}
else
{
pItem->m_curValue = "OFF";
}
m_Dirty = true;
}
void CPropertyList::OnButton()
{
if(m_PropertyItems.size() == 0)
{
return;
}
CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
// The dialogs might change the working directory. Save it.
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
//display the appropriate common dialog depending on what type
//of chooser is associated with the property
if (pItem->m_nItemType == CPropertyList::FILE)
{
CString SelectedFile;
CString Filter("All Files (*.*)||");
CFileDialog FileDlg(TRUE, NULL, NULL, NULL,
Filter);
CString initialDir;
CString currPath = pItem->m_curValue;
if (currPath.Right(9) == "-NOTFOUND" || currPath == "NOTFOUND")
{
currPath = "";
}
if (currPath.GetLength() > 0)
{
int endSlash = currPath.ReverseFind('\\');
if(endSlash == -1)
{
endSlash = currPath.ReverseFind('/');
}
initialDir = currPath.Left(endSlash);
}
initialDir.Replace("/", "\\");
FileDlg.m_ofn.lpstrTitle = "Select file";
if (currPath.GetLength() > 0)
FileDlg.m_ofn.lpstrInitialDir = initialDir;
if(IDOK == FileDlg.DoModal())
{
SelectedFile = FileDlg.GetPathName();
m_btnCtrl.ShowWindow(SW_HIDE);
std::string path = SelectedFile;
cmSystemTools::ConvertToUnixSlashes(path);
pItem->m_curValue = path.c_str();
m_Dirty = true;
InvalidateList();
}
}
else if (pItem->m_nItemType == CPropertyList::PATH)
{
CString initialDir = pItem->m_curValue;
// convert back to windos style path
initialDir.Replace("/", "\\");
CString title = "Setting Cache Value: ";
title += pItem->m_propName;
CPathDialog dlg("Select Path", title, initialDir);
if(dlg.DoModal()==IDOK)
{
CString SelectedFile = dlg.GetPathName();
m_btnCtrl.ShowWindow(SW_HIDE);
std::string path = SelectedFile;
cmSystemTools::ConvertToUnixSlashes(path);
pItem->m_curValue = path.c_str();
m_Dirty = true;
InvalidateList();
}
}
cmSystemTools::ChangeDirectory(cwd.c_str());
}
void CPropertyList::OnLButtonUp(UINT nFlags, CPoint point)
{
if (m_bTracking)
{
//if columns were being resized then this indicates
//that mouse is up so resizing is done. Need to redraw
//columns to reflect their new widths.
m_bTracking = FALSE;
//if mouse was captured then release it
if (GetCapture()==this)
::ReleaseCapture();
::ClipCursor(NULL);
CClientDC dc(this);
InvertLine(&dc,CPoint(point.x,m_nDivTop),CPoint(point.x,m_nDivBtm));
//set the divider position to the new value
m_nDivider = point.x;
//redraw
Invalidate();
}
else
{
BOOL loc;
int i = ItemFromPoint(point,loc);
m_curSel = i;
CListBox::OnLButtonUp(nFlags, point);
}
}
void CPropertyList::OnLButtonDown(UINT nFlags, CPoint point)
{
if ((point.x>=m_nDivider-5) && (point.x<=m_nDivider+5))
{
//if mouse clicked on divider line, then start resizing
::SetCursor(m_hCursorSize);
CRect windowRect;
GetWindowRect(windowRect);
windowRect.left += 10; windowRect.right -= 10;
//do not let mouse leave the list box boundary
::ClipCursor(windowRect);
if (m_cmbBox)
m_cmbBox.ShowWindow(SW_HIDE);
if (m_editBox)
m_editBox.ShowWindow(SW_HIDE);
CRect clientRect;
GetClientRect(clientRect);
m_bTracking = TRUE;
m_nDivTop = clientRect.top;
m_nDivBtm = clientRect.bottom;
m_nOldDivX = point.x;
CClientDC dc(this);
InvertLine(&dc,CPoint(m_nOldDivX,m_nDivTop),CPoint(m_nOldDivX,m_nDivBtm));
//capture the mouse
SetCapture();
}
else
{
m_bTracking = FALSE;
CListBox::OnLButtonDown(nFlags, point);
}
}
void CPropertyList::OnMouseMove(UINT nFlags, CPoint point)
{
if (m_bTracking)
{
//move divider line to the mouse pos. if columns are
//currently being resized
CClientDC dc(this);
//remove old divider line
InvertLine(&dc,CPoint(m_nOldDivX,m_nDivTop),CPoint(m_nOldDivX,m_nDivBtm));
//draw new divider line
InvertLine(&dc,CPoint(point.x,m_nDivTop),CPoint(point.x,m_nDivBtm));
m_nOldDivX = point.x;
}
else if ((point.x >= m_nDivider-5) && (point.x <= m_nDivider+5))
//set the cursor to a sizing cursor if the cursor is over the row divider
::SetCursor(m_hCursorSize);
else
{
BOOL loc;
int curSel = ItemFromPoint(point,loc);
if(!loc && curSel < 65535)
{
CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(curSel);
m_CMakeSetupDialog->SetDlgItemText(IDC_PROGRESS, pItem->m_HelpString);
}
CListBox::OnMouseMove(nFlags, point);
}
}
void CPropertyList::InvertLine(CDC* pDC,CPoint ptFrom,CPoint ptTo)
{
int nOldMode = pDC->SetROP2(R2_NOT);
pDC->MoveTo(ptFrom);
pDC->LineTo(ptTo);
pDC->SetROP2(nOldMode);
}
void CPropertyList::PreSubclassWindow()
{
m_bDivIsSet = FALSE;
m_nDivider = 0;
m_bTracking = FALSE;
m_curSel = 1;
m_hCursorSize = AfxGetApp()->LoadStandardCursor(IDC_SIZEWE);
m_hCursorArrow = AfxGetApp()->LoadStandardCursor(IDC_ARROW);
m_SSerif8Font.CreatePointFont(80,_T("MS Sans Serif"));
}
CPropertyItem* CPropertyList::GetItem(int index)
{
return (CPropertyItem*)GetItemDataPtr(index);
}
void CPropertyList::OnRButtonUp( UINT /* nFlags */, CPoint point )
{
CMenu menu;
CRect rect;
this->GetWindowRect(&rect);
BOOL loc;
m_curSel = ItemFromPoint(point,loc);
menu.CreatePopupMenu();
menu.AppendMenu(MF_STRING | MF_ENABLED, 44, "Ignore Cache Entry");
menu.AppendMenu(MF_STRING | MF_ENABLED, 42, "Delete Cache Entry");
menu.AppendMenu(MF_STRING | MF_ENABLED, 43, "Help For Cache Entry");
menu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON,
rect.TopLeft().x + point.x,
rect.TopLeft().y + point.y, this, NULL);
}
void CPropertyList::RemoveProperty(const char* name)
{
this->HideControls();
for(int i =0; i < this->GetCount(); ++i)
{
CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(i);
if(pItem->m_propName == name)
{
m_PropertyItems.erase(pItem);
delete pItem;
this->DeleteString(i);
return;
}
}
}
void CPropertyList::OnIgnore()
{
if(m_curSel == -1 || this->GetCount() <= 0)
{
return;
}
CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
pItem->m_curValue = "IGNORE";
InvalidateList();
}
void CPropertyList::OnDelete()
{
if(m_curSel == -1 || this->GetCount() <= 0)
{
return;
}
CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
m_CMakeSetupDialog->GetCMakeInstance()->GetCacheManager()->RemoveCacheEntry(pItem->m_propName);
m_PropertyItems.erase(pItem);
delete pItem;
this->DeleteString(m_curSel);
this->HideControls();
this->SetTopIndex(0);
InvalidateList();
m_curSel += 1;
if(m_curSel > this->GetCount())
{
m_curSel = this->GetCount();
}
this->SetCurSel(m_curSel);
}
void CPropertyList::OnHelp()
{
if(m_curSel == -1 || this->GetCount() <= 0)
{
return;
}
CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel);
MessageBox(pItem->m_HelpString, pItem->m_propName, MB_OK|MB_ICONINFORMATION);
}
void CPropertyList::RemoveAll()
{
int c = this->GetCount();
for(int i =0; i < c; ++i)
{
this->DeleteString(0);
}
for(std::set<CPropertyItem*>::iterator ii = m_PropertyItems.begin();
ii != m_PropertyItems.end(); ++ii)
{
delete *ii;
}
m_PropertyItems.clear();
m_Dirty = false;
this->HideControls();
InvalidateList();
}
void CPropertyList::InvalidateList()
{
Invalidate();
m_Dirty = true;
}
void CPropertyList::ShowAdvanced()
{
this->SetRedraw(FALSE);
this->ResetContent();
m_ShowAdvanced = true;
std::map<std::string, CPropertyItem*> sortProps;
for(std::set<CPropertyItem*>::iterator i = m_PropertyItems.begin();
i != m_PropertyItems.end(); ++i)
{
sortProps[(const char*)(*i)->m_propName] = *i;
}
for(std::map<std::string, CPropertyItem*>::iterator i = sortProps.begin();
i != sortProps.end(); ++i)
{
CPropertyItem* item = i->second;
if(item->m_NewValue)
{
this->AddPropItem(item, 2);
}
}
for(std::map<std::string, CPropertyItem*>::iterator i = sortProps.begin();
i != sortProps.end(); ++i)
{
CPropertyItem* item = i->second;
if(!item->m_NewValue)
{
this->AddPropItem(item, 2);
}
}
this->SetRedraw(TRUE);
this->InvalidateList();
}
void CPropertyList::HideAdvanced()
{
this->SetRedraw(FALSE);
this->ResetContent();
m_ShowAdvanced = false;
std::map<std::string, CPropertyItem*> sortProps;
for(std::set<CPropertyItem*>::iterator i = m_PropertyItems.begin();
i != m_PropertyItems.end(); ++i)
{
sortProps[(const char*)(*i)->m_propName] = *i;
}
for(std::map<std::string, CPropertyItem*>::iterator i = sortProps.begin();
i != sortProps.end(); ++i)
{
CPropertyItem* item = i->second;
if(item->m_NewValue && !item->m_Advanced)
{
this->AddPropItem(item, 2);
}
}
for(std::map<std::string, CPropertyItem*>::iterator i = sortProps.begin();
i != sortProps.end(); ++i)
{
CPropertyItem* item = i->second;
if(!item->m_Advanced && !item->m_NewValue)
{
this->AddPropItem(item, 2);
}
}
this->SetRedraw(TRUE);
this->InvalidateList();
}

View File

@ -1,179 +0,0 @@
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef CPROPERTYLIST_H
#define CPROPERTYLIST_H
#include "../cmStandardIncludes.h"
class CMakeSetupDialog;
/////////////////////////////////////////////////////////////////////////////
//CPropertyList Items
class CPropertyItem
{
// Attributes
public:
CString m_HelpString;
CString m_propName;
CString m_curValue;
int m_nItemType;
CString m_cmbItems;
bool m_NewValue;
bool m_Removed;
bool m_Advanced;
public:
CPropertyItem(CString propName, CString curValue,
CString helpString,
int nItemType, CString cmbItems)
{
m_NewValue = true;
m_HelpString = helpString;
m_Removed = false;
m_propName = propName;
m_curValue = curValue;
m_nItemType = nItemType;
m_cmbItems = cmbItems;
m_Advanced = false;
}
};
/////////////////////////////////////////////////////////////////////////////
// CPropertyList window
class CPropertyList : public CListBox
{
// Construction
public:
enum ItemType
{
COMBO = 0,
EDIT,
COLOR,
FONT,
FILE,
CHECKBOX,
PATH
};
CPropertyList();
// Attributes
public:
CMakeSetupDialog *m_CMakeSetupDialog;
// Operations
public:
bool GetShowAdvanced() {return m_ShowAdvanced;}
bool IsDirty() { return m_Dirty; }
void ClearDirty() { m_Dirty = false; }
int AddItem(CString txt);
void AddProperty(const char* name,
const char* value,
const char* helpString,
int type,
const char* comboItems,
bool reverseOrder,
bool advanced);
void RemoveProperty(const char* name);
void HideControls();
void ShowAdvanced();
void HideAdvanced();
std::set<CPropertyItem*> GetItems()
{
return m_PropertyItems;
}
void RemoveAll();
CPropertyItem* GetItem(int index);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPropertyList)
public:
virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
protected:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual void PreSubclassWindow();
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CPropertyList();
// Generated message map functions
protected:
//{{AFX_MSG(CPropertyList)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSelchange();
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnKillFocus(CWnd* pNewWnd);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnRButtonUp( UINT nFlags, CPoint point );
//}}AFX_MSG
afx_msg void OnKillfocusCmbBox();
afx_msg void OnSelchangeCmbBox();
afx_msg void OnKillfocusEditBox();
afx_msg void OnChangeEditBox();
afx_msg void OnButton();
afx_msg void OnIgnore();
afx_msg void OnDelete();
afx_msg void OnHelp();
afx_msg void OnCheckBox();
afx_msg void OnVScroll( UINT nSBCode, UINT nPos, CScrollBar* pScrollBar );
DECLARE_MESSAGE_MAP()
void InvertLine(CDC* pDC,CPoint ptFrom,CPoint ptTo);
void DisplayButton(CRect region);
// order = 0 sorted
// order = 1 add to top
// order = 2 add to bottom
int AddPropItem(CPropertyItem* pItem, int order);
void InvalidateList();
CComboBox m_cmbBox;
CEdit m_editBox;
CButton m_btnCtrl;
CButton m_CheckBoxControl;
CFont m_SSerif8Font;
bool m_Dirty;
int m_curSel;
int m_prevSel;
int m_nDivider;
int m_nDivTop;
int m_nDivBtm;
int m_nOldDivX;
int m_nLastBox;
BOOL m_bTracking;
BOOL m_bDivIsSet;
HCURSOR m_hCursorArrow;
HCURSOR m_hCursorSize;
bool m_ShowAdvanced;
std::set<CPropertyItem*> m_PropertyItems;
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PROPERTYLIST_H__74205380_1B56_11D4_BC48_00105AA2186F__INCLUDED_)

View File

@ -1,8 +0,0 @@
// stdafx.cpp : source file that includes just the standard includes
// pcbuilderdialog.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"

View File

@ -1,49 +0,0 @@
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
// 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__AC17A6F8_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_)
#define AFX_STDAFX_H__AC17A6F8_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_
#if _MSC_VER < 1600
#define _WIN32_WINNT 0x0400
#else
#define _WIN32_WINNT 0x0500
#endif
#define _WIN32_IE 0x0400
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#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__AC17A6F8_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@ -1,13 +0,0 @@
//
// PCBUILDERDIALOG.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...
/////////////////////////////////////////////////////////////////////////////

View File

@ -1,48 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by CMakeSetup.rc
//
#define IDM_ABOUTBOX 0x0010
#define IDM_CREATESHORTCUT 0x0020
#define IDD_ABOUTBOX 100
#define IDS_ABOUTBOX 101
#define IDD_CMakeSetupDialog_DIALOG 102
#define IDS_CREATESHORTCUT 102
#define IDR_MAINFRAME 128
#define IDD_CMAKE_HELP_DIALOG 133
#define IDD_GEN_DIALOG 134
#define IDC_WhereSource 1001
#define IDC_BUTTON2 1002
#define IDC_BROWSE_SOURCE 1002
#define IDC_WhereBuild 1003
#define IDC_BUTTON3 1004
#define IDC_BROWSE_BUILD 1004
#define IDC_BuildProjects 1006
#define IDC_LIST2 1007
#define IDC_LIST3 1010
#define IDC_CMAKE_VERSION 1014
#define IDC_FRAME 1015
#define IDC_MouseHelpCaption 1016
#define IDC_OK 1018
#define IDC_Generator 1019
#define IDC_GeneratorLabel 1020
#define IDC_HELP_BUTTON 1021
#define IDC_HELP_BUTTON2 1022
#define IDC_DELETE_BUTTON 1022
#define IDC_EDIT1 1025
#define IDC_AdvancedValues 1027
#define IDC_PROGRESS 1028
#define IDC_BuildForLabel 1029
#define IDC_CHECK1 1030
#define IDC_SUPPRESS_DEV_WARNINGS 1030
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 135
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1031
#define _APS_NEXT_SYMED_VALUE 102
#endif
#endif

View File

@ -176,10 +176,10 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
cm->DefineProperty
("CMAKE_EDIT_COMMAND", cmProperty::VARIABLE,
"Full path to CMakeSetup or ccmake.",
"Full path to cmake-gui or ccmake.",
"This is the full path to the CMake executable "
"that can graphically edit the cache. For example,"
" CMakeSetup, ccmake, or cmake -i.",false,
" cmake-gui, ccmake, or cmake -i.",false,
"Variables that Provide Information");
cm->DefineProperty
@ -289,7 +289,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"Source directory for project.",
"This is the top level source directory for the project. "
"It corresponds to the source directory given to "
"CMakeSetup or ccmake.",false,
"cmake-gui or ccmake.",false,
"Variables that Provide Information");
cm->DefineProperty
("CMAKE_STANDARD_LIBRARIES", cmProperty::VARIABLE,
@ -631,7 +631,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"to 1 for static the static MFC library, and 2 for "
"the shared MFC library. This is used in visual "
"studio 6 and 7 project files. The CMakeSetup "
"dialog uses MFC and the CMakeLists.txt looks like this:\n"
"dialog used MFC and the CMakeLists.txt looks like this:\n"
"add_definitions(-D_AFXDLL)\n"
"set(CMAKE_MFC_FLAG 2)\n"
"add_executable(CMakeSetup WIN32 ${SRCS})\n",false,

View File

@ -840,7 +840,7 @@ int cmake::AddCMakePaths()
if( !cmSystemTools::FileExists(editCacheCommand.c_str()))
{
editCacheCommand = cmSystemTools::GetFilenamePath(cMakeSelf) +
"/CMakeSetup" + cmSystemTools::GetFilenameExtension(cMakeSelf);
"/cmake-gui" + cmSystemTools::GetFilenameExtension(cMakeSelf);
}
if(cmSystemTools::FileExists(editCacheCommand.c_str()))
{