[libs] SharpDX via nuget

pull/9/head
standardtoaster 10 years ago
parent b165864ea1
commit 8109a75532

@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using SharpDX;
using SharpDX.DirectInput;

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18444
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18444
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -12,7 +12,7 @@ namespace SCJMapper_V2.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

@ -14,6 +14,7 @@
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>3422add1</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
@ -42,10 +43,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="SharpDX">
<HintPath>E:\D\SharpDX\Bin\DirectX11-net40\SharpDX.dll</HintPath>
<HintPath>$(SharpDXPackageBinDir)\SharpDX.dll</HintPath>
</Reference>
<Reference Include="SharpDX.DirectInput">
<HintPath>E:\D\SharpDX\Bin\DirectX11-net40\SharpDX.DirectInput.dll</HintPath>
<HintPath>$(SharpDXPackageBinDir)\SharpDX.DirectInput.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@ -99,6 +100,7 @@
<None Include="actionList\MappingVars.csv" />
<None Include="actionList\MappingVars.xlsx" />
<None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
@ -125,6 +127,13 @@
<Content Include="graphics\XBOX.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="packages\SharpDX.2.6.2\build\SharpDX.targets" Condition="Exists('packages\SharpDX.2.6.2\build\SharpDX.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\SharpDX.2.6.2\build\SharpDX.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\SharpDX.2.6.2\build\SharpDX.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SharpDX" version="2.6.2" targetFramework="net20" />
<package id="SharpDX.DirectInput" version="2.6.2" targetFramework="net40" />
</packages>

Binary file not shown.

@ -0,0 +1,36 @@
param($installPath, $toolsPath, $package, $project)
"Installing [{0}] to project [{1}]" -f $package.Id, $project.FullName | Write-Host
# Load MSBuild assembly if its not loaded yet.
Add-Type -AssemblyName "Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
# Check that SharpDX.targets was correctly imported
$buildProject = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($project.FullName) | Select-Object -First 1
$importsToRemove = $buildProject.Xml.Imports | Where-Object { $_.Project.Endswith('SharpDX.targets') }
if (!$importsToRemove)
{
throw ("SharpDX.targets import not found in project [{0}]" -f $project.FullName)
}
$sharpdx_package_bin_dir = $buildProject.GetProperty("SharpDXPackageBinDir").EvaluatedValue
$sharpdx_assembly_path = "{0}\{1}.dll" -f $sharpdx_package_bin_dir, $package.Id
# Add the assembly through the project in order for VS to update correctly the references in the IDE
$project.Object.References.Add($sharpdx_assembly_path)
# Find the references we just added
$sharpdx_reference = $buildProject.GetItems("Reference") | Where-Object { $_.EvaluatedInclude -eq $package.Id }
if (!$sharpdx_reference)
{
$sharpdx_reference = $buildProject.GetItems("Reference") | Where-Object { $_.EvaluatedInclude.StartsWith("{0}," -f $package.Id) }
}
if (!$sharpdx_reference)
{
throw ("Unable to find reference in project for assembly [{0}]" -f $package.Id)
}
# Replace the HintPath using the $(SharpDXPackageBinDir) variable provided by the SharpDX.targets
$sharpdx_reference.SetMetadataValue("HintPath", '$(SharpDXPackageBinDir)\{0}.dll' -f $package.Id)
# Save the project
$project.Save()

@ -0,0 +1,13 @@
param($installPath, $toolsPath, $package, $project)
"Uninstalling [{0}] from project [{1}]" -f $package.Id, $project.FullName | Write-Host
# Retrieve the reference to the package
$sharpdx_reference = $project.Object.References.Item($package.Id)
if ($sharpdx_reference)
{
# Remove the reference
$sharpdx_reference.Remove()
# Save the project
$project.Save()
}

@ -0,0 +1,36 @@
param($installPath, $toolsPath, $package, $project)
"Installing [{0}] to project [{1}]" -f $package.Id, $project.FullName | Write-Host
# Load MSBuild assembly if its not loaded yet.
Add-Type -AssemblyName "Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
# Check that SharpDX.targets was correctly imported
$buildProject = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($project.FullName) | Select-Object -First 1
$importsToRemove = $buildProject.Xml.Imports | Where-Object { $_.Project.Endswith('SharpDX.targets') }
if (!$importsToRemove)
{
throw ("SharpDX.targets import not found in project [{0}]" -f $project.FullName)
}
$sharpdx_package_bin_dir = $buildProject.GetProperty("SharpDXPackageBinDir").EvaluatedValue
$sharpdx_assembly_path = "{0}\{1}.dll" -f $sharpdx_package_bin_dir, $package.Id
# Add the assembly through the project in order for VS to update correctly the references in the IDE
$project.Object.References.Add($sharpdx_assembly_path)
# Find the references we just added
$sharpdx_reference = $buildProject.GetItems("Reference") | Where-Object { $_.EvaluatedInclude -eq $package.Id }
if (!$sharpdx_reference)
{
$sharpdx_reference = $buildProject.GetItems("Reference") | Where-Object { $_.EvaluatedInclude.StartsWith("{0}," -f $package.Id) }
}
if (!$sharpdx_reference)
{
throw ("Unable to find reference in project for assembly [{0}]" -f $package.Id)
}
# Replace the HintPath using the $(SharpDXPackageBinDir) variable provided by the SharpDX.targets
$sharpdx_reference.SetMetadataValue("HintPath", '$(SharpDXPackageBinDir)\{0}.dll' -f $package.Id)
# Save the project
$project.Save()

@ -0,0 +1,13 @@
param($installPath, $toolsPath, $package, $project)
"Uninstalling [{0}] from project [{1}]" -f $package.Id, $project.FullName | Write-Host
# Retrieve the reference to the package
$sharpdx_reference = $project.Object.References.Item($package.Id)
if ($sharpdx_reference)
{
# Remove the reference
$sharpdx_reference.Remove()
# Save the project
$project.Save()
}

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="..\packages.config" />
</repositories>
Loading…
Cancel
Save