am 510c24e8: Merge "Fix AAPT daemon mode with paths containg spaces." into lmp-mr1-dev
* commit '510c24e8930447811f6725cbf7f3cefec2194a5d': Fix AAPT daemon mode with paths containg spaces.
This commit is contained in:
@@ -2533,22 +2533,17 @@ int doSingleCrunch(Bundle* bundle)
|
|||||||
|
|
||||||
int runInDaemonMode(Bundle* bundle) {
|
int runInDaemonMode(Bundle* bundle) {
|
||||||
std::cout << "Ready" << std::endl;
|
std::cout << "Ready" << std::endl;
|
||||||
for (std::string line; std::getline(std::cin, line);) {
|
for (std::string cmd; std::getline(std::cin, cmd);) {
|
||||||
if (line == "quit") {
|
if (cmd == "quit") {
|
||||||
return NO_ERROR;
|
return NO_ERROR;
|
||||||
}
|
} else if (cmd == "s") {
|
||||||
std::stringstream ss;
|
// Two argument crunch
|
||||||
ss << line;
|
std::string inputFile, outputFile;
|
||||||
std::string s;
|
std::getline(std::cin, inputFile);
|
||||||
|
std::getline(std::cin, outputFile);
|
||||||
std::string command, parameterOne, parameterTwo;
|
bundle->setSingleCrunchInputFile(inputFile.c_str());
|
||||||
std::getline(ss, command, ' ');
|
bundle->setSingleCrunchOutputFile(outputFile.c_str());
|
||||||
std::getline(ss, parameterOne, ' ');
|
std::cout << "Crunching " << inputFile << std::endl;
|
||||||
std::getline(ss, parameterTwo, ' ');
|
|
||||||
if (command[0] == 's') {
|
|
||||||
bundle->setSingleCrunchInputFile(parameterOne.c_str());
|
|
||||||
bundle->setSingleCrunchOutputFile(parameterTwo.c_str());
|
|
||||||
std::cout << "Crunching " << parameterOne << std::endl;
|
|
||||||
if (doSingleCrunch(bundle) != NO_ERROR) {
|
if (doSingleCrunch(bundle) != NO_ERROR) {
|
||||||
std::cout << "Error" << std::endl;
|
std::cout << "Error" << std::endl;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user