factor/extra/tools/deploy/windows/windows.factor

37 lines
1.0 KiB
Factor
Raw Normal View History

2008-02-27 17:31:13 -05:00
! Copyright (C) 2007, 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: io io.files kernel namespaces sequences system
2008-01-05 19:37:13 -05:00
tools.deploy.backend tools.deploy.config assocs hashtables
prettyprint windows.shell32 windows.user32 ;
IN: tools.deploy.windows
: copy-vm ( executable bundle-name -- vm )
prepend-path ".exe" append
2008-02-27 17:31:13 -05:00
vm over copy-file ;
: copy-fonts ( bundle-name -- )
2008-03-01 16:52:34 -05:00
"fonts/" resource-path swap copy-tree-into ;
: copy-dlls ( bundle-name -- )
{ "freetype6.dll" "zlib1.dll" "factor.dll" }
2008-02-27 17:31:13 -05:00
[ resource-path ] map
2008-03-01 16:52:34 -05:00
swap copy-files-into ;
: create-exe-dir ( vocab bundle-name -- vm )
dup copy-dlls
dup copy-fonts
copy-vm ;
: image-name ( vocab bundle-name -- str )
prepend-path ".image" append ;
2008-04-02 20:46:37 -04:00
M: winnt deploy*
"." resource-path [
dup deploy-config [
[ deploy-name get create-exe-dir ] keep
[ deploy-name get image-name ] keep
[ namespace make-deploy-image ] keep
2008-04-05 09:31:29 -04:00
(normalize-path) open-in-explorer
] bind
] with-directory ;