new module tools.deploy.embed: make self-exe image

db4
Joe Groff 2011-11-18 18:39:19 -08:00
parent 7754ab2c06
commit de5cc96286
4 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1 @@
Joe Groff

View File

@ -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 <file-appender> [| out |
out stream-tell :> offset
from-image binary <file-reader> [| in |
in out stream-copy*
] with-disposal
image-magic uintptr_t <ref> out stream-write
offset uintptr_t <ref> out stream-write
] with-disposal ;

View File

@ -0,0 +1 @@
Embed a Factor image into a VM to create a single standalone executable file

View File

@ -0,0 +1 @@
deploy