6.6.0 - Fix6 - 修复 Temurin 平台无法构建项目
This commit is contained in:
@@ -186,8 +186,8 @@ class UI(private val scriptRuntime: ScriptRuntime) : AugmentableProxy(scriptRunt
|
||||
val widgets = scriptRuntime.ui.widgets
|
||||
if (widgets.contains(viewName)) {
|
||||
val ctor = widgets.prop(viewName) as NativeFunction
|
||||
val widget = withRhinoContext {
|
||||
ctor.construct(it, scriptRuntime.topLevelScope, arrayOf())
|
||||
val widget = withRhinoContext { ctx ->
|
||||
ctor.construct(ctx, scriptRuntime.topLevelScope, arrayOf())
|
||||
} as ScriptableObject
|
||||
val f = widget.prop("renderInternal") as BaseFunction
|
||||
return __inflateRhinoRuntime__(scriptRuntime, scriptRuntime.ui.layoutInflater.newInflateContext().also { ctx ->
|
||||
|
||||
@@ -108,11 +108,26 @@ class Utils {
|
||||
}
|
||||
|
||||
LibDeployer setDestDir(String destDir) {
|
||||
def destFile = destDir.matches("[/\\\\].+") ? project.file(destDir.substring(1)) : project.file(destDir)
|
||||
println(destDir.matches("[/\\\\].+"))
|
||||
println(project.file(destDir))
|
||||
println(project.file(destDir.substring(1)))
|
||||
println(destFile.absolutePath)
|
||||
|
||||
// @Hint by SuperMonster003 on Dec 2, 2024.
|
||||
// ! On some platforms (such as Temurin),
|
||||
// ! using project.file might not correctly retrieve the absolute path of the current project.
|
||||
// ! For example, using "/foo/bar",
|
||||
// ! Expected path: "/.../AutoJs6/libs/.../src/sdk/native",
|
||||
// ! Actual path: "/src/sdk/native",
|
||||
// ! In this case, the leading path separator should be removed, using "foo/bar" instead of "/foo/bar".
|
||||
// !
|
||||
// ! zh-CN:
|
||||
// !
|
||||
// ! 某些平台 (如 Temurin) 使用 project.file 可能无法正确获取当前项目的绝对路径.
|
||||
// ! 以 "/foo/bar" 为例,
|
||||
// ! 预期路径: "/.../AutoJs6/libs/.../src/sdk/native",
|
||||
// ! 实际路径: "/src/sdk/native",
|
||||
// ! 这种情况下需要去除路径分隔符前缀, 即使用 "foo/bar" 而非 "/foo/bar".
|
||||
def destFile = destDir.startsWith(File.separator)
|
||||
? project.file(destDir.substring(1))
|
||||
: project.file(destDir)
|
||||
|
||||
destFile.mkdirs()
|
||||
this.destDir = destDir
|
||||
this.destFile = destFile
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#Mon Dec 02 16:52:56 CST 2024
|
||||
BUILD_TIME=1733129576279
|
||||
#Mon Dec 02 18:03:28 CST 2024
|
||||
BUILD_TIME=1733133808639
|
||||
COMPILE_SDK_VERSION=34
|
||||
JAVA_VERSION=23
|
||||
JAVA_VERSION_MIN_RADICAL=0
|
||||
@@ -17,6 +17,6 @@ RAPID_OCR_OPENCV_MOBILE_LABEL_VERSION=13
|
||||
RAPID_OCR_OPENCV_MOBILE_VERSION=4.5.3
|
||||
TARGET_SDK_VERSION=34
|
||||
TARGET_SDK_VERSION_INRT=29
|
||||
VERSION_BUILD=2883
|
||||
VERSION_BUILD=2884
|
||||
VERSION_NAME=6.6.0
|
||||
VSCODE_EXT_REQUIRED_VERSION=1.0.8
|
||||
|
||||
Reference in New Issue
Block a user