GithubHelp home page GithubHelp logo

hiitiger / goverlay Goto Github PK

View Code? Open in Web Editor NEW
764.0 36.0 110.0 142.35 MB

DirectX hook and game overlay solution for Electron, Qt and CEF, just like discord/steam game overlay,inject any app to overlay in your game

License: Other

TypeScript 2.02% JavaScript 0.23% C++ 97.50% Batchfile 0.04% CMake 0.21%
electron hook directx game game-overlay overlay

goverlay's Introduction

DirectX hook and game overlay solution for any desktop GUI like Electron, Qt, CEF and WPF⚡

Codacy Badge

Build status

game overlay solution

  • DirectX hook, draw in game
  • support any GUI framework, use the power of web/Electron/WPF/Qt to inject any app to overlay in your game
  • easy window management
  • input intercept in game

screenshot

demo

Prerequisites

  1. Visual Sudio 2022 with latest sdk to build native C++ project.
  2. CMake
  3. node 32bit/64bit

run demo

  1. git clone https://github.com/hiitiger/goverlay.git
  2. run demo client
    • this includes the steps to build node native-addons electron-overlay
        npm i
        npm run build
        @REM  for 32bit electron
        npm run build:addon:x86
        @REM  for 64bit electron
        npm run build:addon:x64
    
        npm run start
  3. click the start button to start overlay
  4. start a d3d game, type its window name and inject
  5. CTRL+F2 to toggle full input intercept, CTRL+F3 to show demo popup(doit ^^)

inject a specific game

After you have the demo runs right

  1. copy files [n_overlay.dll, n_overlay.x64.dll, injector_helper.exe, injector_helper.x64.exe] from directory game-overlay\prebuilt to directory electron-overlay
  2. run demo client
  3. click start button to start overlay
  4. start the game you want to inject to and wait for it game window to show
  5. input the window title(or part of the title) of the game, and click the inject button

use in your own project

  1. checkout document about how to use it in your own project

feature

  • electron offscreen window overlay in game
  • dx12 api support
  • dx11 api support
  • dx10 api support
  • dx9 api support
  • OpenGL api support
  • native draw overlay
  • hardware acc osr bitmap transport
  • multi windows support
  • window z-index and focus
  • in game sync drag and resize
  • in game defered drag and resize
  • window draw policy
  • input intercepting by manually control
  • custom shaped window (alpha test for mouse handling)
  • input intercepting by auto mouse check
  • brwoser window state manage
  • better hotkey
  • session reconnect

support

contact me if had issues with specific features or in-game performance.

contact me for other GUI frameworks support or need any special feature.

note

Many games block dll injection, please sign dll files with your certificate.

products using goverlay

goverlay's People

Contributors

anakkk avatar dependabot[bot] avatar hiitiger avatar honzapatcz avatar jellybrick avatar kutu avatar lincolnthree avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

goverlay's Issues

OpenGL hook

DirectX hook covers 40%, but what about the other mainstream GFX library, OpenGL, thats another 40%(Vulkan etc, has the 20% left)

[UI] Displaying text

Waited for the upgrade to 0.9, saw the item about adapting the theme to the system theme. However, the fonts as in the last version I have are not congruent, grey on top of the white tab header.

изображение

I can't use the lib

I try to start to inject to csgo but nothing happens
index.js:

const { app, BrowserWindow } = require('electron')
const path = require('path')
const url = require('url')
const IOverlay = require("electron-overlay")
const IOVhook = require("node-ovhook")
const fs = require("fs")
let screen

app.disableHardwareAcceleration()
IOverlay.start()
IOverlay.setHotkeys([{
  name: "overlay.toggle",
  keyCode: 65,
  modifiers: { ctrl: true }
}])
IOverlay.setEventCallback((event, payload) => {
  if (event === "game.input") {
    const window = BrowserWindow.fromId(payload.windowId)
    if (window) {
      const intpuEvent = IOverlay.translateInputEvent(payload)
      if (payload.msg !== 512) {
        console.log(event, payload)
        console.log(`translate ${JSON.stringify(intpuEvent)}`)
      }

      if (intpuEvent) {
        window.webContents.sendInputEvent(intpuEvent)
      }
      const focusWin = BrowserWindow.fromId(payload.focusWindowId)
      if (focusWin) {
        focusWin.focusOnWebView()
      }
    }
  }
})

// Wait until the app is ready
app.once('ready', () => {
  screen = require("electron").screen
  let windowOverlay = new BrowserWindow({
    transparent: true,
    frame: false,
    show: false,
    webPreferences: {
      nodeIntegration: true,
      offscreen: true,
    },
    title: "Overlay"
  })
  addOverlayWindows("Overlay", windowOverlay, 0, 0, true)

  windowOverlay.webContents.on("paint", (event, dirty, image) => {
    IOverlay.sendFrameBuffer(
      windowOverlay.id,
      image.getBitmap(),
      image.getSize().width,
      image.getSize().height
    )
  })

  windowOverlay.on("resize", () => {
    IOverlay.sendWindowBounds(window.id, { rect: window.getBounds() })
  })

  fs.writeFileSync("process.json", JSON.stringify(IOVhook.getTopWindows(true)))

  let process
  for (let i = 0; i < IOVhook.getTopWindows(true).length; i++) {
    const element = IOVhook.getTopWindows(true)[i];
    if (element.title === "Counter-Strike: Global Offensive") {
      process = element
    }
  }
  console.log("process: " + JSON.stringify(process))
  if (process) {
    console.log("inject:" + IOVhook.injectProcess(process))
  }

  windowOverlay.loadURL(url.format({
    pathname: path.join(__dirname, 'overlay.html'),
    protocol: 'file:',
    slashes: true
  }))

  let window = null

})
function addOverlayWindows(name, window, dragborder = 0, captionHeight = 0, transparent = false) {
  const display = screen.getDisplayNearestPoint(
    screen.getCursorScreenPoint()
  )

  IOverlay.addWindow(window.id, {
    name,
    transparent,
    resizable: window.isResizable(),
    maxWidth: window.isResizable
      ? display.bounds.width
      : window.getBounds().width,
    maxHeight: window.isResizable
      ? display.bounds.height
      : window.getBounds().height,
    minWidth: window.isResizable ? 100 : window.getBounds().width,
    minHeight: window.isResizable ? 100 : window.getBounds().height,
    nativeHandle: window.getNativeWindowHandle().readUInt32LE(0),
    rect: window.getBounds(),
    caption: {
      left: dragborder,
      right: dragborder,
      top: dragborder,
      height: captionHeight
    },
    dragBorderWidth: dragborder
  })

}

overlay.html:

<h1>hello</h1>

logs :

PS H:\loloverlay\gelectron\test> npm start

> [email protected] start H:\loloverlay\gelectron\test
> electron .


 OverlayMain::addWindow
create share mem:1680,1050
process: {"windowId":1838298,"processId":13876,"threadId":15440,"title":"Counter-Strike: Global Offensive"}
inject:false

What am I doing wrong?

I was able to compile and run demo without errors but I can't get it to show overlay on any other game or program...

Dragging issue & fullscreen crash

I have successfully tested in a few games, however in League of Legends, dragging seems a bit off and buggy, it's jittering, some sort of mouse position problems? Also in the same game, if I use fullscreen and click the "doit" button, game will lose focus and eventually crash ( it does work for other games though)
Thanks for such a great library.

Getting (DLL) initialization routine failed error

Hey there. I'm new to this project and trying to figure out how to get things building/running. I followed the steps in your README but keep hitting an issue.

image

After this, the Electron app starts, but when I press "start" I get another error:

image

Any idea of the cause/fix?

No source files to change .dll

Unfortunately, you've removed source files to compile new n_overlay.x64.dll. I need to use window with name "OverlayTip" to get simple overlay that will be always visible ontop of the game, but it have -10px offset on top and left, so it's impossible to screen of the game.

Pretty much, all i need is this code to be compiled with latest sources for game-overlay

{
    if (overlayTipSprite_)
    {
        overlayTipSprite_->rect.x = targetWidth_ - overlayTipSprite_->rect.width;
        overlayTipSprite_->rect.y = targetHeight_ - overlayTipSprite_->rect.height;
        _drawWindowSprite(overlayTipSprite_);
    }
}

Also it would be great if you remove hotkey for F1 from precompiled .dlls because you can't disable that F1 acts pretty much like ctrl+F2 and triggers overlay.hotkey.toggleInputIntercept

If it's possible and you will be able to provide me just compiled .dlls, it also would be fantastic!

All games are not working

hello again,
finally i compiled the files and manage to run overlay on csgo ,
But there is a problem. I also tested 2 other games(Dota2, Foxhole). None of them worked.
I have active windows by ovhook.getTopWindows()
as you see all 3 games are running
image

i got this IDs

{ windowId: 1836928,
    processId: 10980,
    threadId: 11416,
    title: 'Counter-Strike: Global Offensive' },

  { windowId: 11076044,
    processId: 9048,
    threadId: 13096,
    title: 'Dota 2' },

  { windowId: 5440872,
    processId: 12868,
    threadId: 6752,
    title: 'War  ' },

but when i use

ovhook.injectProcess({
        processId: number,
        threadId: number,
    })

Only the csgo works.
how can i fix this any tips ?

also i Copied n_overlay.dll + n_ovhelper.exe into ...\node-ovhook\build\Release
thank you
best regards

Demo not work

Hi
I try to run your demo client but failed. Here is my steps.

  1. i use the node-gyp: ^9.x to recompile c++ addons, because i have only installed python3.
  2. Then i ran the electron client successfully. Also i click the button start overlay and run csgo in steam
  3. Then i input the csgo process title to inject, command line outputs:
PostThreadMessage to hook window. 
PostThreadMessage to hook window. 
PostThreadMessage to hook window. 
safeInject, pid:19808 dll:xxx\n_overlay.dll result:1

which means inject successfully (i guess)
4. There is no window appeared in csgo. Is there any step that i make wrong?

Thx a lot!

dx11app doesn't re-render overlay, unless resize window

Overlay works fine with dx9app, but doesn't with dx11app

Video that demonstrate the issue https://youtu.be/o_4kfkJ3GMo

I use:

  • win7 x64 SP1
  • node v10.14.1
  • electron 2.0.8
  • npm install --global --production windows-build-tools to compile

I compile all code with --msvs_version=2017, without this parameter it fails to compile
npm run compile:electron --msvs_version=2017

Compile logs https://gist.github.com/kutu/3068190697791625e79d36d7def9f4cd

  • electron-overlay
  • game-overlay, dx9app, dx11app, n_overlay and n_ovhelper
    "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe" gameoverlay.sln /p:Configuration="Debug" /p:Platform="x64"

I'm not C dev, but if you tell me what to try to do, I hope we can narrow down the issue.

windows 11 / vs2022, overlay not working on fortnight. Possible to use discord overlay binaries?

not sure what logs I can post, I saw the message about attempting hook but nothing ever happens. Anything I can upload here to help diagnose why it doesn't work?

also, would it be possible to just use the binaries produced by discord? Might be more trouble than it's worth to reverse engineer them but they work well in full screen dx3d games:

  • DiscordHookHelper64.exe (supports two args : inject and offsets)
  • discord_overlay_sdk_x64.dll
    1 0 000239E0 CharEvent
    2 1 000237A0 ForwardMessage
    3 2 00023F60 ImeCancelComposition
    4 3 00023CB0 ImeCommitText
    5 4 00023D80 ImeSetComposition
    6 5 00023730 InitDxgi
    7 6 000237B0 KeyEvent
    8 7 00023B50 MouseButtonEvent
    9 8 00023C70 MouseMotionEvent
    10 9 00023780 OnPresent
    11 A 00023AC0 PointInsideClickZone
    12 B 00023C90 SetImeCompositionRangeCallback
    13 C 00023CA0 SetImeSelectionBoundsCallback
  • DiscordHook64.dll

It needs some extensive documentation | Doesnt work for me

I tried the default app compiled everything as should. Game runs normally press ESC and VS stops and breakpoint so I continue and ignore it and nothing Overlay doesnt show up. I then tried to somehow get it to work with CSGO unsuccessfully. Can you post the demo for CSGO please?
Thanks in advance.

Will the overlay work in Fullscreen?

Noticed this on the docs we can assocciate a new IME conext if game disabled it, but in fullscreen it will cause window to lose focus. not really sure what this really means.

Can someone clarify if this will work with games that are full screen or not?

How to ignore mouse in statusbar window?

Is it possible to use the statusbar in a way that ignores mouse events as if this window were invisible?
The idea is to show a performance monitor, and that the user can click through this window

I'm using:
Electron 21.2.2 and latest goverlay version

win.setIgnoreMouseEvents(true) didn't work on overlay

i can't open the demo

hello, i clone your code and want to open the demo, but i see something error, it exists when 'npm run start'

_20181203192017

best wishes

Pass click from trasparency to game

Hello!
Is it possible to pass input from the overlay to the game? I have a fullscreen HTML canvas, but as long as it is active my game won't listen to any mouse / key events.

So far I've tried:

window.setIgnoreMouseEvents(true, {forward: true});
window.setFocusable(false);

also

body {
	pointer-events: none
}

with no success.

Any ideas? Thanks

Intention to continue?

I think this is great and usefull project, maybe a little bit messy, but so far the most working of all, please dont stop. Btw node-gyp has been updated to work with python-3, gonna make PR soon
PR: #35

Error trying demo

projects\gelectron\electron-overlay\build\electron_overlay.vcxproj(50,945): error MSB4025: The project file could not be loaded. '', hexadecim
al value 0x0C, is an invalid character. Line 50, position 945.
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:200:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\projects\gelectron\electron-overlay
gyp ERR! node -v v12.4.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1

using visual studio 2019.

RivaTuner and other GPU software are your enemy!

I spent hours trying to figure out what the problem was and I found out that having RivaTuner running was somehow blocking the overlay from displaying properly! I'm making this issue so whatever poor soul comes here next with this problem has a chance to figure this out faster than I did.

"electron_overlay.node"/"node_ovhook.node" Require/Import Error

Hey,

I've played around with the demo that I built a while ago, and it's working really nicely for most games. Thanks for providing the project - it's really cool!

However, when attempting to follow the instructions to add to your own project, I get an error in both the Main/Renderer process when using const IOverlay = require("electron-overlay") or const IOVhook = require("node-ovhook"):

"Error: The specified module could not be found.
\\?<Path to relevant .node file>"

GoverlayError 0

The thing is, as shown in the screenshot, the ".node" file does actually exist in the directory. So I'm not sure why it can't find it.

Here's the process that I've taken so far:

  • Somehow I managed to compile it a while ago on another computer (that had Visual Studio/Python/Git etc), and I am able to run the app and inject into most games using the Electron GUI (the "DX11app.exe" demo always errors and never works for me for some reason, however).
  • I added "electron-overlay"/"node-ovhook" as a dependency in my package.json file (as electron-overlay": "file:electron-overlay" etc.)
  • I then copied the "electron-overlay" and "node-ovhook" folders from the compiled goverlay directory and placed them in the root directory of my Electron project. I then ran npm install from CMD in this directory and got no errors ("electron-overlay"/"node-ovhook" are now also present in the node-modules folder).
  • I then added the const IOverlay = require("electron-overlay") and const IOVhook = require("node-ovhook") lines to my "main.js" file, and to test, added IOverlay.start(). But when the app runs, I get the error.

I should also note that I don't have any version of Visual Studio or Python installed on this machine (but I assumed they were only needed for compiling the required files rather than using the application itself...).

If you're able to tell me where exactly I am being dumb, or provide me with a completely idiot-proof solution to add the bare-minimum functionality to my app (i.e. start the app > inject Electron window), I would really appreciate it!

Thanks!

Error when building game_overlay with VS2019

Severity Code Description Project File Line Suppression State
Error C1189 #error: The <experimental/coroutine> and <experimental/resumable> headers are only supported with /await and implement pre-C++20 coroutine support. Use for standard C++20 coroutines. dx9app C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\experimental\coroutine 37

Error (active) E0493 no instance of overloaded function "Storm::Skiplist<K, V>::createNode" matches the specified type dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\container\map.h 229
Error (active) E0493 no instance of overloaded function "Storm::Skiplist<K, V>::createNode" matches the specified type dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\container\map.h 236
Error (active) E0493 no instance of overloaded function "Storm::Skiplist<K, V>::createNode" matches the specified type dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\container\map.h 243
Error (active) E0147 declaration is incompatible with "Storm::Skiplist<K, V>::Node *Storm::Skiplist<K, V>::findNode(const K &key) const" (declared at line 45) dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\container\map.h 250
Error (active) E0493 no instance of overloaded function "Storm::Skiplist<K, V>::nodeAt" matches the specified type dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\container\map.h 274
Error (active) E0493 no instance of overloaded function "Storm::Skiplist<K, V>::nodeAt" matches the specified type dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\container\map.h 294
Error (active) E0147 declaration is incompatible with "Storm::Skiplist<K, V>::Node *Storm::Skiplist<K, V>::createHeader()" (declared at line 50) dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\container\map.h 314
Error (active) E0020 identifier "TimerCallback" is undefined dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\thread\timer.h 45
Error (active) E0254 type name is not allowed dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\tools\textstream.h 80
Error (active) E0035 #error directive: The <experimental/coroutine> and <experimental/resumable> headers are only supported with /await and implement pre-C++20 coroutine support. Use for standard C++20 coroutines. dx9app C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\experimental\coroutine 36
Error (active) E0020 identifier "element_type" is undefined dx9app C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\memory 1103
Error (active) E0020 identifier "element_type" is undefined dx9app C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\memory 1109
Error (active) E0020 identifier "element_type" is undefined dx9app C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\memory 1151
Error (active) E0020 identifier "element_type" is undefined dx9app C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\memory 1243
Error (active) E0135 class "std::enable_if<, void>" has no member "type" dx9app C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\xtr1common 54

Setting up to work with Certain Game

Hi,
I got the demo running (only if i run from visual studio, i get an error if i run it normally). And so copied the files across as per the instructions on the front page.
I want to use this with Stronghold Crusader (released 2001 if thats relevant), i open up the client, tell it to hook crusader (tried several variations of window name) but as far as I can tell, it hasnt done anything. (actually on retrying now, it worked once to come up with a console that was looking for window, but didnt show on the game, after closing and reopening it wouldnt work again). NPM just shows "try inject Stronghold Crusader"
How can I tell if it was a setup error, or a bad window name, or if Stronghold Crusader simply doesnt work. Another possibility is that F1 has a hotkey use in Crusader, so maybe its just not toggling on?
I tried in windowed mode (using dxwnd.exe) and fullscreen.

Valorant

I am trying the demo app with Valorant, it seems to not be working. Any thoughts why it could be? It works with demo dx app.

game-overlay Release build artifacts do not render overlay

When using build outputs from game-overlay built with the VStudio 2017 Release profile, the overlay does not seem to attach or render in the host application.
When using the game-overlay build outputs generated with the VStudio Debug profile, the connection seems to be made and the overlay is displayed.

What is the difference between these two profiles, and why would one work as opposed to the other?

The following is output when using Release n_overlay.dll and n_ovhelper.exe.

screen shot 2019-02-21 at 5 02 08 pm

OverlayMain::addWindow
create share mem:4336,2758
hook pid: 11108, thread:9504HookApp::findGameWindow, injectWindow: 00000000
HookApp::findGameWindow, graphOverlayMain::addWindowic
screate share mem:W4i3n3d6,ow2:7 5080
000000
OverlayMain::onClientConnect,15288
OverlayMain::_sendOverlayInit{"directMessageInput":false,"dragMode":1,"fpsPosition":1,"hotkeys":[{"alt":false,"ctrl":true,"keyCode":113,"name":"overlay.toggle","passthrough":false,"shift":false},{"alt":false,"ctrl":true,"keyCode":114,"name":"app.doit","passthrough":false,"shift":false}],"processEnabled":true,"shareMemMutex":"electron-overlay-sharemem-{4C4BD948-0F75-413F-9667-AC64A7944D8E}9944-115316109","showfps":false,"type":"overlay.init","windows":[{"bufferName":"electron-overlay-9944-115316187-2-image-1","caption":{"height":40,"left":10,"right":10,"top":10},"dragBorderWidth":10,"maxHeight":1379,"maxWidth":2168,"minHeight":100,"minWidth":100,"name":"MainOverlay","nativeHandle":3736634,"rect":{"height":361,"width":640,"x":0,"y":0},"resizable":true,"transparent":false,"type":"window","windowId":2},{"bufferName":"electron-overlay-9944-115316218-3-image-2","caption":{"height":0,"left":0,"right":0,"top":0},"dragBorderWidth":0,"maxHeight":1379,"maxWidth":2168,"minHeight":100,"minWidth":100,"name":"StatusBar","nativeHandle":2689810,"rect":{"height":101,"width":300,"x":100,"y":0},"resizable":false,"transparent":false,"type":"window","windowId":3}]}
[9944:0221/170150.014:INFO:CONSOLE(188)] "%cElectron Security Warning (Insecure Content-Security-Policy)", source: C:\Users\linco\projects\gelectron\client\node_modules\electron\dist\resources\electron.asar\renderer\security-warnings.js (188)
[9944:0221/170150.050:INFO:CONSOLE(58)] "focus", source: file:///C:/Users/linco/projects/gelectron/client/dist/index/osr.html (58)
[9944:0221/170150.050:INFO:CONSOLE(58)] "focus", source: file:///C:/Users/linco/projects/gelectron/client/dist/index/osr.html (58)
[9944:0221/170150.092:INFO:CONSOLE(188)] "%cElectron Security Warning (Insecure Content-Security-Policy)", source: C:\Users\linco\projects\gelectron\client\node_modules\electron\dist\resources\electron.asar\renderer\security-warnings.js (188)
PostThreadMessage to hook window[9944:0221/170150.342:INFO:CONSOLE(1)] "blur", source: file:///C:/Users/linco/projects/gelectron/client/dist/renderer/renderer.js (1)
OverlayMain::onClientConnect,11108
OverlayMain::_sendOverlayInit{"directMessageInput":false,"dragMode":1,"fpsPosition":1,"hotkeys":[{"alt":false,"ctrl":true,"keyCode":113,"name":"overlay.toggle","passthrough":false,"shift":false},{"alt":false,"ctrl":true,"keyCode":114,"name":"app.doit","passthrough":false,"shift":false}],"processEnabled":true,"shareMemMutex":"electron-overlay-sharemem-{4C4BD948-0F75-413F-9667-AC64A7944D8E}9944-115316109","showfps":false,"type":"overlay.init","windows":[{"bufferName":"electron-overlay-9944-115316187-2-image-1","caption":{"height":40,"left":10,"right":10,"top":10},"dragBorderWidth":10,"maxHeight":1379,"maxWidth":2168,"minHeight":100,"minWidth":100,"name":"MainOverlay","nativeHandle":3736634,"rect":{"height":361,"width":640,"x":0,"y":0},"resizable":true,"transparent":false,"type":"window","windowId":2},{"bufferName":"electron-overlay-9944-115316218-3-image-2","caption":{"height":0,"left":0,"right":0,"top":0},"dragBorderWidth":0,"maxHeight":1379,"maxWidth":2168,"minHeight":100,"minWidth":100,"name":"StatusBar","nativeHandle":2689810,"rect":{"height":101,"width":300,"x":100,"y":0},"resizable":false,"transparent":false,"type":"window","windowId":3}]}
PostThreadMessage to hook windowPostThreadMessage to hook windowPostThreadMessage to hook windowPostThreadMessage to hook windowPostThreadMessage to hook windowPostThreadMessage to hook windowPostThreadMessage to hook windowPostThreadMessage to hook windowPostThreadMessage to hook windowPostThreadMessage to hook windowPostThreadMessage to hook windowPostThreadMessage to hook windowPostThreadMessage to hook windowPostThreadMessage to hook windowPostThreadMessage to hook windowPostThreadMessage to hook windowPostThreadMessage to hook windowPostThreadMessage to hook windowPostThreadMessage to hook windowsafeInject, pid:11108, result:1*** Leaked objects detected: 1 instance(s) of class WrapTask
*** Leaked objects detected: 3 instance(s) of class BinderBase
*** Leaked objects detected: 3 instance(s) of class CBChecker
**OverlayMain::onClientClose*, 1L5e2a8k8e
d objects detected: 1 instance(s) of class CoreRunloopSafe

How to use this ?

hi , i can't use this program or even compile the demo version

npm link ../electron-overlay gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19) gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:282:31 gyp ERR! stack at FSReqCallback.oncomplete (fs.js:158:21) gyp ERR! System Windows_NT 10.0.17763 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd D:\programming\electron\gelectron-master\gelectron-master\electron-overlay gyp ERR! node -v v11.14.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1

please add document i really need this
Best regards.

Doesnt work properly in electron 4.x

As the title said, electron 2.0.8 works perfectly, but electron 4.x has some render issue like scaling and positioning. Any chance you take a look at this?

injection does not work

I downloaded and installed everything correctly and the demo ran fine but the injection itself didnt work. Everything built successfully and i moved the dlls and exes to the right places (although i did need to retarget them for a different SDK before building). idk whats wrong

when starting dx11app.exe it said it couldnt find dx11appbase.cpp in gelectron\game-overlay\demo\dx11app\src despite it being there, i tried renaming the dll to fit the missing file exactly (it didnt have any caps in there error but the file did) but no luck, it still couldnt find the file.
image

Mouse stuck in the middle of the overlay when toggled from a fps game

Hey there! I have an issue that first occurred on my app once I tried to toggle input.intercept manually and after some digging realized it was reproducible with the demo as well.

Basically if a fps game is focused and I call the overlay to make it appear, the mouse is stuck at the center of the screen as if the game still had focus.

I assume that's because fps games recenter the mouse to the center of the screen for their own purpose but I didn't find a way to switch the focus to the overlay or a browser window properly to prevent that from happening so after many days of trial and error this is my last stop before I attempt another approach for my application. This is the only thing that keeps me from reaching my goal unfortunately.

To reproduce the issue:

  • Add global shortcuts to toggle the overlay
  • Inject the overlay into a fps game (I mostly tested on "Lovely Planet" and "ULTRAKILL")
  • Get into the game and shoot to make sure the window is focused
  • Toggle the overlay and you'll notice the cursor is stuck in the middle of the screen

-- Here's a gif of what's happening --
2021-03-13_00-06-21

Here's the code I added in app-entry.ts to toggle the overlay:

// line 1
import {app, BrowserWindow, globalShortcut, ipcMain} from "electron"
...
...
// line 12
app.on("ready", () => {
  globalShortcut.register("z", () => {
    IOverlay.sendCommand({
      command: "input.intercept",
      intercept: true
    })
  })

  globalShortcut.register("x", () => {
    IOverlay.sendCommand({
      command: "input.intercept",
      intercept: false
    })
  })
})

Thank you in advance if you manage to find some time to help ❤️

Reviving this

Looks like @hiitiger lost interest, but I still think this is useful,
I know a bit about c++, so I can do small adjustments but understanding this source is pretty hard
First of all I think we should update it to the newest VS2019
Anyone wanna help?

Using SetWindowsHookEx causes stuttering with high polling rate mouse

This project sets up 3 hooks with SetWindowsHookEx, which is unfortunately causes very bad stuttering when moving the mouse if it has a high polling rate. Tested with Razer Viper 8khz, but it might also affect 1khz mice to a lesser extent.

From my testing, this is an issue with Windows itself, as even an empty hook causes the same issue.
Looking at some other overlays (e.g. Steam), they hook GetMessage/PeekMessage directly to detect enabling/disabling the overlay, and then add SetWindowsHookEx hooks when the overlay is active, and remove them when it is not. That might be a solution.

I was able to fix this by subclassing the window with SetWindowLongPtr instead of using hooks faceit@aa39f11
This is not 100% tested, so there might be some use cases where it doesn't work properly, and I've commented out a part of code where it checks for "directMessageInput" as it didn't seem like it should be calling TranslateMessage directly inside the window func. It doesn't seem like the "directMessageInput" feature is really used though, it's disabled by default.

Unfortunately when subclassing the window, WM_DESTROY is never received for some games like CS:GO, because the game exits the message loop before processing such messages. gelectron seems to be very reliant on this message to shutdown properly. If it is not received, then the destructor of all the objects will be called from DLL_PROCESS_DETACH, which will cause deadlocks (when releasing DX objects) and/or crashes. Workaround faceit@f190c03 although there may be a better fix.

Documentation for other GUI frameworks?

The title of the project says "...for any desktop GUI like Electron, Qt, CEF and WPF".
But there is no documentation or sample project for other desktop GUI's like Qt, CEF and WPF?
How would you implement an overlay in other languages with other frameworks?

Issues with building

c:\users\xen0n\gelectron\electron-overlay\src\overlay.h(15): fatal error C1083: Cannot open include file: 'boost/interp
rocess/windows_shared_memory.hpp': No such file or directory (compiling source file ..\src\main.cc) [C:\Users\Xen0n\gel
ectron\electron-overlay\build\electron_overlay.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Xen0n\gelectron\electron-overlay
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Xen0n\AppData\Roaming\npm-cache_logs\2018-10-22T02_43_36_696Z-debug.log

How add hotkey ?

hello ,
is this possible to add hotkey like discord, so we can open the overlay by pressing the hotkey only ?
image

if yes, can you guys give me tips for that. thank you

Visual Studio 2019 errors when trying to build game_overlay examples

Severity Code Description Project File Line Suppression State

Severity Code Description Project File Line Suppression State
Error C1189 #error: The <experimental/coroutine> and <experimental/resumable> headers are only supported with /await and implement pre-C++20 coroutine support. Use for standard C++20 coroutines. dx9app C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\experimental\coroutine 37

Error (active) E0493 no instance of overloaded function "Storm::Skiplist<K, V>::createNode" matches the specified type dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\container\map.h 229
Error (active) E0493 no instance of overloaded function "Storm::Skiplist<K, V>::createNode" matches the specified type dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\container\map.h 236
Error (active) E0493 no instance of overloaded function "Storm::Skiplist<K, V>::createNode" matches the specified type dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\container\map.h 243
Error (active) E0147 declaration is incompatible with "Storm::Skiplist<K, V>::Node *Storm::Skiplist<K, V>::findNode(const K &key) const" (declared at line 45) dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\container\map.h 250
Error (active) E0493 no instance of overloaded function "Storm::Skiplist<K, V>::nodeAt" matches the specified type dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\container\map.h 274
Error (active) E0493 no instance of overloaded function "Storm::Skiplist<K, V>::nodeAt" matches the specified type dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\container\map.h 294
Error (active) E0147 declaration is incompatible with "Storm::Skiplist<K, V>::Node *Storm::Skiplist<K, V>::createHeader()" (declared at line 50) dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\container\map.h 314
Error (active) E0020 identifier "TimerCallback" is undefined dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\thread\timer.h 45
Error (active) E0254 type name is not allowed dx9app C:\dev\injection_testing\gelectron\game-overlay\deps\src\corelib\tools\textstream.h 80
Error (active) E0035 #error directive: The <experimental/coroutine> and <experimental/resumable> headers are only supported with /await and implement pre-C++20 coroutine support. Use for standard C++20 coroutines. dx9app C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\experimental\coroutine 36
Error (active) E0020 identifier "element_type" is undefined dx9app C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\memory 1103
Error (active) E0020 identifier "element_type" is undefined dx9app C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\memory 1109
Error (active) E0020 identifier "element_type" is undefined dx9app C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\memory 1151
Error (active) E0020 identifier "element_type" is undefined dx9app C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\memory 1243
Error (active) E0135 class "std::enable_if<, void>" has no member "type" dx9app C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\xtr1common 54

Attaching overlay causes Debug Console to be displayed

Apologies for the 1000 issues. I've got things back in a semi-working state. But now when I attach the overlay to the game, a Debug Console is displayed in a separate window, and prints things like this:

HookApp::findGameWindow, injectWindow: 00000000
HookApp::findGameWindow, graphicsWindow: 00000000
HookApp::findGameWindow, injectWindow: 00000000
HookApp::findGameWindow, graphicsWindow: 00070612
HookApp::hookInput, 1
OverlayConnector::sendGraphicsWindowSetupInfohooked: 1
HookApp::hookD3d9, 0
HookApp::hookDXGI, 1

Is there a way to turn the console off or prevent this?

GOverlay wont open since upgrading to Pop OS 22.04

Since upgrading to Pop OS 22.04 I have noticed that GOverlay doesnt open the GUI anymore. It still runs in the background in every game I have but I was hoping to turn it off. A friend of mine who upgraded has also had this issue. Has anyone else noticed this or know a fix? Already tried reinstalling it to no avail, and as I said the app itself seems to work but just cant open the GUI.

OS: Pop!_OS 22.04 LTSKERNEL: 5.16.19-76051619-genericCPU: AMD Ryzen 9 5900X 12-CoreGPU: AMD Radeon RX 6900 XT (sienna_cichlid, LLVM 13.0.1, DRM 3.44, 5.16.19-76051619-generic)GPU DRIVER: 4.6 Mesa 22.0.1RAM: 32 GB

Injecting while in fullscreen

Hi @hiitiger,

Thank you for maintaining this project! I was trying to test this out with a couple games and I couldn't get it to work for World of Goo. The game only lets me play it in fullscreen mode, so I am switching out of it back to the overlay app to click the inject button. I couldn't get it to appear in the app while doing this. Do you think it's related to being in fullscreen and in not finding the window? Are there special considerations to get things working for games in fullscreen?

Thank you,

David

Build error

Hi. I'm trying to use commands from the documentation to get an example, but on the command: npm run compile:electron getting errors:

> [email protected] compile:electron D:\dev\gelectron\client
> electron-rebuild -v 2.0.8

× Rebuild Failed

An unhandled error occurred inside electron-rebuild
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn D:\dev\Microsoft Visual Studio\2019\Enterprise\MSBuild\15.0\Bin\MSBuild.exe ENOENT
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
gyp ERR! stack     at onErrorNT (internal/child_process.js:456:16)
gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:80:21)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\dev\\gelectron\\client\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=2.0.8" "--arch=ia32" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd D:\dev\gelectron\electron-overlay
gyp ERR! node -v v13.0.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>

Failed with exit code: 7

Error: gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn D:\dev\Microsoft Visual Studio\2019\Enterprise\MSBuild\15.0\Bin\MSBuild.exe ENOENT
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
gyp ERR! stack     at onErrorNT (internal/child_process.js:456:16)
gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:80:21)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\dev\\gelectron\\client\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=2.0.8" "--arch=ia32" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd D:\dev\gelectron\electron-overlay
gyp ERR! node -v v13.0.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>

Failed with exit code: 7
    at SafeSubscriber._error (D:\dev\gelectron\client\node_modules\spawn-rx\lib\src\index.js:277:84)
    at SafeSubscriber.__tryOrUnsub (D:\dev\gelectron\client\node_modules\spawn-rx\node_modules\rxjs\Subscriber.js:242:16)
    at SafeSubscriber.error (D:\dev\gelectron\client\node_modules\spawn-rx\node_modules\rxjs\Subscriber.js:201:26)
    at Subscriber._error (D:\dev\gelectron\client\node_modules\spawn-rx\node_modules\rxjs\Subscriber.js:132:26)
    at Subscriber.error (D:\dev\gelectron\client\node_modules\spawn-rx\node_modules\rxjs\Subscriber.js:106:18)
    at MapSubscriber.Subscriber._error (D:\dev\gelectron\client\node_modules\spawn-rx\node_modules\rxjs\Subscriber.js:132:26)
    at MapSubscriber.Subscriber.error (D:\dev\gelectron\client\node_modules\spawn-rx\node_modules\rxjs\Subscriber.js:106:18)
    at SafeSubscriber._next (D:\dev\gelectron\client\node_modules\spawn-rx\lib\src\index.js:251:65)
    at SafeSubscriber.__tryOrSetError (D:\dev\gelectron\client\node_modules\spawn-rx\node_modules\rxjs\Subscriber.js:251:16)
    at SafeSubscriber.next (D:\dev\gelectron\client\node_modules\spawn-rx\node_modules\rxjs\Subscriber.js:191:27)
npm ERR! code ELIFECYCLE
npm ERR! errno 4294967295
npm ERR! [email protected] compile:electron: `electron-rebuild -v 2.0.8`
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the [email protected] compile:electron script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\continue\AppData\Roaming\npm-cache\_logs\2019-10-29T14_56_31_034Z-debug.log

Debug log:

0 info it worked if it ends with ok
1 warn npm npm does not support Node.js v13.0.1
2 warn npm You should probably upgrade to a newer version of node as we
3 warn npm can't make any promises that npm will work with this version.
4 warn npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11, 12.
5 warn npm You can find the latest version at https://nodejs.org/
6 verbose cli [
6 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
6 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
6 verbose cli   'run',
6 verbose cli   'compile:electron'
6 verbose cli ]
7 info using [email protected]
8 info using [email protected]
9 verbose run-script [ 'precompile:electron', 'compile:electron', 'postcompile:electron' ]
10 info lifecycle [email protected]~precompile:electron: [email protected]
11 info lifecycle [email protected]~compile:electron: [email protected]
12 verbose lifecycle [email protected]~compile:electron: unsafe-perm in lifecycle true
13 verbose lifecycle [email protected]~compile:electron: PATH: C:\ProgramData\nvm\v13.0.1\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\dev\gelectron\client\node_modules\.bin;C:\Python27;c:\perl64\site\bin;c:\perl64\bin;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\windows\system32\windowspowershell\v1.0\;c:\windows\system32\openssh\;c:\program files\nvidia corporation\nvidia nvdlisr;c:\program files\dotnet\;c:\programdata\chocolatey\bin;c:\program files\openssh-win64;c:\program files\microsoft sql server\130\tools\binn\;c:\program files\microsoft sql server\client sdk\odbc\170\tools\binn\;c:\program files\git\cmd;c:\program files\cmake\bin;c:\go\bin;c:\program files\llvm\bin;d:\dev\gnuwin32\bin;C:\Program Files\Microsoft Network Monitor 3\;D:\dev;C:\ProgramData\nvm;C:\Program Files\nodejs;C:\Python27;C:\Users\continue\AppData\Local\Microsoft\WindowsApps;C:\Users\continue\go\bin;C:\Users\continue\AppData\Local\Programs\Microsoft VS Code\bin;C:\TDM-GCC-64\bin;D:\dev;
14 verbose lifecycle [email protected]~compile:electron: CWD: D:\dev\gelectron\client
15 silly lifecycle [email protected]~compile:electron: Args: [ '/d /s /c', 'electron-rebuild -v 2.0.8' ]
16 silly lifecycle [email protected]~compile:electron: Returned: code: 4294967295  signal: null
17 info lifecycle [email protected]~compile:electron: Failed to exec compile:electron script
18 verbose stack Error: [email protected] compile:electron: `electron-rebuild -v 2.0.8`
18 verbose stack Exit status 4294967295
18 verbose stack     at EventEmitter.<anonymous> (C:\ProgramData\nvm\v13.0.1\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
18 verbose stack     at EventEmitter.emit (events.js:210:5)
18 verbose stack     at ChildProcess.<anonymous> (C:\ProgramData\nvm\v13.0.1\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
18 verbose stack     at ChildProcess.emit (events.js:210:5)
18 verbose stack     at maybeClose (internal/child_process.js:1028:16)
18 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
19 verbose pkgid [email protected]
20 verbose cwd D:\dev\gelectron\client
21 verbose Windows_NT 10.0.17763
22 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "compile:electron"
23 verbose node v13.0.1
24 verbose npm  v6.12.0
25 error code ELIFECYCLE
26 error errno 4294967295
27 error [email protected] compile:electron: `electron-rebuild -v 2.0.8`
27 error Exit status 4294967295
28 error Failed at the [email protected] compile:electron script.
28 error This is probably not a problem with npm. There is likely additional logging output above.
29 verbose exit [ 4294967295, true ]

I am use:

node --version
v13.0.1
python --version
Python 2.7.13
node-gyp --version
v6.0.0
Visual Studio 2019 / Windows 10

Another Build Error

Hi, I realise there are other issues with the same name, but they contain different errors.
I managed to follow the front page instructions to set up demo, untill i got to "npm run compile:electron"
Python 3.8 is installed and running, as is vistual studio 2017, as required for previous steps.
The console error is as follows (seems to repeat 3 times)

> [email protected] compile:electron C:\Users\GRhin\coding\gelectron-master\client
> electron-rebuild -v 2.0.8

× Rebuild Failed

An unhandled error occurred inside electron-rebuild
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\cygwin64\bin\python3.8.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                       ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:295:12)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\GRhin\\coding\\gelectron-master\\client\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=2.0.8" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd C:\Users\GRhin\coding\gelectron-master\electron-overlay
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

Failed with exit code: 1

Error: gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\cygwin64\bin\python3.8.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                       ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:295:12)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\GRhin\\coding\\gelectron-master\\client\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=2.0.8" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd C:\Users\GRhin\coding\gelectron-master\electron-overlay
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

Failed with exit code: 1
    at SafeSubscriber._error (C:\Users\GRhin\coding\gelectron-master\client\node_modules\spawn-rx\lib\src\index.js:277:84)
    at SafeSubscriber.__tryOrUnsub (C:\Users\GRhin\coding\gelectron-master\client\node_modules\spawn-rx\node_modules\rxjs\Subscriber.js:242:16)
    at SafeSubscriber.error (C:\Users\GRhin\coding\gelectron-master\client\node_modules\spawn-rx\node_modules\rxjs\Subscriber.js:201:26)
    at Subscriber._error (C:\Users\GRhin\coding\gelectron-master\client\node_modules\spawn-rx\node_modules\rxjs\Subscriber.js:132:26)
    at Subscriber.error (C:\Users\GRhin\coding\gelectron-master\client\node_modules\spawn-rx\node_modules\rxjs\Subscriber.js:106:18)
    at MapSubscriber.Subscriber._error (C:\Users\GRhin\coding\gelectron-master\client\node_modules\spawn-rx\node_modules\rxjs\Subscriber.js:132:26)
    at MapSubscriber.Subscriber.error (C:\Users\GRhin\coding\gelectron-master\client\node_modules\spawn-rx\node_modules\rxjs\Subscriber.js:106:18)
    at SafeSubscriber._next (C:\Users\GRhin\coding\gelectron-master\client\node_modules\spawn-rx\lib\src\index.js:251:65)
    at SafeSubscriber.__tryOrSetError (C:\Users\GRhin\coding\gelectron-master\client\node_modules\spawn-rx\node_modules\rxjs\Subscriber.js:251:16)
    at SafeSubscriber.next (C:\Users\GRhin\coding\gelectron-master\client\node_modules\spawn-rx\node_modules\rxjs\Subscriber.js:191:27)
npm ERR! code ELIFECYCLE
npm ERR! errno 4294967295
npm ERR! [email protected] compile:electron: `electron-rebuild -v 2.0.8`
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the [email protected] compile:electron script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\GRhin\AppData\Roaming\npm-cache\_logs\2020-04-02T04_39_35_686Z-debug.log

× Rebuild Failed

The error log says:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'compile:electron'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'precompile:electron', 'compile:electron', 'postcompile:electron' ]
5 info lifecycle [email protected]~precompile:electron: [email protected]
6 info lifecycle [email protected]~compile:electron: [email protected]
7 verbose lifecycle [email protected]~compile:electron: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~compile:electron: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\GRhin\coding\gelectron-master\client\node_modules\.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\nodejs\;C:\cygwin64\bin;C:\Users\GRhin\AppData\Local\Programs\Python\Python38-32;C:\Users\GRhin\AppData\Roaming\npm;C:\Users\GRhin\AppData\Local\atom\bin;C:\Users\GRhin\AppData\Local\Programs\Microsoft VS Code\bin
9 verbose lifecycle [email protected]~compile:electron: CWD: C:\Users\GRhin\coding\gelectron-master\client
10 silly lifecycle [email protected]~compile:electron: Args: [ '/d /s /c', 'electron-rebuild -v 2.0.8' ]
11 silly lifecycle [email protected]~compile:electron: Returned: code: 4294967295  signal: null
12 info lifecycle [email protected]~compile:electron: Failed to exec compile:electron script
13 verbose stack Error: [email protected] compile:electron: `electron-rebuild -v 2.0.8`
13 verbose stack Exit status 4294967295
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:210:5)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:210:5)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\GRhin\coding\gelectron-master\client
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "compile:electron"
18 verbose node v12.13.0
19 verbose npm  v6.12.0
20 error code ELIFECYCLE
21 error errno 4294967295
22 error [email protected] compile:electron: `electron-rebuild -v 2.0.8`
22 error Exit status 4294967295
23 error Failed at the [email protected] compile:electron script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 4294967295, true ]

What have I missed?

How performant is this?

Hello, as the title said, I'm curious about how performant is this approach. I really like the idea of streaming the texture inside the game. How good is this for a heavy ui? Thanks

prebuild binaries? demo not working ...

what's up with the recent change to prebuilt demo binaries? cc @hiitiger

I built with vs2019 and vs2022 on both x86 and x64 and couldn't get the overlay to load on Counter-Strike: Global Offense - Direct3D 9

my dev setup:

Windows 11
Node v16.13.0

$npm run start...

When I click "start overlay":

[21840:1208/133646.409:INFO:CONSOLE(33)] "Uncaught TypeError: window.require is not a function", source: file:///C:/Users/ryan/src/goverlay/client/dist/index/statusbar.html (33)
[21840:1208/133646.415:INFO:CONSOLE(53)] "%cElectron Security Warning (Insecure Content-Security-Policy) font-weight: bold; This renderer process has either no Content Security
  Policy set or a policy with "unsafe-eval" enabled. This exposes users of
  this app to unnecessary security risks.

For more information and help, consult
https://electronjs.org/docs/tutorial/security.
This warning will not show up
once the app is packaged.", source: node:electron/js2c/sandbox_bundle (53)
[21840:1208/133649.077:INFO:CONSOLE(1)] "blur", source: file:///C:/Users/ryan/src/goverlay/client/dist/renderer/renderer.js (1)
[21840:1208/133658.884:INFO:CONSOLE(1)] "focus", source: file:///C:/Users/ryan/src/goverlay/client/dist/renderer/renderer.js (1)

when I click "inject game":

--------------------
 try inject Counter-Strike: Global Offensive - Direct3D 9
--------------------
 injecting {"windowId":1444746,"processId":4504,"threadId":25352,"title":"Counter-Strike: Global Offensive - Direct3D 9"}

I send ctrl+f2 & ctrl+f3 but nothing happens...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.