Commit e09fda57 authored by chrisryancombs's avatar chrisryancombs
Browse files

Added ISISROOT checks to qisis applications.

parent 6ea3d105
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -102,16 +102,6 @@ namespace Isis {
    strncpy(env, "LANG=en_US", 1023);
    putenv(env);

    // Verify ISISROOT was set
    // Note: as printing and logging IExceptions requires ISISROOT to be set (for preferences),
    //       The case below cannot be handled with IExceptions
    if (getenv("ISISROOT") == NULL || QString(getenv("ISISROOT")) == "") {
      QString message = "Please set ISISROOT before running any Isis "
          "applications";
      cerr << message << endl;
      exit(1);
    }

    // Get the starting cpu time, direct I/Os, page faults, and swaps
    //p_startClock = clock();
    p_startDirectIO = DirectIO();
+11 −5
Original line number Diff line number Diff line
@@ -107,6 +107,14 @@ void InterruptSignal(int);
 * @return int
 */
int main(int argc, char *argv[]) {
  // Verify ISISROOT was set
  // Note: as printing and logging IExceptions requires ISISROOT to be set (for preferences),
  //       The case below cannot be handled with IExceptions
  if (getenv("ISISROOT") == NULL || QString(getenv("ISISROOT")) == "") {
    std::cerr << "Please set ISISROOT before running any Isis applications" << std::endl;
    exit(1);
  }

#ifdef CWDEBUG
  startMonitoringMemory();
  signal(SIGSEGV, SegmentationFault);
@@ -120,14 +128,12 @@ int main(int argc, char *argv[]) {
  Isis::Application::p_applicationForceGuiApp = true;
#endif
    
  // ISISROOT not set is handled in Application initialization, needs to be before qtpluginpath
  Isis::Application *app = new Isis::Application(argc, argv);
  app->RegisterGuiHelpers(GuiHelpers());
  
  // Add the plugin directory so QT looks at the Isis plugin dir
  Isis::FileName qtpluginpath("$ISISROOT/3rdParty/plugins");
  QCoreApplication::addLibraryPath(qtpluginpath.expanded());

  Isis::Application *app = new Isis::Application(argc, argv);
  app->RegisterGuiHelpers(GuiHelpers());
  int status = app->Run(APPLICATION);
  delete app;
  delete QCoreApplication::instance();
+6 −0
Original line number Diff line number Diff line
#include "IsisDebug.h"

#include <iostream>

#include "CnetEditorWindow.h"
#include "QIsisApplication.h"

@@ -7,6 +9,10 @@ using namespace Isis;

int main(int argc, char ** argv)
{
  if (getenv("ISISROOT") == NULL || QString(getenv("ISISROOT")) == "") {
    std::cerr << "Please set ISISROOT before running any Isis applications" << std::endl;
    exit(1);
  }
  QIsisApplication app(argc, argv);
  CnetEditorWindow window;
  window.show();
+4 −1
Original line number Diff line number Diff line
@@ -35,7 +35,10 @@ using namespace std;
using namespace Isis;

int main(int argc, char *argv[]) {

  if (getenv("ISISROOT") == NULL || QString(getenv("ISISROOT")) == "") {
    std::cerr << "Please set ISISROOT before running any Isis applications" << std::endl;
    exit(1);
  }
  Gui::checkX11();

  try {
+4 −0
Original line number Diff line number Diff line
@@ -13,6 +13,10 @@ using namespace std;
using namespace Isis;

int main(int argc, char *argv[]) {
  if (getenv("ISISROOT") == NULL || QString(getenv("ISISROOT")) == "") {
    std::cerr << "Please set ISISROOT before running any Isis applications" << std::endl;
    exit(1);
  }
  Isis::Gui::checkX11();

  // Add the Qt plugin directory to the library path
Loading