]> gitweb.factorcode.org Git - factor.git/blob - basis/tools/deploy/unix/unix.factor
alien.libraries: add a "deploy-library" word that marks a library to have its dll...
[factor.git] / basis / tools / deploy / unix / unix.factor
1 ! Copyright (C) 2008 James Cash
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: io io.pathnames io.directories io.files
4 io.files.info.unix io.backend kernel namespaces make sequences
5 system tools.deploy.backend tools.deploy.config
6 tools.deploy.config.editor assocs hashtables prettyprint ;
7 IN: tools.deploy.unix
8
9 : create-app-dir ( vocab bundle-name -- vm )
10     copy-vm
11     dup OCT: 755 set-file-permissions ;
12
13 : bundle-name ( -- str )
14     deploy-name get ;
15
16 M: unix deploy* ( vocab -- )
17     "." resource-path [
18         dup deploy-config [
19             [ bundle-name create-app-dir ] keep
20             [ bundle-name image-name ] keep
21             namespace make-deploy-image
22             bundle-name "" [ copy-resources ] [ copy-libraries ] 3bi
23             bundle-name normalize-path [ "Binary deployed to " % % "." % ] "" make print
24         ] bind
25     ] with-directory ;