79 : selected(kNone),
session(NULL), shell(NULL), isGUI(
false), verbose(
true)
80{
81 if ( verbose ) {
82 G4cout <<
"Available UI session types: [ ";
83 if ( qt_build )
G4cout <<
"Qt, ";
84 if ( xm_build )
G4cout <<
"Xm, ";
85 if ( win32_build)
G4cout <<
"Win32, ";
86 if (tcsh_build )
G4cout <<
"tcsh, ";
88 }
89
90
91
93 if (type != "") SelectSessionByArg(stype);
94
95
96 if ( selected == kNone ) SelectSessionByEnv();
97
98
99 if ( selected == kNone ) {
102 size_t islash = appinput.find_last_of("/\\");
103 if (islash == G4String::npos)
104 appname = appinput;
105 else
106 appname = appinput.substr(islash+1, appinput.size()-islash-1);
107
108 SelectSessionByFile(appname);
109 }
110
111
112 if ( selected == kNone) SelectSessionByBestGuess();
113
114
115 switch ( selected ) {
116 case kQt:
117#if defined(G4UI_BUILD_QT_SESSION)
119 isGUI = true;
120#endif
121 break;
122 case kXm:
123#if defined(G4UI_BUILD_XM_SESSION)
125 isGUI = true;
126#endif
127 break;
128 case kWin32:
129#if defined(G4UI_BUILD_WIN32_SESSION)
133 isGUI = true;
134#endif
135 break;
136 case kTcsh:
137#if !(defined(WIN32) || defined(__MINGW32__))
142#endif
143 break;
144 case kCsh:
149 default:
150 break;
151 }
152
153
156 "UI0002",
158 "Specified session type is not build in your system,\n"
159 "or no session type is specified.\n"
160 "A fallback session type is used.");
161
162 selected = kCsh;
167 }
168
170}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
#define TIMEMORY_INIT(...)
#define DISCARD_PARAMETER(p)
G4GLOB_DLL std::ostream G4cout
G4String to_lower_copy(G4String str)
Return lowercased copy of string.