Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cmake-js with fork #157

Closed
wants to merge 1 commit into from

Conversation

anoadragon453
Copy link
Contributor

@anoadragon453 anoadragon453 commented Mar 26, 2019

Building iohook for Electron v4 is going to require some updates to cmake-js, some of which haven't been merged yet. This PR change the branch to one that merged those PRs.

Note:: DO NOT MERGE THIS PR IN ITS CURRENT FORM.

If we're going with a fork we should have it be based off wilix-team's repo instead of mine.

Building iohook for Electron v4 is going to require some updates to `cmake-js`, some of which haven't been merged yet. This PR change the branch to one that merged those PRs.

Note:: DO NOT MERGE THIS PR IN IT'S CURRENT FORM.

If we're going with a fork we should have it be based off wilix-team's repo instead of mine.
@anoadragon453
Copy link
Contributor Author

@Djiit Have you had a chance to try this out yet?

@Djiit
Copy link
Collaborator

Djiit commented Mar 27, 2019

Nope, still no windows machine right now. I'll try tonight

@karacas
Copy link

karacas commented Mar 27, 2019

"version": "0.4.1",
"cmake-js": "github:anoadragon453/cmake-js#anoa/delay_generator"

deploy Ok.

extract
c:\test\node_modules\iohook\prebuilds\iohook-v0.4.1-electron-v69-win32-x64.tar.gz
to
c:\test\node_modules\iohook\builds\electron-v69-win32-x64\build\Release\

but in electron:
Error: Module did not self-register.

@anoadragon453
Copy link
Contributor Author

c:\test\node_modules\iohook\prebuilds\iohook-v0.4.1-electron-v69-win32-x64.tar.gz

Did you actually build from this branch or just use a pre-built version built from CI?

@karacas
Copy link

karacas commented Mar 27, 2019

I build from wilix-team/iohook#master
changing
"cmake-js": "github:anoadragon453/cmake-js#anoa/delay_generator"

i try this commit too
node version works fine

@GimpMaster
Copy link

I'd be happy to give this a try on Win64. Do I need to just point my node module at this particular branch or will it require that I actually build this and have tools instead such as cmake / visual studio / etc?

@GimpMaster
Copy link

@Djiit

Ok here is where I am at. I cloned iohook repo. I manually added in this patch...its one line that adjusts CMAKE.

I then performed

npm install
npm run build

Which gave me the following output.

`

iohook@0.4.1 build H:\Fast_Dev\iohook
cmake-js compile

[ 'C:\Program Files\nodejs\node.exe',
'H:\Fast_Dev\iohook\node_modules\cmake-js\bin\cmake-js',
'compile' ]
info TOOL Using Visual Studio 15 2017 Win64 generator.
info DIST Downloading distribution files.
http DIST - https://nodejs.org/dist/v10.15.1/SHASUMS256.txt
http DIST - https://nodejs.org/dist/v10.15.1/win-x64/node.lib
http DIST - https://nodejs.org/dist/v10.15.1/node-v10.15.1-headers.tar.gz
info CMD CONFIGURE
info RUN cmake "H:\Fast_Dev\iohook" --no-warn-unused-cli -G"Visual Studio 15 2017 Win64" -DCMAKE_JS_VERSION="5.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="H:\Fast_Dev\iohook\build" -DCMAKE_JS_INC="C:\Users\Josh.cmake-js\node-x64\v10.15.1\include\node;H:\Fast_Dev\iohook\node_modules\nan" -DCMAKE_JS_SRC="H:/Fast_Dev/iohook/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="10.15.1" -DNODE_ARCH="x64" -DCMAKE_JS_LIB="C:\Users\Josh.cmake-js\node-x64\v10.15.1\win-x64\node.lib" -DCMAKE_SHARED_LINKER_FLAGS="/DELAYLOAD:NODE.EXE"
Not searching for unused variables given on the command line.
-- The C compiler identification is MSVC 19.16.27025.1
-- The CXX compiler identification is MSVC 19.16.27025.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: H:/Fast_Dev/iohook/build
info CMD BUILD
info RUN cmake --build "H:\Fast_Dev\iohook\build" --config Release
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Checking Build System
CMake does not need to re-run because H:/Fast_Dev/iohook/build/CMakeFiles/generate.stamp is up-to-date.
CMake does not need to re-run because H:/Fast_Dev/iohook/libuiohook/CMakeFiles/generate.stamp is up-to-date.
Building Custom Rule H:/Fast_Dev/iohook/libuiohook/CMakeLists.txt
CMake does not need to re-run because H:/Fast_Dev/iohook/libuiohook/CMakeFiles/generate.stamp is up-to-date.
logger.c
input_helper.c
input_hook.c
H:\Fast_Dev\iohook\libuiohook\src\windows\input_hook.c(225): warning C4244: '=': conversion from 'DWORD' to 'uint16_t', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
H:\Fast_Dev\iohook\libuiohook\src\windows\input_hook.c(250): warning C4244: '=': conversion from 'DWORD' to 'uint16_t', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
H:\Fast_Dev\iohook\libuiohook\src\windows\input_hook.c(284): warning C4244: '=': conversion from 'DWORD' to 'uint16_t', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
H:\Fast_Dev\iohook\libuiohook\src\windows\input_hook.c(349): warning C4244: '=': conversion from 'uint64_t' to 'DWORD', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
H:\Fast_Dev\iohook\libuiohook\src\windows\input_hook.c(365): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
H:\Fast_Dev\iohook\libuiohook\src\windows\input_hook.c(366): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
H:\Fast_Dev\iohook\libuiohook\src\windows\input_hook.c(388): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
H:\Fast_Dev\iohook\libuiohook\src\windows\input_hook.c(389): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
H:\Fast_Dev\iohook\libuiohook\src\windows\input_hook.c(411): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
H:\Fast_Dev\iohook\libuiohook\src\windows\input_hook.c(412): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
H:\Fast_Dev\iohook\libuiohook\src\windows\input_hook.c(459): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
H:\Fast_Dev\iohook\libuiohook\src\windows\input_hook.c(460): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
H:\Fast_Dev\iohook\libuiohook\src\windows\input_hook.c(485): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
H:\Fast_Dev\iohook\libuiohook\src\windows\input_hook.c(486): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
H:\Fast_Dev\iohook\libuiohook\src\windows\input_hook.c(488): warning C4244: '=': conversion from 'unsigned short' to 'uint8_t', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
post_event.c
H:\Fast_Dev\iohook\libuiohook\src\windows\post_event.c(123): warning C4244: '=': conversion from 'DWORD' to 'WORD', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
H:\Fast_Dev\iohook\libuiohook\src\windows\post_event.c(139): warning C4244: '=': conversion from 'DWORD' to 'WORD', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
H:\Fast_Dev\iohook\libuiohook\src\windows\post_event.c(143): warning C4244: '=': conversion from 'DWORD' to 'WORD', possible loss of data [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
system_properties.c
Generating Code...
Creating library H:/Fast_Dev/iohook/libuiohook/Release/uiohook.lib and object H:/Fast_Dev/iohook/libuiohook/Release/uiohook.exp
LINK : warning LNK4199: /DELAYLOAD:NODE.EXE ignored; no imports found from NODE.EXE [H:\Fast_Dev\iohook\libuiohook\uiohook.vcxproj]
uiohook.vcxproj -> H:\Fast_Dev\iohook\build\Release\uiohook.dll
Building Custom Rule H:/Fast_Dev/iohook/libuiohook/CMakeLists.txt
CMake does not need to re-run because H:/Fast_Dev/iohook/libuiohook/CMakeFiles/generate.stamp is up-to-date.
demo_hook.c
demo_hook.vcxproj -> H:\Fast_Dev\iohook\build\Release\demo_hook.exe
Building Custom Rule H:/Fast_Dev/iohook/libuiohook/CMakeLists.txt
CMake does not need to re-run because H:/Fast_Dev/iohook/libuiohook/CMakeFiles/generate.stamp is up-to-date.
demo_hook_async.c
demo_hook_async.vcxproj -> H:\Fast_Dev\iohook\build\Release\demo_hook_async.exe
Building Custom Rule H:/Fast_Dev/iohook/libuiohook/CMakeLists.txt
CMake does not need to re-run because H:/Fast_Dev/iohook/libuiohook/CMakeFiles/generate.stamp is up-to-date.
demo_post.c
demo_post.vcxproj -> H:\Fast_Dev\iohook\build\Release\demo_post.exe
Building Custom Rule H:/Fast_Dev/iohook/libuiohook/CMakeLists.txt
CMake does not need to re-run because H:/Fast_Dev/iohook/libuiohook/CMakeFiles/generate.stamp is up-to-date.
demo_properties.c
demo_properties.vcxproj -> H:\Fast_Dev\iohook\build\Release\demo_properties.exe
Building Custom Rule H:/Fast_Dev/iohook/CMakeLists.txt
CMake does not need to re-run because H:/Fast_Dev/iohook/build/CMakeFiles/generate.stamp is up-to-date.
iohook.cc
C:\Users\Josh.cmake-js\node-x64\v10.15.1\include\node\node.h(240): warning C4275: non dll-interface class 'v8::Platform' used as base for dll-interface class 'node::MultiIsolatePlatform' [H:\Fast_Dev\iohook\build\iohook.vcxproj]
c:\users\josh.cmake-js\node-x64\v10.15.1\include\node\v8-platform.h(247): note: see declaration of 'v8::Platform'
C:\Users\Josh.cmake-js\node-x64\v10.15.1\include\node\node.h(240): note: see declaration of 'node::MultiIsolatePlatform'
C:\Users\Josh.cmake-js\node-x64\v10.15.1\include\node\node.h(733): warning C4251: 'node::CallbackScope::try_catch_': class 'v8::TryCatch' needs to have dll-interface to be used by clients of class 'node::CallbackScope' [H:\Fast_Dev\iohook\build\iohook.vcxproj]
c:\users\josh.cmake-js\node-x64\v10.15.1\include\node\v8.h(8529): note: see declaration of 'v8::TryCatch'
H:\Fast_Dev\iohook\src\iohook.cc(490): warning C4996: 'Nan::Callback::Call': was declared deprecated [H:\Fast_Dev\iohook\build\iohook.vcxproj]
H:\Fast_Dev\iohook\node_modules\nan\nan.h(1618): note: see declaration of 'Nan::Callback::Call'
Creating library H:/Fast_Dev/iohook/build/Release/iohook.lib and object H:/Fast_Dev/iohook/build/Release/iohook.exp
iohook.vcxproj -> H:\Fast_Dev\iohook\build\Release\iohook.node
Building Custom Rule H:/Fast_Dev/iohook/CMakeLists.txt
CMake does not need to re-run because H:/Fast_Dev/iohook/build/CMakeFiles/generate.stamp is up-to-date.

`

I copied over the iohook.node and uiohook.dll from the build/Release folder into my Electron App here:

node_modules\iohook\builds\electron-v69-win32-x64\build\Release

Then I tried to launch my electron app and got this error:

Uncaught Error: Module did not self-register. at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:160:31) at Object.Module._extensions..node (internal/modules/cjs/loader.js:722) at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:160:31) at Module.load (internal/modules/cjs/loader.js:602) at tryModuleLoad (internal/modules/cjs/loader.js:541) at Function.Module._load (internal/modules/cjs/loader.js:533) at Module.require (internal/modules/cjs/loader.js:640) at require (internal/modules/cjs/helpers.js:20) at Object.<anonymous> (H:\Fast_Dev\line_app\node_modules\iohook\index.js:10) at Object.<anonymous> (H:\Fast_Dev\line_app\node_modules\iohook\index.js:397)

Quick search of internet shows that we are mismatched on versions from what I compiled to what node is wanting it seems.

It's getting late so I'll have to try again tomorrow. Any suggestions?

@Djiit
Copy link
Collaborator

Djiit commented Mar 28, 2019

Hi there,

I just tried a .\node_modules\.bin\cmake-js rebuild --runtime-version=4.1.1 --target_arch=x64 --runtime=electron (@GimpMaster this is the command you should use to build for Electron v4)

But with no luck. I still get the "Module did not self register" error.

Can someone else test it out ? I might have done something wrong.

@karacas
Copy link

karacas commented Mar 28, 2019

Same here, build works fine (with some warnings), but i have same error running in electron: Module did not self register

λ npx cmake-js rebuild --runtime-version=4.1.1 --target_arch=x64 --runtime=electron

[ 'C:\\nodejs\\node.exe',
  'C:\\_testing_\\_node_modules\\iohook\\node_modules\\cmake-js\\bin\\cmake-js',
  'rebuild',
  '--runtime-version=4.1.1',
  '--target_arch=x64',
  '--runtime=electron' ]
info TOOL Using Visual Studio 14 2015 Win64 generator.
info CMD CLEAN
info RUN cmake -E remove_directory "C:\_testing_\_node_modules\iohook\build"
info CMD CONFIGURE
info RUN cmake "C:\_testing_\_node_modules\iohook" --no-warn-unused-cli -G"Visual Studio 14 2015 Win64" -DCMAKE_JS_VERSION="5.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="C:\_testing_\_node_modules\iohook\build" -DCMAKE_JS_INC="C:\Users\der2\.cmake-js\electron-x64\v4.1.1\include\node;C:\_testing_\_node_modules\iohook\node_modules\nan" -DCMAKE_JS_SRC="C:/_testing_/_node_modules/iohook/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc" -DNODE_RUNTIME="electron" -DNODE_RUNTIMEVERSION="4.1.1" -DNODE_ARCH="x64" -DCMAKE_JS_LIB="C:\Users\der2\.cmake-js\electron-x64\v4.1.1\x64\node.lib" -DCMAKE_SHARED_LINKER_FLAGS="/DELAYLOAD:NODE.EXE"
Not searching for unused variables given on the command line.
-- Selecting Windows SDK version  to target Windows 10.0.17763.
-- The C compiler identification is MSVC 19.0.24210.0
-- The CXX compiler identification is MSVC 19.0.24210.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/_testing_/_node_modules/iohook/build
info CMD BUILD
info RUN cmake --build "C:\_testing_\_node_modules\iohook\build" --config Release
Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.

  Checking Build System
  CMake does not need to re-run because C:/_testing_/_node_modules/iohook/build/CMakeFiles/generate.stamp is up-to-date.
  CMake does not need to re-run because C:/_testing_/_node_modules/iohook/libuiohook/CMakeFiles/generate.stamp is up-to-date.
  Building Custom Rule C:/_testing_/_node_modules/iohook/libuiohook/CMakeLists.txt
  CMake does not need to re-run because C:/_testing_/_node_modules/iohook/libuiohook/CMakeFiles/generate.stamp is up-to-date.
  logger.c
  input_helper.c
  input_hook.c
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\input_hook.c(225): warning C4244: '=': conversion from 'DWORD' to 'uint16_t', possib le loss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\input_hook.c(250): warning C4244: '=': conversion from 'DWORD' to 'uint16_t', possib le loss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\input_hook.c(284): warning C4244: '=': conversion from 'DWORD' to 'uint16_t', possib le loss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\input_hook.c(349): warning C4244: '=': conversion from 'uint64_t' to 'DWORD', possib le loss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\input_hook.c(365): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible  loss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\input_hook.c(366): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible  loss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\input_hook.c(388): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible  loss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\input_hook.c(389): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible  loss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\input_hook.c(411): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible  loss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\input_hook.c(412): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible  loss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\input_hook.c(459): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible  loss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\input_hook.c(460): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible  loss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\input_hook.c(485): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible  loss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\input_hook.c(486): warning C4244: '=': conversion from 'LONG' to 'int16_t', possible  loss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\input_hook.c(488): warning C4244: '=': conversion from 'unsigned short' to 'uint8_t' , possible loss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
  post_event.c
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\post_event.c(123): warning C4244: '=': conversion from 'DWORD' to 'WORD', possible l oss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\post_event.c(139): warning C4244: '=': conversion from 'DWORD' to 'WORD', possible l oss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
C:\_testing_\_node_modules\iohook\libuiohook\src\windows\post_event.c(143): warning C4244: '=': conversion from 'DWORD' to 'WORD', possible l oss of data [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcxproj]
  system_properties.c
  Generating Code...
     Creating library C:/_testing_/_node_modules/iohook/libuiohook/Release/uiohook.lib and object C:/_testing_/_node_modules/iohook/libuiohook/
  Release/uiohook.exp
LINK : warning LNK4199: /DELAYLOAD:NODE.EXE ignored; no imports found from NODE.EXE [C:\_testing_\_node_modules\iohook\libuiohook\uiohook.vcx proj]
  uiohook.vcxproj -> C:\_testing_\_node_modules\iohook\build\Release\uiohook.dll
  Building Custom Rule C:/_testing_/_node_modules/iohook/libuiohook/CMakeLists.txt
  CMake does not need to re-run because C:/_testing_/_node_modules/iohook/libuiohook/CMakeFiles/generate.stamp is up-to-date.
  demo_hook.c
  demo_hook.vcxproj -> C:\_testing_\_node_modules\iohook\build\Release\demo_hook.exe
  Building Custom Rule C:/_testing_/_node_modules/iohook/libuiohook/CMakeLists.txt
  CMake does not need to re-run because C:/_testing_/_node_modules/iohook/libuiohook/CMakeFiles/generate.stamp is up-to-date.
  demo_hook_async.c
  demo_hook_async.vcxproj -> C:\_testing_\_node_modules\iohook\build\Release\demo_hook_async.exe
  Building Custom Rule C:/_testing_/_node_modules/iohook/libuiohook/CMakeLists.txt
  CMake does not need to re-run because C:/_testing_/_node_modules/iohook/libuiohook/CMakeFiles/generate.stamp is up-to-date.
  demo_post.c
  demo_post.vcxproj -> C:\_testing_\_node_modules\iohook\build\Release\demo_post.exe
  Building Custom Rule C:/_testing_/_node_modules/iohook/libuiohook/CMakeLists.txt
  CMake does not need to re-run because C:/_testing_/_node_modules/iohook/libuiohook/CMakeFiles/generate.stamp is up-to-date.
  demo_properties.c
  demo_properties.vcxproj -> C:\_testing_\_node_modules\iohook\build\Release\demo_properties.exe
  Building Custom Rule C:/_testing_/_node_modules/iohook/CMakeLists.txt
  CMake does not need to re-run because C:/_testing_/_node_modules/iohook/build/CMakeFiles/generate.stamp is up-to-date.
  iohook.cc
C:\Users\der2\.cmake-js\electron-x64\v4.1.1\include\node\node.h(246): warning C4275: non dll-interface class 'v8::Platform' used as base fo r dll-interface class 'node::MultiIsolatePlatform' [C:\_testing_\_node_modules\iohook\build\iohook.vcxproj]
  c:\users\der2\.cmake-js\electron-x64\v4.1.1\include\node\v8-platform.h(248): note: see declaration of 'v8::Platform'
  C:\Users\der2\.cmake-js\electron-x64\v4.1.1\include\node\node.h(246): note: see declaration of 'node::MultiIsolatePlatform'
C:\Users\der2\.cmake-js\electron-x64\v4.1.1\include\node\node.h(729): warning C4251: 'node::CallbackScope::try_catch_': class 'v8::TryCatch ' needs to have dll-interface to be used by clients of class 'node::CallbackScope' [C:\_testing_\_node_modules\iohook\build\iohook.vcxproj]
  c:\users\der2\.cmake-js\electron-x64\v4.1.1\include\node\v8.h(8905): note: see declaration of 'v8::TryCatch'
C:\_testing_\_node_modules\iohook\src\iohook.cc(490): warning C4996: 'Nan::Callback::Call': was declared deprecated [C:\_testing_\_node_modules \iohook\build\iohook.vcxproj]
  C:\_testing_\_node_modules\iohook\node_modules\nan\nan.h(1674): note: see declaration of 'Nan::Callback::Call'
     Creating library C:/_testing_/_node_modules/iohook/build/Release/iohook.lib and object C:/_testing_/_node_modules/iohook/build/Release/ioh
  ook.exp
  iohook.vcxproj -> C:\_testing_\_node_modules\iohook\build\Release\iohook.node
  Building Custom Rule C:/_testing_/_node_modules/iohook/CMakeLists.txt
  CMake does not need to re-run because C:/_testing_/_node_modules/iohook/build/CMakeFiles/generate.stamp is up-to-date.


@GimpMaster
Copy link

Thanks @Djiit . I just ran your command. It compiled again just fine. For fun I tried running the "demo_hook.exe" and even that gives the Module did not self-register. For good measure I also copied it to my own electron project but got the same error.

@Djiit
Copy link
Collaborator

Djiit commented Mar 28, 2019

Thanks all for your tests. It seems that using this cmake-js version is not enough.

I did one more test : I'm able to build a working version for Electron 3, so cmake-js is definetely working but we might be missing something on our side.

@Djiit
Copy link
Collaborator

Djiit commented Mar 28, 2019

Got it ! We needed to explicitely list this new cpp file (see: cmake-js/cmake-js@bb82c63)

@Djiit
Copy link
Collaborator

Djiit commented Mar 28, 2019

It's now resolved and available in 0.4.2. Could you please test it ?

I've forked your cmake-js repo under another org, as I can't create another repo here and I can't reach and wilix team member.

@karacas
Copy link

karacas commented Mar 29, 2019

Nice! 0.4.2 run perfectly in electron 4 / win
Tnx!

@anoadragon453
Copy link
Contributor Author

Solved in #159

@anoadragon453 anoadragon453 deleted the patch-3 branch March 29, 2019 10:14
@GimpMaster
Copy link

Works great for me too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants