ENH: fix uppercase version so defines are not upper as well
[cmake.git] / Source / WXDialog / CMakeSetup.cpp
blob23b3f0952270d98d3d0aa08ad542a72169bcafb4
1 /*=========================================================================
3 Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake
4 Module: $RCSfile: CMakeSetup.cpp,v $
5 Language: C++
6 Date: $Date: 2005-08-09 19:42:49 $
7 Version: $Revision: 1.3 $
9 Author: Jorgen Bodde
11 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
12 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
14 This software is distributed WITHOUT ANY WARRANTY; without even
15 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 PURPOSE. See the above copyright notices for more information.
18 =========================================================================*/
20 #if defined(__GNUG__) && !defined(__APPLE__)
21 #pragma implementation "CMakeSetup.h"
22 #endif
24 // For compilers that support precompilation, includes "wx/wx.h".
25 #include "wx/wxprec.h"
27 #ifdef __BORLANDC__
28 #pragma hdrstop
29 #endif
31 #ifndef WX_PRECOMP
32 #include "wx/wx.h"
33 #endif
35 ////@begin includes
36 ////@end includes
38 #include <wx/filename.h>
40 #include "cmSystemTools.h"
41 #include "CommandLineInfo.h"
43 #include "CMakeSetup.h"
44 #include "CMakeSetupFrame.h"
46 ////@begin XPM images
47 ////@end XPM images
49 /*!
50 * Application instance implementation
53 ////@begin implement app
54 IMPLEMENT_APP( CMakeSetupApp )
55 ////@end implement app
57 /*!
58 * CMakeSetupApp type definition
61 IMPLEMENT_CLASS( CMakeSetupApp, wxApp )
63 /*!
64 * CMakeSetupApp event table definition
67 BEGIN_EVENT_TABLE( CMakeSetupApp, wxApp )
69 ////@begin CMakeSetupApp event table entries
70 ////@end CMakeSetupApp event table entries
72 END_EVENT_TABLE()
74 /*!
75 * Constructor for CMakeSetupApp
78 CMakeSetupApp::CMakeSetupApp()
80 ////@begin CMakeSetupApp member initialisation
81 ////@end CMakeSetupApp member initialisation
84 /*!
85 * Initialisation for CMakeSetupApp
88 bool CMakeSetupApp::OnInit()
90 cmSystemTools::DisableRunCommandOutput();
92 // parse command line params
93 cmCommandLineInfo cm;
94 if(!cm.ParseCommandLine(wxApp::argc, wxApp::argv))
96 printf("Error while parsing the command line\n");
97 return false;
100 // set vendor name and app for config
101 SetVendorName("Kitware");
102 SetAppName("CMakeSetup");
104 CMakeSetupFrm *MyFrame = new CMakeSetupFrm(NULL);
106 // alternative app path way, somehow otherwise it does not work
107 wxFileName fname(argv[0]);
108 MyFrame->DoInitFrame(cm, fname.GetPath(wxPATH_GET_SEPARATOR | wxPATH_GET_VOLUME));
109 MyFrame->Show(TRUE);
111 return true;
115 * Cleanup for CMakeSetupApp
117 int CMakeSetupApp::OnExit()
119 ////@begin CMakeSetupApp cleanup
120 return wxApp::OnExit();
121 ////@end CMakeSetupApp cleanup