Merge git://factorcode.org/git/factor

db4
Doug Coleman 2007-12-13 15:56:30 -06:00
commit c4a0937193
10 changed files with 67 additions and 16 deletions

View File

@ -3,7 +3,7 @@
USING: kernel.private ; USING: kernel.private ;
IN: kernel IN: kernel
: version ( -- str ) "0.91" ; foldable : version ( -- str ) "0.92" ; foldable
! Stack stuff ! Stack stuff
: roll ( x y z t -- y z t x ) >r rot r> swap ; inline : roll ( x y z t -- y z t x ) >r rot r> swap ; inline

View File

@ -195,11 +195,11 @@ TUPLE: one-word-elt ;
M: one-word-elt prev-elt M: one-word-elt prev-elt
drop drop
[ [ f -rot >r 1- r> (prev-word) ] (word-elt) ] (prev-char) ; [ f -rot >r 1- r> (prev-word) ] (word-elt) ;
M: one-word-elt next-elt M: one-word-elt next-elt
drop drop
[ [ f -rot (next-word) ] (word-elt) ] (next-char) ; [ f -rot (next-word) ] (word-elt) ;
TUPLE: word-elt ; TUPLE: word-elt ;

View File

@ -0,0 +1,13 @@
USING: tools.deploy.config ;
H{
{ deploy-compiler? t }
{ deploy-word-props? f }
{ deploy-ui? t }
{ deploy-reflection 1 }
{ deploy-name "springies.models.2x2snake" }
{ deploy-c-types? f }
{ deploy-word-defs? f }
{ "stop-after-last-window?" t }
{ deploy-math? t }
{ deploy-io 1 }
}

View File

@ -30,6 +30,16 @@ tools.test.inference tools.test.ui models ;
] with-grafted-gadget ] with-grafted-gadget
] unit-test ] unit-test
[ "bar" ] [
<editor> "editor" set
"editor" get [
"bar\nbaz quux" "editor" get set-editor-string
{ 0 3 } "editor" get editor-caret set-model
"editor" get select-word
"editor" get gadget-selection
] with-grafted-gadget
] unit-test
{ 0 1 } [ <editor> ] unit-test-effect { 0 1 } [ <editor> ] unit-test-effect
"hello" <model> <field> "field" set "hello" <model> <field> "field" set

View File

@ -320,11 +320,6 @@ M: editor gadget-text* editor-string % ;
: end-of-document ( editor -- ) T{ doc-elt } editor-next ; : end-of-document ( editor -- ) T{ doc-elt } editor-next ;
: selected-word ( editor -- string )
dup gadget-selection? [
dup T{ one-word-elt } select-elt
] unless gadget-selection ;
: position-caret ( editor -- ) : position-caret ( editor -- )
mouse-elt dup T{ one-char-elt } = mouse-elt dup T{ one-char-elt } =
[ drop dup extend-selection dup editor-mark click-loc ] [ drop dup extend-selection dup editor-mark click-loc ]
@ -408,6 +403,11 @@ editor "caret-motion" f {
: select-word T{ one-word-elt } select-elt ; : select-word T{ one-word-elt } select-elt ;
: selected-word ( editor -- string )
dup gadget-selection?
[ dup select-word ] unless
gadget-selection ;
: select-previous-character T{ char-elt } editor-select-prev ; : select-previous-character T{ char-elt } editor-select-prev ;
: select-next-character T{ char-elt } editor-select-next ; : select-next-character T{ char-elt } editor-select-next ;

View File

@ -1,15 +1,21 @@
source misc/version.sh
TARGET=$1 TARGET=$1
if [ "$TARGET" = "x86" ]; then if [ "$1" = "x86" ]; then
CPU="x86.32" CPU="x86.32"
TARGET=macosx-x86-32
else else
CPU="ppc" CPU="macosx-ppc"
TARGET=macosx-ppc
fi fi
make macosx-$TARGET BOOT_IMAGE=boot.$CPU.image
Factor.app/Contents/MacOS/factor -i=boot.$CPU.image -no-user-init wget http://factorcode.org/images/$VERSION/$BOOT_IMAGE
make $TARGET
Factor.app/Contents/MacOS/factor -i=$BOOT_IMAGE -no-user-init
VERSION=0.91
DISK_IMAGE_DIR=Factor-$VERSION DISK_IMAGE_DIR=Factor-$VERSION
DISK_IMAGE=Factor-$VERSION-$TARGET.dmg DISK_IMAGE=Factor-$VERSION-$TARGET.dmg
@ -24,3 +30,6 @@ find core extra fonts misc unmaintained -type f \
-exec ./cp_dir {} $DISK_IMAGE_DIR/Factor/{} \; -exec ./cp_dir {} $DISK_IMAGE_DIR/Factor/{} \;
hdiutil create -srcfolder "$DISK_IMAGE_DIR" -fs HFS+ \ hdiutil create -srcfolder "$DISK_IMAGE_DIR" -fs HFS+ \
-volname "$DISK_IMAGE_DIR" "$DISK_IMAGE" -volname "$DISK_IMAGE_DIR" "$DISK_IMAGE"
ssh linode mkdir -p w/downloads/$VERSION/
scp $DISK_IMAGE linode:w/downloads/$VERSION/

7
misc/source-release.sh Normal file
View File

@ -0,0 +1,7 @@
source misc/version.sh
rm -rf .git
cd ..
tar cfz Factor-$VERSION.tar.gz factor/
ssh linode mkdir -p w/downloads/$VERSION/
scp Factor-$VERSION.tar.gz linode:w/downloads/$VERSION/

1
misc/version.sh Normal file
View File

@ -0,0 +1 @@
export VERSION=0.92

View File

@ -1,19 +1,31 @@
source misc/version.sh
CPU=$1 CPU=$1
VERSION=0.91
if [ "$CPU" = "x86" ]; then if [ "$CPU" = "x86" ]; then
FLAGS="-no-sse2" FLAGS="-no-sse2"
fi fi
make windows-nt-x86 make windows-nt-x86
wget http://factorcode.org/dlls/freetype6.dll
wget http://factorcode.org/dlls/zlib1.dll
wget http://factorcode.org/images/$VERSION/boot.x86.32.image
CMD="./factor-nt -i=boot.x86.32.image -no-user-init $FLAGS" CMD="./factor-nt -i=boot.x86.32.image -no-user-init $FLAGS"
echo $CMD echo $CMD
$CMD $CMD
rm -rf .git/
rm -rf Factor.app/ rm -rf Factor.app/
rm -rf vm/ rm -rf vm/
rm -f Makefile rm -f Makefile
rm -f cp_dir rm -f cp_dir
rm -f boot.*.image rm -f boot.*.image
FILE=Factor-$VERSION-win32-$CPU.zip
cd .. cd ..
zip -r Factor-$VERSION-win32-$CPU.zip Factor/ zip -r $FILE Factor/
ssh linode mkdir -p w/downloads/$VERSION/
scp $FILE linode:w/downloads/$VERSION/

View File

@ -72,7 +72,6 @@
#elif defined(FACTOR_ARM) #elif defined(FACTOR_ARM)
#include "os-linux-arm.h" #include "os-linux-arm.h"
#elif defined(FACTOR_AMD64) #elif defined(FACTOR_AMD64)
#include "os-unix-ucontext.h"
#include "os-linux-x86-64.h" #include "os-linux-x86-64.h"
#else #else
#error "Unsupported Linux flavor" #error "Unsupported Linux flavor"