summaryrefslogtreecommitdiff
path: root/installer
diff options
context:
space:
mode:
authora1xd <[email protected]>2020-12-05 21:28:08 -0500
committerGitHub <[email protected]>2020-12-05 21:28:08 -0500
commitc8503654da5bc40a129e58914549cd394349d059 (patch)
treee4760c579597d0e292c7b03dff95d19bb8f3c750 /installer
parentMerge pull request #45 from JacobPalecki/fix (diff)
parentupdate signed, add installers (diff)
downloadrawaccel-c8503654da5bc40a129e58914549cd394349d059.tar.xz
rawaccel-c8503654da5bc40a129e58914549cd394349d059.zip
Merge pull request #46 from a1xd/1.3
Diffstat (limited to 'installer')
-rw-r--r--installer/install.manifest6
-rw-r--r--installer/installer.cpp7
-rw-r--r--installer/installer.rc100
-rw-r--r--installer/installer.vcxproj17
-rw-r--r--installer/resource.h14
5 files changed, 138 insertions, 6 deletions
diff --git a/installer/install.manifest b/installer/install.manifest
index 0478246..f9b5ea3 100644
--- a/installer/install.manifest
+++ b/installer/install.manifest
@@ -4,6 +4,12 @@
<application>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+ <!-- Windows 8.1 -->
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+ <!-- Windows 8 -->
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ <!-- Windows 7 -->
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
</application>
</compatibility>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
diff --git a/installer/installer.cpp b/installer/installer.cpp
index 06f234e..916209f 100644
--- a/installer/installer.cpp
+++ b/installer/installer.cpp
@@ -1,9 +1,8 @@
-
-
#include <iostream>
#include <utility-install.hpp>
#include <VersionHelpers.h>
+
void add_service(const fs::path& target) {
SC_HANDLE schSCManager = OpenSCManager(
NULL, // local computer
@@ -43,8 +42,8 @@ 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");
+ if (!IsWindows7OrGreater()) {
+ throw std::runtime_error("OS not supported, you need at least Windows 7");
}
fs::path source = fs::path(L"driver") / DRIVER_FILE_NAME;
diff --git a/installer/installer.rc b/installer/installer.rc
new file mode 100644
index 0000000..43672d7
--- /dev/null
+++ b/installer/installer.rc
@@ -0,0 +1,100 @@
+// Microsoft Visual C++ generated resource script.
+//
+#pragma code_page(65001)
+
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (United States) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+#include <rawaccel-version.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION RA_VER_MAJOR, RA_VER_MINOR, RA_VER_PATCH
+PRODUCTVERSION RA_VER_MAJOR, RA_VER_MINOR, RA_VER_PATCH
+FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+FILEOS 0x40004L
+FILETYPE 0x1L
+FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "FileDescription", "Raw Accel installer (" RA_MIN_OS ")"
+ VALUE "FileVersion", RA_VER_STRING
+ VALUE "OriginalFilename", "installer.exe"
+ VALUE "ProductName", "Raw Accel"
+ VALUE "ProductVersion", RA_VER_STRING
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // English (United States) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/installer/installer.vcxproj b/installer/installer.vcxproj
index 8ff13a6..fa18344 100644
--- a/installer/installer.vcxproj
+++ b/installer/installer.vcxproj
@@ -35,7 +35,7 @@
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
- <Import Project="..\common-install\common-install.vcxitems" Label="Shared" />
+ <Import Project="..\common\common.vcxitems" Label="Shared" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
@@ -70,6 +70,9 @@
<Manifest>
<AdditionalManifestFiles>install.manifest</AdditionalManifestFiles>
</Manifest>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>$(SolutionDir)/common;</AdditionalIncludeDirectories>
+ </ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
@@ -96,12 +99,22 @@
<AdditionalManifestFiles>install.manifest</AdditionalManifestFiles>
</Manifest>
<PostBuildEvent>
- <Command>copy /Y "$(TargetPath)" "$(SolutionDir)signed\$(TargetFileName)"</Command>
+ <Command>
+ </Command>
</PostBuildEvent>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>$(SolutionDir)/common;</AdditionalIncludeDirectories>
+ </ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="installer.cpp" />
</ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="resource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="installer.rc" />
+ </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
diff --git a/installer/resource.h b/installer/resource.h
new file mode 100644
index 0000000..98c3941
--- /dev/null
+++ b/installer/resource.h
@@ -0,0 +1,14 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by installer.rc
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif