Code Monkey home page Code Monkey logo

Comments (1)

hexabits avatar hexabits commented on September 2, 2024

Examples

refrbrowser.cpp @L51

    // Next, try the docsys path (if application is run from the nifskope
    // repository directory, as in linux build).
    if( ! docFolderPresent ) {
        docFolder.setPath( qApp->applicationDirPath() );
        docFolder.cd( "docsys" );
        docFolderPresent = docFolder.exists( "doc" );
    }

    // Again, try the docsys path (if application is run from the
    // nifskope/release repository directory, as in windows build).
    if( ! docFolderPresent ) {
        docFolder.setPath( qApp->applicationDirPath() );
        docFolder.cd( "../docsys" );
        docFolderPresent = docFolder.exists( "doc" );
    }

    // Again, try the docsys path when build dir != source dir
    // which is default in recent versions of Qt SDK,
    // i.e. "shadow build" option in Qt Creator.
    if( ! docFolderPresent ) {
    docFolder.setPath( qApp->applicationDirPath() );
    docFolder.cd( "../../nifskope/docsys" );
    docFolderPresent = docFolder.exists( "doc" );
    }

    // Try the /usr/share/nifskope path, for linux install.
    if ( ! docFolderPresent ) {
        docFolder.cd( "/usr/share/nifskope" );
        docFolderPresent = docFolder.exists( "doc" );
    }

nifxml.cpp @L517

    QStringList xmlList( QStringList()
            << "nif.xml"
                        << "docsys/nifxml/nif.xml"
                        << "../docsys/nifxml/nif.xml"
                        << "../../docsys/nifxml/nif.xml"
                        << "../nifskope/docsys/nifxml/nif.xml"
                        << "../../nifskope/docsys/nifxml/nif.xml"
            << "/usr/share/nifskope/nif.xml" );

kfmxml.cpp @L224

    QStringList xmlList( QStringList()
            << "kfm.xml"
                        << "docsys/kfmxml/kfm.xml"
                        << "../docsys/kfmxml/kfm.xml"
                        << "../../docsys/kfmxml/kfm.xml"
                        << "../nifskope/docsys/kfmxml/kfm.xml"
                        << "../../nifskope/docsys/kfmxml/kfm.xml"
            << "/usr/share/nifskope/kfm.xml" );

options.cpp @L172

      QDir directory( QApplication::applicationDirPath() );
      // local copy
      if (!directory.cd("lang")) {
         // relative from nifskope/release
         if (!directory.cd("../lang")) {
            // linux
            if (!directory.cd("/usr/share/nifskope/lang")) {
               // no language directory found
            }
         }
      }

nifskope.cpp @L1188, @L1254

   // local copy
   if (!directory.cd("lang")) {
      // relative from nifskope/release
      if (!directory.cd("../lang")) {
         // linux
         if (!directory.cd("/usr/share/nifskope/lang")) {
            // no language directory found
         }
      }
   }

// ...

    // Check app dir, relative from nifskope/release, linux data dir
    QStringList qssList( QStringList()
            << "style.qss"
            << "../style.qss"
            << "/usr/share/nifskope/style.qss" );

renderer.cpp @L385

    QDir dir( QApplication::applicationDirPath() );
    if ( 0 == dir.dirName().compare("Release",Qt::CaseInsensitive) 
        ||0 == dir.dirName().compare("Debug",Qt::CaseInsensitive) 
        )
    {
        dir.cd( ".." );
    }

    if ( dir.exists( "shaders" ) )
        dir.cd( "shaders" );
    else if ( dir.exists( "/usr/share/nifskope/shaders" ) )
        dir.cd( "/usr/share/nifskope/shaders" );

from nifskope.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.