Joystick support via SDL2 library?

Has anyone modified the JoystickPlugin.Build.cs so that Linux and Mac builds do not require system installs of SDL2?

You guys are the best. My NES USB controller is working with UE4. :smiley:

Hi,
theoretically you can try this:



JoystickPlugin.Build.cs
line 106
                        else if (Target.Platform == UnrealTargetPlatform.Linux)
			{			
				PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "SDL2", "Lib", "Linux", "SDL2"));
				//tsky PublicAdditionalLibraries.Add("SDL2");
			}


I try to add the SDL2 linux files in a couple of days to my github branch. At this time i got this error while linking :



Distributing 2 actions to XGE
Performing 2 actions (8 in parallel)
[1/2] Link libUE4Editor-JoystickPlugin.so
/usr/bin/ld: ld: wcsrtombs.c:99: __wcsrtombs: Zusicherung »data.__outbuf-1] == '\0'« nicht erfüllt.
clang: error: unable to execute command: Aborted (core dumped)
clang: error: linker command failed due to signal (use -v to see invocation)
-------- End Detailed Actions Stats -----------------------------------------------------------
ERROR: UBT ERROR: Failed to produce item: /home/tsky/UE4/cglabUnrealEngine/Engine/Plugins/JoystickPlugin/Binaries/Linux/libUE4Editor-JoystickPlugin.so
Total build time: 16,30 seconds
make: *** [UE4Editor] Fehler 5



and i have to figure out whats happened.

tsky

FYI - With UE4.10 under Windows and Visual Studio 2015 you’ll need to rebuild the SDL2 libraries and copy them to the Lib directory to avoid linker errors due to Windows CRT (C RunTime library) changes.

Hi,
thanks for the hint.

I work on a solution to build a static sdl2 that works out of the box with the plugin. On linux you could take the engine/source/thirdparty sdl2, if you call the build.sh script before compiling ue4. The changes on the .build.cs are very small.

The windows stuff will take some time, i don´t have much spare time to do this.

tsky

The SDL2 build for Release configuration is normally a DLL with a lib loader. To build a static SDL2 lib file, I followed the directions from this bug entry: building SDL as a static library with static runtime doesn't compile/link with visual studio · Issue #846 · libsdl-org/SDL · GitHub

Maybe you try this: GitHub - tsky1971/UEJoystickPlugin at 4.11

Hi,

So here is a Testproject with binaries. This is compiled with VC2015 and as dynamic version. I created/tested this with the editor version 4.10 from launcher. Sorry for the size.

The branch 4.10 has precompiled dll and build batches etc. I had to add some libs for the crt linker problems into the cmakefiles.txt. So it compiles and links now all the sdl2 libraries.

The JoystickPlugin uses the dynamic version of dll due to linker errors with the static version. A well known problem with VC2015!?

At this time it´s very painful to work with windows version - due to the changes of VC2015. On Linux it seems to be more smooth…

tsky

@tksy - I’m guessing you are referring to the following link errors when trying to build against a non-dll SDL2.lib?


2>  [1/1] Link UE4Editor-JoystickPlugin.dll
2>     Creating library C:\Users\Jason\Dev\DescentUnderground\GameProject\Plugins\JoystickPlugin\Intermediate/Build/Win64\UE4Editor\Development\UE4Editor-JoystickPlugin.lib and object C:\Users\Jason\Dev\DescentUnderground\GameProject\Plugins\JoystickPlugin\Intermediate/Build/Win64\UE4Editor\Development\UE4Editor-JoystickPlugin.exp
2>msvcrt.lib(utility.obj) : error LNK2019: unresolved external symbol __vcrt_initialize referenced in function __scrt_initialize_crt
2>msvcrt.lib(utility.obj) : error LNK2019: unresolved external symbol __vcrt_uninitialize referenced in function __scrt_initialize_crt
2>msvcrt.lib(utility.obj) : error LNK2019: unresolved external symbol __vcrt_uninitialize_critical referenced in function __scrt_dllmain_uninitialize_critical
2>msvcrt.lib(utility.obj) : error LNK2019: unresolved external symbol __vcrt_thread_attach referenced in function __scrt_dllmain_crt_thread_attach
2>msvcrt.lib(utility.obj) : error LNK2019: unresolved external symbol __vcrt_thread_detach referenced in function __scrt_dllmain_crt_thread_attach
2>msvcrt.lib(utility.obj) : error LNK2019: unresolved external symbol _is_c_termination_complete referenced in function __scrt_dllmain_uninitialize_c
2>msvcrt.lib(utility.obj) : error LNK2019: unresolved external symbol __acrt_initialize referenced in function __scrt_initialize_crt
2>msvcrt.lib(utility.obj) : error LNK2019: unresolved external symbol __acrt_uninitialize referenced in function __scrt_uninitialize_crt
2>msvcrt.lib(utility.obj) : error LNK2019: unresolved external symbol __acrt_uninitialize_critical referenced in function __scrt_dllmain_uninitialize_critical
2>msvcrt.lib(utility.obj) : error LNK2019: unresolved external symbol __acrt_thread_attach referenced in function __scrt_dllmain_crt_thread_attach
2>msvcrt.lib(utility.obj) : error LNK2019: unresolved external symbol __acrt_thread_detach referenced in function __scrt_dllmain_crt_thread_detach
2>C:\Users\Jason\Dev\DescentUnderground\GameProject\Plugins\JoystickPlugin\Binaries\Win64\UE4Editor-JoystickPlugin.dll : fatal error LNK1120: 11 unresolved externals


Down in Makefile.ubt I found lots of nodefaultlib options being generated by UBT for the JoystickPlugin link - I suspect it may be related:



/NODEFAULTLIB:"LIBCMT" /NODEFAULTLIB:"LIBCPMT" /NODEFAULTLIB:"LIBCMTD" /NODEFAULTLIB:"LIBCPMTD" /NODEFAULTLIB:"MSVCRTD" /NODEFAULTLIB:"MSVCPRTD" /NODEFAULTLIB:"LIBC" /NODEFAULTLIB:"LIBCP" /NODEFAULTLIB:"LIBCD" /NODEFAULTLIB:"LIBCPD"


Hello guys!

Could you help a total noob with the steps of enabling this great plug-in with UE4.10.1?
Running on windows 8.1, I am stuck at these steps:
4) Now you should have an UE4-Project with C++ Sources. At least a Dummy-Class, you need to create an VisualStudio Project-File create from the UE-Project-File (RMB - Generate VisualStudio…).

  1. Now open the VS-Solution and compile all.

I got the static.lib file, but have no idea what I should actually do right now :<
Thanks guys and sorry to bring noob questions on this thread!

Hello Virgil,
i updated the documention on Github to reflect the last updates.
The pre´s are:

i interpret your comment that you compile the SDL → call the batch files setup.bat and build.bat.
You create C++ sources in your ue4 project and vs comes up and you compiled it.
What now ? copy the **Plugins **Directory (something like this: GitHub sky1971\UEJoystickPlugin_tsky1971\Plugins) to your UE4 project. Look at the demo project. You have to generate the VS-Project files otherwise UE4 would not see the plugins sources. This is updated step 2.

That´s it. If you have problems let me know.

tsky

HI! I try to follow instructions GitHub - tsky1971/UEJoystickPlugin: Unofficial Joystick Plugin for the Unreal Engine (branch 4.10)
but when i compile project i have this errors:

Error 8 error MSB3075: The command ““D:\unreal_engine\Epic Games\4.9\Engine\Build\BatchFiles\Rebuild.bat” AirplaneEditor Win64 Development “D:\Unreal projects\Airplane5-CURENT\Airplane.uproject” -rocket -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets 43 5 Airplane

Error 6 error LNK1181: cannot open input file ‘D:\Unreal projects\Airplane5-CURENT\Plugins\JoystickPlugin\ThirdParty\SDL2/SDL/Lib/SDL2.lib’ D:\Unreal projects\Airplane5-CURENT\Intermediate\ProjectFiles\LINK Airplane

Error 7 error : Failed to produce item: D:\Unreal projects\Airplane5-CURENT\Plugins\JoystickPlugin\Binaries\Win64\UE4Editor-JoystickPlugin.dll D:\Unreal projects\Airplane5-CURENT\Intermediate\ProjectFiles\ERROR Airplane

I try with 4.9.2 и 4.10.3 but have same errors. Please help me!

Unfortunately even the demo project fails if you try to package it with the joystick plugin enabled.

MainFrameActions: Packaging (Windows (64-bit)): Running AutomationTool…
MainFrameActions: Packaging (Windows (64-bit)): Program.Main: CWD=C:\Program Files\Epic Games\4.10\Engine\Binaries\DotNET
MainFrameActions: Packaging (Windows (64-bit)): Automation.ParseCommandLine: Parsing command line: BuildCookRun -rocket -nocompile -nocompileeditor -installed -nop4 -project=L:/Downloads/DemoJoystickPlugin/DemoJoystickPlugin/DemoJoystickPlugin.uproject -cook -stage -archive -archivedirectory=C:/demo -package -clientconfig=Development -ue4exe=UE4Editor-Cmd.exe -pak -prereqs -nodebuginfo -targetplatform=Win64 -build -CrashReporter -utf8output
MainFrameActions: Packaging (Windows (64-bit)): Automation.Process: IsBuildMachine=False
MainFrameActions: Packaging (Windows (64-bit)): Automation.Process: ShouldKillProcesses=True
MainFrameActions: Packaging (Windows (64-bit)): Automation.Process: Setting up command environment.
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.SetEnvVar: SetEnvVar uebp_EngineSavedFolder=C:/Program Files/Epic Games/4.10/Engine/Programs/AutomationTool/Saved
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.DeleteDirectoryContents: DeleteDirectoryContents(C:/Users/Home/AppData/Roaming/Unreal Engine/AutomationTool/Logs/C+Program+Files+Epic+Games+4.10)
MainFrameActions: Packaging (Windows (64-bit)): WindowsHostPlatform.SetFrameworkVars: Setting .Net Framework environment variables.
MainFrameActions: Packaging (Windows (64-bit)): WindowsHostPlatform.SetFrameworkVars: Supports64bitExecutables=True
MainFrameActions: Packaging (Windows (64-bit)): WindowsHostPlatform.SetFrameworkVars: WindowsPlatform.CompilerVisualStudio2015
MainFrameActions: Packaging (Windows (64-bit)): WindowsHostPlatform.SetFrameworkVars: WindowsSDKDir=C:\Program Files (x86)\Windows Kits\8.1
MainFrameActions: Packaging (Windows (64-bit)): WindowsHostPlatform.SetFrameworkVars: BaseVSToolPath=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools
MainFrameActions: Packaging (Windows (64-bit)): WindowsHostPlatform.SetFrameworkVars: Setting VS environment variables via C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools....\VC\bin\x86_amd64\vcvarsx86_amd64.bat.
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.SetEnvVar: SetEnvVar FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.SetEnvVar: SetEnvVar FrameworkVersion=v4.0.30319
MainFrameActions: Packaging (Windows (64-bit)): WindowsHostPlatform.SetFrameworkVars: FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework
MainFrameActions: Packaging (Windows (64-bit)): WindowsHostPlatform.SetFrameworkVars: FrameworkVersion=v4.0.30319
MainFrameActions: Packaging (Windows (64-bit)): ProjectUtils.CleanupFolders: Cleaning up project rules folder
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.DeleteDirectoryContents: DeleteDirectoryContents(C:\Users\Home\AppData\Local\Temp\UAT\C+Program+Files+Epic+Games+4.10\Rules)
MainFrameActions: Packaging (Windows (64-bit)): Automation.Process: Compiling scripts.
MainFrameActions: Packaging (Windows (64-bit)): ScriptCompiler.LoadPreCompiledScriptAssemblies: Loading precompiled script DLLs
MainFrameActions: Packaging (Windows (64-bit)): ScriptCompiler.LoadPreCompiledScriptAssemblies: Found 9 script DLL(s).
MainFrameActions: Packaging (Windows (64-bit)): BuildCookRun.SetupParams: Setting up ProjectParams for L:\Downloads\DemoJoystickPlugin\DemoJoystickPlugin\DemoJoystickPlugin.uproject
MainFrameActions: Packaging (Windows (64-bit)): ProjectUtils.CompileAndLoadTargetsAssembly: Compiling targets DLL: C:\Users\Home\AppData\Local\Temp\UAT\C+Program+Files+Epic+Games+4.10\Rules\UATRules1646372043.dll
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Project Params **************
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: AdditionalServerMapParams=
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Archive=True
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: ArchiveMetaData=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: CreateAppBundle=True
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: BaseArchiveDirectory=C:\demo
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: BaseStageDirectory=L:\Downloads\DemoJoystickPlugin\DemoJoystickPlugin\Saved\StagedBuilds
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Build=True
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Cook=True
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Clean=
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Client=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: ClientConfigsToBuild=Development
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: ClientCookedTargets=DemoJoystickPlugin
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: ClientTargetPlatform=Win64
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Compressed=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: UseDebugParamForEditorExe=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: CookFlavor=
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: CookOnTheFly=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: CookOnTheFlyStreaming=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: UnversionedCookedContent=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: SkipCookingEditorContent=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: NumCookersToSpawn=0
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: GeneratePatch=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: CreateReleaseVersion=
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: BasedOnReleaseVersion=
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: DLCName=
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: DLCIncludeEngineContent=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: AdditionalCookerOptions=
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: DedicatedServer=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: DirectoriesToCook=
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: CulturesToCook=
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: EditorTargets=
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Foreign=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: IsCodeBasedProject=True
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: IsProgramTarget=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: IterativeCooking=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: CookAll=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: CookMapsOnly=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Deploy=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: IterativeDeploy=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: FastCook=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: LogWindow=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Manifests=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: MapToRun=
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: NoClient=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: NumClients=0
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: NoDebugInfo=True
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: NoCleanStage=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: NoXGE=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: MapsToCook=
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Pak=True
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Package=True
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: NullRHI=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: FakeClient=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: EditorTest=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: RunAutomationTests=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: RunAutomationTest=
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: RunTimeoutSeconds=0
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: CrashIndex=0
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: ProgramTargets=
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: ProjectBinariesFolder=L:\Downloads\DemoJoystickPlugin\DemoJoystickPlugin\Binaries\Win64
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: ProjectBinariesPath=L:\Downloads\DemoJoystickPlugin\DemoJoystickPlugin\Binaries\Win64
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: ProjectGameExeFilename=L:\Downloads\DemoJoystickPlugin\DemoJoystickPlugin\Binaries\Win64\DemoJoystickPlugin.exe
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: ProjectGameExePath=L:\Downloads\DemoJoystickPlugin\DemoJoystickPlugin\Binaries\Win64\DemoJoystickPlugin.exe
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Distribution=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Prebuilt=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Prereqs=True
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: NoBootstrapExe=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: RawProjectPath=L:\Downloads\DemoJoystickPlugin\DemoJoystickPlugin\DemoJoystickPlugin.uproject
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Rocket=True
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Run=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: ServerConfigsToBuild=Development
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: ServerCookedTargets=
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: ServerTargetPlatform=Win64
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: ShortProjectName=DemoJoystickPlugin
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: SignedPak=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: SignPak=
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: SkipCook=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: SkipCookOnTheFly=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: SkipPak=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: SkipStage=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Stage=True
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: bUsesSteam=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: bUsesCEF3=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: bUsesSlate=True
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: bDebugBuildsActuallyUseDebugCRT=False
MainFrameActions: Packaging (Windows (64-bit)): ProjectParams.ValidateAndLog: Project Params **************
MainFrameActions: Packaging (Windows (64-bit)): Project.Build: ********** BUILD COMMAND STARTED **********
MainFrameActions: Packaging (Windows (64-bit)): UE4Build.Build: XGE was requested, but is unavailable, so we won’t use it.
MainFrameActions: Packaging (Windows (64-bit)): UE4Build.Build: ************************* UE4Build:
MainFrameActions: Packaging (Windows (64-bit)): UE4Build.Build: ************************* ForceMonolithic: False
MainFrameActions: Packaging (Windows (64-bit)): UE4Build.Build: ************************* ForceNonUnity:False
MainFrameActions: Packaging (Windows (64-bit)): UE4Build.Build: ************************* ForceDebugInfo: False
MainFrameActions: Packaging (Windows (64-bit)): UE4Build.Build: ************************* UseXGE: False
MainFrameActions: Packaging (Windows (64-bit)): UE4Build.Build: ************************* UseParallelExecutor: False
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: C:\Program Files\Epic Games\4.10\Engine\Binaries\DotNET\UnrealBuildTool.exe DemoJoystickPlugin Win64 Development L:\Downloads\DemoJoystickPlugin\DemoJoystickPlugin\DemoJoystickPlugin.uproject -remoteini=“L:\Downloads\DemoJoystickPlugin\DemoJoystickPlugin” -noxge -generatemanifest -rocket -NoHotReloadFromIDE
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: Performing full C++ include scan (building a new target)
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: Took 0.8227442s to run UnrealBuildTool.exe, ExitCode=0
MainFrameActions: Packaging (Windows (64-bit)): UE4Build.PrepareManifest: Copied UBT manifest to C:\Users\Home\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+4.10\UBTManifest.0.xml
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: C:\Program Files\Epic Games\4.10\Engine\Binaries\DotNET\UnrealBuildTool.exe DemoJoystickPlugin Win64 Development L:\Downloads\DemoJoystickPlugin\DemoJoystickPlugin\DemoJoystickPlugin.uproject -remoteini=“L:\Downloads\DemoJoystickPlugin\DemoJoystickPlugin” -noxge -rocket -NoHotReloadFromIDE -ignorejunk
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: Performing 3 actions (4 in parallel)
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: DeviceSDL.cpp
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: L:\Downloads\DemoJoystickPlugin\DemoJoystickPlugin\Plugins\JoystickPlugin\Source\JoystickPlugin\Private\DeviceSDL.cpp(15): fatal error C1083: Cannot open include file: ‘SDL.h’: No such file or directory
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: -------- End Detailed Actions Stats -----------------------------------------------------------
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: L:\Downloads\DemoJoystickPlugin\DemoJoystickPlugin\Binaries\Win64\DemoJoystickPlugin.exe
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: Total build time: 2.25 seconds
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: Took 2.268088s to run UnrealBuildTool.exe, ExitCode=5
MainFrameActions: Packaging (Windows (64-bit)): BuildCommand.Execute: ERROR: BUILD FAILED
MainFrameActions: Packaging (Windows (64-bit)): Program.Main: ERROR: AutomationTool terminated with exception:
MainFrameActions: Packaging (Windows (64-bit)): Program.Main: ERROR: Exception in AutomationUtils.Automation: Command failed (Result:5): C:\Program Files\Epic Games\4.10\Engine\Binaries\DotNET\UnrealBuildTool.exe DemoJoystickPlugin Win64 Development L:\Downloads\DemoJoystickPlugin\DemoJoystickPlugin\DemoJoystickPlugin.uproject -remoteini=“L:\Downloads\DemoJoystickPlugin\DemoJoystickPlugin” -noxge -rocket -NoHotReloadFromIDE -ignorejunk. See logfile for details: ‘UnrealBuildTool-2016.02.19-18.21.01.txt’
MainFrameActions: Packaging (Windows (64-bit)): Stacktrace: at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary2 EnvVars) MainFrameActions: Packaging (Windows (64-bit)): at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary2 EnvVars)
MainFrameActions: Packaging (Windows (64-bit)): at AutomationTool.UE4Build.BuildWithUBT(String ProjectName, String TargetName, UnrealTargetPlatform TargetPlatform, String Config, String UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boo
MainFrameActions: Packaging (Windows (64-bit)): lean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary2 EnvVars) MainFrameActions: Packaging (Windows (64-bit)): at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary2 PlatformEnvVars) MainFrameActions: Packaging (Windows (64-bit)): at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL) MainFrameActions: Packaging (Windows (64-bit)): at BuildCookRun.DoBuildCookRun(ProjectParams Params) MainFrameActions: Packaging (Windows (64-bit)): at BuildCommand.Execute() MainFrameActions: Packaging (Windows (64-bit)): at AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands) MainFrameActions: Packaging (Windows (64-bit)): at AutomationTool.Automation.Process(String] CommandLine) MainFrameActions: Packaging (Windows (64-bit)): at AutomationTool.Program.MainProc(Object Param) MainFrameActions: Packaging (Windows (64-bit)): at AutomationTool.InternalUtils.RunSingleInstance(Action1 Main, Object Param)
MainFrameActions: Packaging (Windows (64-bit)): at AutomationTool.Program.Main()
MainFrameActions: Packaging (Windows (64-bit)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
MainFrameActions: Packaging (Windows (64-bit)): Program.Main: AutomationTool exiting with ExitCode=5
MainFrameActions: Packaging (Windows (64-bit)): Domain_ProcessExit
MainFrameActions: Packaging (Windows (64-bit)): copying UAT log files…
MainFrameActions: Packaging (Windows (64-bit)): RunUAT.bat ERROR: AutomationTool was unable to run successfully.
MainFrameActions: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults:Error: Error Unknown Error

Hi,
i will try to reproduce your error. My first look show me a line which could be the/one problem: “…Please verify that you have sufficient rights to run…” this is in your error 8 message.

tsky

Hi TK11,
as soon as i have time i will try to resolve the error. Seems recompiling oder linking SDL doesn´t work.

Next week i hope to have the time for that. Maybe late sunday.

tsky

edit:
Ok missing sdl.h was the error. When you use this plugins only in editor you only have to compile once. If you want to deploy your project recompiling is needed (obviously). In my instruction i advise to delete the sdl after compiling -> this is not correct :wink:

My solution is to change the batch file slightly to get ready for compling sdl from source and NOT delete the sources after compiling. If you not have installed mercurial and/or cmake (x86) it will fail. The batchfile only checks for x86 cmake. With these changes the demo project deploys without errors on win x64.

tsky

I have followed all of the steps on github (i have cmake and mercurial) and I would like to include the master branch of JoystickPlugin in my engine version of 4.10 (built from binary).

On compile I get this:

Was there a workaround to this?

Thanks.

Sorry, but if you want to use engine version 4.10 you have to take the JoystickPlugin branch 4.10.

I try to have a binary version of the plugin for each version of the engine. In past sometimes the build.cs classes or names changes, so not all version are compatible. So each branch of the plugin takes care of the engine version.

tsky

Yes I downloaded UEJoystcikPlugin-4.1.zip but was never able to compile without errors in the engine. I ran all the setup.bat and build.bat but it always gives the link error to ‘SDL2.lib’. When I build it builds a ‘SDL2-static.lib’ and ‘SDL2main.lib’

However, I downloaded the ‘sdl’ branch and placed it in my Engine-4.10 and compiled successfully. I’m able to enable the plugin.

Would like to test out the improvements you made but just can’t figure it out right now. Bummer.

Hi guys

First of all, compliments for your work and many thanks for this great plugin!!

I’m using it in a test C++ Project and it seems to work. I’ve only an issue sometimes getting inaccurate (or completly wrong) axis values.

For Instance. Moving one Axis of my Joystick creates values like:

0.0001
0.0002
0.0003
0.0221 <---------------- Wrong value
0.0004
0.0005

Sometimes the float Value is also higher als the configured Scale in the Project/Input Settings: (basically getting values > 1.f and < -1.f).

Is this a known issue or am I doing something wrong?

Regards
MFox

Has anyone been able to compile for 4.11.1 yet and would you mind sharing?