Skip to content
paul-reilly edited this page Sep 10, 2017 · 1 revision

5 EXPORTING PLUGINS

You can use the file gideros/plugins/exampleplugin/main.txt to follow this part of the guide.

Create a new project in Gideros Studio. In the file main.lua :

Load and initialize your plugin :

pcall(function () require("exampleplugin") end)

Implement the listeners and the functions, start and test from your plugin :

if exampleplugin then              
  local function onEvent(event)                      
    --TODO              
  end  
  exampleplugin:addEventListener(Event.EXAMPLEPLUGIN_STATE, onEvent)
  exampleplugin:addEventListener(Event.EXAMPLEPLUGIN_WIFI, onEvent) 
  exampleplugin.start_lua()
  print(exampleplugin.test_lua()) 
end 

Open the project export window. Select the plugin from the list of plugins to export.

After each modification of the Lua code, you must re-export the plugin!

5.1 Android (On PC)

Select the architecture « Android » and the template « Android Studio ». Renseignez le nom de votre package. Select « Full Export » and click OK. Export your Android Studio project.

In Android Studio, it is possible to modify and to test the Manifest and le Manifest et le code Java without the need to recompile or export (if the modifications don't change any files other than Java!) When you have finished changing and testing, copy the modifications to the Gideros plugin files. Then recompile and re-export your plugin as detailed in section 4.

5.2 Plugin winRT (On PC)

(En cours de rédaction) Puis recompilez et réexportez votre plugin en reprenant à partir du point COMPILATION Plugin winRT.

5.3 Plugin iOS (Sur MAC)

(En cours de rédaction) Puis recompilez et réexportez votre plugin en reprenant à partir du point COMPILATION Plugin iOS.