Fix Windows bootstrap
parent
7b62d19924
commit
cf39fd29f8
|
@ -1,9 +1,9 @@
|
|||
USING: alien alien.c-types arrays assocs combinators
|
||||
continuations destructors io io.backend io.ports io.timeouts
|
||||
io.backend.windows io.files.windows io.files io.buffers io.streams.c
|
||||
libc kernel math namespaces sequences threads windows
|
||||
windows.errors windows.kernel32 strings splitting qualified
|
||||
ascii system accessors locals ;
|
||||
io.backend.windows io.files.windows io.files.windows.nt io.files
|
||||
io.pathnames io.buffers io.streams.c libc kernel math namespaces
|
||||
sequences threads windows windows.errors windows.kernel32
|
||||
strings splitting qualified ascii system accessors locals ;
|
||||
QUALIFIED: windows.winsock
|
||||
IN: io.backend.windows.nt
|
||||
|
||||
|
|
|
@ -83,4 +83,5 @@ M: object copy-file
|
|||
|
||||
{
|
||||
{ [ os unix? ] [ "io.directories.unix" require ] }
|
||||
{ [ os windows? ] [ "io.directories.windows" require ] }
|
||||
} cond
|
|
@ -1,7 +1,19 @@
|
|||
! Copyright (C) 2008 Doug Coleman.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: system io.directories io.encodings.utf16n alien.strings
|
||||
io.pathnames io.backend io.files.windows destructors
|
||||
kernel accessors calendar windows windows.errors
|
||||
windows.kernel32 alien.c-types sequences splitting
|
||||
fry continuations ;
|
||||
IN: io.directories.windows
|
||||
|
||||
M: windows touch-file ( path -- )
|
||||
[
|
||||
normalize-path
|
||||
maybe-create-file [ &dispose ] dip
|
||||
[ drop ] [ handle>> f now dup (set-file-times) ] if
|
||||
] with-destructors ;
|
||||
|
||||
M: windows move-file ( from to -- )
|
||||
[ normalize-path ] bi@ MoveFile win32-error=0/f ;
|
||||
|
||||
|
|
|
@ -2,12 +2,3 @@
|
|||
! See http://factorcode.org/license.txt for BSD license.
|
||||
IN: io.files.info.windows.nt
|
||||
|
||||
ERROR: not-absolute-path ;
|
||||
|
||||
M: winnt root-directory ( string -- string' )
|
||||
unicode-prefix ?head drop
|
||||
dup {
|
||||
[ length 2 >= ]
|
||||
[ second CHAR: : = ]
|
||||
[ first Letter? ]
|
||||
} 1&& [ 2 head "\\" append ] [ not-absolute-path ] if ;
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
! Copyright (C) 2008 Doug Coleman.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: byte-arrays math io.backend io.files.info
|
||||
io.files.windows io.files.windows.nt kernel windows.kernel32
|
||||
windows.time windows accessors alien.c-types combinators
|
||||
generalizations system alien.strings io.encodings.utf16n
|
||||
sequences splitting windows.errors fry continuations destructors
|
||||
calendar ascii combinators.short-circuit ;
|
||||
IN: io.files.info.windows
|
||||
|
||||
TUPLE: windows-file-info < file-info attributes ;
|
||||
|
@ -72,10 +78,10 @@ TUPLE: windows-file-info < file-info attributes ;
|
|||
get-file-information BY_HANDLE_FILE_INFORMATION>file-info
|
||||
] if ;
|
||||
|
||||
M: winnt file-info ( path -- info )
|
||||
M: windows file-info ( path -- info )
|
||||
normalize-path get-file-information-stat ;
|
||||
|
||||
M: winnt link-info ( path -- info )
|
||||
M: windows link-info ( path -- info )
|
||||
file-info ;
|
||||
|
||||
: volume-information ( normalized-path -- volume-name volume-serial max-component flags type )
|
||||
|
@ -103,7 +109,15 @@ M: winnt link-info ( path -- info )
|
|||
|
||||
TUPLE: win32-file-system-info < file-system-info max-component flags device-serial ;
|
||||
|
||||
HOOK: root-directory os ( string -- string' )
|
||||
ERROR: not-absolute-path ;
|
||||
|
||||
: root-directory ( string -- string' )
|
||||
unicode-prefix ?head drop
|
||||
dup {
|
||||
[ length 2 >= ]
|
||||
[ second CHAR: : = ]
|
||||
[ first Letter? ]
|
||||
} 1&& [ 2 head "\\" append ] [ not-absolute-path ] if ;
|
||||
|
||||
M: winnt file-system-info ( path -- file-system-info )
|
||||
normalize-path root-directory
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
USING: continuations destructors io.buffers io.files io.backend
|
||||
io.timeouts io.ports io.files.private io.backend.windows
|
||||
io.timeouts io.ports io.pathnames io.files.private io.backend.windows
|
||||
io.files.windows io.backend.windows.nt io.encodings.utf16n
|
||||
windows windows.kernel32 kernel libc math threads system
|
||||
environment alien.c-types alien.arrays alien.strings sequences
|
||||
|
@ -48,7 +48,7 @@ M: winnt FileArgs-overlapped ( port -- overlapped )
|
|||
make-overlapped ;
|
||||
|
||||
M: winnt open-append
|
||||
[ dup file-info size>> ] [ drop 0 ] recover
|
||||
0 ! [ dup file-info size>> ] [ drop 0 ] recover
|
||||
[ (open-append) ] dip >>ptr ;
|
||||
|
||||
M: winnt home "USERPROFILE" os-env ;
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
! Copyright (C) 2008 Doug Coleman.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: alien.c-types io.binary io.backend io.files io.buffers
|
||||
io.encodings.utf16n io.ports io.backend.windows kernel math splitting
|
||||
fry alien.strings windows windows.kernel32 windows.time calendar
|
||||
combinators math.functions sequences namespaces make words
|
||||
symbols system destructors accessors math.bitwise continuations
|
||||
windows.errors arrays byte-arrays generalizations ;
|
||||
USING: alien.c-types io.binary io.backend io.files
|
||||
io.files.types io.buffers io.encodings.utf16n io.ports
|
||||
io.backend.windows kernel math splitting fry alien.strings
|
||||
windows windows.kernel32 windows.time calendar combinators
|
||||
math.functions sequences namespaces make words symbols system
|
||||
destructors accessors math.bitwise continuations windows.errors
|
||||
arrays byte-arrays generalizations ;
|
||||
IN: io.files.windows
|
||||
|
||||
: open-file ( path access-mode create-mode flags -- handle )
|
||||
|
@ -130,10 +131,3 @@ SYMBOLS: +read-only+ +hidden+ +system+
|
|||
: (set-file-times) ( handle timestamp/f timestamp/f timestamp/f -- )
|
||||
[ timestamp>FILETIME ] tri@
|
||||
SetFileTime win32-error=0/f ;
|
||||
|
||||
M: winnt touch-file ( path -- )
|
||||
[
|
||||
normalize-path
|
||||
maybe-create-file [ &dispose ] dip
|
||||
[ drop ] [ handle>> f now dup (set-file-times) ] if
|
||||
] with-destructors ;
|
||||
|
|
|
@ -262,7 +262,6 @@ M: object run-pipeline-element
|
|||
|
||||
{
|
||||
{ [ os unix? ] [ "io.launcher.unix" require ] }
|
||||
{ [ os winnt? ] [ "io.backend.windows.nt.launcher" require ] }
|
||||
{ [ os wince? ] [ "io.launcher.windows" require ] }
|
||||
{ [ os winnt? ] [ "io.launcher.windows.nt" require ] }
|
||||
[ ]
|
||||
} cond
|
||||
|
|
|
@ -6,7 +6,7 @@ windows.kernel32 windows namespaces make io.launcher kernel
|
|||
sequences windows.errors assocs splitting system strings
|
||||
io.launcher.windows io.files.windows io.backend io.files
|
||||
io.files.private combinators shuffle accessors locals ;
|
||||
IN: io.backend.windows.nt.launcher
|
||||
IN: io.launcher.windows.nt
|
||||
|
||||
: duplicate-handle ( handle -- handle' )
|
||||
GetCurrentProcess ! source process
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
! Copyright (C) 2007, 2008 Doug Coleman, Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: alien alien.c-types arrays continuations io
|
||||
io.backend.windows io.pipes.windows.nt libc io.ports
|
||||
io.backend.windows io.pipes.windows.nt io.pathnames libc io.ports
|
||||
windows.types math windows.kernel32
|
||||
namespaces make io.launcher kernel sequences windows.errors
|
||||
splitting system threads init strings combinators
|
||||
|
|
|
@ -6,7 +6,8 @@ hashtables sorting arrays combinators math.bitwise strings
|
|||
system accessors threads splitting io.backend io.backend.windows
|
||||
io.backend.windows.nt io.files.windows.nt io.monitors io.ports
|
||||
io.buffers io.files io.timeouts io.encodings.string
|
||||
io.encodings.utf16n io windows windows.kernel32 windows.types ;
|
||||
io.encodings.utf16n io windows windows.kernel32 windows.types
|
||||
io.pathnames ;
|
||||
IN: io.monitors.windows.nt
|
||||
|
||||
: open-directory ( path -- handle )
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
! Copyright (C) 2007, 2008 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: io io.files kernel namespaces sequences system
|
||||
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 ;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
! Copyright (C) 2008 Slava Pestov, Jorge Acereda Macia.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: io.files io words alien kernel math.parser alien.syntax
|
||||
io.launcher system assocs arrays sequences namespaces make
|
||||
qualified system math io.encodings.ascii accessors
|
||||
tools.disassembler ;
|
||||
USING: io.files io.files.temp io words alien kernel math.parser
|
||||
alien.syntax io.launcher system assocs arrays sequences
|
||||
namespaces make qualified system math io.encodings.ascii
|
||||
accessors tools.disassembler ;
|
||||
IN: tools.disassembler.gdb
|
||||
|
||||
SINGLETON: gdb-disassembler
|
||||
|
|
Loading…
Reference in New Issue