/[svn]/qsampler/trunk/src/main.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/main.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1558 by capela, Thu Dec 6 09:35:33 2007 UTC revision 1643 by nagata, Sun Jan 13 16:44:00 2008 UTC
# Line 27  Line 27 
27  #include <QApplication>  #include <QApplication>
28  #include <QTranslator>  #include <QTranslator>
29  #include <QLocale>  #include <QLocale>
30    #if defined(__APPLE__)  // Toshi Nagata 20080105
31    #include <QDir>
32    #endif
33    
34  //-------------------------------------------------------------------------  //-------------------------------------------------------------------------
35  // main - The main program trunk.  // main - The main program trunk.
# Line 52  int main ( int argc, char **argv ) Line 54  int main ( int argc, char **argv )
54                  app.installTranslator(&translator);                  app.installTranslator(&translator);
55          }          }
56    
57            #if defined(__APPLE__)  //  Toshi Nagata 20080105
58            {
59                    //  Set the plugin path to @exetutable_path/../plugins
60                    QDir dir(QApplication::applicationDirPath());
61                    dir.cdUp();  // "Contents" directory
62                    QApplication::setLibraryPaths(QStringList(dir.absolutePath() + "/plugins"));
63    
64                    //  Set the PATH environment variable to include @executable_path/../../..
65                    dir.cdUp();
66                    dir.cdUp();
67                    QString path(getenv("PATH"));
68                    path = dir.absolutePath() + ":" + path;
69                    setenv("PATH", path.toUtf8().constData(), 1);
70            }
71            #endif
72    
73          // Construct default settings; override with command line arguments.          // Construct default settings; override with command line arguments.
74          QSampler::Options options;          QSampler::Options options;
75          if (!options.parse_args(app.argc(), app.argv())) {          if (!options.parse_args(app.argc(), app.argv())) {

Legend:
Removed from v.1558  
changed lines
  Added in v.1643

  ViewVC Help
Powered by ViewVC