버전

menu_open
Wwise SDK 2021.1.14
Configuring Your Project With Premake

The premake command generates the solutions that will be used by the build command to build your plug-in. The default Premake configuration file generated by the new command works out of the box, however, further modifications will be needed to work on your plug-in. The generated solutions should not be modified directly as calling the premake command again will overwrite all changes to these files. Instead, modify the Premake configuration file. This configuration file is located at the root of your plug-in and is named PremakePlugin.lua.

Looking at the PremakePlugin.lua, notice how it is divided into three similar sections. Each section contains a table with various lists of strings that are used to configure how a solution is generated:

  • The Plugin.sdk.static table is used to configure the static SDK plug-in.
  • The Plugin.sdk.shared table is used to configure the shared SDK plug-in, which links to the static SDK plug-in (this is done under the hood by premake scripts).
  • The Plugin.authoring table is used to configure the Authoring plug-in, which links to the static SDK plug-in.

Further information on how to populate each list is found in the Premake documentation:

Once the plug-in project has been created, other commands, such as premake, must be called from within the project folder. Here is how to generate the solutions for Authoring on the current operating system:

cd MyNewFX
python "%WWISEROOT%/Scripts/Build/Plugins/wp.py" premake Authoring

Available platforms are:

Android, Authoring, Authoring_Windows, Authoring_Linux, Authoring_Mac, WinGC, GGP, XboxOneGC, iOS, Linux, LinuxAuto, Mac, NX, PS4, PS5, QNX, tvOS, UWP_vc140, UWP_vc150, UWP_vc160, Windows_vc140, Windows_vc150, Windows_vc160, XboxOne, XboxSeriesX

When the solutions are generated, refer to Building Your Project for the Different Wwise Platforms to build and install your plug-in in your Wwise installation.

Static Authoring Configuration

Even though it is not included in the generated PremakePlugin.lua file, there is also an optional Plugin.sdk.authoringstatic table. This is used for unique use cases and provides a different configuration for the static SDK plug-in that is linked to the Authoring plug-in. For example, this demonstrates how to re-use the same SDK plug-in code with a FOR_AUTHORING compiler define:

Plugin.sdk.staticauthoring = {}
-- SDK STATIC AUTHORING PLUGIN SECTION
Plugin.sdk.staticauthoring.includedirs = Plugin.sdk.static.includedirs
Plugin.sdk.staticauthoring.files = Plugin.sdk.static.files
Plugin.sdk.staticauthoring.excludes = Plugin.sdk.static.excludes
Plugin.sdk.staticauthoring.links = Plugin.sdk.static.links
Plugin.sdk.staticauthoring.libdirs = Plugin.sdk.static.libdirs
Plugin.sdk.staticauthoring.defines = table.join(Plugin.sdk.static.defines, { "FOR_AUTHORING" })

Advanced Premake Configuration

Notice how configuring a project is fairly straightforward since most of the Premake code is hidden in the configuration table. For a more advanced configuration, add a custom field to any of the following configuration sections:

Plugin.sdk.static.custom = function()
-- put your Premake code here
end
Plugin.sdk.shared.custom = function()
-- put your Premake code here
end
Plugin.authoring.custom = function()
-- put your Premake code here
end

Next section: Building Your Project for the Different Wwise Platforms


이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요