Publishing
From MaratisWiki
(Difference between revisions)
Dahnielson (Talk | contribs) |
|||
| (One intermediate revision by one user not shown) | |||
| Line 27: | Line 27: | ||
"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: | + | [[Category: User manual]] |
Latest revision as of 15: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.