new module tools.deploy.embed: make self-exe image
parent
7754ab2c06
commit
de5cc96286
|
@ -0,0 +1 @@
|
||||||
|
Joe Groff
|
|
@ -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 ;
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Embed a Factor image into a VM to create a single standalone executable file
|
|
@ -0,0 +1 @@
|
||||||
|
deploy
|
Loading…
Reference in New Issue