Publishing
From MaratisWiki
(Difference between revisions)
(Created page with "''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 ...") |
Dahnielson (Talk | contribs) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 26: | Line 26: | ||
closePackage(pkg)</pre> | closePackage(pkg)</pre> | ||
"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. | "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. | ||
+ | |||
+ | [[Category: User manual]] |
Latest revision as of 16:14, 7 February 2014
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.