tools.deploy: adding a deploy-path that gives you the executable that was created.
parent
ec7afb3ea6
commit
17b369972f
|
@ -140,3 +140,5 @@ DEFER: ?make-staging-image
|
||||||
image vm embed-image ;
|
image vm embed-image ;
|
||||||
|
|
||||||
HOOK: deploy* os ( vocab -- )
|
HOOK: deploy* os ( vocab -- )
|
||||||
|
|
||||||
|
HOOK: deploy-path os ( vocab -- path )
|
||||||
|
|
|
@ -18,6 +18,12 @@ delete-staging-images
|
||||||
|
|
||||||
{ } [ "hello-world" shake-and-bake 550000 small-enough? ] unit-test
|
{ } [ "hello-world" shake-and-bake 550000 small-enough? ] unit-test
|
||||||
|
|
||||||
|
{ "Hello world\n" } [
|
||||||
|
"hello-world" deploy
|
||||||
|
"hello-world" deploy-path 1array
|
||||||
|
ascii [ contents ] with-process-reader
|
||||||
|
] unit-test
|
||||||
|
|
||||||
{ } [ "sudoku" shake-and-bake 800000 small-enough? ] unit-test
|
{ } [ "sudoku" shake-and-bake 800000 small-enough? ] unit-test
|
||||||
|
|
||||||
! [ ] [ "hello-ui" shake-and-bake 1605000 small-enough? ] unit-test
|
! [ ] [ "hello-ui" shake-and-bake 1605000 small-enough? ] unit-test
|
||||||
|
|
|
@ -92,8 +92,22 @@ IN: tools.deploy.macosx
|
||||||
: 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 ;
|
||||||
|
|
||||||
M: macosx deploy* ( vocab -- )
|
M: macosx deploy*
|
||||||
! pass off to M: unix deploy* if we're building a console app
|
! pass off to M: unix deploy* if we're building a console app
|
||||||
dup deploy-app-bundle?
|
dup deploy-app-bundle? [
|
||||||
[ deploy-app-bundle ]
|
deploy-app-bundle
|
||||||
[ call-next-method ] if ;
|
] [
|
||||||
|
call-next-method
|
||||||
|
] if ;
|
||||||
|
|
||||||
|
M: macosx deploy-path
|
||||||
|
dup deploy-app-bundle? [
|
||||||
|
deploy-directory get [
|
||||||
|
dup deploy-config [
|
||||||
|
bundle-name "Contents/MacOS/" append-path
|
||||||
|
swap append-path normalize-path
|
||||||
|
] with-variables
|
||||||
|
] with-directory
|
||||||
|
] [
|
||||||
|
call-next-method
|
||||||
|
] if ;
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
! Copyright (C) 2008 James Cash
|
! Copyright (C) 2008 James Cash
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: io io.backend io.directories io.files.info.unix kernel
|
USING: io io.backend io.directories io.files.info.unix
|
||||||
namespaces sequences system tools.deploy.backend
|
io.pathnames kernel namespaces sequences system
|
||||||
tools.deploy.config tools.deploy.config.editor ;
|
tools.deploy.backend tools.deploy.config
|
||||||
|
tools.deploy.config.editor ;
|
||||||
QUALIFIED: webbrowser
|
QUALIFIED: webbrowser
|
||||||
IN: tools.deploy.unix
|
IN: tools.deploy.unix
|
||||||
|
|
||||||
|
@ -13,7 +14,7 @@ IN: tools.deploy.unix
|
||||||
: bundle-name ( -- str )
|
: bundle-name ( -- str )
|
||||||
deploy-name get ;
|
deploy-name get ;
|
||||||
|
|
||||||
M: unix deploy* ( vocab -- )
|
M: unix deploy*
|
||||||
deploy-directory get [
|
deploy-directory get [
|
||||||
dup deploy-config [
|
dup deploy-config [
|
||||||
[ bundle-name create-app-dir ] keep
|
[ bundle-name create-app-dir ] keep
|
||||||
|
@ -24,3 +25,10 @@ M: unix deploy* ( vocab -- )
|
||||||
bundle-name webbrowser:open-file
|
bundle-name webbrowser:open-file
|
||||||
] with-variables
|
] with-variables
|
||||||
] with-directory ;
|
] with-directory ;
|
||||||
|
|
||||||
|
M: unix deploy-path
|
||||||
|
deploy-directory get [
|
||||||
|
dup deploy-config [
|
||||||
|
bundle-name swap append-path normalize-path
|
||||||
|
] with-variables
|
||||||
|
] with-directory ;
|
||||||
|
|
|
@ -40,3 +40,12 @@ M: windows deploy*
|
||||||
} 2cleave
|
} 2cleave
|
||||||
] with-variables
|
] with-variables
|
||||||
] with-directory ;
|
] with-directory ;
|
||||||
|
|
||||||
|
M: windows deploy-path
|
||||||
|
deploy-directory get [
|
||||||
|
dup deploy-config [
|
||||||
|
deploy-name get
|
||||||
|
swap ".exe" append append-path
|
||||||
|
normalize-path
|
||||||
|
] with-variables
|
||||||
|
] with-directory ;
|
||||||
|
|
Loading…
Reference in New Issue