Electron 将图像设置为墙纸 (OS X and Windows)

Electron set image as wallpaper (OS X and Windows)

如何将图像设置为 OS X 和 Windows 上的墙纸?我已经查看了文档,但找不到这方面的信息。

它不在 Electron 文档中,因为它首先不是 Electron 问题。

使用库 'wallpaper' which can be found on NPMjs 并通过

安装
npm install --save wallpaper

您可以使用 this 电子模块。

$ npm install wallpaper

Note that this module works only for macOS 10.12+, Linux, and Windows 10+. as on 8th April, 2019

我也在寻找一些解决方案来处理 Windows 7。