diff --git a/basis/tools/deploy/embed/authors.txt b/basis/tools/deploy/embed/authors.txt new file mode 100644 index 0000000000..f13c9c1e77 --- /dev/null +++ b/basis/tools/deploy/embed/authors.txt @@ -0,0 +1 @@ +Joe Groff diff --git a/basis/tools/deploy/embed/embed.factor b/basis/tools/deploy/embed/embed.factor new file mode 100644 index 0000000000..02b9a5db8c --- /dev/null +++ b/basis/tools/deploy/embed/embed.factor @@ -0,0 +1,17 @@ +! (c)2010 Joe Groff bsd license +USING: alien.c-types alien.data bootstrap.image +bootstrap.image.private destructors io io.directories +io.encodings.binary io.files locals system ; +IN: tools.deploy.embed + +:: embed-image ( from-image to-executable -- ) + vm to-executable copy-file + to-executable binary [| out | + out stream-tell :> offset + from-image binary [| in | + in out stream-copy* + ] with-disposal + image-magic uintptr_t out stream-write + offset uintptr_t out stream-write + ] with-disposal ; + diff --git a/basis/tools/deploy/embed/summary.txt b/basis/tools/deploy/embed/summary.txt new file mode 100644 index 0000000000..b54209ae2a --- /dev/null +++ b/basis/tools/deploy/embed/summary.txt @@ -0,0 +1 @@ +Embed a Factor image into a VM to create a single standalone executable file diff --git a/basis/tools/deploy/embed/tags.txt b/basis/tools/deploy/embed/tags.txt new file mode 100644 index 0000000000..8541464a78 --- /dev/null +++ b/basis/tools/deploy/embed/tags.txt @@ -0,0 +1 @@ +deploy