清除所有第三方库
This commit is contained in:
parent
00318a3bae
commit
25794b178b
@ -17,7 +17,7 @@
|
||||
"arkOptions": {
|
||||
"runtimeOnly" : {
|
||||
"packages": [
|
||||
"libocctrender.so"
|
||||
"libnativeocct.so"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -6,13 +6,13 @@
|
||||
"lockfileVersion": 3,
|
||||
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
|
||||
"specifiers": {
|
||||
"libocctrender.so@src/main/cpp/types/libocctrender": "libocctrender.so@src/main/cpp/types/libocctrender"
|
||||
"libnativeocct.so@src/main/cpp/types/libnativeocct": "libnativeocct.so@src/main/cpp/types/libnativeocct"
|
||||
},
|
||||
"packages": {
|
||||
"libocctrender.so@src/main/cpp/types/libocctrender": {
|
||||
"name": "libocctrender.so",
|
||||
"libnativeocct.so@src/main/cpp/types/libnativeocct": {
|
||||
"name": "libnativeocct.so",
|
||||
"version": "1.0.0",
|
||||
"resolved": "src/main/cpp/types/libocctrender",
|
||||
"resolved": "src/main/cpp/types/libnativeocct",
|
||||
"registryType": "local"
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,6 @@
|
||||
"author": "",
|
||||
"license": "",
|
||||
"dependencies": {
|
||||
"libocctrender.so": "file:./src/main/cpp/types/libocctrender"
|
||||
"libnativeocct.so": "file:./src/main/cpp/types/libnativeocct"
|
||||
}
|
||||
}
|
||||
@ -13,8 +13,8 @@ include_directories(${NATIVERENDER_ROOT_PATH}
|
||||
|
||||
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN")
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
set(CMAKE_INSTALL_RPATH "\${ORIGIN}")
|
||||
|
||||
# OCCT 库目录
|
||||
set(OCCT_VERSION "7.9")
|
||||
@ -68,7 +68,7 @@ foreach(LIB_NAME ${THIRD_PARTY_LIBS})
|
||||
endforeach()
|
||||
|
||||
# 添加源文件
|
||||
add_library(occtrender SHARED
|
||||
add_library(nativeocct SHARED
|
||||
napi_init.cpp
|
||||
# Header
|
||||
EGLCore/EGLCore.h
|
||||
@ -87,12 +87,8 @@ find_library(hilog-lib hilog_ndk.z)
|
||||
find_library(libace-lib ace_ndk.z)
|
||||
find_library(libuv-lib uv)
|
||||
|
||||
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN")
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
# 链接系统库
|
||||
target_link_libraries(occtrender PUBLIC
|
||||
target_link_libraries(nativeocct PUBLIC
|
||||
# EGL Hilog 库
|
||||
${EGL-lib}
|
||||
${GLES-lib}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "libocctrender.so",
|
||||
"name": "libnativeocct.so",
|
||||
"types": "./Index.d.ts",
|
||||
"version": "1.0.0",
|
||||
"description": "Please describe the basic information."
|
||||
@ -65,11 +65,11 @@ export struct ModelView {
|
||||
})
|
||||
Button('测试库加载').onClick(async()=>{
|
||||
try {
|
||||
let OCCTRender = await import("libocctrender.so")
|
||||
console.info(`[NDK] 模块类型: ${typeof OCCTRender}`);
|
||||
console.info(`[NDK] 模块值: ${JSON.stringify(OCCTRender)}`);
|
||||
console.info(`[NDK] 所有属性: ${Object.keys(OCCTRender).join(', ')}`);
|
||||
if (!OCCTRender) throw new Error("模块为 undefined");
|
||||
const nativeocct = await import("libnativeocct.so")
|
||||
console.info(`[NDK] 模块类型: ${typeof nativeocct}`);
|
||||
console.info(`[NDK] 模块值: ${JSON.stringify(nativeocct)}`);
|
||||
console.info(`[NDK] 所有属性: ${Object.keys(nativeocct).join(', ')}`);
|
||||
if (!nativeocct) throw new Error("模块为 undefined");
|
||||
} catch (e) {
|
||||
console.error(`[NDK] 加载失败: ${e.message}`, e);
|
||||
// 此处会触发你看到的错误
|
||||
@ -81,35 +81,6 @@ export struct ModelView {
|
||||
type: 'surface',
|
||||
controller: this.displayController
|
||||
})
|
||||
// .onLoad(() => {
|
||||
// // 获取 native window(必须在 onLoad 后才能获取)
|
||||
// this.nativeWindow = this.displayController.getXComponentSurfaceId();
|
||||
// if (this.nativeWindow === undefined || this.nativeWindow === '') {
|
||||
// hilog.error(0x0000, 'ModelView', 'Failed to get native window');
|
||||
// return;
|
||||
// }
|
||||
// // 获取 XComponent 尺寸
|
||||
// let width = 0;
|
||||
// let height = 0;
|
||||
// try {
|
||||
// OCCTRender.initRenderer(this.displayContrId, this.nativeWindow, { width: 800, height: 600 });
|
||||
// console.info('Init Render Good');
|
||||
// }catch(e){
|
||||
// console.info('Init Render Faile');
|
||||
// }
|
||||
// })
|
||||
// .onDestroy(() => {
|
||||
// // 销毁时清理资源
|
||||
// OCCTRender.destroyRenderer(this.displayContrId);
|
||||
// })
|
||||
// .onTouch((event) => {
|
||||
// // 简单鼠标/触摸拖拽旋转
|
||||
// if (event.type === TouchType.Move) {
|
||||
// const dx = event.tiltX;
|
||||
// const dy = event.tiltY;
|
||||
// //occt.onMouseEvent(this.xcomponentId, dx, dy);
|
||||
// }
|
||||
// })
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
.backgroundColor('#333333');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user