Skip to content
Snippets Groups Projects
Select Git revision
  • 4197c2af849b25edf94385445d3aaad74382d87e
  • master default protected
  • 72-improve-docs-for_optimal_setup
  • os-path-join
  • develop-GA
  • add-higher-spindown-components
  • v1.3
  • v1.2
  • v1.1.2
  • v1.1.0
  • v1.0.1
11 results

git-tag.sh

Blame
  • orc.cpp 602 B
    #include "ResourceCompiler.h"
    
    void printUsage() {
    	cerr << "Invalid command-line options!" << endl;
    	cerr << "Usage: orc <input filename> <output filename>" << endl;
    }
    
    int main(int argc, char *argv[])
    {
    	if(argc != 3) {
    		printUsage();
    		exit(1);
    	}
    	else {
    		string inputFilename(argv[1]);
    		string outputFilename(argv[2]);
    		
    		// TODO: better filename checking
    		if( inputFilename == "." || inputFilename == ".." ||
    			outputFilename == "." || outputFilename == "..")
    		{
    			printUsage();
    			exit(1);
    		}
    		
    		ResourceCompiler rc(inputFilename, outputFilename);
    		rc.compile();
    		
    		exit(0);
    	}
    }