Skip to content

Commit b65a6f1

Browse files
committed
Fix issues when building with new folder organisation.
1 parent 0ef1c41 commit b65a6f1

25 files changed

+26
-268
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ BinariesX86/
2929
BinariesX64/
3030
XInputUnity4/Library/
3131
XInputUnity5/Library/
32+
XInputUnity5/Assets/AssetStoreTools*
3233
Temp/

Build/UpdateUnityProject.bat

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ setlocal
44
call BuildCurrentBranch.bat
55

66
call :copyToUnity ..\XInputUnity4
7+
copy ..\BinariesX86\Release\XInputInterface.dll ..\XInputUnity4\
8+
79
call :copyToUnity ..\XInputUnity5
10+
811
exit /b 0
912

1013
:copyToUnity
1114
setlocal
1215
if not exist %1\Assets\XInputDotNet\Plugins\x86 md %1\Assets\XInputDotNet\Plugins\x86
1316
if not exist %1\Assets\XInputDotNet\Plugins\x86_64 md %1\Assets\XInputDotNet\Plugins\x86_64
1417

15-
copy ..\BinariesX86\Release\XInputInterfaceX86.dll %1\Assets\XInputDotNet\Plugins\x86\
16-
copy ..\BinariesX86\Release\XInputInterfaceX86.dll %1\
17-
copy ..\BinariesX86\Release\XInputDotNetPure.dll %1\Assets\XInputDotNet\Plugins\x86\
18+
copy ..\BinariesX86\Release\XInputDotNetPure.dll %1\Assets\XInputDotNet\Plugins\
1819

19-
copy ..\BinariesX64\Release\XInputInterfaceX64.dll %1\Assets\XInputDotNet\Plugins\x86_64\
20-
copy ..\BinariesX64\Release\XInputInterfaceX64.dll %1\
21-
copy ..\BinariesX64\Release\XInputDotNetPure.dll %1\Assets\XInputDotNet\Plugins\x86_64\
20+
copy ..\BinariesX86\Release\XInputInterface.dll %1\Assets\XInputDotNet\Plugins\x86\
21+
copy ..\BinariesX64\Release\XInputInterface.dll %1\Assets\XInputDotNet\Plugins\x86_64\
2222
endlocal

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,17 @@ Some examples are available in this repository :
4040

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

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

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

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

51+
For `Plugins\XInputDotNetPure.dll`
52+
![Plugin settings for AnyCPU DLLs](https://raw.github.com/speps/XInputDotNet/master/SettingsAnyCPU.jpg)
53+
4954
#### <a name="free"></a>Special instructions for Free version of Unity
5055

5156
NOTE: this is needed only for Unity 4, Unity 5 seems to have the right behaviour

SettingsAnyCPU.jpg

19.6 KB
Loading

XInputDotNetPure/GamePad.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ namespace XInputDotNetPure
55
{
66
class Imports
77
{
8-
#if WIN64
9-
internal const string DLLName = "XInputInterfaceX64";
10-
#else
11-
internal const string DLLName = "XInputInterfaceX86";
12-
#endif
8+
internal const string DLLName = "XInputInterface";
139

1410
[DllImport(DLLName)]
1511
public static extern uint XInputGamePadGetState(uint playerIndex, out GamePadState.RawState state);

XInputDotNetPure/XInputDotNetPure.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<DefineConstants>TRACE</DefineConstants>
2727
<Optimize>true</Optimize>
2828
<DebugType>pdbonly</DebugType>
29-
<PlatformTarget>x86</PlatformTarget>
29+
<PlatformTarget>AnyCPU</PlatformTarget>
3030
<ErrorReport>prompt</ErrorReport>
3131
</PropertyGroup>
3232
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
@@ -42,10 +42,10 @@
4242
</PropertyGroup>
4343
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
4444
<OutputPath>..\BinariesX64\Release\</OutputPath>
45-
<DefineConstants>TRACE;WIN64</DefineConstants>
45+
<DefineConstants>TRACE</DefineConstants>
4646
<Optimize>true</Optimize>
4747
<DebugType>pdbonly</DebugType>
48-
<PlatformTarget>x64</PlatformTarget>
48+
<PlatformTarget>AnyCPU</PlatformTarget>
4949
<ErrorReport>prompt</ErrorReport>
5050
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
5151
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>

XInputInterface/XInputInterface.vcxproj

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,10 @@
8181
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
8282
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
8383
</PropertyGroup>
84-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
85-
<TargetName>$(ProjectName)X86</TargetName>
86-
</PropertyGroup>
87-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
88-
<TargetName>$(ProjectName)X86</TargetName>
89-
</PropertyGroup>
90-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
91-
<TargetName>$(ProjectName)X64</TargetName>
92-
</PropertyGroup>
93-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
94-
<TargetName>$(ProjectName)X64</TargetName>
95-
</PropertyGroup>
84+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
85+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
86+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
87+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
9688
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
9789
<ClCompile>
9890
<Optimization>Disabled</Optimization>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

XInputUnity5/Assets/XInputDotNet/Plugins/x86_64/XInputDotNetPure.dll.meta renamed to XInputUnity5/Assets/XInputDotNet/Plugins/XInputDotNetPure.dll.meta

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

XInputUnity5/Assets/XInputDotNet/Plugins/x86/XInputDotNetPure.dll.meta

Lines changed: 0 additions & 145 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.

XInputUnity5/XInputUnity5.CSharp.csproj

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)