nashaofu

Results 199 comments of nashaofu

This library is consistent with the return value of electron, but in the next version I will add a property to provide the actual scale_factor,

I can't reproduce this issue on my computer, but I tried modifying the code. Could you test the code on your computer?https://github.com/nashaofu/display-info/pull/26

@luftaquila Is it the latest version?

不太会交叉编译,arm64的编译总是报错

你可以尝试编译一下吧,直接引用这个库会报错的,因为没有编译出arm的二进制文件,这个项目的二进制文件是提前生成好的,不是安装包的时候编译的。 如果你有兴趣,可以帮忙编译一下arm的包

1. 你可以看看napi-rs的设计,在安装依赖时,会根据系统架构去拉取对应的二进制包 2. fromPoint等API接口是使用rust实现的,具体可参考https://github.com/nashaofu/screenshots-rs 3. slim-init.sh 是用于打包生成docker镜像的(用于测试),你不需要管这个,交叉编译可以看看napi-rs的说明

可以正常运行了吗

js调用c++[官方实现](https://github.com/nodejs/node-addon-api),搜索引擎关键词napi,如果用rust编写也可以使用napi-rs。测试编译后的文件是否有效,可以直接用下面代码测试,API与本项目的README一样。 ```js const { Screenshots } = require('./xxxxx.node') ``` 如果你这边编译好了,希望能把你的编译步骤给到我,我这边使用ci执行

那这个不可以的,我这边npm包是使用ci发布的