Comments (3)
Also, irritatingly, installing Visual Studio doesn't update the PATH by default.
Visual Studio uses its own shell. You need to compile from the shell launched by C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat
. You can find these tool shortcuts here: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2019\Visual Studio Tools\VC
. I am sure there is a reason for this like having multiple tool-chains installed at the same time. Windows is really just a pain in general, but not nearly as much of a pain as MacOS.
Processors like i3, i5, i 7 are x64 right?
Anything modern is going to be x64 (aka amd64, X86-64 or k8). Sometimes you want Win32 (aka x86 or i386) compatibility because Windows still ships a lot of 32-bit software for whatever reason. See Wow64.
What about building for Windows on ARM is that supported?
Yes, you can look at the build scripts that package artifacts for this repo here: https://github.com/kwhat/libuiohook/blob/1.2/.github/workflows/package.yml#L342 This builds everything currently supported except for BSD.
Is there any difference in the functioning / performance of libuiohook with compiling with Visual Studio vs compiling with MinGW?
Not really, a lot of work went into making sure it would compile with gcc/clang on Windows. This may not be the case moving forward, but for now its fine.
from libuiohook.
This is what I use to build for Windows locally:
Z:
cd Z:\IdeaProjects\JNativeHook\src\external\libuiohook
cmake -B .\build ^
-G "Visual Studio 16 2019" -A x64 ^
-D CMAKE_INSTALL_PREFIX=.\dist\windows\x86_64 ^
-D CMAKE_VERBOSE_MAKEFILE=true ^
-D USE_EPOCH_TIME=OFF ^
-D BUILD_SHARED_LIBS=ON ^
-D BUILD_DEMO=ON
cmake --build .\build ^
--parallel 2 ^
--config RelWithDebInfo
cmake --install .\build --config RelWithDebInfo
You probably need to switch out -G mingw32-make
if you want to build with MinGW. See https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html#manual:cmake-generators(7)
from libuiohook.
@kwhat Thank you for this, in the process of trying out dozens of combinations, I think I wrote this as well but probably missed out on the -A
switch. Also, irritatingly, installing Visual Studio doesn't update the PATH
by default. Maybe I am missing something there. I will try with MinGW and close this thread if successful. Just a few questions:
-
Do you think it would be good if we added this to README or maybe somewhere else in the docs? Apologies if this is already there.
-
I'm always a bit confused with the Architecture switch. Processors like i3, i5, i 7 are
x64
right? AMD processors would also bex64
? What about building for Windows on ARM is that supported? If so, what would be the correct value for-A
then? I went through the link you gave and CMake also has aWin32
value for the-A
switch. What would be the target platform then? -
Is there any difference in the functioning / performance of
libuiohook
with compiling with Visual Studio vs compiling with MinGW?
from libuiohook.
Related Issues (20)
- [Feature Request] Allow event "consumption" on Linux via evdev HOT 14
- [Feature Request] Gamepad support? HOT 1
- [Feature request] gamepads support?
- Can't type special characters with right alt HOT 3
- replace key ouput with other value HOT 11
- Caps lock can't be suppressed on Mac OS Monterey HOT 1
- Posting Keys Does Not Work in Games on Windows
- KeyTyped event wasn't emitted for @ on German keyboard layout HOT 10
- hook_create_screen_info doesn't work correctly on Windows when there are multiple screens HOT 1
- Darwin Segfualt on CGEventTapCreate failure
- [Feature Request] Add support for Mac Catalyst HOT 8
- Address issues with Windows hook restarts HOT 2
- coordinates multiplied by two for the mouse on windows HOT 9
- error in the readme HOT 1
- Add keychar support to press and release HOT 2
- Remap a keyboard key as a left mouse button unable to register a double click HOT 1
- Getting mouse position without listening to an event. HOT 4
- add libuiohook as a package on xmake-repo HOT 2
- `keycode` does not match (all?) definitions from `uiohook.h` on Windows HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libuiohook.