Use factor.exe or factor.com when deploying on Windows, depending on whether or not the UI is enabled

db4
U-SLAVA-DFB8FF805\Slava 2009-01-28 01:57:46 -06:00
parent 1cd285bcaa
commit 49875b9cc7
4 changed files with 17 additions and 12 deletions

2
basis/tools/deploy/backend/backend.factor Normal file → Executable file
View File

@ -11,7 +11,7 @@ tools.deploy.config.editor bootstrap.image io.encodings.utf8
destructors accessors ; destructors accessors ;
IN: tools.deploy.backend IN: tools.deploy.backend
: copy-vm ( executable bundle-name extension -- vm ) : copy-vm ( executable bundle-name -- vm )
[ prepend-path ] dip append vm over copy-file ; [ prepend-path ] dip append vm over copy-file ;
: copy-fonts ( name dir -- ) : copy-fonts ( name dir -- )

2
basis/tools/deploy/macosx/macosx.factor Normal file → Executable file
View File

@ -54,7 +54,7 @@ IN: tools.deploy.macosx
} cleave } cleave
] ]
[ create-app-plist ] [ create-app-plist ]
[ "Contents/MacOS/" append-path "" copy-vm ] 2tri [ "Contents/MacOS/" append-path copy-vm ] 2tri
dup OCT: 755 set-file-permissions ; dup OCT: 755 set-file-permissions ;
: deploy.app-image ( vocab bundle-name -- str ) : deploy.app-image ( vocab bundle-name -- str )

2
basis/tools/deploy/unix/unix.factor Normal file → Executable file
View File

@ -8,7 +8,7 @@ IN: tools.deploy.unix
: create-app-dir ( vocab bundle-name -- vm ) : create-app-dir ( vocab bundle-name -- vm )
dup "" copy-fonts dup "" copy-fonts
"" copy-vm copy-vm
dup OCT: 755 set-file-permissions ; dup OCT: 755 set-file-permissions ;
: bundle-name ( -- str ) : bundle-name ( -- str )

View File

@ -1,9 +1,9 @@
! Copyright (C) 2007, 2008 Slava Pestov. ! Copyright (C) 2007, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: io io.files io.directories kernel namespaces sequences system USING: io io.files io.pathnames io.directories kernel namespaces
tools.deploy.backend tools.deploy.config sequences locals system splitting tools.deploy.backend
tools.deploy.config.editor assocs hashtables prettyprint tools.deploy.config tools.deploy.config.editor assocs hashtables
combinators windows.shell32 windows.user32 ; prettyprint combinators windows.shell32 windows.user32 ;
IN: tools.deploy.windows IN: tools.deploy.windows
: copy-dll ( bundle-name -- ) : copy-dll ( bundle-name -- )
@ -15,13 +15,18 @@ IN: tools.deploy.windows
"resource:zlib1.dll" "resource:zlib1.dll"
} swap copy-files-into ; } swap copy-files-into ;
:: copy-vm ( executable bundle-name extension -- vm )
vm "." split1-last drop extension append
bundle-name executable ".exe" append append-path
[ copy-file ] keep ;
: create-exe-dir ( vocab bundle-name -- vm ) : create-exe-dir ( vocab bundle-name -- vm )
dup copy-dll dup copy-dll
deploy-ui? get [ deploy-ui? get [
dup copy-freetype [ copy-freetype ]
dup "" copy-fonts [ "" copy-fonts ]
] when [ ".exe" copy-vm ] tri
".exe" copy-vm ; ] [ ".com" copy-vm ] if ;
M: winnt deploy* M: winnt deploy*
"resource:" [ "resource:" [