6.5.0 - 新增 opencc 模块; 修复编辑器问题; 优化打包应用功能及文件管理器

This commit is contained in:
SuperMonster003
2023-12-02 13:52:14 +08:00
parent afc0bce2c9
commit 17616504ab
907 changed files with 6766 additions and 3005 deletions

View File

@@ -211,17 +211,17 @@ class Versions {
void showInfo() {
def title = "Version information for paddleocr library"
def infoOpencv = "OpenCV version: $opencv"
def infoOpenCV = "OpenCV version: $opencv"
def infoNdk = "NDK version: $ndk"
def infoCmake = "CMake version: $cmake"
def maxLength = maxOf([title, infoOpencv, infoNdk, infoCmake].collect { it.length() })
def maxLength = maxOf([title, infoOpenCV, infoNdk, infoCmake].collect { it.length() })
[
"=".repeat(maxLength),
title,
"-".repeat(maxLength),
infoOpencv,
infoOpenCV,
infoNdk,
infoCmake,
"=".repeat(maxLength),

View File

@@ -181,7 +181,7 @@ public class Predictor {
if (modelPath.charAt(0) != '/') {
// Read model files from custom path if the first character of mode path is '/'
// otherwise copy model to cache from assets
realPath = appCtx.getCacheDir() + "/" + modelPath;
realPath = appCtx.getCacheDir() + File.separator + modelPath;
// region add by TonyJiangWJ
String key = "PADDLE_MODEL_LOADED" + md5(modelPath);
// 进行了模型更新 需要强制覆盖旧模型
@@ -210,7 +210,7 @@ public class Predictor {
this.cpuThreadNum = cpuThreadNum;
this.cpuPowerMode = cpuPowerMode;
this.modelPath = realPath;
this.modelName = realPath.substring(realPath.lastIndexOf("/") + 1);
this.modelName = realPath.substring(realPath.lastIndexOf(File.separator) + 1);
return true;
}
@@ -242,7 +242,7 @@ public class Predictor {
// Load word labels from file
try {
InputStream labelInputStream;
if (labelPath.startsWith("/")) {
if (labelPath.startsWith(File.separator)) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
labelInputStream = Files.newInputStream(Paths.get(labelPath));
} else {