diff --git a/appveyor.yml b/appveyor.yml index b558068..3b93a22 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,7 +5,14 @@ install: build_script: - ps: .\build.ps1 -configuration release after_build: -- cmd: makecab.exe /f ViGEmBus.ddf +- ps: | + 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" + .\verpatch.exe .\artifacts\x86\ViGEmBus.sys "$env:APPVEYOR_BUILD_VERSION" + .\verpatch.exe .\artifacts\x86\ViGEmBus.sys /pv "$env:APPVEYOR_BUILD_VERSION" + makecab.exe /f ViGEmBus.ddf artifacts: - path: disk1\ViGEmBus.cab name: ViGEmBus_unsigned_x86_amd64 diff --git a/build/Build.cs b/build/Build.cs index cbf0df2..16240b0 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -91,20 +91,6 @@ internal class Build : NukeBuild ); #endregion - - if (Configuration.Equals("release", StringComparison.InvariantCultureIgnoreCase)) - { - var version = - new Version(IsLocalBuild ? GitVersion.GetNormalizedFileVersion() : AppVeyor.Instance.BuildVersion); - - StampVersion( - Path.Combine(ArtifactsDirectory, @"x64\ViGEmBus.sys"), - version); - - StampVersion( - Path.Combine(ArtifactsDirectory, @"x86\ViGEmBus.sys"), - version); - } }); private Target Pack => _ => _ @@ -123,38 +109,4 @@ internal class Build : NukeBuild { return Execute(x => x.Compile); } - - private static void StampVersion(string path, Version version) - { - var versionResource = new VersionResource - { - FileVersion = version.ToString(), - ProductVersion = version.ToString() - }; - - var stringFileInfo = new StringFileInfo(); - versionResource[stringFileInfo.Key] = stringFileInfo; - var stringFileInfoStrings = new StringTable - { - LanguageID = 1033, - CodePage = 1200 - }; - stringFileInfo.Strings.Add(stringFileInfoStrings.Key, stringFileInfoStrings); - stringFileInfoStrings["CompanyName"] = Config.Global.Version.CompanyName; - stringFileInfoStrings["FileDescription"] = Config.Global.Version.FileDescription; - stringFileInfoStrings["FileVersion"] = version.ToString(); - stringFileInfoStrings["InternalName"] = Config.Global.Version.InternalName; - stringFileInfoStrings["LegalCopyright"] = Config.Global.Version.LegalCopyright; - stringFileInfoStrings["OriginalFilename"] = Config.Global.Version.OriginalFilename; - stringFileInfoStrings["ProductName"] = Config.Global.Version.ProductName; - stringFileInfoStrings["ProductVersion"] = version.ToString(); - - var varFileInfo = new VarFileInfo(); - versionResource[varFileInfo.Key] = varFileInfo; - var varFileInfoTranslation = new VarTable("Translation"); - varFileInfo.Vars.Add(varFileInfoTranslation.Key, varFileInfoTranslation); - varFileInfoTranslation[ResourceUtil.USENGLISHLANGID] = 1300; - - versionResource.SaveTo(path); - } } \ No newline at end of file diff --git a/sys/ViGEmBus.rc b/sys/ViGEmBus.rc new file mode 100644 index 0000000..77cb42b --- /dev/null +++ b/sys/ViGEmBus.rc @@ -0,0 +1,100 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// German (Austria) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEA) +LANGUAGE LANG_GERMAN, SUBLANG_GERMAN_AUSTRIAN +#pragma code_page(1252) + +#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 +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,14,3,0 + PRODUCTVERSION 1,14,3,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0xe9L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000904b0" + BEGIN + VALUE "CompanyName", "Benjamin Höglinger-Stelzer" + VALUE "FileDescription", "Virtual Gamepad Emulation Bus Driver" +VALUE "FileVersion", "1.14.3.0" + VALUE "InternalName", "Virtual Gamepad Emulation Bus Driver" + VALUE "LegalCopyright", "Copyright (C) Benjamin Höglinger-Stelzer 2016" + VALUE "OriginalFilename", "vigembus.sys" + VALUE "ProductName", "Virtual Gamepad Emulation Bus Driver" +VALUE "ProductVersion", "1.14.3.0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x9, 1200 + END +END + +#endif // German (Austria) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/sys/ViGEmBus.vcxproj b/sys/ViGEmBus.vcxproj index feed3c7..ab5cb4a 100644 --- a/sys/ViGEmBus.vcxproj +++ b/sys/ViGEmBus.vcxproj @@ -185,12 +185,16 @@ + + + + diff --git a/sys/resource.h b/sys/resource.h new file mode 100644 index 0000000..97b180c --- /dev/null +++ b/sys/resource.h @@ -0,0 +1,14 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by ViGEmBus.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