Commits
Darrell Schiebel authored 718cc8dab56
28 28 | |
29 29 | |
30 30 | |
31 31 | |
32 32 | |
33 33 | |
34 34 | |
35 35 | |
36 36 | |
37 37 | |
38 + | |
38 39 | |
40 + | |
41 + | |
39 42 | |
43 + | |
40 44 | |
41 45 | |
42 46 | |
43 47 | |
48 + | |
49 + | |
44 50 | |
45 51 | using namespace casa; |
46 52 | |
47 53 | int main( int argc, char *argv[] ) { |
54 + | |
55 + | casacore::FFTW init_casacore_fftw; |
56 + | std::string casadata; |
57 + | |
58 + | char *ctmp; |
59 + | std::string tmp; |
60 + | struct stat statbuf; |
61 + | if ( (ctmp=getenv("CASADATA")) && stat(ctmp,&statbuf) == 0 && S_ISDIR(statbuf.st_mode) ) { |
62 + | casadata = ctmp; |
63 + | } else if ( (ctmp=getenv("CASAPATH")) && stat((tmp=std::string(ctmp)+"/data").c_str( ),&statbuf) && S_ISDIR(statbuf.st_mode) ) { |
64 + | casadata = tmp; |
65 + | } else { |
66 + | struct passwd *pw = getpwuid(getuid()); |
67 + | casadata = std::string(pw->pw_dir) + "/.casa/data"; |
68 + | } |
69 + | //fprintf(stderr, "measures data: %s\n", casadata.c_str( )); |
70 + | //fflush(stderr); |
71 + | casatools::get_state( ).setDistroDataPath(casadata); |
72 + | |
48 73 | int stat = 0; |
49 74 | QApplication app(argc, argv ); |
50 75 | app.setOrganizationName( "CASA"); |
51 76 | app.setApplicationName( "Feather"); |
52 77 | try { |
53 78 | FeatherMain featherApplication; |
54 79 | featherApplication.show(); |
55 80 | /*featherApplication.ensurePolished(); |
56 81 | QSize rect = featherApplication.size(); |
57 82 | qDebug() << "Size of rectangle is "<<rect.width()<<" height="<<rect.height(); |
62 87 | return stat; |
63 88 | } |
64 89 | catch (const casacore::AipsError& err) { |
65 90 | cerr<<"**"<<err.getMesg()<<endl; |
66 91 | } |
67 92 | catch (...) { |
68 93 | cerr<<"**non-AipsError exception**"<<endl; |
69 94 | } |
70 95 | return stat; |
71 96 | } |
72 - | |
73 - | |
74 - | |
75 - | |
76 - | |
77 - | |
78 - | |