Building luasec as native extensions

Excellent! Thank you so much for your effort! Porting the GameSparks SDK to Defold should be a fairly straight forward process now.

3 Likes

Not yet, but very soon I think :wink:
Weā€™re starting with it now that weā€™re done with HTML5 support (which comes in next release)

2 Likes

Ok, Iā€™ll add the Windows support as soon as you complete this feature. :slight_smile:

3 Likes

Hi all! Saw we were mentioned and just want to let you know that at GameSparks we have an Defold SDK in our pipeline! :slight_smile:

3 Likes

Welcome @gamesparksclare!
Donā€™t hesitate to ask question on our forum or in our ā€œ#monetization_sdkā€ channel on the Defold slack

1 Like

Windows support for native extensions is here now. Have you managed to solve the same problem as you ran into for Mac? We have run into the same problem and your solution for Mac worked fine for Mac platform in our native extension

Now my extension supports Windows platform and it can be downloaded from here.

6 Likes

Hey @sonountaleban! Thank you for your work on this! You should add this extension to the Asset Portal.

2 Likes

Hey, yes, an user advised me about this. How does it work? It seems I need icons and other thingsā€¦

You can probably skip most of those, right @axel.hammarback? You can currently create a community page from the dashboard. Create an empty project and use that as the container for the community page (from the Community Page tab on the project page)

Yeah, this is correct. While it looks nicer, itā€™s not a requirement on our end. Like Bjƶrn said ā€“ either from the dashboard (Tab called ā€˜Community pageā€™ next to ā€˜Settingsā€™), or directly from defold.com/community/assets (the ā€œAdd your Assetā€ button. Check out the manual if you get stuck (or just ask here in the forum, of course).

1 Like

Ok guys, Iā€™ll do it as soon as possible. Thank you. :slight_smile:

2 Likes

Iā€™m trying to make your luasec and crypto module work for linux now that Defold supports native extensions for this platform. But Iā€™m currently stuck with the same issue @sonountaleban were having, duplicate symbols (RSA_free, AES_cbc_encrypt etc). Does anyone know how to fix it?

I have downloaded the OpenSSL repo, but what do I need to do before I build it?
C and C++ is outside my current skillset so all help is greatly appreciated.

EDIT: Nvm, I just did a simple search & replace through the entire project. I was looking for a less ā€œhackyā€ solution, but this is good enough for now

2 Likes

I agree that it feels a bit hacky but itā€™s the most straight forward solution since there is currently no way for you to modify whatā€™s being used by the engine.

PS Donā€™t forget to contribute back to the original repo with the Linux version of libcrypto and libssl that you built!

4 Likes

Also, our work with native extensions is by no means finished yet. We are actively working towards making these things a lot easier to work with, without unnecessary tweaks needed by our users.

4 Likes

I made a script for Mac (and Windows) to replace those symbols, do you want it?

G.

2 Likes

Thanks, but itā€™s alright. I did my own pythonscript.

I made a pull request for defold-luasec to fix crashing in HTML5. Check it out?

Yay, I had that on my list of things to do this week! I recently extracted my lua-websocket compatible async client from DefNet into a separate project and at the same time upgraded lua-websocket to a version that handles secure websockets, thus the need for LuaSec.

1 Like

@britzl Do you have any example to use the secure websockets? Thanks