Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

win32 plugin development
Started by alex23 Aug 03 2019 03:17 PM

4 replies to this topic
plugin win32
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

alex23

[GLOBAL: userInfoPane.html]
alex23
  • Observer

  • 4 posts
  • Corona SDK

Hi,

 

Can someone experienced help me get started on creating simple native (c++) plugin for win32 platform ?

 

I found this resource: https://docs.coronalabs.com/native/plugin/index.html#coding-plugins

 

Is there some example code/project that can get me started?

 

I am trying to update TextureResource object (https://docs.coronalabs.com/api/type/TextureResource/index.html) from video frames. To show video with texture inside UI.

 

Thanks,

Alex



[TOPIC: post.html]
#2

StarCrunch

[GLOBAL: userInfoPane.html]
StarCrunch
  • Contributor

  • 815 posts
  • Corona SDK

Hi Alex.

 

You might try starting from the library I linked in the other post. It includes a Win32 solution. Some things might be out of doubt, e.g. references to CORONA_ENTERPRISE (environment variable, possibly my own, for relative paths of include files and libraries) should be switched to CORONA_ROOT (assigned by Corona on installation).

 

The memory bitmap plugin I also mentioned is probably a gentler start.

 

For Visual Studio setup, this is still a very good post.



[TOPIC: post.html]
#3

alex23

[GLOBAL: userInfoPane.html]
alex23
  • Observer

  • 4 posts
  • Corona SDK

Hi StarCrunch,

 

Awesome starting point, thank you.

 

Do you know if i can use corona simulator to load plugin from created .dll ?



[TOPIC: post.html]
#4

StarCrunch

[GLOBAL: userInfoPane.html]
StarCrunch
  • Contributor

  • 815 posts
  • Corona SDK

Yep.

 

In the project properties in Visual Studio you should see something called Build Events. In my Post-Build Event command line, I have

set PLUGINS=$(appdata)/Corona Labs/Corona Simulator/Plugins/plugin/
copy "$(OutDir)$(TargetName).dll" "%PLUGINS%video.dll"

in that VLC plugin, which will dump that DLL in a folder Corona searches when you call require(). You can of course rename it to whatever you want. The TargetName gets picked up from the corresponding General property. My comments in the VLC thread go into more detail, but basically you can just enter %appdata% in a File Explorer window and then follow the rest of what I assign in this command, creating the plugin folder if necessary.

 

You might get confused if you build while Corona is running (with the plugin loaded, anyway), since it will fail. Just make sure to Ctrl+W or whatever first.  :)



[TOPIC: post.html]
#5

alex23

[GLOBAL: userInfoPane.html]
alex23
  • Observer

  • 4 posts
  • Corona SDK

Hi StarCrunch,

 

Thank you very much for detailed information :)

 

Will post update on my progress here.

 

Alex


  • StarCrunch likes this


[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: plugin, win32