mirror of
https://github.com/openharmony/developtools_global_resource_tool.git
synced 2026-07-18 17:24:42 -04:00
单独对Har包编译时不进行解引用
Signed-off-by: fangyunzhong <fangyunzhong2@huawei.com>
This commit is contained in:
@@ -59,6 +59,10 @@ public:
|
||||
{
|
||||
return dependEntry;
|
||||
}
|
||||
bool IsHar()
|
||||
{
|
||||
return moduleType_ == ModuleType::HAR;
|
||||
}
|
||||
static void SetUseModule()
|
||||
{
|
||||
useModule_ = true;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Global {
|
||||
namespace Restool {
|
||||
class FileManager : public Singleton<FileManager> {
|
||||
public:
|
||||
uint32_t ScanModules(const std::vector<std::string> &inputs, const std::string &output);
|
||||
uint32_t ScanModules(const std::vector<std::string> &inputs, const std::string &output, const bool isHar);
|
||||
const std::map<int64_t, std::vector<ResourceItem>> &GetResources() const
|
||||
{
|
||||
return items_;
|
||||
|
||||
@@ -39,7 +39,7 @@ const static std::string NEW_LINE_PATH = "\nat ";
|
||||
const static std::string LONG_PATH_HEAD = "\\\\?\\";
|
||||
const static int32_t VERSION_MAX_LEN = 128;
|
||||
const static int32_t INT_TO_BYTES = sizeof(uint32_t);
|
||||
static const int8_t RESTOOL_VERSION[VERSION_MAX_LEN] = { "Restool 5.005" };
|
||||
static const int8_t RESTOOL_VERSION[VERSION_MAX_LEN] = { "Restool 5.006" };
|
||||
const static int32_t TAG_LEN = 4;
|
||||
|
||||
enum class KeyType {
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace OHOS {
|
||||
namespace Global {
|
||||
namespace Restool {
|
||||
using namespace std;
|
||||
uint32_t FileManager::ScanModules(const vector<string> &inputs, const string &output)
|
||||
uint32_t FileManager::ScanModules(const vector<string> &inputs, const string &output, const bool isHar)
|
||||
{
|
||||
vector<pair<ResType, string>> noBaseResource;
|
||||
for (auto input : inputs) {
|
||||
@@ -41,7 +41,7 @@ uint32_t FileManager::ScanModules(const vector<string> &inputs, const string &ou
|
||||
if (!noBaseResource.empty()) {
|
||||
ResourceUtil::PrintWarningMsg(noBaseResource);
|
||||
}
|
||||
return ParseReference(output);
|
||||
return isHar ? RESTOOL_SUCCESS : ParseReference(output);
|
||||
}
|
||||
|
||||
uint32_t FileManager::MergeResourceItem(const map<int64_t, vector<ResourceItem>> &resourceInfos)
|
||||
|
||||
@@ -325,7 +325,7 @@ uint32_t ResourcePack::ScanResources(const vector<string> &inputs, const string
|
||||
{
|
||||
auto &fileManager = FileManager::GetInstance();
|
||||
fileManager.SetModuleName(moduleName_);
|
||||
if (fileManager.ScanModules(inputs, output) != RESTOOL_SUCCESS) {
|
||||
if (fileManager.ScanModules(inputs, output, configJson_.IsHar()) != RESTOOL_SUCCESS) {
|
||||
return RESTOOL_ERROR;
|
||||
}
|
||||
return RESTOOL_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user