Closed longsoft-dev closed 14 years ago
Hi,
The examples aren't supposed to be built that way. If you want to check out the visualization tests (the examples are included in the tests) then you can read this wiki: http://wiki.github.com/philogb/jit/getting-started . If you want to create an entire build of the toolkit then you should execute
python make.py
And a folder with the examples will be created (in Linux/Mac).
Hi, I guess you missed some point of my comment. Instead of python make.py I run python make.dos.py examples because I'm using Windows. Anyway, have you tried the visualization in IE?
Yes, but the examples command creates an Examples folder that doesn't work like you'd expect because the examples keyword is not supposed to be used without creating an entire build afterwards :) Yes I did test the examples with a complete build and they seem to work fine. You just have to include the excanvas.js file found in the Extras folder. Perhaps you can hand-code the path to that file in the Examples folder you created with make.dos.py.
Hi philogb, I would be surprised if you passed the test in IE 6. I traced the problem and found it was actually caused by the extra comma in line 307 of Icicle.js. As indicated in http://github.com/philogb/jit/issues#issue/27, this breaks IE as IE is very picky about the syntax. After I fixed that, it worked in IE now.
FYI, the way I built examples also works a treat probably because I forgot to tell you that before run python make.dos.py examples, I have also run python build.py > jit.js :)
Thanks a lot for the heads up :)
Check out the latest version as of Jun 17 2010, run Python 2.6.5: > python make.dos.py examples
Then in the generated Examples directory run any example?.html, it works in Firefox and Chrome, but broken in IE 6/8.
For someone who is interested, make.dos.py is a copy of make.py except that some system commands were replaced with those of windows, contents as following:
include libraries
from os import system, walk from shutil import copy import sys, re
from tests import tests_model from serve import render from build import Build
YC = 'yuicompressor-2.4.2.jar' EXCLUDES = ['Source/Extras', 'Source/Layouts', 'Source/Options/Options.js' 'Source/Core/Fx.js', 'Source/Graph/Graph.Geom.js']
def main(): if 'docs' in sys.argv: make_docs() if 'examples' in sys.argv: make_examples() if 'examples-fancy' in sys.argv: make_examples(fancy=True) if 'build' in sys.argv: make_build() if 'build-fancy' in sys.argv: make_build(fancy=True)
def make_docs(): system("perl "
def make_examples(fancy=False):
clean examples folder
copy css base files
iterate over the examples
create example folder
copy some extra files
def make_example(viz, ex, i, count, fancy):
insert the example js file
render the html file
create syntax highlighted code page
def make_build(fancy=False): system('del /q Jit*') print "Building Examples..." make_examples(fancy) system('xcopy Examples Jit /e/y') print "Done. Building Extras..." system('md Jit\Extras && copy /y Extras\excanvas.js Jit/Extras\excanvas.js') print "Done. Building Library..." lib = Build().build() license = open('LICENSE', 'r').read() f = open('Jit/jit.js', 'w') f.write(license) f.write(lib) f.close() print "Done. Compressing Library..." f = open('Jit/jit-yc.js', 'w') f.write(license) f.close() system('java -jar Extras/' + YC + ' Jit/jit.js >> Jit/jit-yc.js') print "Done. Zipping..." system('del Jit.zip') system('C:\utils\7-Zip\7z.exe a Jit.zip Jit/') print "Done, I guess." if name == "main": main()