]> gitweb.factorcode.org Git - factor.git/blob - basis/tools/deploy/windows/windows.factor
Fix load errors related to utf16n being moved to io.encodings.utf16n
[factor.git] / basis / tools / deploy / windows / windows.factor
1 ! Copyright (C) 2007, 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: io io.files kernel namespaces sequences system
4 tools.deploy.backend tools.deploy.config
5 tools.deploy.config.editor assocs hashtables prettyprint
6 combinators windows.shell32 windows.user32 ;
7 IN: tools.deploy.windows
8
9 : copy-dll ( bundle-name -- )
10     "resource:factor.dll" swap copy-file-into ;
11
12 : copy-freetype ( bundle-name -- )
13     {
14         "resource:freetype6.dll"
15         "resource:zlib1.dll"
16     } swap copy-files-into ;
17
18 : create-exe-dir ( vocab bundle-name -- vm )
19     dup copy-dll
20     deploy-ui? get [
21         dup copy-freetype
22         dup "" copy-fonts
23     ] when
24     ".exe" copy-vm ;
25
26 M: winnt deploy*
27     "resource:" [
28         dup deploy-config [
29             deploy-name get
30             [
31                 [ create-exe-dir ]
32                 [ image-name ]
33                 [ drop ]
34                 2tri namespace make-deploy-image
35             ]
36             [ nip open-in-explorer ] 2bi
37         ] bind
38     ] with-directory ;