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