tools.deploy: adding a configurable deploy-directory.
parent
78d0aad87d
commit
580bafb857
|
@ -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
|
||||
|
|
|
@ -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 ;
|
||||
|
|
|
@ -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 ;
|
||||
|
|
|
@ -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 ;
|
||||
|
|
Loading…
Reference in New Issue