Answered
0
0

When we package Xbox One builds of our game we find that they fail to start. Using the kernel debugger it appears that fmodl.dll (& I presume I need fmodstudiol.dll?) is not packaged into the build and thus the executable is failing to start.

How do I ensure that fmodl.dll is packaged into Xbox One?

  • Paul Ross

    Looking closer there are some other threads on here about FMOD & Xbox One. I don’t understand how PC packages correctly though with the dlls winding up in the finished build?

  • You must to post comments
Best Answer
0
0

On PC, the UE4 engine automatically takes care of deployment of plugin dlls. But apparently this feature has not yet been rolled out to other platforms. So on Xbox One there are some manual steps you have to do.

You’ve probably found this already, but here is a link to the FMOD UE4 documentation that explains how to deploy the plugin on various platforms:

http://www.fmod.org/documentation/#content/generated/engine_ue4/deployment.html

  • Paul Ross

    Hello. Initially that link above did work but it was because I had a legacy plugin in my engine directory. Once this was deleted the deploy started to fail. It’s because the plugin is now in the game directory so this line:

    string FMODDLLPath = Path.Combine(Path.GetFullPath(BuildConfiguration.RelativeEnginePath), “Plugins/FMODStudio/Binaries/XboxOne/”);

    Needs to be:

    string FMODDLLPath = Path.Combine(Path.GetFullPath(InTarget.ProjectDirectory), “Plugins/FMODStudio/Binaries/XboxOne/”);

    This seems to work after an UnrealEngineBuildTool rebuild & UnrealFrontEnd

  • Geoff Carlton

    Hi Paul,
    Thanks for the feedback. I’ll look in this and update the docs.

  • Paul Ross

    Hello,
    That link now seems to fail when using latest FMOD & UE4.12.4. Specifically:

    Deployment on XBox One
    Add the following to StageRuntimeDependenciesFromReceipt in DeploymentContext.cs, just before the call to StageFile:

    // PLUGIN DEPLOYMENT START
    foreach (BuildProperty p in Receipt.Properties)
    {
    if (p.Name.Equals(“Platform”) && p.Value.Equals(“XboxOne”))
    {
    RuntimeDependency.StagePath = RuntimeDependency.Path.Substring(RuntimeDependency.Path.LastIndexOf(‘\\’) + 1);
    }
    }
    // PLUGIN DEPLOYMENT END

    Is now producing the following error when I try and launch:

    LogPlayLevel: DeploymentContext.cs(433,42): error CS1061: ‘TargetReceipt’ does not contain a definition for ‘Properties’ and no extension method ‘Properties’ accepting a first argument of type ‘TargetReceipt’ could be found (are you missing a using directive or an assembly reference?) [C:\src\PHX\M\Engine\Source\Programs\AutomationTool\AutomationUtils\Automa
    tionUtils.Automation.csproj]
    LogPlayLevel: DeploymentContext.cs(433,15): error CS0246: The type or namespace name ‘BuildProperty’ could not be found (are you missing a using directive or an assembly reference?) [C:\src\PHX\M\Engine\Source\Programs\AutomationTool\AutomationUtils\AutomationUtils.Automation.csproj]
    LogPlayLevel: DeploymentContext.cs(437,26): error CS1061: ‘RuntimeDependency’ does not contain a definition for ‘StagePath’ and no extension method ‘StagePath’ accepting a first argument of type ‘RuntimeDependency’ could be found (are you missing a using directive or an assembly reference?) [C:\src\PHX\M\Engine\Source\Programs\AutomationTool\AutomationUtils\
    AutomationUtils.Automation.csproj]

    Wondering what the work flow is for deploying FMOD on UE4.12.4 now days? Thanks.

  • Geoff Carlton

    I’m looking at this now and I’ll update the answer with the new method.

  • You must to post comments
0
0

Unreal 4.12 still requires a workaround. The updated one is here, which should work regardless of whether FMODStudio is in the game or the engine plugins directory. I’ll update the official docs for next release, as well as pinging Epic for a better ETA on real support.

Add the following to GetFilesToDeployOrStage in XboxOnePlatform.Automation.cs, before the end of the function:

        // FMOD code start
        string FMODDLLPath = null;
        if (Directory.Exists(Path.Combine(SC.ProjectRoot, "Plugins/FMODStudio")))
        {
            FMODDLLPath = Path.Combine(SC.ProjectRoot, "Plugins/FMODStudio/Binaries/XBoxOne/");
        }
        else if (Directory.Exists(Path.Combine(SC.LocalRoot, "Engine/Plugins/FMODStudio")))
        {
            FMODDLLPath = Path.Combine(SC.LocalRoot, "Engine/Plugins/FMODStudio/Binaries/XBoxOne/");
        }
        else 
        {
            LogError("Failed to find FMODStudio plugin in game or engine directory");
        }
        if (FMODDLLPath != null)
        {
            Log("Copying FMOD dlls to loose directory: " + RelativeBinPath);
            SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmod.dll", false, null, RelativeBinPath, false, false);
            SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmodL.dll", false, null, RelativeBinPath, false, false);
            SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmodstudio.dll", false, null, RelativeBinPath, false, false);
            SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmodstudioL.dll", false, null, RelativeBinPath, false, false);
        }
        // FMOD code end

Add the following to PrepTargetForDeployment in XboxOneDeploy.cs, before the end of the function:

        // FMOD code start
        string FMODDLLPath = null;
        if (Directory.Exists(Path.Combine(InTarget.ProjectDirectory.FullName, "Plugins/FMODStudio")))
        {
            FMODDLLPath = Path.Combine(InTarget.ProjectDirectory.FullName, "Plugins/FMODStudio/Binaries/XBoxOne/");
        }
        else if (Directory.Exists(Path.Combine(BuildConfiguration.RelativeEnginePath, "Plugins/FMODStudio")))
        {
            FMODDLLPath = Path.Combine(BuildConfiguration.RelativeEnginePath, "Plugins/FMODStudio/Binaries/XBoxOne/");
        }
        else 
        {
            Log.TraceWarning("Failed to find FMODStudio plugin in game or engine directory");
        }
        if (FMODDLLPath != null)
        {
            Log.TraceInformation("...copying the FMOD dlls...");
            string FMODDLLName = "fmod.dll";
            Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
            CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
            FMODDLLName = "fmodL.dll";
            Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
            CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
            FMODDLLName = "fmodstudio.dll";
            Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
            CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
            FMODDLLName = "fmodstudioL.dll";
            Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
            CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
        }
        // FMOD code end
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.