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

0 votes

Hi,

we are introducing Wwise to our workflow and are still in the learning phase, currently learning about the pre/post generation step commands. As a hello world task I prepared a simple batch script, which just renames the exported banks from .bnk to .bin format in the post generation step:

@ECHO OFF
set path=%1
SHIFT

:TOP
IF %1=="" GOTO END
set origin=%path%\%1%.bnk
set dest=%path%\%1%.bin
move %origin% %dest%
SHIFT
GOTO TOP

:END

On Windows machines it works when I run it simply by adding the following new line to the default Copy Streamed Files command:

 "$(WwiseProjectPath)\test.bat" "$(SoundBankPath)" $(SoundBankList)

However, the problem appears on Mac machines, probably since they are using Wine to run Wwise (which I still do not understand, why this direction was taken, with how unstable Wine ports tend to be).

When I setup the same command on a Mac machine it simply never stops exporting, just saying it is in progress. Actually the only thing that happens is, that my CPU is getting hot and the fans start to spin like crazy. Even after closing the app I need to shutdown the Mac to escape the infinite loop, some wild process escapes me to kill it.

First I thought it was just a OS path slash issue ( \ vs / ) but after trying with the actual path values instead of variables both in UNIX and Windows path forms, the result did not change, the infinite loop remained.

Is it a wine issue? Or is the command setup on Mac different than on Windows, since the Macros seem to randomly change between UNIX and Windows path forms?

in General Discussion by Rok K. (170 points)

1 Answer

0 votes
 
Best answer

Got an answer from their cross platform developer lead, so sharing it here, if somebody gets the same issue as me:

It assumes a Windows environment. Windows commands implemented by in Wine however support unix paths, but the application launched by Wwise has to be a Windows-style path.

The following drive letters are provided for mapping:

Y: = User home folder (~/)
Z: = Root (/)

With this in mind, the command may look like:
"z:$(WwiseProjectPath)/test.bat" "$(SoundBankPath)" $(SoundBankList)

As for the script itself, after some tests, the issue seems to be with the move command, which can hang when it requests user input. For this, I added the /y argument,
and I used proper quotes (with %~1% to initially remove them from SoundBankPath and then adding them for the move command). This yields the expected result.

@ECHO OFF
set path=%~1
SHIFT

:TOP
IF [%1]==[] GOTO END
set origin=%path%/%1%.bnk
set dest=%path%/%1%.bin
SHIFT
move /y "%origin%" "%dest%"
GOTO TOP

:END
by Rok K. (170 points)
selected by Samuel L. (Audiokinetic)
...