Starting at _dev/avida-notebook/AvidaResourceNotebook git clone https://github.com/devosoft/avida.git cd avida git checkout AvidaED-Web git submodule init git submodule update cat .gitmodules to see what was put in .getmodules The modules are in the /lib folder ./build_avida avida-ed #puts in the cbuild/work folder more options now. Do all the git stuff from the terminal. X-code does not always play nicely with git DRIVER use a feedback object - user feedback - - error - - info - - warning - - data new for Avida-ED are there any messages that need to be sent Logic of the asychreous state - -previous grid update (stats that av_ui requests - handles messages from av_ui - step update - stuff goes into evens. - still event driven application webDriverActions.h - writes to feedback rather than to a file. Only that can be sent to av_ui come from WebDriverActions.h place to get info from avida to av_ui can read in json and write json messaging.h - interface between javascript and avida - untility to grab stuff. Might also look in applications cd apps 516 cd viewer-webed 518 cd resources prepend.js calls avida-messages.js avida-messages.js would contain the que, but I dont’ send messages fast enough for there to be a que Debug stuff is in avida-messages.js. the counterpart is WebDebug.h macro called debug mode. Build Script ./build_avida avida-ed (from main avida folder) Need C++ 11 or 14 installed. gcc 45 and all of clang handles it setting up Empscripten again. emsdk_portable. emsdk script handles everything emsdk update reaches out and grabs the info ./emsdk list tells what is available and what is installed. node js clang need emscripten out of tagged releases right now. ./emsdk install (what ever need to pull in) which packages emsdk environment. put in bash r c file. puts in the right environmental files set ./emsdk_set_env.sh ———————————————————————————————————————————————————— Emscripten install notes ———————————————————————————————————————————————————— ./emsdk update ./emsdk list #to see what is available ./emsdk install latest to install the latest version ./emsdk activate latest needed to actually use the stuff source ./emsdk_env.sh to set up shell variables Then need to edit .profile in the home folder to make sure emscripten is in the path that is put the following line in the .profile file with the correct path source /Users/dianeblackwood/_dev/emscripten/emsdk-portable/emsdk_env.sh ———————————————————————————————————————————————————— To check on the status of cmake do which cmake on the command prompt. ———————————————————————————————————————————————————— Back to compiling Avida. . . . At the command prompt in the following folder /Users/dianeblackwood/_dev/avida/ First remove the cbuild folder rm -rf cbuild —— note rm -rf * will delete all files/folders on the disk rm - remove -rf recursive forcefully ./build_avida avida-ed-web is the correct build for the web based branch To update avida to use the latest version of av_ui ./update_avui.sh ———————————————————————————————————————————————————— X-Code ———————————————————————————————————————————————————— use [command][shift]o to search for a file or object anywhere in the project use spy glass on tool bar upper left to find a string — to build using xcode Under Applications in the project navigator - click on viewer-webed then in center area look under TARGETS - click on viewer-webed The arguments must be $(ACTION) avida-ed-web icons on uppper left (cartoon dialog = report navigator) Product menu -> Clean delete the cbuild folder. then hit play button (right pointing triangle) ———————————————————————————————————————————————————— Cmake ———————————————————————————————————————————————————— cmake --version ———————————————————————————————————————————————————— Path ———————————————————————————————————————————————————— changing files to update the path. env|grep -i path to list the path var export PATH=“${PATH}:/new/path” per session or modify ~/.profile w/ above source the file or open new shell Change the .profile file in the home directory cd to get to home directory ls -a to display .files open a new terminal session or type source .profile to get the new path or any other new stuff in .profile echo ${PATH} to see the current path ———————————————————————————————————————————————————— Node.js was installed at /usr/local/bin/node npm was installed at /usr/local/bin/npm Make sure that /usr/local/bin is in your $PATH. ———————————————————————————————————————————————————— VIM ———————————————————————————————————————————————————— vim filename to open vim with a certain file. [esc]i to insert [escape] to leaven insert mode [shift]:wq to have command prompt; write; quit ———————————————————————————————————————————————————— command prompt ———————————————————————————————————————————————————— md5 build_avida to get hash number pwr to get what folder one is in cd to change folder to home or root cat to concatenate files, but just list one then it gives a listing ls to get a folder listing ls -alh listing with all files; long version; human readable file size ls -lh long version; nameOfExecutableFile --version to get a version number which nameOfFile mv move to change the file or folder name. && to put more than one command on the same line. if one command fails it does not do the next command & to something in background as a batch can use | to redirect stuff to another program 3 streams = input stream, output stream and error stream ln creates a soft link -s means soft ln -s ~/_dev/avida/cbuild/work/ av_ui file/dir soft link points to nothing if file deleted. hard link still retains the block. if there are any hard links to a file it still exists, bust with one fewer names soft link does not retain the file if the file is deleted (file exists as long as there is the original name or a hard link The original name is a hard link sort of man ls gives you the manual for ls = man works for many other commands. q to quit out of man less and more work the same way and show you part of a file. ———————————————————————————————————————————————————— Error logging 2017 August 25 ———————————————————————————————————————————————————— av_ui (web page) ^ | v Avida Core (Web worker) ^ | | v WS_server (python) - /Logger (web page) localhost:5000/logger - /Command localhost:5000/command - /executor (web page) a way to send commands without using av_ui localhost:5000/avida /avida on lines between Avida CORE and WS_Server and WS_Server and /executor AEDBridge (name of the project) - WebSocktes for duplex coms - Needs server provided by flask - python 3 logger displays stuff that is normally disabled in avida. C_ (MODE, STMT, VERBOSITY) displays on a webpage. ———— To enable - modify WebDebug.h to turn on debug statements - modify messages.js to enable websocket ———— Redis is the name of the database all stored in memory that the WS_SERVER uses. This is all in a python virtual environment. ——————— ———————————————————————————————————————————————————— Redis 2017 August 25 ———————————————————————————————————————————————————— ./redis-server --port 5060 ———————————————————————————————————————————————————————————————————————————————————————————————————————— Git help for Github ———————————————————————————————————————————————————————————————————————————————————————————————————————— git checkout build_avida to revert back version on website. https://chris.beams.io/posts/git-commit/ git reset --hard to get rid of changes made to local folder git submodule init && git submodule update git checkout AvidaED-Web puts me in the AvidaED-web branch https://chris.beams.io/posts/git-commit/ ———————————————————————————————————————————————————————————————————————————————————————————————————————— Changing how we calculate averages for population stats 2017 August 25 ———————————————————————————————————————————————————————————————————————————————————————————————————————— #In the root directory ./update_avui.sh gets latest av_ui from git hub an stages them to go in the next update #Then build #When tested add the changes and commit git add apps/viewer-webed/src/WebDriverActions.h git add cbuild/bin/* git commit #Add comments in editor when it pops up and exit git commit -m “ the comments “ git push #Email Diane Matt uses Dr. Gein for a dentist - in his 70s and is semi-retired Yancy Tygesen on Jolly Road Okemos oral surgeon ———— Avida building avida cleanly Commit change in Avida - Clean builds - - Remove cbuild folder - - - rm –rf cbuild or ./build_avida clean - - now actually build avida for regular C ./build_avida - - now build avida for avida-ed-web (emscripten) ./build_avida clean && ./build_avida avida-ed-web