Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion faxe/linc_faxe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ namespace linc
}

// Callback definitions must be defined before they are used in functions
FMOD_RESULT F_CALLBACK GetCallbackType(FMOD_STUDIO_EVENT_CALLBACK_TYPE type, FMOD_STUDIO_EVENTINSTANCE *event, void *parameters)
FMOD_RESULT F_CALL GetCallbackType(FMOD_STUDIO_EVENT_CALLBACK_TYPE type, FMOD_STUDIO_EVENTINSTANCE *event, void *parameters)
{
auto eventInstancePath = GetEventInstancePath((FMOD::Studio::EventInstance*) event);
auto eventWithCallback = eventCallbacksFlagsMap.find(eventInstancePath);
Expand Down
41 changes: 32 additions & 9 deletions faxe/linc_faxe.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<set name="NATIVE_TOOLKIT_PATH" value="${LINC_FAXE_PATH}/lib/Windows" />
</section>

<!-- Outdated links for other platforms
<section if="linux HXCPP_M32">
<set name="NATIVE_TOOLKIT_PATH" value="${LINC_FAXE_PATH}/lib/Linux" />
</section>

<section if="linux HXCPP_M64">
<set name="NATIVE_TOOLKIT_PATH" value="${LINC_FAXE_PATH}/lib/Linux64" />
<set name="NATIVE_TOOLKIT_PATH" value="${LINC_FAXE_PATH}/lib/Linux" />
</section>

<!-- Outdated links for other platforms
<section if="switch">
<set name="NATIVE_TOOLKIT_PATH" value="${LINC_FAXE_PATH}/lib/Switch" />
</section>
Expand All @@ -24,10 +24,8 @@
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/api/core/inc/" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/api/studio/inc/" />

<!-- Additional linux compiler flags
<compilerflag value="-std=c++11" if="linux" />
<compilerflag value="-Wl,-rpath,$ORIGIN" if="linux" />
-->
<compilerflag value="-Wl,-rpath,./lib,--enable-new-dtags" if="linux" />

<file name="${LINC_FAXE_PATH}/faxe/linc_faxe.cpp" />
</files>
Expand All @@ -44,17 +42,19 @@
<lib name="${NATIVE_TOOLKIT_PATH}/api/studio/lib/x64/fmodstudio_vc.lib" />
</section>

<!-- Outdated linux dependencies
<section if="linux HXCPP_M32">
<lib name="${NATIVE_TOOLKIT_PATH}/api/lowlevel/lib/x86/libfmod.so" />
<lib name="${NATIVE_TOOLKIT_PATH}/api/core/lib/x86/libfmod.so" />
<lib name="${NATIVE_TOOLKIT_PATH}/api/studio/lib/x86/libfmodstudio.so" />
<flag value="-Wl,-rpath,./lib"/>
<flag value="-Wl,--enable-new-dtags"/>
</section>

<section if="linux HXCPP_M64">
<lib name="${NATIVE_TOOLKIT_PATH}/api/lowlevel/lib/x86_64/libfmod.so" />
<lib name="${NATIVE_TOOLKIT_PATH}/api/core/lib/x86_64/libfmod.so" />
<lib name="${NATIVE_TOOLKIT_PATH}/api/studio/lib/x86_64/libfmodstudio.so" />
<flag value="-Wl,-rpath,./lib"/>
<flag value="-Wl,--enable-new-dtags"/>
</section>
-->
</target>

<!--TODO OVERRIDE BuildMain.xml in project ... in the end I never came up with a true fix for nx and had to blit it over...-->
Expand All @@ -76,6 +76,29 @@
<copyFile name="fmodstudio.dll" from="${NATIVE_TOOLKIT_PATH}/api/studio/lib/x64" toolId="exe" allowMissing="false"/>
</section>
</section>

<section if="linux" unless="switch">

<section if="linux HXCPP_M32" >
<echo value="building for linux. x86" />
<copyFile name="libfmod.so" from="${NATIVE_TOOLKIT_PATH}/api/core/lib/x86" toolId="exe" allowMissing="false"/>
<copyFile name="libfmod.so.14" from="${NATIVE_TOOLKIT_PATH}/api/core/lib/x86" toolId="exe" allowMissing="false"/>
<copyFile name="libfmod.so.14.6" from="${NATIVE_TOOLKIT_PATH}/api/core/lib/x86" toolId="exe" allowMissing="false"/>
<copyFile name="libfmodstudio.so" from="${NATIVE_TOOLKIT_PATH}/api/studio/lib/x86" toolId="exe" allowMissing="false"/>
<copyFile name="libfmodstudio.so.14" from="${NATIVE_TOOLKIT_PATH}/api/studio/lib/x86" toolId="exe" allowMissing="false"/>
<copyFile name="libfmodstudio.so.14.6" from="${NATIVE_TOOLKIT_PATH}/api/studio/lib/x86" toolId="exe" allowMissing="false"/>
</section>

<section if="linux HXCPP_M64" >
<echo value="building for linux. x64" />
<copyFile name="libfmod.so" from="${NATIVE_TOOLKIT_PATH}/api/core/lib/x86_64" toolId="exe" allowMissing="false"/>
<copyFile name="libfmod.so.14" from="${NATIVE_TOOLKIT_PATH}/api/core/lib/x86_64" toolId="exe" allowMissing="false"/>
<copyFile name="libfmod.so.14.6" from="${NATIVE_TOOLKIT_PATH}/api/core/lib/x86_64" toolId="exe" allowMissing="false"/>
<copyFile name="libfmodstudio.so" from="${NATIVE_TOOLKIT_PATH}/api/studio/lib/x86_64" toolId="exe" allowMissing="false"/>
<copyFile name="libfmodstudio.so.14" from="${NATIVE_TOOLKIT_PATH}/api/studio/lib/x86_64" toolId="exe" allowMissing="false"/>
<copyFile name="libfmodstudio.so.14.6" from="${NATIVE_TOOLKIT_PATH}/api/studio/lib/x86_64" toolId="exe" allowMissing="false"/>
</section>
</section>


</xml>
2 changes: 1 addition & 1 deletion haxefmod/FmodManagerPrivate.hx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class FmodManagerPrivate {

HaxeFmod.fmod_init(128);
// For html5 deployments, the banks must be loaded from inside the javascript fmod_init() call
#if windows
#if (windows || linux)
HaxeFmod.fmod_load_bank("assets/fmod/Desktop/Master.bank");
HaxeFmod.fmod_load_bank("assets/fmod/Desktop/Master.strings.bank");
#end
Expand Down
2 changes: 1 addition & 1 deletion haxefmod/HaxeFmod.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package haxefmod;

import haxefmod.FmodInternalEnums;

#if windows
#if (windows||linux)
@:keep
@:include('linc_faxe.h')
#if !display
Expand Down
14 changes: 12 additions & 2 deletions include.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,18 @@
<dependency name="lib/Windows/api/core/lib/x86/fmod.dll" if="windows HXCPP_M32"/>
<dependency name="lib/Windows/api/studio/lib/x86/fmodstudio.dll" if="windows HXCPP_M32" />

<dependency name="lib/Windows/api/core/lib/x64/fmod.dll" if="windows" unless="HXCPP_M32"/>
<dependency name="lib/Windows/api/studio/lib/x64/fmodstudio.dll" if="windows" unless="HXCPP_M32"/>
<dependency name="lib/Windows/api/core/lib/x64/fmod.dll" if="windows" unless="HXCPP_M64"/>
<dependency name="lib/Windows/api/studio/lib/x64/fmodstudio.dll" if="windows" unless="HXCPP_M64"/>

<dependency name="lib/Linux/api/core/lib/x86/fmod.so" if="linux HXCPP_M32"/>
<dependency name="lib/Linux/api/studio/lib/x86/fmodstudio.so" if="linux HXCPP_M32" />
<assets path="lib/Linux/api/core/lib/x86/" rename="lib/" if="linux HXCPP_M32" embed="false"/>
<assets path="lib/Linux/api/studio/lib/x86/" rename="lib/" if="linux HXCPP_M32" embed="false"/>

<dependency name="lib/Linux/api/core/lib/x86_x4/fmod.so" if="linux" unless="HXCPP_M32"/>
<dependency name="lib/Linux/api/studio/lib/x86_64/fmodstudio.so" if="linux" unless="HXCPP_M32"/>
<assets path="lib/Linux/api/core/lib/x86_64/" rename="lib/" if="linux" unless="HXCPP_M32" embed="false"/>
<assets path="lib/Linux/api/studio/lib/x86_64/" rename="lib/" if="linux" unless="HXCPP_M32" embed="false"/>

<dependency path="lib/html5/fmodstudio.js" if="html5"/>
<assets path="lib/html5/fmodstudio.wasm" rename="lib/fmodstudio.wasm" if="html5"/>
Expand Down
Loading