Skip to content
Snippets Groups Projects
Select Git revision
  • 85254c16b2cce0da9da3fd5d44229c3a164635b2
  • master default
2 results

pykat_output.kat

Blame
  • Forked from finesse / pykat
    Source project has a limited visibility.
    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);
    	}
    }