For much more go to vJoy web site: http://vjoystick.sourceforge.net
To build the project:
Pull the project
Run batch file BuildAll.bat to get installer (in install/ directory)
Run batch file CreateSDK.bat to copy SDK files (in SDK/ directory)
Caution: You will need to install Visual Studio 2022 Community (Free) + WDK and MFC/ATL libraires with Spectre mitigation and InnoSetup 6.0. To build the entire project including the driver you need to install the SDK and puchase a license to sign drivers.
Justin's notes are now at the end of this document.
In case the installation failed, please post your problem in the forum. Attach two log files:
1) The log file for the Inno Setup wrapper is called Setup Log 2011-11-01 #xxx.txt and is located under %TEMP% folder. (xxx can be any number in the range 001-999).
2) The log file for the executable is called vJoyInstall.log and located in the vJoy folder (C:/Program Files/vJoy).
Shaul wrote very good guides about vJoy's internal, please see:
[http://vjoystick.sourceforge.net/site/index.php/dev216/system-architecture] https://web.archive.org/web/20190509030210/http://vjoystick.sourceforge.net/site/index.php/dev216/system-architecture
[http://vjoystick.sourceforge.net/site/index.php/dev216/internal-architecture] https://web.archive.org/web/20190509030210/http://vjoystick.sourceforge.net/site/index.php/dev216/internal-architecture
Shaul's notes here: [http://vjoystick.sourceforge.net/site/index.php/download-a-install/77-vjoy] https://web.archive.org/web/20180602003145/http://vjoystick.sourceforge.net/site/index.php/download-a-install/77-vjoy
This is an extract from the page :
- Enter
pnputil -e
in the command-line window.- Search for
Shaul
in the text you receive.If you don't find then vJoy is not installed
If you find entries of the following type:
Write down the names of the OEM files (e.g. oem86.inf) associated with vJoy.
Remove all OEM files associated with vJoy, one by one.
To remove an OEM file (e.g. oem86.inf) you need to enter
pnputil -f -d oemXX.inf
where XX stands for the appropriate number. (e.gpnputil -f -d oem86.inf
)
Since you need a EV certificate to build the public driver (which is expensive), there is still a solution for developping, debugging and testing.
You have to create a local test certificate from within Visual Studio in Driver Signing page, then select "Test Sign" as the signing mode instead of "Production Sign". If you don't have yet a test certificate, simply creates one from within Visual Studio dialog box. Once created, or if already created, use "select from store" to select the certificat and export it to a file (*.PFX recommended by Microsoft). Once you have build a full setup with the test-signed driver you can install it on a test computer with the test certificate.
To build the solution, the easiest solution is to run the provided batch file from either a cmd.exe prompt, or from within visual Studio, see:
The test computer must enable loading of test signed driver, see:
Basically, you have to remove UEFI secure boot from your Bios, then within Windows you must run cmd.exe with administrative provilieges and type:
C:\WINDOWS\system32> bcdedit.exe -set TESTSIGNING ON
Then reboot your computer. You shoud see a watermark in the bottom right corner telling you that the system is in test mode. Worth noting that doing that this is only for testing and not for permanent use.
Install the test certificate in the trusted root store, see:
https://www.tbs-certificates.co.uk/FAQ/en/174.html
The version is automatically retrieved from git tag by checkversion.exe (see C++ project)
which calls internally git describe --all
to retrieve version from last
annoted tag stored in the git tree. How to update the version:
The same procedure as below, but you need a valid EV certificate and select "Production Sign" in the Driver Signing page in each VS project file.
When updating your build system (like update from VSXX to VSYY), place the C++ dll dependencies in apps\External\DLL
Shaul gave a detailled explanation how the installer works: [http://vjoystick.sourceforge.net/site/index.php/dev216/installer] https://web.archive.org/web/20190509030210/http://vjoystick.sourceforge.net/site/index.php/dev216/installer
[http://vjoystick.sourceforge.net/site/index.php/download-a-install/deployment216/vjoy-installer] https://web.archive.org/web/20190509030211/http://vjoystick.sourceforge.net/site/index.php/download-a-install/deployment216/vjoy-installer
Once you have configured your Visual Studio to use a test certificate, you can deploy and debug your driver in a targtet - or test - computer. The target computer must run the same x86 or x64 architecture as your host.
Tutorial on Windows driver development:
https://www.harald-rosenfeldt.de/2019/05/25/windows-driver-development/
A good tutorial on how to setup your target computer and start a debug session is available here:
For network kernel debugging (KDNET), see also:
The recommanded debugger is WinDbg, that is available in the Microsoft Store.
https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/
A tutorial is given here:
To build in Debug mode, you need to change the BuildAll.bat script:
REM SET BuildMode=Release
SET BuildMode=Debug
If you want to see the traces in the driver's code, you need to remove all filtering in the debugger:
kd> ed nt!Kd_DEFAULT_MASK 0xFFFFFFFF
Please also check this page:
To load symbols, use the already builtin sympath, or add Microsoft's symbol server
.sympath srv*
.sympath srv*https://msdl.microsoft.com/download/symbols
To add your own symbols path (for example vJoy *.pdb files in c:\dev\vjoy\2.1.9.1\vJoy path), use
.sympath+ C:\dev\vjoy\2.1.9.1\vJoy
To reload symbols, use
.reload
(I do not recommand to add /f
to force retrieving, as lazy evaluation is faster)
To get information about vJoy module, type :
!drvobj vJoy