mirror of
https://github.com/openharmony/developtools_global_resource_tool.git
synced 2026-07-20 22:47:00 -04:00
+15
-1
@@ -50,7 +50,11 @@ uint32_t PackageParser::Parse(int argc, char *argv[])
|
||||
if (ParseCommand(argc, argv) != RESTOOL_SUCCESS) {
|
||||
return RESTOOL_ERROR;
|
||||
}
|
||||
return CheckParam();
|
||||
if (CheckParam() != RESTOOL_SUCCESS) {
|
||||
return RESTOOL_ERROR;
|
||||
}
|
||||
AdaptResourcesDirForInput();
|
||||
return RESTOOL_SUCCESS;
|
||||
}
|
||||
|
||||
const vector<string> &PackageParser::GetInputs() const
|
||||
@@ -220,6 +224,16 @@ uint32_t PackageParser::AddCachePath(const string& argValue)
|
||||
return RESTOOL_SUCCESS;
|
||||
}
|
||||
|
||||
// -i input directory, add the resource directory
|
||||
void PackageParser::AdaptResourcesDirForInput()
|
||||
{
|
||||
if (!isFileList_ && !combine_) { // -l and increment compile -i, no need to add resource directory
|
||||
for (auto &path : inputs_) {
|
||||
path = FileEntry::FilePath(path).Append(RESOURCES_DIR).GetPath();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t PackageParser::CheckParam() const
|
||||
{
|
||||
if (inputs_.empty() && append_.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user