|
@@ -42,8 +42,7 @@ Usage: $0 [-L level] [-l lib1,lib2...] [-i file] [-m class] [-M file]
|
|
where level is:
|
|
where level is:
|
|
|
|
|
|
KERNEL - a reasonable level for server side programs or libraries.
|
|
KERNEL - a reasonable level for server side programs or libraries.
|
|
- PARSER - if you need to parse stuff, includes PetitParser etc.
|
|
|
|
- COMPILER - if you need to compile Jtalk code.
|
|
|
|
|
|
+ COMPILER - if you need to compile, import or export Jtalk code.
|
|
CANVAS - if you need HTML DOM manipulation, typical for client side.
|
|
CANVAS - if you need HTML DOM manipulation, typical for client side.
|
|
JQUERY - if you want JQuery stuff on top of Canvas.
|
|
JQUERY - if you want JQuery stuff on top of Canvas.
|
|
IDE - if you are extending the IDE with new tools etc.
|
|
IDE - if you are extending the IDE with new tools etc.
|
|
@@ -92,7 +91,7 @@ Usage: $0 [-L level] [-l lib1,lib2...] [-i file] [-m class] [-M file]
|
|
Compile Hello.st to Hello.js and create complete program called
|
|
Compile Hello.st to Hello.js and create complete program called
|
|
Program.js and adding a call to class method #main in class Hello:
|
|
Program.js and adding a call to class method #main in class Hello:
|
|
|
|
|
|
- jtalkc -N -m Hello Hello.st Program
|
|
|
|
|
|
+ jtalkc -m Hello Hello.st Program
|
|
|
|
|
|
Compile two .st files into corresponding .js files,
|
|
Compile two .st files into corresponding .js files,
|
|
and link with specific myboot.js, myKernel.js, myinit.js
|
|
and link with specific myboot.js, myKernel.js, myinit.js
|
|
@@ -112,10 +111,9 @@ fi
|
|
# Define our predefined library combinations
|
|
# Define our predefined library combinations
|
|
BOOT="boot"
|
|
BOOT="boot"
|
|
KERNEL="$BOOT Kernel"
|
|
KERNEL="$BOOT Kernel"
|
|
-PARSER="$KERNEL Parser"
|
|
|
|
-COMPILER="$PARSER parser Compiler"
|
|
|
|
-CANVAS="$COMPILER Canvas"
|
|
|
|
-JQUERY="$COMPILER JQuery"
|
|
|
|
|
|
+COMPILER="$KERNEL Parser parser Compiler"
|
|
|
|
+CANVAS="$KERNEL Canvas"
|
|
|
|
+JQUERY="$CANVAS JQuery"
|
|
IDE="$JQUERY IDE SUnit Examples"
|
|
IDE="$JQUERY IDE SUnit Examples"
|
|
|
|
|
|
# Predefined initializer
|
|
# Predefined initializer
|
|
@@ -203,7 +201,6 @@ for FILE in $LOAD
|
|
do
|
|
do
|
|
resolvejs $FILE
|
|
resolvejs $FILE
|
|
TOLOAD="$TOLOAD $RESOLVED"
|
|
TOLOAD="$TOLOAD $RESOLVED"
|
|
- TOADD="$TOADD $RESOLVED"
|
|
|
|
done
|
|
done
|
|
|
|
|
|
# Resolve COMPILER
|
|
# Resolve COMPILER
|
|
@@ -212,10 +209,18 @@ do
|
|
resolvejs $FILE
|
|
resolvejs $FILE
|
|
TOCOMPILER="$TOCOMPILER $RESOLVED"
|
|
TOCOMPILER="$TOCOMPILER $RESOLVED"
|
|
done
|
|
done
|
|
-# Add supplied libraries to load (they are already resolved)
|
|
|
|
|
|
+
|
|
|
|
+# Add supplied libraries we have not already loaded (they are already resolved)
|
|
|
|
+#for FILE in $EXTRA
|
|
|
|
+#do
|
|
|
|
+# resolvejs $FILE
|
|
|
|
+# TOEXTRA="$TOEXTRA $RESOLVED"
|
|
|
|
+#done
|
|
|
|
+
|
|
TOCOMPILER="$TOCOMPILER$TOLOAD"
|
|
TOCOMPILER="$TOCOMPILER$TOLOAD"
|
|
-THEREST="init $JTALK/bin/$NODECOMPILE"
|
|
|
|
|
|
+
|
|
# Resolve init and nodecompile
|
|
# Resolve init and nodecompile
|
|
|
|
+THEREST="init $JTALK/bin/$NODECOMPILE"
|
|
for FILE in $THEREST
|
|
for FILE in $THEREST
|
|
do
|
|
do
|
|
resolvejs $FILE
|
|
resolvejs $FILE
|
|
@@ -223,7 +228,7 @@ do
|
|
done
|
|
done
|
|
|
|
|
|
# Add supplied libraries
|
|
# Add supplied libraries
|
|
-LIBS="$TOBASE $TOADD"
|
|
|
|
|
|
+LIBS="$TOBASE $TOLOAD"
|
|
|
|
|
|
# Get a unique tempdir and make it get auto removed on exit
|
|
# Get a unique tempdir and make it get auto removed on exit
|
|
TMPDIR=`mktemp -d jtalkc.XXXXXX`
|
|
TMPDIR=`mktemp -d jtalkc.XXXXXX`
|
|
@@ -274,7 +279,7 @@ done
|
|
cat $TOCOMPILER > $TMPDIR/compiler.js
|
|
cat $TOCOMPILER > $TMPDIR/compiler.js
|
|
|
|
|
|
# Compile all collected .st files to .js
|
|
# Compile all collected .st files to .js
|
|
-echo "Loading libraries$TOOURCOMPILER and compiling ..."
|
|
|
|
|
|
+echo "Loading libraries$TOCOMPILER and compiling ..."
|
|
node $TMPDIR/compiler.js $DEPLOY $SUFFIX $COMPILE
|
|
node $TMPDIR/compiler.js $DEPLOY $SUFFIX $COMPILE
|
|
|
|
|
|
# Verify all .js files corresponding to .st files were created, otherwise exit
|
|
# Verify all .js files corresponding to .st files were created, otherwise exit
|