mirror of
https://github.com/autc04/Retro68.git
synced 2024-06-18 13:29:37 +00:00
Rez: don't insist on .r input files when --copy is present
This commit is contained in:
parent
1cc5202ccf
commit
ccd227e67c
27
Rez/Rez.cc
27
Rez/Rez.cc
|
@ -62,7 +62,7 @@ int main(int argc, const char *argv[])
|
||||||
|
|
||||||
po::notify(options);
|
po::notify(options);
|
||||||
|
|
||||||
if(options.count("help") || !options.count("input"))
|
if(options.count("help") || (!options.count("input") && !options.count("copy")))
|
||||||
{
|
{
|
||||||
usage();
|
usage();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -91,21 +91,22 @@ int main(int argc, const char *argv[])
|
||||||
world.getResources().addResources(copyRsrc.resources);
|
world.getResources().addResources(copyRsrc.resources);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(std::string fn : options["input"].as<std::vector<std::string>>())
|
if(options.count("input"))
|
||||||
{
|
for(std::string fn : options["input"].as<std::vector<std::string>>())
|
||||||
RezLexer lexer(fn);
|
{
|
||||||
|
RezLexer lexer(fn);
|
||||||
|
|
||||||
if(options.count("define"))
|
if(options.count("define"))
|
||||||
for(std::string define : options["define"].as<std::vector<std::string>>())
|
for(std::string define : options["define"].as<std::vector<std::string>>())
|
||||||
lexer.addDefine(define);
|
lexer.addDefine(define);
|
||||||
if(options.count("include"))
|
if(options.count("include"))
|
||||||
for(std::string path : options["include"].as<std::vector<std::string>>())
|
for(std::string path : options["include"].as<std::vector<std::string>>())
|
||||||
lexer.addIncludePath(path);
|
lexer.addIncludePath(path);
|
||||||
|
|
||||||
|
|
||||||
RezParser parser(lexer, world);
|
RezParser parser(lexer, world);
|
||||||
parser.parse();
|
parser.parse();
|
||||||
}
|
}
|
||||||
|
|
||||||
rsrcFile.resources = world.getResources();
|
rsrcFile.resources = world.getResources();
|
||||||
rsrcFile.creator = options["creator"].as<std::string>();
|
rsrcFile.creator = options["creator"].as<std::string>();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user