ElectronScreenshot

基于 Electron 开发的截屏软件

MIT License

Downloads
3
Stars
10
Committers
2

Electron .

Usage

Prerequisite

uglify-js (, ).

npm i -g uglify-js

Install

npm i @financial-freedom/electron-screenshot

Import

/**
 *  main.js
 */
// 
const { useCapture } = require('@jsoon/electron-screenshot');

// 
const mainWindow = new BrowserWindow({
  // Options
  // ...
});

// 
useCapture({
  mainWindow
});

Demo Run

npm run start

Demo Build

#  mac
npm run dist:mac

#  win
npm run dist:win

, .

Features

  • (, )
  • 🤩
  • 🤩

Issues

Windows

⚠️ canvas Node ( Electron ), node-canvas . canvas , .

Windows node-canvas , Node, Electron , , c++ v8, , .

node-canvas , .

'toupper': is not a member of 'std'

, node_modules/canvas/src/util.h :

// Line 31
return c1 == c2 || std::toupper(c1) == std::toupper(c2);

:

// std:: -> ::
return c1 == c2 || ::toupper(c1) == ::toupper(c2);

Canvas.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::shared_ptr<class v8::BackingStore> __cdecl v8::ArrayBuffer::GetBackingStore(void)

, node_modules/nan/nan_typedarray_contents.h :

// Line 36 - 40
#if (V8_MAJOR_VERSION >= 8)
  data = static_cast<char*>(buffer->GetBackingStore()->Data()) + byte_offset;
#else
  data = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
#endif

:

// 
data = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;

Electron-rebuild canvas 2.6.1 fails on Windows 10: Canvas.obj : error LNK2001: unresolved external symbol

[Bug]: Link error for native c++ modules

Package Rankings
Top 20.4% on Npmjs.org
Related Projects