Changeset 1341 for trunk/examples/novice/N03/exampleN03.cc
- Timestamp:
- Nov 5, 2010, 4:03:47 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/novice/N03/exampleN03.cc
r1337 r1341 52 52 #include "G4UIExecutive.hh" 53 53 #endif 54 55 #include "qcoreapplication.h" 56 57 #define MAC_OSX_APP 1 54 58 55 59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 107 111 // 108 112 G4UImanager* UImanager = G4UImanager::GetUIpointer(); 109 113 114 #ifdef MAC_OSX_APP 115 std::string progName = argv[0]; 116 std::string::size_type pos = progName.find(".app/Contents/MacOS/",0); 117 if (pos != std::string::npos) { 118 std::string progDir = progName.substr(0,pos+4); 119 chdir((progDir+"/Contents/macros").c_str()); 120 argc = 1; 121 } 122 #endif 123 110 124 if (argc!=1) // batch mode 111 125 { 112 126 G4String command = "/control/execute "; 113 127 G4String fileName = argv[1]; 114 128 UImanager->ApplyCommand(command+fileName);
Note: See TracChangeset
for help on using the changeset viewer.