diff options
| author | JacobPalecki <[email protected]> | 2020-09-27 20:54:57 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-09-27 20:54:57 -0700 |
| commit | 5f3ea6699f4b1a7eec7f9f0cd51ad9afbc1dea4b (patch) | |
| tree | f1c73a42b369f362a40ea251281d98ee02bf0a98 /installer | |
| parent | Merge pull request #25 from JacobPalecki/GUI (diff) | |
| parent | add arg checks in wrapper (diff) | |
| download | rawaccel-5f3ea6699f4b1a7eec7f9f0cd51ad9afbc1dea4b.tar.xz rawaccel-5f3ea6699f4b1a7eec7f9f0cd51ad9afbc1dea4b.zip | |
Merge pull request #26 from a1xd/argcheck
Accel arg checks
Diffstat (limited to 'installer')
| -rw-r--r-- | installer/install.manifest | 16 | ||||
| -rw-r--r-- | installer/installer.cpp | 7 | ||||
| -rw-r--r-- | installer/installer.vcxproj | 7 |
3 files changed, 29 insertions, 1 deletions
diff --git a/installer/install.manifest b/installer/install.manifest new file mode 100644 index 0000000..0478246 --- /dev/null +++ b/installer/install.manifest @@ -0,0 +1,16 @@ +<?xml version='1.0' encoding='UTF-8' standalone='yes'?> +<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'> + <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> + <application> + <!-- Windows 10 --> + <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> + </application> + </compatibility> + <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> + <security> + <requestedPrivileges> + <requestedExecutionLevel level='requireAdministrator' uiAccess='false' /> + </requestedPrivileges> + </security> + </trustInfo> +</assembly>
\ No newline at end of file diff --git a/installer/installer.cpp b/installer/installer.cpp index ac426af..03c8881 100644 --- a/installer/installer.cpp +++ b/installer/installer.cpp @@ -1,7 +1,9 @@ + + #include <iostream> #include <utility-install.hpp> - +#include <VersionHelpers.h> void add_service(const fs::path& target) { SC_HANDLE schSCManager = OpenSCManager( NULL, // local computer @@ -41,6 +43,9 @@ void add_service(const fs::path& target) { int main() { try { + if (!IsWindows10OrGreater()) { + throw std::runtime_error("OS not supported, you need at least Windows 10"); + } fs::path source = fs::path(L"driver") / DRIVER_FILE_NAME; if (!fs::exists(source)) { diff --git a/installer/installer.vcxproj b/installer/installer.vcxproj index 45ef0c8..a91ed09 100644 --- a/installer/installer.vcxproj +++ b/installer/installer.vcxproj @@ -49,6 +49,7 @@ </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <LinkIncremental>false</LinkIncremental> + <EmbedManifest>true</EmbedManifest> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> @@ -66,6 +67,9 @@ <GenerateDebugInformation>true</GenerateDebugInformation> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> </Link> + <Manifest> + <AdditionalManifestFiles>install.manifest</AdditionalManifestFiles> + </Manifest> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> @@ -88,6 +92,9 @@ <GenerateDebugInformation>true</GenerateDebugInformation> <UACExecutionLevel>RequireAdministrator</UACExecutionLevel> </Link> + <Manifest> + <AdditionalManifestFiles>install.manifest</AdditionalManifestFiles> + </Manifest> </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="installer.cpp" /> |