Publishing
From MaratisWiki
Revision as of 19:51, 4 February 2014 by Dahnielson (Talk | contribs)
This requires the community branch of Maratis and the MScriptExt and MEvent plugins
To add an event to the publish queue in lua: editor.publish_event(event)
"event" can be either a function, or a table containing a "publish" function as follows:
local test_publish_event_function = function() print("test publish event function") end local test_publish_event_table = { publish = function() print("test publish event table") end } editor.publish_event(test_publish_event_function) editor.publish_event(test_publish_event_table)
It should be possible to use the standard lua "io" functions to copy any relevant files.
It is also possible to package files into an archive with the following functions:
local pkg = openPackage("package.npk") packageAddFile(pkg, "specialfile/some.file") closePackage(pkg)
"package.npk" will be opened within the "published/" directory. Usually this will be named the same as the project. Any files can then be added to the package before closing it.