]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.deploy: adding a configurable deploy-directory.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 22 Apr 2014 21:08:40 +0000 (14:08 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 22 Apr 2014 21:08:40 +0000 (14:08 -0700)
basis/tools/deploy/config/config.factor
basis/tools/deploy/macosx/macosx.factor
basis/tools/deploy/unix/unix.factor
basis/tools/deploy/windows/windows.factor

index 7af24b837fee3b63f460b2d746c41d37c029a984..950b2da2a1f411f0623b22fe4648c5f629225dfc 100644 (file)
@@ -1,7 +1,6 @@
 ! Copyright (C) 2007, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: io.files io kernel sequences assocs splitting parser
-namespaces math vocabs hashtables ;
+USING: assocs hashtables kernel math namespaces vocabs ;
 IN: tools.deploy.config
 
 SYMBOL: deploy-name
@@ -67,3 +66,6 @@ SYMBOL: deploy-image
         ! default value for deploy.macosx
         { "stop-after-last-window?" t }
     } assoc-union ;
+
+SYMBOL: deploy-directory
+"resource:" deploy-directory set-global
index 6b06dd0c08d054fb2fc29b4b92817d8db1870c10..6b1ab40eedd204d93fc8d6b0fdee5a4cfc851a42 100644 (file)
@@ -74,7 +74,7 @@ IN: tools.deploy.macosx
     [ % "/Contents/Resources/" % % ".image" % ] "" make ;
 
 : deploy-app-bundle ( vocab -- )
-    [
+    deploy-directory get [
         dup deploy-config [
             bundle-name dup exists? [ delete-tree ] [ drop ] if
             [ bundle-name create-app-dir ] keep
@@ -85,7 +85,7 @@ IN: tools.deploy.macosx
             [ "Contents/Frameworks" copy-libraries ] 2bi
             bundle-name show-in-finder
         ] with-variables
-    ] with-resource-directory ;
+    ] with-directory ;
 
 : deploy-app-bundle? ( vocab -- ? )
     deploy-config [ deploy-console? get not deploy-ui? get or ] with-variables ;
index 7b3ffb05a013eb96b6fab698e8221e6cd8cf85d1..e8fd2c745bc2f2313dbb31c9e35d2430c883305e 100644 (file)
@@ -14,7 +14,7 @@ IN: tools.deploy.unix
     deploy-name get ;
 
 M: unix deploy* ( vocab -- )
-    [
+    deploy-directory get [
         dup deploy-config [
             [ bundle-name create-app-dir ] keep
             [ deployed-image-name ] keep
@@ -23,4 +23,4 @@ M: unix deploy* ( vocab -- )
             bundle-name normalize-path "Binary deployed to " "." surround print
             bundle-name webbrowser:open-file
         ] with-variables
-    ] with-resource-directory ;
+    ] with-directory ;
index 31b7f9fde214130ef33b90a8e7963b54f3c847bb..0a9cd8d1052c9eb4a97b16066e1d52fbee8f6fcf 100755 (executable)
@@ -29,7 +29,7 @@ CONSTANT: app-icon-resource-id "APPICON"
     [ 2drop ] if ;
 
 M: windows deploy*
-    [
+    deploy-directory get [
         dup deploy-config [
             deploy-name get
             {
@@ -41,4 +41,4 @@ M: windows deploy*
                 [ nip open-in-explorer ]
             } 2cleave 
         ] with-variables
-    ] with-resource-directory ;
+    ] with-directory ;