CalcProgrammer1 / openrazer-win32

Wrapper to build OpenRazer Linux driver as a Windows DLL
67 stars 9 forks source link

Getting started with example project #1

Closed thowimmer closed 4 years ago

thowimmer commented 4 years ago

Hi @CalcProgrammer1,

first of all many many thanks for this great initiative ! I'm currently investigating on how to control my chroma devices from Windows without installing the Synapse or Chroma SDK and stumbled over this project.

I would like to play around with the example project. Therefore I cloned and open the solution in Visual Studio 2019 community edition as proposed.

But once I want to build the project (OpenRazerExampleDLL) I get the following error:

1>------ Rebuild All started: Project: OpenRazer, Configuration: Debug x64 ------
1>razeraccessory_driver.c
1>razerchromacommon.c
1>razercommon.c
1>c1 : fatal error C1083: Cannot open source file: 'openrazer\driver\razeraccessory_driver.c': No such file or directory
1>c1 : fatal error C1083: Cannot open source file: 'openrazer\driver\razerchromacommon.c': No such file or directory
1>razercore_driver.c
1>razerkbd_driver.c
1>razerkraken_driver.c
1>razermousemat_driver.c
1>c1 : fatal error C1083: Cannot open source file: 'openrazer\driver\razercommon.c': No such file or directory
1>razermouse_driver.c
1>c1 : fatal error C1083: Cannot open source file: 'openrazer\driver\razercore_driver.c': No such file or directory
1>c1 : fatal error C1083: Cannot open source file: 'openrazer\driver\razerkbd_driver.c': No such file or directory
1>c1 : fatal error C1083: Cannot open source file: 'openrazer\driver\razerkraken_driver.c': No such file or directory
1>c1 : fatal error C1083: Cannot open source file: 'openrazer\driver\razermouse_driver.c': No such file or directory
1>c1 : fatal error C1083: Cannot open source file: 'openrazer\driver\razermousemat_driver.c': No such file or directory
1>Done building project "OpenRazer.vcxproj" -- FAILED.
2>------ Rebuild All started: Project: OpenRazerExampleDLL, Configuration: Debug x64 ------
2>main.cpp
2>ChromaExampleDLL.vcxproj -> ...\openrazer-win32-master\openrazer-win32-master\x64\Debug\OpenRazerExampleDLL.exe
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

Can you help me in resolving this issue ?

p.s. I'm not familiar with building native code on Windows using the tools of Visual Studio. So bear with me in being a newby here ;-)

CalcProgrammer1 commented 4 years ago

You had the right ideas for building with Visual Studio, but you didn't initialize the submodule first. This project includes my fork of the upstream openrazer project as a submodule. To initialize the submodule, go to where you cloned the repository and run:

git submodule update --init --recursive

This should clone my openrazer fork into the openrazer folder inside openrazer-win32. The build should now complete in Visual Studio.

If you're looking to use this to control your Razer devices in Windows, check out my OpenRGB project which provides a GUI for controlling Razer devices as well as many other RGB devices. I resurrected rsandoz's old Windows OpenRazer port here because I wanted to use it in OpenRGB.

https://gitlab.com/CalcProgrammer1/OpenRGB

thowimmer commented 4 years ago

Cloning the submodule solved the issue. I was also able to successfully run the example project with my BlackWidow Tournament Edition V2 !

No it's time to getting into code ;-)

I will definitely checkout OpenRGB and use it for general purpose over Synapse :-)

My goal would be to develop a lightweight server, based upon OpenRazer, which can control Razer devices over HTTP (or alike) to make it easier for developers to get started in building solutions for Razer devices without the need of installing vendor specific, closed source, software.

Many thanks for your fast feedback and the efforts your put into this project and OpenRGB !