tools.deploy.*: new word maybe-open-deploy-directory

char-rename
Björn Lindqvist 2016-12-18 04:12:56 +01:00
parent 5f5098617a
commit 6f555a7b2c
4 changed files with 9 additions and 4 deletions

View File

@ -4,7 +4,8 @@ USING: accessors assocs bootstrap.image hashtables io io.directories
io.encodings.utf8 io.files io.files.temp io.launcher io.pathnames io.encodings.utf8 io.files io.files.temp io.launcher io.pathnames
kernel locals make namespaces prettyprint sequences splitting system kernel locals make namespaces prettyprint sequences splitting system
tools.deploy.config tools.deploy.config.editor tools.deploy.embed tools.deploy.config tools.deploy.config.editor tools.deploy.embed
tools.deploy.libraries vocabs.loader vocabs.metadata.resources ; tools.deploy.libraries vocabs.loader vocabs.metadata.resources
webbrowser ;
IN: tools.deploy.backend IN: tools.deploy.backend
: copy-vm ( executable bundle-name -- vm-path ) : copy-vm ( executable bundle-name -- vm-path )
@ -121,6 +122,10 @@ ERROR: can't-deploy-library-file library ;
SYMBOL: open-directory-after-deploy? SYMBOL: open-directory-after-deploy?
t open-directory-after-deploy? set-global t open-directory-after-deploy? set-global
: maybe-open-deploy-directory ( directory -- )
absolute-path open-directory-after-deploy? get
[ open-item ] [ drop ] if ;
HOOK: deploy* os ( vocab -- ) HOOK: deploy* os ( vocab -- )
HOOK: deploy-path os ( vocab -- path ) HOOK: deploy-path os ( vocab -- path )

View File

@ -81,7 +81,7 @@ IN: tools.deploy.macosx
bundle-name bundle-name
[ "Contents/Resources" copy-resources ] [ "Contents/Resources" copy-resources ]
[ "Contents/Frameworks" copy-libraries ] 2bi [ "Contents/Frameworks" copy-libraries ] 2bi
open-directory-after-deploy? get [ bundle-name open-item ] when ; bundle-name maybe-open-deploy-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 ;

View File

@ -15,7 +15,7 @@ M: unix deploy*
[ drop deployed-image-name ] [ drop deployed-image-name ]
[ drop namespace make-deploy-image-executable ] [ drop namespace make-deploy-image-executable ]
[ nip "" [ copy-resources ] [ copy-libraries ] 3bi ] [ nip "" [ copy-resources ] [ copy-libraries ] 3bi ]
[ nip open-directory-after-deploy? get [ open-item ] [ drop ] if ] [ nip maybe-open-deploy-directory ]
} 2cleave ; } 2cleave ;
M: unix deploy-path M: unix deploy-path

View File

@ -33,7 +33,7 @@ M: windows deploy*
[ drop deployed-image-name ] [ drop deployed-image-name ]
[ drop namespace make-deploy-image-executable ] [ drop namespace make-deploy-image-executable ]
[ nip "" [ copy-resources ] [ copy-libraries ] 3bi ] [ nip "" [ copy-resources ] [ copy-libraries ] 3bi ]
[ nip open-directory-after-deploy? get [ open-item ] [ drop ] if ] [ nip maybe-open-deploy-directory ]
} 2cleave ; } 2cleave ;
M: windows deploy-path M: windows deploy-path