1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-30 02:50:05 +00:00

Projucer: Added an optional command-line argument when generating a project from a PIP to specify a JUCE modules directory to be used instead of the global default

This commit is contained in:
ed 2018-08-23 15:53:08 +01:00
parent f77c995b4d
commit cd8c25b0c1
3 changed files with 18 additions and 7 deletions

View file

@ -718,7 +718,17 @@ namespace
std::cout << "Creating directory " << outputDir.getFullPathName() << std::endl;
}
PIPGenerator generator (pipFile, outputDir);
File juceDir;
if (args.size() > 3)
{
juceDir = args[3].resolveAsFile();
if (! juceDir.exists())
ConsoleApplication::fail ("Specified JUCE modules directory doesn't exist.");
}
PIPGenerator generator (pipFile, outputDir, juceDir);
auto createJucerFileResult = generator.createJucerFile();
@ -797,7 +807,7 @@ namespace
<< " Sets the global path for a specified os and identifier. The os should be either osx, windows or linux and the identifiers can be any of the following: "
<< "defaultJuceModulePath, defaultUserModulePath, vst3Path, aaxPath (not valid on linux), rtasPath (not valid on linux), androidSDKPath or androidNDKPath." << std::endl
<< std::endl
<< " " << appName << " --create-project-from-pip path/to/PIP path/to/output" << std::endl
<< " " << appName << " --create-project-from-pip path/to/PIP path/to/output path/to/JUCE/modules (optional)" << std::endl
<< " Generates a JUCE project from a PIP file." << std::endl
<< std::endl
<< "Note that for any of the file-rewriting commands, add the option \"--lf\" if you want it to use LF linefeeds instead of CRLF" << std::endl