Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,22 @@
{
"target_name": "electron-wallpaper",
"sources": [
"src/output.cc",
"src/bindings.cc"
],
"include_dirs": [
"<!@(node -p \"require('node-addon-api').include\")",
],
"defines": ["NAPI_CPP_EXCEPTIONS"],
"configurations": {
"Release": {
"msvs_settings": {
"VCCLCompilerTool": {
"ExceptionHandling": 1
}
}
}
},
"conditions": [
[
"OS==\"win\"",
Expand Down
7 changes: 6 additions & 1 deletion example/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;

app.allowRendererProcessReuse = true;

let mainWindow;

/**
Expand All @@ -15,7 +17,10 @@ let mainWindow;
const createWindow = function() {
const windowProperties = {
width: 800,
height: 600
height: 600,
webPreferences: {
nodeIntegration: true
}
};

mainWindow = new BrowserWindow(windowProperties);
Expand Down
Loading