--- modules/damieng/doc/graphical_editor.tex 2015/04/27 18:12:47 1.2 +++ modules/damieng/doc/graphical_editor.tex 2015/05/14 17:51:10 1.4 @@ -62,6 +62,11 @@ The Dart editor, while not necessary, is Other Linux distros are not officially supported. While it is possible to compile the Dart SDK, compiling Dartium is a lot harder and it is harder to debug without Dartium. +There is an unofficial PPA to install it on Ubuntu: + \texttt{https://launchpad.net/~hachre/+archive/dart} +For other platforms, a package can be downloaded from + \texttt{https://www.dartlang.org/downloads/} + Once Dart Editor is started, the directories \texttt{loncapa/modules/damieng/graphical_editor/daxe} and \texttt{loncapa/modules/damieng/graphical_editor/loncapa\_daxe} should be opened with the menu \texttt{File-Open existing Folder...}. They will reopen automatically the next time Dart Editor is opened. The \texttt{Run-Manage Launches...} menu can be used to configure launches with Dartium and other browsers (Dartium is a version of Chromium with an enabled Dart VM). Dartium is good for development, but testing with other browsers (which requires an automatic conversion into Javascript) is also necessary. @@ -70,11 +75,13 @@ The following text should be used in the This will start the editor with an empty file. A file can also be edited by specifying its relative path (from the web directory) in the \\* URL: \texttt{/loncapa\_daxe/web/loncapa\_daxe.html?file=templates/problems/numerical.problem.xml\&config=config/loncapa\_config.xml} +For JSME to work, it should be uncompressed from \texttt{loncapa\_daxe/JSME_2015-03-03_xsiframe.zip}, and the \texttt{jsme} directory should be moved to \texttt{loncapa\_daxe/web}. + Note that was a bug in the Dart SDK 1.5 that prevented the use of Daxe in Javascript (Dart Issue 19888). It is fixed in v1.6. Since early 2013 (before version 1), there has been some issues with the conversion from Dart to Javascript, but Google has been fast to fix them when they were reported at \url{https://code.google.com/p/dart/issues/list}. \subsection{Export to Javascript} -Note that an export is not necessary to just test Daxe with Javascript (as explained above). -To export the Javascript code and related files for use in LON-CAPA, select a LON-CAPA Daxe file (as opposed to Daxe) in the Dart editor, -and select the menu \texttt{Tools - Pub Build (generates JS)}. A whole directory is built in \texttt{loncapa\_daxe/build}. -This does not create a directory with a minimal set of files. \texttt{loncapa\_daxe/build.sh} can be used for that. +Note that an export is not necessary to just test Daxe with Javascript (it can be done with Dart Editor, as explained above). + +To export the minimized Javascript code and related files for use in LON-CAPA, use the \texttt{loncapa\_daxe/build.sh} script. It creates a \texttt{dist} directory with everything needed to run LON-CAPA Daxe in any web browser. Note that depending on the browser, it might not work with "file://" URLs (because of security restrictions), so the contents have to be put on a web server first. +