: copy-dll ( bundle-name -- )
"resource:factor.dll" swap copy-file-into ;
-: copy-pango ( bundle-name -- )
- "resource:build-support/dlls.txt" ascii file-lines
- [ "resource:" prepend-path ] map
- swap copy-files-into ;
-
:: copy-vm ( executable bundle-name extension -- vm )
vm "." split1-last drop extension append
bundle-name executable ".exe" append append-path
: create-exe-dir ( vocab bundle-name -- vm )
dup copy-dll
deploy-ui? get [
- [ copy-pango ]
- [ "" copy-theme ]
- [ ".exe" copy-vm ] tri
+ [ "" copy-theme ] [ ".exe" copy-vm ] bi
] [ ".com" copy-vm ] if ;
M: winnt deploy*
+++ /dev/null
-libcairo-2.dll
-libgio-2.0-0.dll
-libglib-2.0-0.dll
-libgmodule-2.0-0.dll
-libgobject-2.0-0.dll
-libgthread-2.0-0.dll
-libpango-1.0-0.dll
-libpangocairo-1.0-0.dll
-libpangowin32-1.0-0.dll
-libpng12-0.dll
-libtiff3.dll
-zlib1.dll
check_ret $DOWNLOADER
}
-maybe_download_dlls() {
- if [[ $OS == winnt ]] ; then
- for file in `cat build-support/dlls.txt`; do
- get_url http://factorcode.org/dlls/$file
- chmod 777 *.dll
- check_ret chmod
- done
- fi
-}
-
get_config_info() {
find_build_info
check_installed_programs
cd_factor
make_factor
get_boot_image
- maybe_download_dlls
bootstrap
}
update) update; update_bootstrap ;;
bootstrap) get_config_info; bootstrap ;;
report) find_build_info ;;
- dlls) get_config_info; maybe_download_dlls;;
net-bootstrap) get_config_info; update_boot_images; bootstrap ;;
make-target) ECHO=false; find_build_info; echo $MAKE_TARGET ;;
*) usage ;;
! Copyright (C) 2008, 2009 Eduardo Cavazos, Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays calendar combinators.short-circuit
-continuations debugger http.client io.directories io.files io.launcher
+continuations debugger io.directories io.files io.launcher
io.pathnames io.encodings.ascii kernel make mason.common mason.config
mason.platform mason.report mason.email namespaces sequences ;
IN: mason.child
: make-cmd ( -- args )
gnu-make platform 2array ;
-: dll-url ( -- url )
- "http://factorcode.org/dlls/"
- target-cpu get "x86.64" = [ "64/" append ] when ;
-
-: download-dlls ( -- )
- target-os get "winnt" = [
- dll-url "build-support/dlls.txt" ascii file-lines
- [ append download ] with each
- ] when ;
-
: make-vm ( -- )
"factor" [
- download-dlls
-
<process>
make-cmd >>command
"../compile-log" >>stdout