mirror of
https://github.com/openharmony/developtools_global_resource_tool.git
synced 2026-07-18 09:14:48 -04:00
引用oh资源
Change-Id: Ic8f9d01597448b36f9a81c38313f41ebf0699bbb Signed-off-by: 谢智宇 <xiezhiyu2@huawei.com>
This commit is contained in:
@@ -35,6 +35,10 @@ public:
|
||||
{
|
||||
moduleName_ = moduleName;
|
||||
};
|
||||
const std::string &GetModuleName() const
|
||||
{
|
||||
return moduleName_;
|
||||
};
|
||||
uint32_t MergeResourceItem(const std::map<int64_t, std::vector<ResourceItem>> &resourceInfos);
|
||||
bool ScaleIcons(const std::string &output, const std::map<std::string, std::set<uint32_t>> &iconMap);
|
||||
void SetScanHap(bool state);
|
||||
|
||||
@@ -49,7 +49,7 @@ const static std::string SOLUTIONS_ARROW = "> ";
|
||||
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.1.0.005" };
|
||||
static const int8_t RESTOOL_VERSION[VERSION_MAX_LEN] = { "Restool 5.1.0.006" };
|
||||
const static int32_t TAG_LEN = 4;
|
||||
constexpr static int DEFAULT_POOL_SIZE = 8;
|
||||
static std::set<std::string> g_resourceSet;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include "id_defined_parser.h"
|
||||
#include "file_entry.h"
|
||||
#include "file_manager.h"
|
||||
#include "resource_util.h"
|
||||
|
||||
namespace OHOS {
|
||||
@@ -57,7 +58,8 @@ uint32_t IdDefinedParser::Init()
|
||||
}
|
||||
}
|
||||
//SystemResource.hap only defined by base/element/id_defined.json
|
||||
if (isSys) {
|
||||
string moduleName = FileManager::GetInstance().GetModuleName();
|
||||
if (isSys && moduleName == "entry") {
|
||||
return RESTOOL_SUCCESS;
|
||||
}
|
||||
if (!idDefinedInput.empty() && ResourceUtil::FileExist(idDefinedInput)) {
|
||||
|
||||
@@ -101,6 +101,7 @@ uint32_t ResourcePack::InitModule()
|
||||
}
|
||||
|
||||
moduleName_ = configJson_.GetModuleName();
|
||||
FileManager::GetInstance().SetModuleName(moduleName_);
|
||||
vector<string> moduleNames = packageParser_.GetModuleNames();
|
||||
IdWorker &idWorker = IdWorker::GetInstance();
|
||||
int64_t startId = static_cast<int64_t>(packageParser_.GetStartId());
|
||||
|
||||
Reference in New Issue
Block a user