mirror of
https://github.com/nefarius/ViGEmBus.git
synced 2025-08-10 00:52:17 +00:00
Re-introduced "old" version stamping until new method is rock-solid
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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<Build>(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);
|
||||
}
|
||||
}
|
||||
100
sys/ViGEmBus.rc
Normal file
100
sys/ViGEmBus.rc
Normal file
@@ -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
|
||||
|
||||
@@ -185,12 +185,16 @@
|
||||
<ClInclude Include="Context.h" />
|
||||
<ClInclude Include="Ds4.h" />
|
||||
<ClInclude Include="Queue.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="trace.h" />
|
||||
<ClInclude Include="UsbPdo.h" />
|
||||
<ClInclude Include="Util.h" />
|
||||
<ClInclude Include="Xgip.h" />
|
||||
<ClInclude Include="Xusb.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ViGEmBus.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="busenum.c" />
|
||||
<ClCompile Include="buspdo.c" />
|
||||
|
||||
14
sys/resource.h
Normal file
14
sys/resource.h
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user