From 0d7fbbfb063ed98d2a51a5fd3b44c9c39dad2ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger?= Date: Sun, 24 Jun 2018 21:04:42 +0200 Subject: [PATCH 01/18] Corrected links --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index d00a232..8b620e2 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,6 @@ Windows kernel-mode driver emulating well-known USB game controllers. Currently supports emulation of the following USB gamepads: - [Microsoft Xbox 360 Controller](https://en.wikipedia.org/wiki/Xbox_360_controller) - [Sony DualShock 4 Controller](https://en.wikipedia.org/wiki/DualShock#DualShock_4) -- [Microsoft Xbox One Controller](https://en.wikipedia.org/wiki/Xbox_One_Controller) - - Experimental; not ready for stable release yet ## Necessary preparations for Windows 7 Before installing the bus driver on Windows 7 (x86 or x64) the following 3rd party software has to be installed: @@ -20,4 +18,4 @@ Before installing the bus driver on Windows 7 (x86 or x64) the following 3rd par * [Security Update for Windows 7 for x64-based Systems (KB3033929)](https://www.microsoft.com/en-us/download/details.aspx?id=46148) ## Installation -[Follow the installation instructions](https://github.com/nefarius/ViGEm/wiki/Driver-Installation). +[Follow the installation instructions](). From fb8c4b1e684ff8a8a7e386ff7e98641d64696aeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger?= Date: Fri, 29 Jun 2018 12:56:43 +0200 Subject: [PATCH 02/18] Enhanced README.md --- README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8b620e2..0252fa7 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,27 @@ Windows kernel-mode driver emulating well-known USB game controllers. )](https://ci.appveyor.com/project/nefarius/indicium-supra) [![Discord](https://img.shields.io/discord/346756263763378176.svg)](https://discord.gg/QTJpBX5) [![Website](https://img.shields.io/website-up-down-green-red/https/vigem.org.svg?label=ViGEm.org)](https://vigem.org/) [![PayPal Donate](https://img.shields.io/badge/paypal-donate-blue.svg)]() [![Support on Patreon](https://img.shields.io/badge/patreon-donate-orange.svg)]() [![GitHub followers](https://img.shields.io/github/followers/nefarius.svg?style=social&label=Follow)](https://github.com/nefarius) [![Twitter Follow](https://img.shields.io/twitter/follow/nefariusmaximus.svg?style=social&label=Follow)](https://twitter.com/nefariusmaximus) ## About -Currently supports emulation of the following USB gamepads: +The `ViGEmBus` driver and `ViGEmClient` libraries represent the core of the Virtual Gamepad Emulation Framework (or `ViGEm` , in short). `ViGEm` aims for a 100% accurate [emulation]() of well-known gaming peripherals as pure software-based devices at kernel level. As it mimics "the real thing" games and other processes require no additional modification whatsoever to detect `ViGEm`-based devices (no Proxy-DLLs or API-Hooking) and simply work out of the box. The spiritual father of `ViGEm` is the (now obsolete) [Scarlett.Crush Productions Virtual Bus Driver]() while it has been completely redesigned and rewritten from the ground up utilizing Microsoft`s [Kernel-Mode Driver Framework +](https://en.wikipedia.org/wiki/Kernel-Mode_Driver_Framework). + +### Emulated devices +Currently supports emulation of the following USB Gamepads: - [Microsoft Xbox 360 Controller](https://en.wikipedia.org/wiki/Xbox_360_controller) - [Sony DualShock 4 Controller](https://en.wikipedia.org/wiki/DualShock#DualShock_4) -## Necessary preparations for Windows 7 +## Use cases +A few examples of the most common use cases for `ViGEm` are: + * You have an unsupported input device you'd like to use within games without modifying said game. + * You want the freedom to use a different controller of your choice in [PS4 Remote Play](). + * You encountered a game not compatible with [x360ce](). + * You want to extend the the reach of your input device (like send traffic to a different machine over a network). + * You want to test/benchmark your game and need a replay mechanism for your user inputs. + * You want to work around player slot assignment order issues in `XInput`. + +## Supported Systems +The driver is built for Windows 7/8/8.1/10 (x86 and amd64). + +### Necessary preparations for Windows 7 Before installing the bus driver on Windows 7 (x86 or x64) the following 3rd party software has to be installed: * [Xbox 360 Accessories Software 1.2](https://www.microsoft.com/accessories/en-us/products/gaming/xbox-360-controller-for-windows/52a-00004#techspecs-connect) (contains the missing device drivers) * [Microsoft Security Advisory 3033929 Update](https://technet.microsoft.com/en-us/library/security/3033929) has to be installed to support the drivers signature. Download links: From f1c668c7bc7c5b0da9606fdf1465bf1858f2979d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger?= Date: Fri, 29 Jun 2018 13:19:10 +0200 Subject: [PATCH 03/18] Ported over sponsors and known users --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 0252fa7..630256b 100644 --- a/README.md +++ b/README.md @@ -35,3 +35,19 @@ Before installing the bus driver on Windows 7 (x86 or x64) the following 3rd par ## Installation [Follow the installation instructions](). + +## Sponsors + - [3dRudder](https://www.3drudder.com/eu/) + - [Wohlfeil.IT e.U.](https://wohlfeil.it/) + - [Parsec](https://parsec.tv/) + - [Rainway, Inc](https://rainway.io/) + +## Known users of ViGEm + - [3dRudder](https://www.3drudder.com/eu/) + - [Parsec](https://parsec.tv/) + - [GloSC](https://github.com/Alia5/GloSC) + - [WhiteKnight](https://autohotkey.com/boards/viewtopic.php?t=34890) + - [InputMapper](https://inputmapper.com/) + - [Oculus VR, LLC.](https://www.oculus.com/) + - [Rainway, Inc](https://rainway.io/) + - [WiimoteHook](https://forum.cemu.info/showthread.php/140-WiimoteHook-Nintendo-Wii-Remote-with-Motion-Rumble-and-Nunchuk-support)- From 3576a5517f61e64c667b8fe39c26d0a3140a32d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger?= Date: Sat, 30 Jun 2018 21:22:23 +0200 Subject: [PATCH 04/18] Typo fixes --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 630256b..00e5f3f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Windows kernel-mode driver emulating well-known USB game controllers. )](https://ci.appveyor.com/project/nefarius/indicium-supra) [![Discord](https://img.shields.io/discord/346756263763378176.svg)](https://discord.gg/QTJpBX5) [![Website](https://img.shields.io/website-up-down-green-red/https/vigem.org.svg?label=ViGEm.org)](https://vigem.org/) [![PayPal Donate](https://img.shields.io/badge/paypal-donate-blue.svg)]() [![Support on Patreon](https://img.shields.io/badge/patreon-donate-orange.svg)]() [![GitHub followers](https://img.shields.io/github/followers/nefarius.svg?style=social&label=Follow)](https://github.com/nefarius) [![Twitter Follow](https://img.shields.io/twitter/follow/nefariusmaximus.svg?style=social&label=Follow)](https://twitter.com/nefariusmaximus) ## About -The `ViGEmBus` driver and `ViGEmClient` libraries represent the core of the Virtual Gamepad Emulation Framework (or `ViGEm` , in short). `ViGEm` aims for a 100% accurate [emulation]() of well-known gaming peripherals as pure software-based devices at kernel level. As it mimics "the real thing" games and other processes require no additional modification whatsoever to detect `ViGEm`-based devices (no Proxy-DLLs or API-Hooking) and simply work out of the box. The spiritual father of `ViGEm` is the (now obsolete) [Scarlett.Crush Productions Virtual Bus Driver]() while it has been completely redesigned and rewritten from the ground up utilizing Microsoft`s [Kernel-Mode Driver Framework +The `ViGEmBus` driver and `ViGEmClient` libraries represent the core of the Virtual Gamepad Emulation Framework (or `ViGEm` , for short). `ViGEm` aims for a 100% accurate [emulation]() of well-known gaming peripherals as pure software-based devices at kernel level. As it mimics "the real thing" games and other processes require no additional modification whatsoever to detect `ViGEm`-based devices (no Proxy-DLLs or API-Hooking) and simply work out of the box. The spiritual father of `ViGEm` is the (now obsolete) [Scarlett.Crush Productions Virtual Bus Driver]() while it has been completely redesigned and rewritten from the ground up utilizing Microsoft's [Kernel-Mode Driver Framework ](https://en.wikipedia.org/wiki/Kernel-Mode_Driver_Framework). ### Emulated devices @@ -19,7 +19,7 @@ A few examples of the most common use cases for `ViGEm` are: * You have an unsupported input device you'd like to use within games without modifying said game. * You want the freedom to use a different controller of your choice in [PS4 Remote Play](). * You encountered a game not compatible with [x360ce](). - * You want to extend the the reach of your input device (like send traffic to a different machine over a network). + * You want to extend the reach of your input device (like send traffic to a different machine over a network). * You want to test/benchmark your game and need a replay mechanism for your user inputs. * You want to work around player slot assignment order issues in `XInput`. @@ -50,4 +50,4 @@ Before installing the bus driver on Windows 7 (x86 or x64) the following 3rd par - [InputMapper](https://inputmapper.com/) - [Oculus VR, LLC.](https://www.oculus.com/) - [Rainway, Inc](https://rainway.io/) - - [WiimoteHook](https://forum.cemu.info/showthread.php/140-WiimoteHook-Nintendo-Wii-Remote-with-Motion-Rumble-and-Nunchuk-support)- + - [WiimoteHook](https://forum.cemu.info/showthread.php/140-WiimoteHook-Nintendo-Wii-Remote-with-Motion-Rumble-and-Nunchuk-support) From db1ae40250e568aa84c47c2f4c7b0b87478b1d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger?= Date: Sun, 1 Jul 2018 11:06:56 +0200 Subject: [PATCH 05/18] Update README.md --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 00e5f3f..3647e76 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,7 @@ Windows kernel-mode driver emulating well-known USB game controllers. )](https://ci.appveyor.com/project/nefarius/indicium-supra) [![Discord](https://img.shields.io/discord/346756263763378176.svg)](https://discord.gg/QTJpBX5) [![Website](https://img.shields.io/website-up-down-green-red/https/vigem.org.svg?label=ViGEm.org)](https://vigem.org/) [![PayPal Donate](https://img.shields.io/badge/paypal-donate-blue.svg)]() [![Support on Patreon](https://img.shields.io/badge/patreon-donate-orange.svg)]() [![GitHub followers](https://img.shields.io/github/followers/nefarius.svg?style=social&label=Follow)](https://github.com/nefarius) [![Twitter Follow](https://img.shields.io/twitter/follow/nefariusmaximus.svg?style=social&label=Follow)](https://twitter.com/nefariusmaximus) ## About -The `ViGEmBus` driver and `ViGEmClient` libraries represent the core of the Virtual Gamepad Emulation Framework (or `ViGEm` , for short). `ViGEm` aims for a 100% accurate [emulation]() of well-known gaming peripherals as pure software-based devices at kernel level. As it mimics "the real thing" games and other processes require no additional modification whatsoever to detect `ViGEm`-based devices (no Proxy-DLLs or API-Hooking) and simply work out of the box. The spiritual father of `ViGEm` is the (now obsolete) [Scarlett.Crush Productions Virtual Bus Driver]() while it has been completely redesigned and rewritten from the ground up utilizing Microsoft's [Kernel-Mode Driver Framework -](https://en.wikipedia.org/wiki/Kernel-Mode_Driver_Framework). +The `ViGEmBus` driver and `ViGEmClient` libraries represent the core of the Virtual Gamepad Emulation Framework (or `ViGEm` , for short). `ViGEm` aims for a 100% accurate [emulation]() of well-known gaming peripherals as pure software-based devices at kernel level. As it mimics "the real thing" games and other processes require no additional modification whatsoever to detect `ViGEm`-based devices (no Proxy-DLLs or API-Hooking) and simply work out of the box. While the (now obsolete) [Scarlett.Crush Productions Virtual Bus Driver]() is the spiritual father of this project, `ViGEm` has been designed and written from the ground up utilizing Microsoft's [Kernel-Mode Driver Framework](https://en.wikipedia.org/wiki/Kernel-Mode_Driver_Framework). ### Emulated devices Currently supports emulation of the following USB Gamepads: @@ -26,6 +25,9 @@ A few examples of the most common use cases for `ViGEm` are: ## Supported Systems The driver is built for Windows 7/8/8.1/10 (x86 and amd64). +## Installation +[Follow the installation instructions](). + ### Necessary preparations for Windows 7 Before installing the bus driver on Windows 7 (x86 or x64) the following 3rd party software has to be installed: * [Xbox 360 Accessories Software 1.2](https://www.microsoft.com/accessories/en-us/products/gaming/xbox-360-controller-for-windows/52a-00004#techspecs-connect) (contains the missing device drivers) @@ -33,9 +35,6 @@ Before installing the bus driver on Windows 7 (x86 or x64) the following 3rd par * [Security Update for Windows 7 (KB3033929)](https://www.microsoft.com/en-us/download/details.aspx?id=46078) * [Security Update for Windows 7 for x64-based Systems (KB3033929)](https://www.microsoft.com/en-us/download/details.aspx?id=46148) -## Installation -[Follow the installation instructions](). - ## Sponsors - [3dRudder](https://www.3drudder.com/eu/) - [Wohlfeil.IT e.U.](https://wohlfeil.it/) From 1dc6ff9816f5b6e693a819e95c62c7aebe9f6b4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger?= Date: Sun, 1 Jul 2018 11:29:03 +0200 Subject: [PATCH 06/18] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 29 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 17 +++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..0140e55 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,29 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior (example): +1. Start program '...' +2. Click on '....' +3. Plug in device '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**System details (please complete the following information):** + - OS: [e.g. Windows 10 1803] + - Feeder software: [e.g. VDX, DS4Windows, ...] + - Driver Version: [e.g. 1.14.3.0] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..066b2d9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From e41796c22e1eba4e667ff2cbdfa1b67a892d0076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger?= Date: Sun, 1 Jul 2018 11:35:44 +0200 Subject: [PATCH 07/18] Update issue templates --- .github/ISSUE_TEMPLATE/you-need-support.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/you-need-support.md diff --git a/.github/ISSUE_TEMPLATE/you-need-support.md b/.github/ISSUE_TEMPLATE/you-need-support.md new file mode 100644 index 0000000..d713514 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/you-need-support.md @@ -0,0 +1,7 @@ +--- +name: You need support +about: This is the wrong place to ask for support + +--- + +**Please don't abuse the issue tracker as a helpdesk!** We have a Discord server (linked in the README) where you can ask the lovely like-minded folks for assistance. Thank you for you compliance :smiley: From 4fced8b3906bdd0d078b6abfb5decf686ea27206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger?= Date: Sun, 1 Jul 2018 11:38:09 +0200 Subject: [PATCH 08/18] Update issue templates --- .github/ISSUE_TEMPLATE/you-need-support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/you-need-support.md b/.github/ISSUE_TEMPLATE/you-need-support.md index d713514..98baada 100644 --- a/.github/ISSUE_TEMPLATE/you-need-support.md +++ b/.github/ISSUE_TEMPLATE/you-need-support.md @@ -4,4 +4,4 @@ about: This is the wrong place to ask for support --- -**Please don't abuse the issue tracker as a helpdesk!** We have a Discord server (linked in the README) where you can ask the lovely like-minded folks for assistance. Thank you for you compliance :smiley: +**Please don't abuse the issue tracker as a helpdesk!** We have a Discord server (linked in the README) where you can ask the lovely like-minded folks for assistance. Thank you for your compliance :smiley: From eae38f6849b3250643674fe1bb79ae27f054f4ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger?= Date: Sun, 1 Jul 2018 14:13:23 +0200 Subject: [PATCH 09/18] Create pull_request_template.md --- .github/PULL_REQUEST_TEMPLATE/pull_request_template.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE/pull_request_template.md diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md new file mode 100644 index 0000000..be5d79c --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -0,0 +1 @@ +# TBD :smiley: From 0d016bedccaa26337e8c2355e77ef8114901226a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger?= Date: Sun, 1 Jul 2018 19:55:23 +0200 Subject: [PATCH 10/18] Added build instructions Added disclaimer Minor change of wording --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3647e76..69e5e24 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ Windows kernel-mode driver emulating well-known USB game controllers. )](https://ci.appveyor.com/project/nefarius/indicium-supra) [![Discord](https://img.shields.io/discord/346756263763378176.svg)](https://discord.gg/QTJpBX5) [![Website](https://img.shields.io/website-up-down-green-red/https/vigem.org.svg?label=ViGEm.org)](https://vigem.org/) [![PayPal Donate](https://img.shields.io/badge/paypal-donate-blue.svg)]() [![Support on Patreon](https://img.shields.io/badge/patreon-donate-orange.svg)]() [![GitHub followers](https://img.shields.io/github/followers/nefarius.svg?style=social&label=Follow)](https://github.com/nefarius) [![Twitter Follow](https://img.shields.io/twitter/follow/nefariusmaximus.svg?style=social&label=Follow)](https://twitter.com/nefariusmaximus) ## About +**Disclaimer:** this project is for software developers. To make it do something useful you'll also need a [feeder application](). + The `ViGEmBus` driver and `ViGEmClient` libraries represent the core of the Virtual Gamepad Emulation Framework (or `ViGEm` , for short). `ViGEm` aims for a 100% accurate [emulation]() of well-known gaming peripherals as pure software-based devices at kernel level. As it mimics "the real thing" games and other processes require no additional modification whatsoever to detect `ViGEm`-based devices (no Proxy-DLLs or API-Hooking) and simply work out of the box. While the (now obsolete) [Scarlett.Crush Productions Virtual Bus Driver]() is the spiritual father of this project, `ViGEm` has been designed and written from the ground up utilizing Microsoft's [Kernel-Mode Driver Framework](https://en.wikipedia.org/wiki/Kernel-Mode_Driver_Framework). ### Emulated devices @@ -25,8 +27,22 @@ A few examples of the most common use cases for `ViGEm` are: ## Supported Systems The driver is built for Windows 7/8/8.1/10 (x86 and amd64). +## How to build + +### Prerequisites + - Visual Studio **2017** ([Community Edition](https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15) is just fine) + - [WDK for Windows 10, version 1803](https://developer.microsoft.com/en-us/windows/hardware/windows-driver-kit) + + You can either build directly within Visual Studio or in PowerShell by running the build script: + + ``` + .\build.ps1 -configuration release + ``` + + Do bear in mind that you'll need to sign the driver to use it without [test mode](). + ## Installation -[Follow the installation instructions](). +To grab the latest signed binaries for use or redistribution [follow the installation instructions](). ### Necessary preparations for Windows 7 Before installing the bus driver on Windows 7 (x86 or x64) the following 3rd party software has to be installed: From b789190e98891a711642dc7e583ef1d8fbec2e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger?= Date: Sun, 1 Jul 2018 20:06:15 +0200 Subject: [PATCH 11/18] Updated sponsors links --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 69e5e24..923af46 100644 --- a/README.md +++ b/README.md @@ -52,14 +52,14 @@ Before installing the bus driver on Windows 7 (x86 or x64) the following 3rd par * [Security Update for Windows 7 for x64-based Systems (KB3033929)](https://www.microsoft.com/en-us/download/details.aspx?id=46148) ## Sponsors - - [3dRudder](https://www.3drudder.com/eu/) + - [3dRudder](https://www.3drudder.com/) - [Wohlfeil.IT e.U.](https://wohlfeil.it/) - - [Parsec](https://parsec.tv/) + - [Parsec](https://parsecgaming.com/) - [Rainway, Inc](https://rainway.io/) ## Known users of ViGEm - - [3dRudder](https://www.3drudder.com/eu/) - - [Parsec](https://parsec.tv/) + - [3dRudder](https://www.3drudder.com/) + - [Parsec](https://parsecgaming.com/) - [GloSC](https://github.com/Alia5/GloSC) - [WhiteKnight](https://autohotkey.com/boards/viewtopic.php?t=34890) - [InputMapper](https://inputmapper.com/) From 6025c73150a08fb7ca3b0f80e3e7d677c9d0c063 Mon Sep 17 00:00:00 2001 From: Clive Galway Date: Mon, 2 Jul 2018 20:45:17 +0100 Subject: [PATCH 12/18] WhiteKnight does not use ViGEm It used HidGuardian, and it's gonna be deprecated with the new HG anyway. Replaced with UCR --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 923af46..fc22548 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Before installing the bus driver on Windows 7 (x86 or x64) the following 3rd par - [3dRudder](https://www.3drudder.com/) - [Parsec](https://parsecgaming.com/) - [GloSC](https://github.com/Alia5/GloSC) - - [WhiteKnight](https://autohotkey.com/boards/viewtopic.php?t=34890) + - [UCR](https://github.com/Snoothy/UCR) - [InputMapper](https://inputmapper.com/) - [Oculus VR, LLC.](https://www.oculus.com/) - [Rainway, Inc](https://rainway.io/) From a7fe0ed1209f318b10241231fed41b1b9d2f60b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger?= Date: Sun, 15 Jul 2018 14:12:16 +0200 Subject: [PATCH 13/18] Changed version patch utility download URL Changed build image version to reflect https://github.com/appveyor/ci/issues/2458 Pushing builds on tag only now --- appveyor.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index bb00381..367489d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,10 +1,10 @@ version: 1.15.{build}.0 -image: Previous Visual Studio 2017 +image: Visual Studio 2017 build_script: - ps: .\build.ps1 -configuration release after_build: - ps: | - Invoke-WebRequest "https://github.com/pavel-a/ddverpatch/files/1215010/verpatch-1.0.15.1-x86-codeplex.zip" -OutFile verpatch-1.0.15.1-x86-codeplex.zip + Invoke-WebRequest "https://downloads.vigem.org/other/pavel-a/ddverpatch/verpatch-1.0.15.1-x86-codeplex.zip" -OutFile verpatch-1.0.15.1-x86-codeplex.zip Expand-Archive verpatch-1.0.15.1-x86-codeplex.zip -DestinationPath . .\verpatch.exe .\artifacts\x64\ViGEmBus.sys "$env:APPVEYOR_BUILD_VERSION" .\verpatch.exe .\artifacts\x64\ViGEmBus.sys /pv "$env:APPVEYOR_BUILD_VERSION" @@ -16,4 +16,6 @@ artifacts: name: ViGEmBus_unsigned_x86_amd64 deploy: - provider: Environment - name: BUILDBOT \ No newline at end of file + name: BUILDBOT + on: + appveyor_repo_tag: true \ No newline at end of file From 6d10f45a85a8791bdc3a78a35bc7daccfb7650b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger?= Date: Wed, 15 Aug 2018 00:43:44 +0200 Subject: [PATCH 14/18] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fc22548..8bb6281 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Windows kernel-mode driver emulating well-known USB game controllers. )](https://ci.appveyor.com/project/nefarius/indicium-supra) [![Discord](https://img.shields.io/discord/346756263763378176.svg)](https://discord.gg/QTJpBX5) [![Website](https://img.shields.io/website-up-down-green-red/https/vigem.org.svg?label=ViGEm.org)](https://vigem.org/) [![PayPal Donate](https://img.shields.io/badge/paypal-donate-blue.svg)]() [![Support on Patreon](https://img.shields.io/badge/patreon-donate-orange.svg)]() [![GitHub followers](https://img.shields.io/github/followers/nefarius.svg?style=social&label=Follow)](https://github.com/nefarius) [![Twitter Follow](https://img.shields.io/twitter/follow/nefariusmaximus.svg?style=social&label=Follow)](https://twitter.com/nefariusmaximus) ## About -**Disclaimer:** this project is for software developers. To make it do something useful you'll also need a [feeder application](). +**Disclaimer:** this project is for software developers. To make it do something useful you'll also need a [feeder application](). The `ViGEmBus` driver and `ViGEmClient` libraries represent the core of the Virtual Gamepad Emulation Framework (or `ViGEm` , for short). `ViGEm` aims for a 100% accurate [emulation]() of well-known gaming peripherals as pure software-based devices at kernel level. As it mimics "the real thing" games and other processes require no additional modification whatsoever to detect `ViGEm`-based devices (no Proxy-DLLs or API-Hooking) and simply work out of the box. While the (now obsolete) [Scarlett.Crush Productions Virtual Bus Driver]() is the spiritual father of this project, `ViGEm` has been designed and written from the ground up utilizing Microsoft's [Kernel-Mode Driver Framework](https://en.wikipedia.org/wiki/Kernel-Mode_Driver_Framework). From 492fba8f3145fc35b2e53fe4329c8c640fcc2f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger?= Date: Wed, 15 Aug 2018 00:51:06 +0200 Subject: [PATCH 15/18] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8bb6281..047c5eb 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ The driver is built for Windows 7/8/8.1/10 (x86 and amd64). Do bear in mind that you'll need to sign the driver to use it without [test mode](). ## Installation -To grab the latest signed binaries for use or redistribution [follow the installation instructions](). +To grab the latest signed binaries for use or redistribution [follow the installation instructions](). ### Necessary preparations for Windows 7 Before installing the bus driver on Windows 7 (x86 or x64) the following 3rd party software has to be installed: From 71da1366334160ec1ed8c2ebe0279cb30c53cf0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger-Stelzer?= Date: Mon, 20 Aug 2018 12:21:07 +0200 Subject: [PATCH 16/18] Removed file not meant to be in repository --- .gitignore | 1 + build/.build.csproj.dotsettings | 17 ----------------- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 build/.build.csproj.dotsettings diff --git a/.gitignore b/.gitignore index 5caa9df..eb13e11 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ /.vs/config /sys/RCa21300 /sys/RCb21300 +/build/*.dotsettings diff --git a/build/.build.csproj.dotsettings b/build/.build.csproj.dotsettings deleted file mode 100644 index de07a95..0000000 --- a/build/.build.csproj.dotsettings +++ /dev/null @@ -1,17 +0,0 @@ - - False - Implicit - Implicit - ExpressionBody - 0 - NEXT_LINE - True - False - WRAP_IF_LONG - True - False - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - True - True - True From 25a85794a39ba6c44b2d0f40526865b339155a9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger-Stelzer?= Date: Mon, 20 Aug 2018 12:50:27 +0200 Subject: [PATCH 17/18] Upgraded to latest nuke build Implemented https://docs.vigem.org/#!automatically-select-latest-windows-10-sdk.md --- .nuke | Bin 34 -> 12 bytes ViGEmBus.sln | 100 +++++++++++++++---------------- build.ps1 | 63 ++++++++++++-------- build.sh | 62 ++++++++++++------- build/.build.csproj | 128 ---------------------------------------- build/Build.cs | 123 +++++++++++++++++--------------------- build/_build.csproj | 34 +++++++++++ build/packages.config | 28 --------- lib/ViGEmClient.vcxproj | 7 ++- 9 files changed, 222 insertions(+), 323 deletions(-) delete mode 100644 build/.build.csproj create mode 100644 build/_build.csproj delete mode 100644 build/packages.config diff --git a/.nuke b/.nuke index 1256cc32d5c17f18d4cc7db7b30396f54274a313..4d60562812ee7a252a8e1dc44685790c71788bd7 100644 GIT binary patch literal 12 TcmWH`ba%~lDlOJ4&dCD+8&m{d literal 34 ncmezWPme*LA&eoD!JWaCA(z34p_HMRK@W&?81fi+8Mqh#mP`iE diff --git a/ViGEmBus.sln b/ViGEmBus.sln index a3b3627..e57c1c8 100644 --- a/ViGEmBus.sln +++ b/ViGEmBus.sln @@ -3,12 +3,12 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27130.2024 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = ".build", "build\.build.csproj", "{6DAE6010-3A66-4191-B462-60E82A0D0445}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ViGEmBus", "sys\ViGEmBus.vcxproj", "{040101B0-EE5C-4EF1-99EE-9F81C795C001}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ViGEmClient", "lib\ViGEmClient.vcxproj", "{7DB06674-1F4F-464B-8E1C-172E9587F9DC}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{148E5E2E-2613-4EA5-AB8F-D93747E927E3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug (dynamic)|ARM = Debug (dynamic)|ARM @@ -37,54 +37,6 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug (dynamic)|ARM.ActiveCfg = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug (dynamic)|ARM.Build.0 = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug (dynamic)|ARM64.ActiveCfg = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug (dynamic)|ARM64.Build.0 = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug (dynamic)|x64.ActiveCfg = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug (dynamic)|x64.Build.0 = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug (dynamic)|x86.ActiveCfg = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug (dynamic)|x86.Build.0 = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug (static)|ARM.ActiveCfg = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug (static)|ARM.Build.0 = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug (static)|ARM64.ActiveCfg = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug (static)|ARM64.Build.0 = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug (static)|x64.ActiveCfg = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug (static)|x64.Build.0 = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug (static)|x86.ActiveCfg = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug (static)|x86.Build.0 = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug|ARM.ActiveCfg = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug|ARM.Build.0 = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug|ARM64.Build.0 = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug|x64.ActiveCfg = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug|x64.Build.0 = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug|x86.ActiveCfg = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Debug|x86.Build.0 = Debug|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release (dynamic)|ARM.ActiveCfg = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release (dynamic)|ARM.Build.0 = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release (dynamic)|ARM64.ActiveCfg = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release (dynamic)|ARM64.Build.0 = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release (dynamic)|x64.ActiveCfg = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release (dynamic)|x64.Build.0 = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release (dynamic)|x86.ActiveCfg = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release (dynamic)|x86.Build.0 = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release (static)|ARM.ActiveCfg = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release (static)|ARM.Build.0 = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release (static)|ARM64.ActiveCfg = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release (static)|ARM64.Build.0 = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release (static)|x64.ActiveCfg = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release (static)|x64.Build.0 = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release (static)|x86.ActiveCfg = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release (static)|x86.Build.0 = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release|ARM.ActiveCfg = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release|ARM.Build.0 = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release|ARM64.ActiveCfg = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release|ARM64.Build.0 = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release|x64.ActiveCfg = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release|x64.Build.0 = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release|x86.ActiveCfg = Release|Any CPU - {6DAE6010-3A66-4191-B462-60E82A0D0445}.Release|x86.Build.0 = Release|Any CPU {040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug (dynamic)|ARM.ActiveCfg = Debug|ARM {040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug (dynamic)|ARM.Build.0 = Debug|ARM {040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug (dynamic)|ARM.Deploy.0 = Debug|ARM @@ -197,6 +149,54 @@ Global {7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release|x64.Build.0 = Release (static)|x64 {7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release|x86.ActiveCfg = Release (static)|Win32 {7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release|x86.Build.0 = Release (static)|Win32 + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug (dynamic)|ARM.ActiveCfg = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug (dynamic)|ARM.Build.0 = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug (dynamic)|ARM64.ActiveCfg = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug (dynamic)|ARM64.Build.0 = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug (dynamic)|x64.ActiveCfg = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug (dynamic)|x64.Build.0 = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug (dynamic)|x86.ActiveCfg = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug (dynamic)|x86.Build.0 = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug (static)|ARM.ActiveCfg = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug (static)|ARM.Build.0 = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug (static)|ARM64.ActiveCfg = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug (static)|ARM64.Build.0 = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug (static)|x64.ActiveCfg = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug (static)|x64.Build.0 = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug (static)|x86.ActiveCfg = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug (static)|x86.Build.0 = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug|ARM.ActiveCfg = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug|ARM.Build.0 = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug|ARM64.Build.0 = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug|x64.ActiveCfg = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug|x64.Build.0 = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug|x86.ActiveCfg = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Debug|x86.Build.0 = Debug|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release (dynamic)|ARM.ActiveCfg = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release (dynamic)|ARM.Build.0 = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release (dynamic)|ARM64.ActiveCfg = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release (dynamic)|ARM64.Build.0 = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release (dynamic)|x64.ActiveCfg = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release (dynamic)|x64.Build.0 = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release (dynamic)|x86.ActiveCfg = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release (dynamic)|x86.Build.0 = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release (static)|ARM.ActiveCfg = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release (static)|ARM.Build.0 = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release (static)|ARM64.ActiveCfg = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release (static)|ARM64.Build.0 = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release (static)|x64.ActiveCfg = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release (static)|x64.Build.0 = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release (static)|x86.ActiveCfg = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release (static)|x86.Build.0 = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release|ARM.ActiveCfg = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release|ARM.Build.0 = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release|ARM64.ActiveCfg = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release|ARM64.Build.0 = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release|x64.ActiveCfg = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release|x64.Build.0 = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release|x86.ActiveCfg = Release|Any CPU + {148E5E2E-2613-4EA5-AB8F-D93747E927E3}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/build.ps1 b/build.ps1 index ec371c0..728f31b 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,10 +1,12 @@ [CmdletBinding()] Param( - [switch]$NoInit, + #[switch]$CustomParam, [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)] [string[]]$BuildArguments ) +Write-Output "Windows PowerShell $($Host.Version)" + Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { $host.SetShouldExit(1) } $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent @@ -12,41 +14,52 @@ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent # CONFIGURATION ########################################################################### -$NuGetVersion = "latest" -$SolutionDirectory = "$PSScriptRoot\..\ViGEm" -$BuildProjectFile = "$PSScriptRoot\.\build\.build.csproj" -$BuildExeFile = "$PSScriptRoot\.\build\bin\debug\.build.exe" +$BuildProjectFile = "$PSScriptRoot\build\_build.csproj" +$TempDirectory = "$PSScriptRoot\\.tmp" -$TempDirectory = "$PSScriptRoot\.tmp" +$DotNetGlobalFile = "$PSScriptRoot\\global.json" +$DotNetInstallUrl = "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1" +$DotNetReleasesUrl = "https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json" -$NuGetUrl = "https://dist.nuget.org/win-x86-commandline/$NuGetVersion/nuget.exe" -$NuGetFile = "$TempDirectory\nuget.exe" -$env:NUGET_EXE = $NuGetFile +$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1 +$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1 +$env:NUGET_XMLDOC_MODE = "skip" ########################################################################### -# PREPARE BUILD +# EXECUTION ########################################################################### function ExecSafe([scriptblock] $cmd) { & $cmd - if ($LastExitCode -ne 0) { throw "The following call failed with exit code $LastExitCode. '$cmd'" } + if ($LASTEXITCODE) { exit $LASTEXITCODE } } -if (!$NoInit) { +# If global.json exists, load expected version +if (Test-Path $DotNetGlobalFile) { + $DotNetVersion = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json).sdk.version +} + +# If dotnet is installed locally, and expected version is not set or installation matches the expected version +if ((Get-Command "dotnet" -ErrorAction SilentlyContinue) -ne $null -and ` + (!(Test-Path variable:DotNetVersion) -or $(& dotnet --version) -eq $DotNetVersion)) { + $env:DOTNET_EXE = (Get-Command "dotnet").Path +} +else { + $DotNetDirectory = "$TempDirectory\dotnet-win" + $env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe" + + # If expected version is not set, get latest version + if (!(Test-Path variable:DotNetVersion)) { + $DotNetVersion = $(Invoke-WebRequest -UseBasicParsing $DotNetReleasesUrl | ConvertFrom-Json)[0]."version-sdk" + } + + # Download and execute install script + $DotNetInstallFile = "$TempDirectory\dotnet-install.ps1" md -force $TempDirectory > $null - - if (!(Test-Path $NuGetFile)) { (New-Object System.Net.WebClient).DownloadFile($NuGetUrl, $NuGetFile) } - elseif ($NuGetVersion -eq "latest") { & $NuGetFile update -Self } - - ExecSafe { & $NuGetFile restore $BuildProjectFile -SolutionDirectory $SolutionDirectory } - ExecSafe { & $NuGetFile install Nuke.MSBuildLocator -ExcludeVersion -OutputDirectory $TempDirectory -SolutionDirectory $SolutionDirectory } + (New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile) + ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath } } -$MSBuildFile = & "$TempDirectory\Nuke.MSBuildLocator\tools\Nuke.MSBuildLocator.exe" -ExecSafe { & $MSBuildFile $BuildProjectFile } +Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)" -########################################################################### -# EXECUTE BUILD -########################################################################### - -ExecSafe { & $BuildExeFile $BuildArguments } +ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile -- $BuildArguments } diff --git a/build.sh b/build.sh index c5d8219..7dfb86b 100644 --- a/build.sh +++ b/build.sh @@ -1,10 +1,12 @@ #!/usr/bin/env bash -NOINIT=0 +echo $(bash --version 2>&1 | head -n 1) + +#CUSTOMPARAM=0 BUILD_ARGUMENTS=() for i in "$@"; do case $(echo $1 | awk '{print tolower($0)}') in - -noinit) NOINIT=1;; + # -custom-param) CUSTOMPARAM=1;; *) BUILD_ARGUMENTS+=("$1") ;; esac shift @@ -17,34 +19,50 @@ SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) # CONFIGURATION ########################################################################### -NUGET_VERSION="latest" -SOLUTION_DIRECTORY="$SCRIPT_DIR/../ViGEm" -BUILD_PROJECT_FILE="$SCRIPT_DIR/./build/.build.csproj" -BUILD_EXE_FILE="$SCRIPT_DIR/./build/bin/Debug/.build.exe" +BUILD_PROJECT_FILE="$SCRIPT_DIR/build/_build.csproj" +TEMP_DIRECTORY="$SCRIPT_DIR//.tmp" -TEMP_DIRECTORY="$SCRIPT_DIR/.tmp" +DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json" +DOTNET_INSTALL_URL="https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh" +DOTNET_RELEASES_URL="https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json" -NUGET_URL="https://dist.nuget.org/win-x86-commandline/$NUGET_VERSION/nuget.exe" -NUGET_FILE="$TEMP_DIRECTORY/nuget.exe" -export NUGET_EXE="$NUGET_FILE" +export DOTNET_CLI_TELEMETRY_OPTOUT=1 +export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 +export NUGET_XMLDOC_MODE="skip" ########################################################################### -# PREPARE BUILD +# EXECUTION ########################################################################### -if ! ((NOINIT)); then - mkdir -p "$TEMP_DIRECTORY" +function FirstJsonValue { + perl -nle 'print $1 if m{"'$1'": "([^"\-]+)",?}' <<< ${@:2} +} - if [ ! -f "$NUGET_FILE" ]; then curl -Lsfo "$NUGET_FILE" $NUGET_URL; - elif [ $NUGET_VERSION == "latest" ]; then mono "$NUGET_FILE" update -Self; fi - - mono "$NUGET_FILE" restore "$BUILD_PROJECT_FILE" -SolutionDirectory $SOLUTION_DIRECTORY +# If global.json exists, load expected version +if [ -f "$DOTNET_GLOBAL_FILE" ]; then + DOTNET_VERSION=$(FirstJsonValue "version" $(cat "$DOTNET_GLOBAL_FILE")) fi -msbuild "$BUILD_PROJECT_FILE" +# If dotnet is installed locally, and expected version is not set or installation matches the expected version +if [[ -x "$(command -v dotnet)" && (-z ${DOTNET_VERSION+x} || $(dotnet --version) == "$DOTNET_VERSION") ]]; then + export DOTNET_EXE="$(command -v dotnet)" +else + DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix" + export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet" + + # If expected version is not set, get latest version + if [ -z ${DOTNET_VERSION+x} ]; then + DOTNET_VERSION=$(FirstJsonValue "version-sdk" $(curl -s "$DOTNET_RELEASES_URL")) + fi + + # Download and execute install script + DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh" + mkdir -p "$TEMP_DIRECTORY" + curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL" + chmod +x "$DOTNET_INSTALL_FILE" + "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path +fi -########################################################################### -# EXECUTE BUILD -########################################################################### +echo "Microsoft (R) .NET Core SDK version $("$DOTNET_EXE" --version)" -mono "$BUILD_EXE_FILE" ${BUILD_ARGUMENTS[@]} +"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" -- ${BUILD_ARGUMENTS[@]} diff --git a/build/.build.csproj b/build/.build.csproj deleted file mode 100644 index 6c96206..0000000 --- a/build/.build.csproj +++ /dev/null @@ -1,128 +0,0 @@ - - - - - Debug - AnyCPU - {6DAE6010-3A66-4191-B462-60E82A0D0445} - Exe - - .build - v4.6.1 - 512 - true - - CS0649;CS0169 - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\ViGEm\packages\AutoMapper.6.0.2\lib\net45\AutoMapper.dll - - - ..\..\ViGEm\packages\Colorful.Console.1.0.7\lib\net461\Colorful.Console.dll - - - ..\..\ViGEm\packages\Glob.0.3.2\lib\net46\Glob.dll - - - ..\..\ViGEm\packages\JetBrains.Annotations.10.4.0\lib\net\JetBrains.Annotations.dll - - - ..\..\ViGEm\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - - - ..\..\ViGEm\packages\Newtonsoft.Json.Bson.1.0.1\lib\net45\Newtonsoft.Json.Bson.dll - - - ..\..\ViGEm\packages\NuGet.Client.4.0.0\lib\net45\NuGet.Client.dll - - - ..\..\ViGEm\packages\NuGet.Common.4.0.0\lib\net45\NuGet.Common.dll - - - ..\..\ViGEm\packages\NuGet.ContentModel.4.0.0\lib\net45\NuGet.ContentModel.dll - - - ..\..\ViGEm\packages\NuGet.Frameworks.4.0.0\lib\net45\NuGet.Frameworks.dll - - - ..\..\ViGEm\packages\NuGet.Packaging.4.0.0\lib\net45\NuGet.Packaging.dll - - - ..\..\ViGEm\packages\NuGet.Packaging.Core.4.0.0\lib\net45\NuGet.Packaging.Core.dll - - - ..\..\ViGEm\packages\NuGet.Packaging.Core.Types.4.0.0\lib\net45\NuGet.Packaging.Core.Types.dll - - - ..\..\ViGEm\packages\NuGet.Repositories.4.0.0\lib\net45\NuGet.Repositories.dll - - - ..\..\ViGEm\packages\NuGet.RuntimeModel.4.0.0\lib\net45\NuGet.RuntimeModel.dll - - - ..\..\ViGEm\packages\NuGet.Versioning.4.0.0\lib\net45\NuGet.Versioning.dll - - - ..\..\ViGEm\packages\Nuke.Common.0.1.458\lib\net461\Nuke.Common.dll - - - ..\..\ViGEm\packages\Nuke.Core.0.1.458\lib\net461\Nuke.Core.dll - - - ..\..\ViGEm\packages\Octokit.0.24.0\lib\net45\Octokit.dll - - - - - ..\..\ViGEm\packages\System.Diagnostics.Process.4.3.0\lib\net461\System.Diagnostics.Process.dll - - - - - - ..\..\ViGEm\packages\System.Runtime.Serialization.Formatters.4.3.0\lib\net46\System.Runtime.Serialization.Formatters.dll - - - ..\..\ViGEm\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll - - - ..\..\ViGEm\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll - - - - - - - - - ..\..\ViGEm\packages\YamlDotNet.4.2.1\lib\net35\YamlDotNet.dll - - - - - - - - - - diff --git a/build/Build.cs b/build/Build.cs index 9edb11d..ca58fe8 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -1,89 +1,74 @@ -using System; -using System.IO; +using System; using System.Linq; using Nuke.Common; using Nuke.Common.Git; -using Nuke.Common.Tools.GitVersion; +using Nuke.Common.ProjectModel; using Nuke.Common.Tools.MSBuild; -using Nuke.Core; +using static Nuke.Common.EnvironmentInfo; +using static Nuke.Common.IO.FileSystemTasks; +using static Nuke.Common.IO.PathConstruction; using static Nuke.Common.Tools.MSBuild.MSBuildTasks; -using static Nuke.Core.IO.FileSystemTasks; -using static Nuke.Core.IO.PathConstruction; -using static Nuke.Core.EnvironmentInfo; class Build : NukeBuild { - // Console application entry. Also defines the default target. public static int Main () => Execute(x => x.Compile); - // Auto-injection fields: + [Solution] readonly Solution Solution; + [GitRepository] readonly GitRepository GitRepository; - // [GitVersion] readonly GitVersion GitVersion; - // Semantic versioning. Must have 'GitVersion.CommandLine' referenced. - - // [GitRepository] readonly GitRepository GitRepository; - // Parses origin, branch name and head from git config. - - // [Parameter] readonly string MyGetApiKey; - // Returns command-line arguments and environment variables. + AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts"; Target Clean => _ => _ - .OnlyWhen(() => false) // Disabled for safety. - .Executes(() => - { - DeleteDirectories(GlobDirectories(SourceDirectory, "**/bin", "**/obj")); - EnsureCleanDirectory(OutputDirectory); - }); + .Executes(() => + { + EnsureCleanDirectory(ArtifactsDirectory); + }); Target Restore => _ => _ - .DependsOn(Clean) - .Executes(() => - { - MSBuild(s => DefaultMSBuildRestore.SetTargetPlatform(MSBuildTargetPlatform.x64)); - MSBuild(s => DefaultMSBuildRestore.SetTargetPlatform(MSBuildTargetPlatform.x86)); - }); + .DependsOn(Clean) + .Executes(() => + { + MSBuild(s => s + .SetTargetPath(SolutionFile) + .SetTargets("Restore") + .SetTargetPlatform(MSBuildTargetPlatform.x64)); + + MSBuild(s => s + .SetTargetPath(SolutionFile) + .SetTargets("Restore") + .SetTargetPlatform(MSBuildTargetPlatform.x86)); + }); Target Compile => _ => _ - .DependsOn(Restore) - .Executes(() => - { - MSBuild(s => DefaultMSBuildCompile.SetTargetPlatform(MSBuildTargetPlatform.x64)); - MSBuild(s => DefaultMSBuildCompile.SetTargetPlatform(MSBuildTargetPlatform.x86)); + .DependsOn(Restore) + .Executes(() => + { + MSBuild(s => s + .SetTargetPath(SolutionFile) + .SetTargets("Rebuild") + .SetConfiguration(Configuration) + .SetMaxCpuCount(Environment.ProcessorCount) + .SetNodeReuse(IsLocalBuild) + .SetTargetPlatform(MSBuildTargetPlatform.x64)); - #region Ugly hack, fix me! - EnsureExistingDirectory(Path.Combine(ArtifactsDirectory, @"x64")); - EnsureExistingDirectory(Path.Combine(ArtifactsDirectory, @"x86")); + MSBuild(s => s + .SetTargetPath(SolutionFile) + .SetTargets("Rebuild") + .SetConfiguration(Configuration) + .SetMaxCpuCount(Environment.ProcessorCount) + .SetNodeReuse(IsLocalBuild) + .SetTargetPlatform(MSBuildTargetPlatform.x86)); + }); - File.Copy( - Path.Combine(WorkingDirectory, @"bin\x64\ViGEmBus.inf"), - Path.Combine(ArtifactsDirectory, @"ViGEmBus.inf") - ); - - File.Copy( - Path.Combine(WorkingDirectory, @"bin\x64\ViGEmBus.pdb"), - Path.Combine(ArtifactsDirectory, @"x64\ViGEmBus.pdb") - ); - File.Copy( - Path.Combine(WorkingDirectory, @"bin\x64\ViGEmBus\ViGEmBus.sys"), - Path.Combine(ArtifactsDirectory, @"x64\ViGEmBus.sys") - ); - File.Copy( - Path.Combine(WorkingDirectory, @"bin\x64\ViGEmBus\WdfCoinstaller01009.dll"), - Path.Combine(ArtifactsDirectory, @"x64\WdfCoinstaller01009.dll") - ); - - File.Copy( - Path.Combine(WorkingDirectory, @"bin\x86\ViGEmBus.pdb"), - Path.Combine(ArtifactsDirectory, @"x86\ViGEmBus.pdb") - ); - File.Copy( - Path.Combine(WorkingDirectory, @"bin\x86\ViGEmBus\ViGEmBus.sys"), - Path.Combine(ArtifactsDirectory, @"x86\ViGEmBus.sys") - ); - File.Copy( - Path.Combine(WorkingDirectory, @"bin\x86\ViGEmBus\WdfCoinstaller01009.dll"), - Path.Combine(ArtifactsDirectory, @"x86\WdfCoinstaller01009.dll") - ); - #endregion - }); + private Target Pack => _ => _ + .DependsOn(Compile) + .Executes(() => + { + MSBuild(s => s + .SetTargetPath(SolutionFile) + .SetTargets("Restore", "Pack") + .SetPackageOutputPath(ArtifactsDirectory) + .SetConfiguration(Configuration) + .EnableIncludeSymbols()); + }); } diff --git a/build/_build.csproj b/build/_build.csproj new file mode 100644 index 0000000..3ce5270 --- /dev/null +++ b/build/_build.csproj @@ -0,0 +1,34 @@ + + + + Exe + netcoreapp2.0 + false + + False + CS0649;CS0169 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/packages.config b/build/packages.config deleted file mode 100644 index 491a6ea..0000000 --- a/build/packages.config +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/ViGEmClient.vcxproj b/lib/ViGEmClient.vcxproj index 57fbbe5..3c9995f 100644 --- a/lib/ViGEmClient.vcxproj +++ b/lib/ViGEmClient.vcxproj @@ -38,7 +38,12 @@ {7DB06674-1F4F-464B-8E1C-172E9587F9DC} Win32Proj ViGEmClient - 10.0.16299.0 + + + + $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) + $(LatestTargetPlatformVersion) + $(WindowsTargetPlatformVersion) From ae049ada57f2d6eb2ea093ec3e58d8b4b9d9bc12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger-Stelzer?= Date: Mon, 20 Aug 2018 12:55:24 +0200 Subject: [PATCH 18/18] Added the hack back ;) --- build/Build.cs | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/build/Build.cs b/build/Build.cs index ca58fe8..e3801fd 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -1,4 +1,5 @@ using System; +using System.IO; using System.Linq; using Nuke.Common; using Nuke.Common.Git; @@ -58,6 +59,42 @@ class Build : NukeBuild .SetMaxCpuCount(Environment.ProcessorCount) .SetNodeReuse(IsLocalBuild) .SetTargetPlatform(MSBuildTargetPlatform.x86)); + + #region Ugly hack, fix me! + EnsureExistingDirectory(Path.Combine(ArtifactsDirectory, @"x64")); + EnsureExistingDirectory(Path.Combine(ArtifactsDirectory, @"x86")); + + File.Copy( + Path.Combine(WorkingDirectory, @"bin\x64\ViGEmBus.inf"), + Path.Combine(ArtifactsDirectory, @"ViGEmBus.inf") + ); + + File.Copy( + Path.Combine(WorkingDirectory, @"bin\x64\ViGEmBus.pdb"), + Path.Combine(ArtifactsDirectory, @"x64\ViGEmBus.pdb") + ); + File.Copy( + Path.Combine(WorkingDirectory, @"bin\x64\ViGEmBus\ViGEmBus.sys"), + Path.Combine(ArtifactsDirectory, @"x64\ViGEmBus.sys") + ); + File.Copy( + Path.Combine(WorkingDirectory, @"bin\x64\ViGEmBus\WdfCoinstaller01009.dll"), + Path.Combine(ArtifactsDirectory, @"x64\WdfCoinstaller01009.dll") + ); + + File.Copy( + Path.Combine(WorkingDirectory, @"bin\x86\ViGEmBus.pdb"), + Path.Combine(ArtifactsDirectory, @"x86\ViGEmBus.pdb") + ); + File.Copy( + Path.Combine(WorkingDirectory, @"bin\x86\ViGEmBus\ViGEmBus.sys"), + Path.Combine(ArtifactsDirectory, @"x86\ViGEmBus.sys") + ); + File.Copy( + Path.Combine(WorkingDirectory, @"bin\x86\ViGEmBus\WdfCoinstaller01009.dll"), + Path.Combine(ArtifactsDirectory, @"x86\WdfCoinstaller01009.dll") + ); + #endregion }); private Target Pack => _ => _