Skip to content

Releases: Tencent/puerts

Unreal_v1.0.7

25 Jun 07:22
Compare
Choose a tag to compare

新增特性

  • 静态绑定的Register支持自定义析构

  • 增加一个宏,允许ts不持有ueobject (#1660)

  • JsEnv.Build.cs增加KeepUObjectReference配置,支持js不强引用uobject

  • JsEnv.Build.cs增加SingleThreaded选项,用于指定v8别开线程池

  • 支持V8 10.6.194

优化

  • 只在有文件更改的时候广播 (#1637)

  • 如果是插件的蓝图类,生成到ue.d.ts文件

  • 如果生成Delegate调用器失败打印错误信息

  • 修复静态函数每次调用的时候会查两次hash表 (#1654)

  • 导出C++的类的Interface函数 (#1681)

  • 生成默认值元信息头文件(InitParamDefaultMetas.inl)保证顺序,以免每次都重新编译FunctionTranslator.cpp

  • UE 5.4的一些编译错误

  • 将蓝图中显示的变量顺序与TS文件中定义的变量顺序保持一致 (#1740)

  • 去除bEnableUndefinedIdentifierWarnings的依赖,可以支持在ue5.3+下开PCH

  • 默认的tsconfig.json添加useDefineForClassFields: false,优化8.4、9.4版本v8的性能

变更

bug修复

  • 修复这个commit导致ue5.3编译报GenericplatformProcess的错误:9258c33

  • 修正pesapi静态绑定,对puerts::Object赋值为空仍然持有context引用的问题

  • Mixin 基类,PIE第二次启动后会崩溃

  • 确保unhandledRejection() 在所有microtasks跑完后才执行

  • PaddingKill状态的对象在虚拟机释放是没有回收 UEGC时崩溃 (#1645)

  • 修复在IWYU模式下的编译报错问题 (#1648)

  • AddToDelegate 区分 SingleDeleagte 和MultipleDelegate,解决单播变成多播的问题

  • 在js绑定delegate时,应该考虑在c++侧被clear的情况,fix #1653

  • 不必要的Reset导致内存泄露,Release传入的地址是null (#1652)

  • 解决如果有多个plugin使用了asio,asio_signal_handler会符号冲突的问题

  • asio在C++ 20下编译报错的问题

  • 静态绑定的报错解决(找不到API)

  • RegisterTArray 支持指针成员类型 (#1657)

  • mixin基类的objectTakeByNative设置同步到其子类

  • 解决错误的将父类的hideCategories赋值给蓝图以及错误的覆盖了ts收集到的hideCategories元数据

  • 把Engine也加入扫描目录,生成相应的ts声明,fix #1727

  • 移除已弃用的configname避免出现没有任何改动也会进行重新编译保存的bug (#1730)

  • 增加对metadata的修改检查来修复删除元数据不会被检测为更改而不重新编译的问题 (#1733)

  • 修复删除uproperty中Property Specifiers不生效的问题 (#1744)

  • 增加对未能正确添加变量的情况进行提示 (#1748)

mac下如果遇到移入废纸篓问题,请

cd Plugins/Puerts/ThirdParty
find . -name "*.dylib" | xargs sudo xattr -r -d com.apple.quarantine 

Unity_v2.1.0,ApiLevel:34

25 Jun 07:20
Compare
Choose a tag to compare

支持10.6版本的v8,升级quickjs到最新版本,支持为每一个虚拟机实例分别指定脚本后端是v8还是quickjs。

中文版本请查看 changelog_hans.md

difference between Node.js/Quickjs/V8: wiki

Unity_v2.0.5,ApiLevel:32

07 May 04:52
Compare
Choose a tag to compare

中文版本请查看 changelog_hans.md

  1. fix: problem about GenericDelegate accessing JsEnv after JsEnv is disposed. #1677 81c3be7
  2. fix: Unity will crash when there are syntax errors in ESM. #1670

difference between Node.js/Quickjs/V8: wiki

Unreal_v1.0.6p1

16 Jan 07:19
Compare
Choose a tag to compare

针对v1.0.6的修复

5.3报GenericPlatformProcess.h的错误请合入:f35a847

v1.0.6p1 2024年1月16日

bug修复

  • 待结束的timer回调中设置的timer不生效的问题

mac下如果遇到移入废纸篓问题,请

cd Plugins/Puerts/ThirdParty
find . -name "*.dylib" | xargs sudo xattr -r -d com.apple.quarantine 

Unreal_v1.0.6

11 Jan 08:28
Compare
Choose a tag to compare

!请使用p1版本

v1.0.6 2024年1月11日

新增特性

  • 支持通过赋值去清空一个JsObject

  • 添加UsingCrossModuleCppType,能避免不同模块引用同一个类typeid不同的问题

  • 静态绑定支持在原生函数中跑异常,有两种实现,线程本地存储以及异常,前者有侵入性,后者不能跨动态库使用

  • 容器添加[Symbol.iterator]支持

  • puerts::Object尝试添加SetWeakAndOwnBy方法,用于某种场景下避免循环引用

  • 静态绑定新增MethodProxy,PropertyProxy,用于解决多重继承virtual public静态绑定,子类对象调用父类方法时,this指针错误的问题

  • 静态绑定添加从Function数据获取this的选项:GetSelfFromData

  • ue5.3兼容

  • v8后端拓展esm的支持:引用ue,cpp模块,继承ue类支持esm(*.mts)

  • TArray.Add() 变参函数 (#1513)

优化

  • v8 和 UE 字符串传递默认使用 UTF16 避免编码转换

  • 声明生成排除PropertyMetaRoot

  • 重构静态绑定,支持同时使用多种后端

  • 支持在puerts名字空间加个_qjs后缀

  • 默认打开UE绕行优化 fix #1537

  • 容器以及纯c++类型修改为使用InstanceTemplate()->NewInstance实现FindOrAdd,fix #1496

  • 优化timer实现,fix #1506

变更

  • 内部使用的GetJsObject方法改为私有,防止业务调用

  • pesapi版本升级以及api新增

  • v8编译参数v8_use_external_startup_data改为false,去掉SnapshotBlob.h,fix #1478

bug修复

  • 修复在windows下使用远程IOS编译,变量名重名导致的编译失败

  • Delegate没调用Bind就Unbind会报错 (#1622)

  • mixin原生类,然后恢复,导致后续原生实现调用参数不对的问题,fix #1618

  • 解决静态绑定下,需要检查参数类型,子类不能通过基类参数的检查的问题

  • 修复 codegen .d.ts 函数参数列表可能重名的问题 (#1609)

  • V8Object.hpp加上线程安全支持

  • FJsObject析构时加入JsEnv生命周期的判断,fix #1582

  • 属性的meta在ts删除了,生成蓝图要同步删除,fix #1551

  • UStruct 析构可能发生在后台线程 fix #1539

  • js分配的容器,在关闭JsEnv时可能会有内存泄露,fix #1530

  • 防止toManualReleaseDelegate传给多个不同签名的回调,导致后面的参数处理错误

  • 函数返回const FXXStruct&时,静态绑定报错,fix #1516

  • 如果require脚本发送错误,不应该放cache,这会导致第二次require能成功返回(但模块不正常)

mac下如果遇到移入废纸篓问题,请

cd Plugins/Puerts/ThirdParty
find . -name "*.dylib" | xargs sudo xattr -r -d com.apple.quarantine 

Unity_v2.0.4,ApiLevel:32

09 Jan 01:51
1b4768d
Compare
Choose a tag to compare

中文版本请查看 doc/unity/zhcn/changelog.md

[2.0.4] - 2024-01-09

  1. fix: the error when invoking extension method with out/ref args.
  2. fix: the error when set a JSObject to null.
  3. fix: the error when getting the arg index when invoking extension method with default arguments value.
  4. fix: members of valuetype created by paramless ctor will be random value.

difference between Node.js/Quickjs/V8: wiki

Unity_v2.0.3,ApiLevel:32

02 Nov 04:37
Compare
Choose a tag to compare

中文版本请查看 doc/unity/zhcn/changelog.md

[2.0.3] - 2023-11-02

  1. important!: to follow the rules of Assetstore, move the generation menu from PuerTS to Tools/PuerTS
  2. feature: support dynamic import (import()) #1540
  3. fix: a bug in access control #1512
  4. fix: a bug about Interface in DTS generation #1541
  5. fix: a bug about functions returning Datetime in DTS generation #1565
  6. fix: a bug in invoking ctors with params in xil2cpp mode #1519
  7. fix: compating the latest Thread::GetThreadStaticDataForThread in xil2cpp mode #1503
  8. fix: some generation error in xil2cpp mode #1520
  9. fix: a memory issue after invoking paramless ctor of valuetype #1563

difference between Node.js/Quickjs/V8: wiki

Unity_v2.0.2,ApiLevel:32

07 Sep 07:25
Compare
Choose a tag to compare

中文版本请查看 doc/unity/zhcn/changelog.md

  1. fix: defaultParam's value is not as expected when StaticWrapper in generated @ctxdegithub
  2. fix: could not build puerts with v8_8.4. In Unity2020-, the xil2cpp mode binary with v8_9.4 of android armv7 may not work. #1469
  3. optimize: combine libwee8.a and libpuerts.a in android for xil2cpp mode @mingxxming
  4. optimize: use universal binary instead of two binary with different arch in OSX now. @mikejurka
  5. optimize: JsEnv now have a public Isolate field to get the pointer of v8::Isolate @mingxxming
  6. optimize: remove our SnapshotBlob.h. Use v8's builtin snapshot instead. #1477
  7. optimize: The build script can now run with low Node.js version @xiezheng-XD #1495
  8. optimize: support inspector by default in Linux @Geequlim

difference between Node.js/Quickjs/V8: wiki

Unreal_v1.0.5

31 Aug 03:56
Compare
Choose a tag to compare

mac下如果遇到移入废纸篓问题,请

cd Plugins/Puerts/ThirdParty
find . -name "*.dylib" | xargs sudo xattr -r -d com.apple.quarantine 

新增特性

  • ios下,以及quickjs后端的wasm实现

  • FJsObject添加JsEnv生命周期监听,puerts.Object补上拷贝构造,赋值的JsEnv生命周期监听

  • 支持使用visual studio时,typescript的监听和自动蓝图,js生成

  • 支持通过@uproperty.attach设置Component层次

  • 对放置路径不符合ts标识符规范的蓝图

  • 支持单独设置某个虚拟机的max-old-space-size,并把增量分析编译虚拟机的内存增加到2G

  • 声明生成按钮改为puerts按钮,除了生成*.d.ts,也拷贝系统js文件

  • 添加自动管理生命周期的puerts.toDelegate方法

  • ue.d.ts新增ue api的注释

  • pesapi addon的支持

  • pesapi添加类型信息支持

  • pesapi addon支持通过WITHOUT_PESAPI_WRAPPER使用dll链接,而不是内部函数指针

  • pesapi addon支持直接使用V8 api

  • pesapi addon支持v8 fast api call

  • 添加pesapi_create_array, pesapi_is_array,pesapi_get_array_length

  • 添加macOS arm64的支持

  • quickjs版本支持html5打包

优化

  • minxin如果class是RootSet,Function也AddToRoot

  • 只有原生的才生成到ue.d.ts

  • 重构静态绑定:backend彻底分离而且可以共存

  • 尝试ts继承蓝图类时报错

变更

  • 配置类别更名 Engine Class Extends Mode -> Default JavaScript Environment

  • 不支持override GameInstance.ReceiveInit

  • Typing目录调整到Project下

  • quickjs编辑器下默认使用静态链接!影响比较大,如果用quickjs,就不能在JsEnv外使用静态绑定

  • ReactUMG不再随Puerts发布,有需要自行下载:https://github.com/puerts/ReactUMG

bug修复

  • 函数参数是ts关键字导致的语法非法

  • 解决重用外层esm标记导致的两次require间相互影响的问题

  • 静态绑定如果构造函数没重载时,参数错误构造函数不执行也不抛异常的问题

  • 解决元素为组件的容器识别为组件的问题

  • 解决v8 fast api call下静态函数性能慢的问题

  • 修复forceinject的时候可能重复setprototype导致的exception

  • ue5.2可能会生成重名的隐藏property,加个过滤

Unity_v2.0.1,ApiLevel:32

16 Aug 07:11
Compare
Choose a tag to compare

中文版本请查看 doc/unity/zhcn/changelog.md

  1. Fix: NestedType was not declared correctly in link.xml #1460
  2. Fix: out parameters with ValueType might cause crash in xil2cpp mode. #1460
  3. Fix: default value of parameters in extension method was not correct in xil2cpp mode #1456
  4. Fix: JSObject was not recycle correctly

difference between Node.js/Quickjs/V8: wiki