Skip to content

Conversation

@Kaiqgs
Copy link
Collaborator

@Kaiqgs Kaiqgs commented Nov 2, 2025

image

@Kaiqgs Kaiqgs linked an issue Nov 2, 2025 that may be closed by this pull request
@Kaiqgs Kaiqgs self-assigned this Nov 5, 2025
@Kaiqgs Kaiqgs requested review from britzl and ekharkunov November 5, 2025 22:56
@Kaiqgs
Copy link
Collaborator Author

Kaiqgs commented Nov 5, 2025

in lib_path investigation

So far, lib_path has been necessary because we need to load the libs dynamically, and it's much easier to know lib_path at bundled_time, rather than at develop/build_time on the editor.

Currently we do a check to see if it's being executed from the editor

        if (endsIn(exePath, FMB_EDITOR_SUFFIX)) {

Trying to match build/x86_64-osx/dmengine or build/x86_64-win32/dmengine.exe.

Then, for the case it's from the editor, lib_path is queried.

            const char* resPath = FMODBridge_dmConfigFile_GetString("fmod.lib_path", "");
                (...)
               strcpy(newPath, projPath);
            len += projPathLen;

            if (resPath[0] != '/') {
                strcat(newPath, SEP);
                len += 1;
            }

            strcat(newPath + len, resPath);

Later lib_path is used to build the exe+lib path.

    strcpy(exePath, libPath);
    strncat(exePath, SEP LIBPREFIX "fmod." LIBEXT, maxPathLen);
    libOpen(FMODBridge_dlHandleLL, exePath);

    strcpy(exePath, libPath);
    strncat(exePath, SEP LIBPREFIX "fmodstudio." LIBEXT, maxPathLen);
    libOpen(FMODBridge_dlHandleST, exePath);

ongoing discussion

I have raised my points on this issue. I think eventually a plug-and-play solution will be more interesting.

  • Does Defold SDK provide an API to query extension installation or extension files?
  • Is it acceptable for this extension to access .internal lib, or is it too hacky?

@Kaiqgs Kaiqgs marked this pull request as ready for review November 5, 2025 23:24
@Kaiqgs Kaiqgs linked an issue Nov 5, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lib_path needs to be manually set. ext.properties not implemented & lib_path

2 participants