Skip to content

Commit

Permalink
Fix issues when building with new folder organisation.
Browse files Browse the repository at this point in the history
  • Loading branch information
speps committed Apr 9, 2017
1 parent 0ef1c41 commit b65a6f1
Show file tree
Hide file tree
Showing 25 changed files with 26 additions and 268 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ BinariesX86/
BinariesX64/
XInputUnity4/Library/
XInputUnity5/Library/
XInputUnity5/Assets/AssetStoreTools*
Temp/
12 changes: 6 additions & 6 deletions Build/UpdateUnityProject.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ setlocal
call BuildCurrentBranch.bat

call :copyToUnity ..\XInputUnity4
copy ..\BinariesX86\Release\XInputInterface.dll ..\XInputUnity4\

call :copyToUnity ..\XInputUnity5

exit /b 0

:copyToUnity
setlocal
if not exist %1\Assets\XInputDotNet\Plugins\x86 md %1\Assets\XInputDotNet\Plugins\x86
if not exist %1\Assets\XInputDotNet\Plugins\x86_64 md %1\Assets\XInputDotNet\Plugins\x86_64

copy ..\BinariesX86\Release\XInputInterfaceX86.dll %1\Assets\XInputDotNet\Plugins\x86\
copy ..\BinariesX86\Release\XInputInterfaceX86.dll %1\
copy ..\BinariesX86\Release\XInputDotNetPure.dll %1\Assets\XInputDotNet\Plugins\x86\
copy ..\BinariesX86\Release\XInputDotNetPure.dll %1\Assets\XInputDotNet\Plugins\

copy ..\BinariesX64\Release\XInputInterfaceX64.dll %1\Assets\XInputDotNet\Plugins\x86_64\
copy ..\BinariesX64\Release\XInputInterfaceX64.dll %1\
copy ..\BinariesX64\Release\XInputDotNetPure.dll %1\Assets\XInputDotNet\Plugins\x86_64\
copy ..\BinariesX86\Release\XInputInterface.dll %1\Assets\XInputDotNet\Plugins\x86\
copy ..\BinariesX64\Release\XInputInterface.dll %1\Assets\XInputDotNet\Plugins\x86_64\
endlocal
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,17 @@ Some examples are available in this repository :

#### error CS1704: An assembly with the same name `XInputDotNetPure' has already been imported.

If you get this error, or a similar one, make sure the settings for each architecture matches the settings below.
If you get this error, or a similar one, make sure the settings for each file matches the settings below.

For `Plugins\x86\XInputInterface.dll`
![Plugin settings for x86 DLLs](https://raw.github.com/speps/XInputDotNet/master/SettingsX86.jpg)

For `Plugins\x86_64\XInputInterface.dll`
![Plugin settings for x86_64 DLLs](https://raw.github.com/speps/XInputDotNet/master/SettingsX64.jpg)

For `Plugins\XInputDotNetPure.dll`
![Plugin settings for AnyCPU DLLs](https://raw.github.com/speps/XInputDotNet/master/SettingsAnyCPU.jpg)

#### <a name="free"></a>Special instructions for Free version of Unity

NOTE: this is needed only for Unity 4, Unity 5 seems to have the right behaviour
Expand Down
Binary file added SettingsAnyCPU.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 1 addition & 5 deletions XInputDotNetPure/GamePad.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ namespace XInputDotNetPure
{
class Imports
{
#if WIN64
internal const string DLLName = "XInputInterfaceX64";
#else
internal const string DLLName = "XInputInterfaceX86";
#endif
internal const string DLLName = "XInputInterface";

[DllImport(DLLName)]
public static extern uint XInputGamePadGetState(uint playerIndex, out GamePadState.RawState state);
Expand Down
6 changes: 3 additions & 3 deletions XInputDotNetPure/XInputDotNetPure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
Expand All @@ -42,10 +42,10 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>..\BinariesX64\Release\</OutputPath>
<DefineConstants>TRACE;WIN64</DefineConstants>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
Expand Down
16 changes: 4 additions & 12 deletions XInputInterface/XInputInterface.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,10 @@
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<TargetName>$(ProjectName)X86</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<TargetName>$(ProjectName)X86</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<TargetName>$(ProjectName)X64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<TargetName>$(ProjectName)X64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
145 changes: 0 additions & 145 deletions XInputUnity5/Assets/XInputDotNet/Plugins/x86/XInputDotNetPure.dll.meta

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified XInputUnity5/ProjectSettings/ProjectSettings.asset
Binary file not shown.
91 changes: 0 additions & 91 deletions XInputUnity5/XInputUnity5.CSharp.csproj

This file was deleted.

0 comments on commit b65a6f1

Please sign in to comment.