Updating deploy tool, mason.child and factor.sh for new Windows DLLs

db4
Slava Pestov 2009-03-07 19:39:11 -06:00
parent 8f916c061f
commit c2bc2c0705
6 changed files with 43 additions and 46 deletions

View File

@ -1,4 +1,4 @@
! Copyright (C) 2007, 2008 Slava Pestov.
! Copyright (C) 2007, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: namespaces make continuations.private kernel.private init
assocs kernel vocabs words sequences memory io system arrays
@ -14,9 +14,14 @@ IN: tools.deploy.backend
: copy-vm ( executable bundle-name -- vm )
prepend-path vm over copy-file ;
: copy-fonts ( name dir -- )
CONSTANT: theme-path "basis/ui/gadgets/theme/"
: copy-theme ( name dir -- )
deploy-ui? get [
append-path "resource:fonts/" swap copy-tree-into
append-path
theme-path append-path
[ make-directories ]
[ theme-path "resource:" prepend swap copy-tree ] bi
] [ 2drop ] if ;
: image-name ( vocab bundle-name -- str )

View File

@ -7,7 +7,7 @@ tools.deploy.config.editor assocs hashtables prettyprint ;
IN: tools.deploy.unix
: create-app-dir ( vocab bundle-name -- vm )
dup "" copy-fonts
dup "" copy-theme
copy-vm
dup OCT: 755 set-file-permissions ;

View File

@ -1,6 +1,6 @@
! Copyright (C) 2007, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: io io.files io.pathnames io.directories kernel namespaces
USING: io io.files io.pathnames io.directories io.encodings.ascii kernel namespaces
sequences locals system splitting tools.deploy.backend
tools.deploy.config tools.deploy.config.editor assocs hashtables
prettyprint combinators windows.shell32 windows.user32 ;
@ -9,11 +9,10 @@ IN: tools.deploy.windows
: copy-dll ( bundle-name -- )
"resource:factor.dll" swap copy-file-into ;
: copy-freetype ( bundle-name -- )
{
"resource:freetype6.dll"
"resource:zlib1.dll"
} swap copy-files-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
@ -23,8 +22,8 @@ IN: tools.deploy.windows
: create-exe-dir ( vocab bundle-name -- vm )
dup copy-dll
deploy-ui? get [
[ copy-freetype ]
[ "" copy-fonts ]
[ copy-pango ]
[ "" copy-theme ]
[ ".exe" copy-vm ] tri
] [ ".com" copy-vm ] if ;

12
build-support/dlls.txt Normal file
View File

@ -0,0 +1,12 @@
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

View File

@ -447,31 +447,11 @@ get_url() {
maybe_download_dlls() {
if [[ $OS == winnt ]] ; then
get_url http://factorcode.org/dlls/freetype6.dll
get_url http://factorcode.org/dlls/zlib1.dll
get_url http://factorcode.org/dlls/OpenAL32.dll
get_url http://factorcode.org/dlls/alut.dll
get_url http://factorcode.org/dlls/comerr32.dll
get_url http://factorcode.org/dlls/gssapi32.dll
get_url http://factorcode.org/dlls/iconv.dll
get_url http://factorcode.org/dlls/k5sprt32.dll
get_url http://factorcode.org/dlls/krb5_32.dll
get_url http://factorcode.org/dlls/libcairo-2.dll
get_url http://factorcode.org/dlls/libeay32.dll
get_url http://factorcode.org/dlls/libiconv2.dll
get_url http://factorcode.org/dlls/libintl3.dll
get_url http://factorcode.org/dlls/libpq.dll
get_url http://factorcode.org/dlls/libxml2.dll
get_url http://factorcode.org/dlls/libxslt.dll
get_url http://factorcode.org/dlls/msvcr71.dll
get_url http://factorcode.org/dlls/ogg.dll
get_url http://factorcode.org/dlls/pgaevent.dll
get_url http://factorcode.org/dlls/sqlite3.dll
get_url http://factorcode.org/dlls/ssleay32.dll
get_url http://factorcode.org/dlls/theora.dll
get_url http://factorcode.org/dlls/vorbis.dll
for file in `cat build-support/dlls.txt`; do
get_url http://factorcode.org/dlls/$file
chmod 777 *.dll
check_ret chmod
done
fi
}
@ -522,7 +502,7 @@ make_boot_image() {
}
install_build_system_apt() {
sudo apt-get --yes install libc6-dev libfreetype6-dev libx11-dev xorg-dev glutg3-dev wget git-core git-doc rlwrap gcc make
sudo apt-get --yes install libc6-dev libpango-1.0-dev libx11-dev xorg-dev glutg3-dev wget git-core git-doc rlwrap gcc make
check_ret sudo
}

View File

@ -1,21 +1,22 @@
! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
! 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 io.pathnames kernel make mason.common mason.config
continuations debugger http.client 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" = [
"http://factorcode.org/dlls/"
target-cpu get "x86.64" = [ "64/" append ] when
[ "freetype6.dll" append ]
[ "zlib1.dll" append ] bi
[ download ] bi@
dll-url "build-support/dlls.txt" ascii file-lines
[ append download ] with each
] when ;
: make-vm ( -- )