Merge git://factorcode.org/git/factor
commit
e9e26039b2
|
@ -16,4 +16,18 @@ USING: io.unix.launcher tools.test ;
|
|||
[ { "abc def" "hey" } ] [ "'abc def' \"hey\"" tokenize-command ] unit-test
|
||||
[ "'abc def' \"hey" tokenize-command ] unit-test-fails
|
||||
[ "'abc def" tokenize-command ] unit-test-fails
|
||||
[ { "abc def" "h\"ey" } ] [ "'abc def' \"h\"ey\" " tokenize-command ] unit-test
|
||||
[ { "abc def" "h\"ey" } ] [ "'abc def' \"h\\\"ey\" " tokenize-command ] unit-test
|
||||
|
||||
[
|
||||
{
|
||||
"Hello world.app/Contents/MacOS/hello-ui"
|
||||
"-i=boot.macosx-ppc.image"
|
||||
"-include= math compiler ui"
|
||||
"-deploy-vocab=hello-ui"
|
||||
"-output-image=Hello world.app/Contents/Resources/hello-ui.image"
|
||||
"-no-stack-traces"
|
||||
"-no-user-init"
|
||||
}
|
||||
] [
|
||||
"\"Hello world.app/Contents/MacOS/hello-ui\" -i=boot.macosx-ppc.image \"-include= math compiler ui\" -deploy-vocab=hello-ui \"-output-image=Hello world.app/Contents/Resources/hello-ui.image\" -no-stack-traces -no-user-init" tokenize-command
|
||||
] unit-test
|
||||
|
|
|
@ -16,19 +16,18 @@ USE: unix
|
|||
! "foo bar" -- quotation
|
||||
LAZY: 'escaped-char' "\\" token any-char-parser &> ;
|
||||
|
||||
LAZY: 'chars' 'escaped-char' any-char-parser <|> <*> ;
|
||||
LAZY: 'quoted-char' ( delimiter -- parser' )
|
||||
'escaped-char'
|
||||
swap [ member? not ] curry satisfy
|
||||
<|> ; inline
|
||||
|
||||
LAZY: 'quoted-1' 'chars' "\"" "\"" surrounded-by ;
|
||||
LAZY: 'quoted' ( delimiter -- parser )
|
||||
dup 'quoted-char' <*> swap dup surrounded-by ;
|
||||
|
||||
LAZY: 'quoted-2' 'chars' "'" "'" surrounded-by ;
|
||||
LAZY: 'unquoted' ( -- parser ) " " 'quoted-char' <+> ;
|
||||
|
||||
LAZY: 'non-space-char'
|
||||
'escaped-char' [ CHAR: \s = not ] satisfy <|> ;
|
||||
|
||||
LAZY: 'unquoted' 'non-space-char' <+> ;
|
||||
|
||||
LAZY: 'argument'
|
||||
'quoted-1' 'quoted-2' 'unquoted' <|> <|>
|
||||
LAZY: 'argument' ( -- parser )
|
||||
"\"" 'quoted' "'" 'quoted' 'unquoted' <|> <|>
|
||||
[ >string ] <@ ;
|
||||
|
||||
MEMO: 'arguments' ( -- parser )
|
||||
|
|
|
@ -26,12 +26,8 @@ IN: tools.deploy
|
|||
[ (copy-lines) ] [ stream-close ] [ ] cleanup ;
|
||||
|
||||
: stage2 ( vm flags -- )
|
||||
[
|
||||
"\"" % swap % "\" -i=" %
|
||||
boot-image-name %
|
||||
[ " " % % ] each
|
||||
] "" make
|
||||
dup print <process-stream>
|
||||
>r "-i=" boot-image-name append 2array r> append dup .
|
||||
<process-stream>
|
||||
dup duplex-stream-out stream-close
|
||||
copy-lines ;
|
||||
|
||||
|
@ -48,11 +44,11 @@ IN: tools.deploy
|
|||
|
||||
: deploy-command-line ( vm image vocab config -- vm flags )
|
||||
[
|
||||
"\"-include=" swap profile-string "\"" 3append ,
|
||||
"-include=" swap profile-string append ,
|
||||
|
||||
"-deploy-vocab=" swap append ,
|
||||
|
||||
"\"-output-image=" swap "\"" 3append ,
|
||||
"-output-image=" swap append ,
|
||||
|
||||
"-no-stack-traces" ,
|
||||
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: io io.files io.launcher kernel namespaces sequences
|
||||
system tools.deploy tools.deploy.config assocs hashtables
|
||||
prettyprint unix io.unix.backend cocoa cocoa.plists
|
||||
cocoa.application cocoa.classes ;
|
||||
prettyprint io.unix.backend cocoa cocoa.plists
|
||||
cocoa.application cocoa.classes qualified ;
|
||||
QUALIFIED: unix
|
||||
IN: tools.deploy.macosx
|
||||
|
||||
: touch ( path -- )
|
||||
|
@ -19,10 +20,13 @@ IN: tools.deploy.macosx
|
|||
bundle-dir over path+ -rot
|
||||
>r "Contents" path+ r> path+ copy-directory ;
|
||||
|
||||
: chmod ( path perms -- )
|
||||
unix:chmod io-error ;
|
||||
|
||||
: copy-vm ( executable bundle-name -- vm )
|
||||
"Contents/MacOS/" path+ swap path+ vm swap
|
||||
[ copy-file ] keep
|
||||
[ 755 chmod io-error ] keep ;
|
||||
[ OCT: 755 chmod ] keep ;
|
||||
|
||||
: copy-fonts ( name -- )
|
||||
"fonts/" resource-path
|
||||
|
|
Loading…
Reference in New Issue