Defold 1.2.141 has been released

So, regarding dynamic libraries, using dynamicLibs should allow us to link against dynamic libraries on platforms where you were compiling with -Wl,static, (namely Linux and Android, I think), right? Two questions:

  1. Does this also bundle the library along with the executable or do we still have to duplicate it in res?
  2. When running from the editor, if the game links against any dynamic libraries (which would exist at their proper paths if bundled), it will most likely crash if it doesn’t find them. Are there any plans to mitigate this?

Well, I’m afraid there are still a few things left for the actual ticket (DEF-2732) to support dynamic libraries. E.g. uploading the shared libraries to we can link against them, bundling with them in a correct fashion. Still no ETA on that.

This flag (“dynamicLibs”) was one part of it, but also needed for using the sharedlib “jnigraphics” for Android, in a native extension.

3 Likes

html5 build stopped loading after update, there’s a message in console:
wasm streaming compile failed: TypeError: Response has unsupported MIME type

2 Likes

@snakky What webserver are you running from?

From the editor it should work, it has been updated to serve the wasm files with correct MIME type. However, if you are running the bundled output through your own webserver it needs to be configured.

Here is a super simple python server that will serve the wasm files with correct MIME type: https://gist.github.com/andsveking/df04bcac5f687525f7ce2389817ae595

3 Likes

I’m using nginx.

You can configure them this way: https://stackoverflow.com/questions/16789494/extending-default-nginx-mime-types-file

It should be configured so that files ending with .wasm has MIME type application/wasm.

1 Like

I updated to new defold-fmod version and project works now (thanks everyone involved). It works ok in Safari on macOS and in Edge on Windows, but in macOS Opera it runs super slow. Any thoughts why it runs so slow in Opera?

3 Likes

Not sure, is it the “release” version you are bundling?

Yes, “release”. Without webassembly support this example worked in Opera slightly faster then in Safari.

2 Likes

Just tried the example again and it looks like logging is enabled, which would indicate it’s not a release build. Do you have your own app-manifest or similar?

Edit: I think I found it. Sadly it seems that variants does not work as expected for wasm builds, I will fix this and it should be available in next release. Until then, as a workaround, you should be able to modify the output HTML file by adding this:

engine_arguments: ["--verify-graphics-calls=false"],

to the extra_params object. More details here:

Added issue DEF-3604.

5 Likes

pprint issue tracked as DEF-3607.

2 Likes

The engine file of wasm is only 750kb after gzip, that’s fantastic!

6 Likes

I’ve created a separate post regarding WebAssembly and using a custom HTML template:

If you are having issues with a custom template, please reply to that thread! :+1:

4 Likes

Released in 1.2.142

1 Like

Released in 1.2.142

1 Like

Could you please clarify the “dynamicLibs” usage for iOS ? We can’t seem to get it working. Best result which we were able to achieve so far is the error message "Error in ‘thirdparty/ext.manifest’: invalid lib - ‘dynamicLibs’:‘thirdPartySDK’ "

1 Like

let me help @lazy.kokos to assemble the whole story here.

Here’s his question in the chat:

got the build completed successfully, when linked against static library. it’s ok on its’ own but we have another issue with static lib itself (its’ the question to library devs, not to you).
So we tried also to build with dynamic library version, which is newer and doesn’t have the issue - and in this case plist version doesn’t seem to help - we’re getting “embedded dylibs/frameworks are only supported on iOS 8.0 and later” despite the version in plist was set to 10.0

My understanding is that @lazy.kokos is trying to build an empty/dummy project with a single native extension that utilises a third party library that was built/linked for iOS 8. The issue they’re having is that they cannot make the whole project get linked for iOS 8.

So probably the question is: how can they ensure that Defold builds/links the project for iOS8 so their 3rd party library is compatible.

First, read this clarification
Basically, it’s currently for Android, to control the flag “-Wl,dynamic”

We currently build for min iOS version 6.0.
There currently is no way of changing that by the user.

3 Likes

Hi, @Mathias_Westerdahl
Would you please explain How to link against dynamicLib concretely?

We currently don’t support linking to the users’s dynamic libraries. It’s in ticket DEF-2732, which we hope to be able to start soon, in the beginning of 2019.

1 Like