]> gitweb.factorcode.org Git - factor.git/commitdiff
Use factor.exe or factor.com when deploying on Windows, depending on whether or not...
authorU-SLAVA-DFB8FF805\Slava <Slava@slava-dfb8ff805.(none)>
Wed, 28 Jan 2009 07:57:46 +0000 (01:57 -0600)
committerU-SLAVA-DFB8FF805\Slava <Slava@slava-dfb8ff805.(none)>
Wed, 28 Jan 2009 07:57:46 +0000 (01:57 -0600)
basis/tools/deploy/backend/backend.factor [changed mode: 0644->0755]
basis/tools/deploy/macosx/macosx.factor [changed mode: 0644->0755]
basis/tools/deploy/unix/unix.factor [changed mode: 0644->0755]
basis/tools/deploy/windows/windows.factor

old mode 100644 (file)
new mode 100755 (executable)
index 636e440..22d6eb2
@@ -11,7 +11,7 @@ tools.deploy.config.editor bootstrap.image io.encodings.utf8
 destructors accessors ;
 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 ;
 
 : copy-fonts ( name dir -- )
old mode 100644 (file)
new mode 100755 (executable)
index 91b4d60..8fe31ac
@@ -54,7 +54,7 @@ IN: tools.deploy.macosx
         } cleave
     ]
     [ create-app-plist ]
-    [ "Contents/MacOS/" append-path "" copy-vm ] 2tri
+    [ "Contents/MacOS/" append-path copy-vm ] 2tri
     dup OCT: 755 set-file-permissions ;
 
 : deploy.app-image ( vocab bundle-name -- str )
old mode 100644 (file)
new mode 100755 (executable)
index 9e0bb8a..c9bf308
@@ -8,7 +8,7 @@ IN: tools.deploy.unix
 
 : create-app-dir ( vocab bundle-name -- vm )
     dup "" copy-fonts
-    "" copy-vm
+    copy-vm
     dup OCT: 755 set-file-permissions ;
 
 : bundle-name ( -- str )
index 7ce635b1ba90623ffac6c0007a036d1f2ab648e4..0e9146b26eccc2911c9f4277db1163f4031bf379 100755 (executable)
@@ -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.
-USING: io io.files io.directories kernel namespaces sequences system
-tools.deploy.backend tools.deploy.config
-tools.deploy.config.editor assocs hashtables prettyprint
-combinators windows.shell32 windows.user32 ;
+USING: io io.files io.pathnames io.directories kernel namespaces
+sequences locals system splitting tools.deploy.backend
+tools.deploy.config tools.deploy.config.editor assocs hashtables
+prettyprint combinators windows.shell32 windows.user32 ;
 IN: tools.deploy.windows
 
 : copy-dll ( bundle-name -- )
@@ -15,13 +15,18 @@ IN: tools.deploy.windows
         "resource:zlib1.dll"
     } 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 )
     dup copy-dll
     deploy-ui? get [
-        dup copy-freetype
-        dup "" copy-fonts
-    ] when
-    ".exe" copy-vm ;
+        [ copy-freetype ]
+        [ "" copy-fonts ]
+        [ ".exe" copy-vm ] tri
+    ] [ ".com" copy-vm ] if ;
 
 M: winnt deploy*
     "resource:" [