Merge branch 'master' of git://factorcode.org/git/factor into modern-harvey
commit
d4612f2140
|
@ -2,7 +2,9 @@ USING: ui game.input tools.test kernel system threads calendar
|
||||||
combinators.short-circuit ;
|
combinators.short-circuit ;
|
||||||
IN: game.input.tests
|
IN: game.input.tests
|
||||||
|
|
||||||
os { [ windows? ] [ macosx? ] } 1|| [
|
! os { [ windows? ] [ macosx? ] } 1|| [
|
||||||
|
! This test only works if a mouse is present. Issue #1844
|
||||||
|
os { [ macosx? ] } 1|| [
|
||||||
[ ] [ open-game-input ] unit-test
|
[ ] [ open-game-input ] unit-test
|
||||||
[ ] [ 1 seconds sleep ] unit-test
|
[ ] [ 1 seconds sleep ] unit-test
|
||||||
[ ] [ close-game-input ] unit-test
|
[ ] [ close-game-input ] unit-test
|
||||||
|
|
|
@ -11,54 +11,6 @@ ARTICLE: "windows.dragdrop-listener" "Dropping files onto listener window"
|
||||||
{ $subsections dragdrop-listener-window }
|
{ $subsections dragdrop-listener-window }
|
||||||
"Only one file at a time can be dropped." ;
|
"Only one file at a time can be dropped." ;
|
||||||
|
|
||||||
HELP: +listener-dragdrop-wrapper+
|
|
||||||
{ $var-description "" } ;
|
|
||||||
|
|
||||||
HELP: <listener-dragdrop>
|
|
||||||
{ $values
|
|
||||||
{ "hWnd" null }
|
|
||||||
{ "object" object }
|
|
||||||
}
|
|
||||||
{ $description "" } ;
|
|
||||||
|
|
||||||
HELP: dragdrop-listener-window
|
HELP: dragdrop-listener-window
|
||||||
{ $description "Run this word from a listener to activate drag-and-drop support for the listener window." $nl
|
{ $description "Run this word from a listener to activate drag-and-drop support for the listener window." $nl
|
||||||
"Note: if you get the \"" { $snippet "COM error 0x8007000e" } "\", you need to call " { $link ole-initialize } " first." } ;
|
"Note: if you get the \"" { $snippet "COM error 0x8007000e" } "\", you need to call " { $link ole-initialize } " first." } ;
|
||||||
|
|
||||||
HELP: filecount-from-data-object
|
|
||||||
{ $values
|
|
||||||
{ "data-object" null }
|
|
||||||
{ "n" null }
|
|
||||||
}
|
|
||||||
{ $description "" } ;
|
|
||||||
|
|
||||||
HELP: filecount-from-hdrop
|
|
||||||
{ $values
|
|
||||||
{ "hdrop" null }
|
|
||||||
{ "n" null }
|
|
||||||
}
|
|
||||||
{ $description "" } ;
|
|
||||||
|
|
||||||
HELP: filenames-from-data-object
|
|
||||||
{ $values
|
|
||||||
{ "data-object" null }
|
|
||||||
{ "filenames" null }
|
|
||||||
}
|
|
||||||
{ $description "" } ;
|
|
||||||
|
|
||||||
HELP: filenames-from-hdrop
|
|
||||||
{ $values
|
|
||||||
{ "hdrop" null }
|
|
||||||
{ "filenames" null }
|
|
||||||
}
|
|
||||||
{ $description "" } ;
|
|
||||||
|
|
||||||
HELP: handle-data-object
|
|
||||||
{ $values
|
|
||||||
{ "handler" null } { "data-object" null }
|
|
||||||
{ "filenames" null }
|
|
||||||
}
|
|
||||||
{ $description "" } ;
|
|
||||||
|
|
||||||
HELP: listener-dragdrop
|
|
||||||
{ $class-description "" } ;
|
|
||||||
|
|
|
@ -47,10 +47,11 @@ TUPLE: listener-dragdrop hWnd last-drop-effect ;
|
||||||
: <listener-dragdrop> ( hWnd -- object )
|
: <listener-dragdrop> ( hWnd -- object )
|
||||||
DROPEFFECT_NONE listener-dragdrop boa ;
|
DROPEFFECT_NONE listener-dragdrop boa ;
|
||||||
|
|
||||||
|
<<
|
||||||
SYMBOL: +listener-dragdrop-wrapper+
|
SYMBOL: +listener-dragdrop-wrapper+
|
||||||
|
>>
|
||||||
|
|
||||||
<<
|
<<
|
||||||
|
|
||||||
{
|
{
|
||||||
{ IDropTarget {
|
{ IDropTarget {
|
||||||
[ ! HRESULT DragEnter ( IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD* pdwEffect )
|
[ ! HRESULT DragEnter ( IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD* pdwEffect )
|
||||||
|
@ -80,7 +81,6 @@ SYMBOL: +listener-dragdrop-wrapper+
|
||||||
]
|
]
|
||||||
} }
|
} }
|
||||||
} <com-wrapper> +listener-dragdrop-wrapper+ set-global
|
} <com-wrapper> +listener-dragdrop-wrapper+ set-global
|
||||||
|
|
||||||
>>
|
>>
|
||||||
|
|
||||||
: dragdrop-listener-window ( -- )
|
: dragdrop-listener-window ( -- )
|
||||||
|
|
43
build.sh
43
build.sh
|
@ -189,14 +189,6 @@ set_make() {
|
||||||
MAKE='make'
|
MAKE='make'
|
||||||
}
|
}
|
||||||
|
|
||||||
check_git_branch() {
|
|
||||||
BRANCH=`git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,'`
|
|
||||||
if [ "$BRANCH" != "master" ] ; then
|
|
||||||
$ECHO "git branch is $BRANCH, not master"
|
|
||||||
exit_script 3
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
check_installed_programs() {
|
check_installed_programs() {
|
||||||
ensure_program_installed chmod
|
ensure_program_installed chmod
|
||||||
ensure_program_installed uname
|
ensure_program_installed uname
|
||||||
|
@ -295,6 +287,17 @@ find_architecture() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
find_num_cores() {
|
||||||
|
$ECHO "Finding num cores..."
|
||||||
|
NUM_CORES=7ZZ
|
||||||
|
uname_s=`uname -s`
|
||||||
|
check_ret uname
|
||||||
|
case $uname_s in
|
||||||
|
CYGWIN_NT-5.2-WOW64 | *CYGWIN_NT* | *CYGWIN* | MINGW32*) NUM_CORES=$NUMBER_OF_PROCESSORS;;
|
||||||
|
*darwin* | *Darwin* | *linux* | *Linux*) NUM_CORES=$(getconf _NPROCESSORS_ONLN);;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
write_test_program() {
|
write_test_program() {
|
||||||
#! Must be 'echo'
|
#! Must be 'echo'
|
||||||
echo "#include <stdio.h>" > $C_WORD.c
|
echo "#include <stdio.h>" > $C_WORD.c
|
||||||
|
@ -356,6 +359,7 @@ set_factor_image() {
|
||||||
echo_build_info() {
|
echo_build_info() {
|
||||||
$ECHO OS=$OS
|
$ECHO OS=$OS
|
||||||
$ECHO ARCH=$ARCH
|
$ECHO ARCH=$ARCH
|
||||||
|
$ECHO NUM_CORES=$NUM_CORES
|
||||||
$ECHO WORD=$WORD
|
$ECHO WORD=$WORD
|
||||||
$ECHO DEBUG=$DEBUG
|
$ECHO DEBUG=$DEBUG
|
||||||
$ECHO FACTOR_BINARY=$FACTOR_BINARY
|
$ECHO FACTOR_BINARY=$FACTOR_BINARY
|
||||||
|
@ -429,6 +433,7 @@ parse_build_info() {
|
||||||
find_build_info() {
|
find_build_info() {
|
||||||
find_os
|
find_os
|
||||||
find_architecture
|
find_architecture
|
||||||
|
find_num_cores
|
||||||
set_cc
|
set_cc
|
||||||
find_word_size
|
find_word_size
|
||||||
set_factor_binary
|
set_factor_binary
|
||||||
|
@ -536,7 +541,8 @@ make_clean() {
|
||||||
}
|
}
|
||||||
|
|
||||||
make_factor() {
|
make_factor() {
|
||||||
invoke_make CC=$CC CXX=$CXX $MAKE_TARGET -j5
|
$ECHO "Building factor with $NUM_CORES cores"
|
||||||
|
invoke_make CC=$CC CXX=$CXX $MAKE_TARGET -j$NUM_CORES
|
||||||
}
|
}
|
||||||
|
|
||||||
make_clean_factor() {
|
make_clean_factor() {
|
||||||
|
@ -544,6 +550,15 @@ make_clean_factor() {
|
||||||
make_factor
|
make_factor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
current_git_branch() {
|
||||||
|
git rev-parse --abbrev-ref HEAD
|
||||||
|
}
|
||||||
|
|
||||||
|
checksum_url() {
|
||||||
|
branch=$(current_git_branch)
|
||||||
|
echo "http://downloads.factorcode.org/images/$branch/checksums.txt"
|
||||||
|
}
|
||||||
|
|
||||||
update_boot_images() {
|
update_boot_images() {
|
||||||
$ECHO "Deleting old images..."
|
$ECHO "Deleting old images..."
|
||||||
$DELETE checksums.txt* > /dev/null 2>&1
|
$DELETE checksums.txt* > /dev/null 2>&1
|
||||||
|
@ -551,7 +566,7 @@ update_boot_images() {
|
||||||
$DELETE $BOOT_IMAGE.{?,??} > /dev/null 2>&1
|
$DELETE $BOOT_IMAGE.{?,??} > /dev/null 2>&1
|
||||||
$DELETE temp/staging.*.image > /dev/null 2>&1
|
$DELETE temp/staging.*.image > /dev/null 2>&1
|
||||||
if [[ -f $BOOT_IMAGE ]] ; then
|
if [[ -f $BOOT_IMAGE ]] ; then
|
||||||
get_url http://downloads.factorcode.org/images/latest/checksums.txt
|
get_url $(checksum_url)
|
||||||
factorcode_md5=`cat checksums.txt|grep $BOOT_IMAGE|cut -f2 -d' '`
|
factorcode_md5=`cat checksums.txt|grep $BOOT_IMAGE|cut -f2 -d' '`
|
||||||
set_md5sum
|
set_md5sum
|
||||||
disk_md5=`$MD5SUM $BOOT_IMAGE|cut -f1 -d' '`
|
disk_md5=`$MD5SUM $BOOT_IMAGE|cut -f1 -d' '`
|
||||||
|
@ -568,9 +583,14 @@ update_boot_images() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boot_image_url() {
|
||||||
|
branch=$(current_git_branch)
|
||||||
|
echo "http://downloads.factorcode.org/images/$branch/$BOOT_IMAGE"
|
||||||
|
}
|
||||||
|
|
||||||
get_boot_image() {
|
get_boot_image() {
|
||||||
$ECHO "Downloading boot image $BOOT_IMAGE."
|
$ECHO "Downloading boot image $BOOT_IMAGE."
|
||||||
get_url http://downloads.factorcode.org/images/latest/$BOOT_IMAGE
|
get_url $(boot_image_url)
|
||||||
}
|
}
|
||||||
|
|
||||||
get_url() {
|
get_url() {
|
||||||
|
@ -610,7 +630,6 @@ install() {
|
||||||
|
|
||||||
update() {
|
update() {
|
||||||
get_config_info
|
get_config_info
|
||||||
check_git_branch
|
|
||||||
git_fetch_factorcode
|
git_fetch_factorcode
|
||||||
backup_factor
|
backup_factor
|
||||||
make_clean_factor
|
make_clean_factor
|
||||||
|
|
|
@ -9,11 +9,9 @@ IN: git.tests
|
||||||
|
|
||||||
: with-empty-test-git-repo ( quot -- )
|
: with-empty-test-git-repo ( quot -- )
|
||||||
'[
|
'[
|
||||||
[
|
|
||||||
{ "git" "init" } run-process drop
|
{ "git" "init" } run-process drop
|
||||||
@
|
@
|
||||||
] cleanup-unique-directory
|
] with-test-directory ; inline
|
||||||
] with-temp-directory ; inline
|
|
||||||
|
|
||||||
: with-zero-byte-file-repo ( quot -- )
|
: with-zero-byte-file-repo ( quot -- )
|
||||||
'[
|
'[
|
||||||
|
|
Loading…
Reference in New Issue