Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

UE4 LogAkPluginActivator looking for wrong target file

0 votes

I'm having an issue where Wwise's post build step is failing to find a target that I think shouldn't exist when making my cooked Client and Server builds. WWise is being used as a project plugin btw.

My cook command is

call RunUAT ^
-ScriptsForProject=%BLAH%/Blah.uproject ^
BuildCookRun ^
-project=%BLAH%/Blah.uproject ^
-noP4 ^
-clientconfig=Development ^
-serverconfig=Development ^
-utf8output ^
-platform=Win64 ^
-client ^
-build ^
-cook ^
-map=BlahA+BlahB+MainMenu ^
-unversionedcookedcontent ^
-compressed ^
-stage ^
-package ^
-stagingdirectory=%STAGING_BUILD_DIR% ^
-compile ^
-SkipCookingEditorContent ^
-server ^
-serverplatform=Linux ^
-pak ^
-unversioned ^
-unattended

This generates

LogAkPluginActivator: Error: Could not read file: ../../../Blah/Binaries/Win64/Blah.target

I have BlahClient.target and BlahServer.target, but not 'Blah.target'. Is this a WWise bug?

 

asked Mar 30, 2020 in General Discussion by Erik L. (110 points)
This continue to be a problem in the UE4.25 integration. When building a cooked/packaged WindowsClient it looks for Game.target instead of GameClient.target.

2 Answers

0 votes

I had a similar problem with that log:
"LogAkPluginActivator: Display: AkPluginActivator parameters: Client -run=AkPluginActivator -platform=Win64 -configuration=Profile -targetconfig=Development
LogAkPluginActivator: Display: Plug-ins required for <Windows> platform are: AkRoomVerb
LogAkPluginActivator: Error: Could not read file: C:/build/Binaries/Win64/NewProject.target"

Problem was with PlatformArchitecture. Plugin thought that I was using PlatformArchitecture = "vc140", but I used Visual Studio 2019 / 2017
So I add hardcode to AkWindowsInitializationSettings.cpp use "vc150"
In FillInitializationStructure methode

void UAkWindowsInitializationSettings::FillInitializationStructure(FAkInitializationStructure& InitializationStructure) const
{
#if PLATFORM_64BITS
       #define AK_WINDOWS_ARCHITECTURE "x64_"
#else
       #define AK_WINDOWS_ARCHITECTURE "Win32_"
#endif
       constexpr auto PlatformArchitecture = AK_WINDOWS_ARCHITECTURE "vc150";

#undef AK_WINDOWS_ARCHITECTURE

       InitializationStructure.SetPluginDllPath(PlatformArchitecture);
       InitializationStructure.SetupLLMAllocFunctions();

       CommonSettings.FillInitializationStructure(InitializationStructure);
       CommunicationSettings.FillInitializationStructure(InitializationStructure);
       AdvancedSettings.FillInitializationStructure(InitializationStructure);

#if PLATFORM_WINDOWS
       InitializationStructure.PlatformInitSettings.uSampleRate = CommonSettings.SampleRate;
#endif
}

answered May 16, 2020 by Artem M. (160 points)
I appreciate the response but this does not address the problem I have.
This is still a problem in UE 4.25 and the latest WWise. I'm having to reapply my fix for it each update which is irritating. I'm hearing from other people they have similar problems with wwise. We'll likely ditch it in favor of the built in audio tools if this persists.
+1 vote

I solved this problem by adding some codes to AkPluginActivatorCommandlet.cpp

 

int32 UAkPluginActivatorCommandlet::Main(const FString& Params)

{

    // @todo: Determine whether files should be written here at all. It is possible to create these files right after successful bank generation.

 

#if !WITH_EDITOR

    return -1;

#else

    if (!FApp::HasProjectName())

    {

        UE_LOG(LogAkPluginActivator, Display, TEXT("Project name could not be determined."));

        return 0;

    }

 

    const FString TargetName = FApp::GetProjectName(); // Here:  Only use the project name ,not concern the target. 

    FString TargetName = FApp::GetProjectName();  

    if (Params.StartsWith(TEXT(" Server")))

    {

        TargetName.Append(TEXT("Server"));

    }

    else if (Params.StartsWith(TEXT(" Client")))

    {

        TargetName.Append(TEXT("Client"));

    }

    if (TargetName.IsEmpty() || TargetName.Compare("UE4Game") == 0 || TargetName.Compare("UE4Editor") == 0)

    {

        UE_LOG(LogAkPluginActivator, Display, TEXT("No files will be modified when building the UE4 Wwise engine plug-in."));

        return 0;

     }

answered Jun 10, 2020 by Terry W. (160 points)
...