mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-11-29 18:59:14 +08:00
modify idgen,now any directory can be used as assets dir
This commit is contained in:
parent
aa2c1bd866
commit
6916394e96
@ -12,7 +12,7 @@ endmacro()
|
||||
function(CreatePAK project ResourceDIR PakPath rhpath)
|
||||
add_custom_target(${project}_assets
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/scripts/idgen.py ${ResourceDIR} ${rhpath}
|
||||
COMMAND zip -r -D -0 ${PakPath} ./
|
||||
COMMAND zip -q -r -D -0 ${PakPath} ./
|
||||
WORKING_DIRECTORY ${ResourceDIR}
|
||||
COMMENT "Pckage Assets from ${ResourceDIR} to:${PakPath}")
|
||||
add_dependencies(${project} ${project}_assets)
|
||||
|
@ -174,12 +174,9 @@ if ( __name__ == "__main__"):
|
||||
idstart=10000
|
||||
if len(sys.argv)<3:
|
||||
print(sys.argv[0])#+'assetspath R.h_path ID.xml'
|
||||
validassetsdir=['assets','res','resources']
|
||||
print("arg1="+sys.argv[1])
|
||||
segments=sys.argv[1].split('/')
|
||||
for i in range(0,len(segments)):
|
||||
if segments[i] in validassetsdir:
|
||||
break
|
||||
namespace=segments[i]
|
||||
namespace=segments[len(segments)-2]
|
||||
if sys.argv[2].find("widget/R.h")>=0 and (namespace=='gui'):
|
||||
namespace='cdroid'
|
||||
idstart=1000
|
||||
|
@ -383,7 +383,7 @@ ColorStateList* Assets::getColorStateList(const std::string&fullresid){
|
||||
if(it->second->colors)return new ColorStateList(*it->second->colors);
|
||||
else return ColorStateList::valueOf(it->second->icolor);
|
||||
}
|
||||
LOGV("%s not found",fullresid.c_str());
|
||||
LOGV_IF(!fullresid.empty(),"%s not found",fullresid.c_str());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user