Mercurial > hg > dml-home
changeset 0:7d34f4b6df69
Initial check-in (partial)
author | samer |
---|---|
date | Sun, 18 Jan 2015 16:18:01 +0000 |
parents | |
children | bf3354229297 |
files | bin/forever bin/runin etc/.setup_as_root.sh.swp etc/rc.local etc/setup.sh etc/setup_as_dml.sh etc/setup_as_root.sh etc/swipl-build.patch etc/xorg.conf matlab/arrows matlab/audio matlab/dsp matlab/general matlab/graphics matlab/padd.m matlab/pitch matlab/sched matlab/sequences matlab/signals matlab/sinks matlab/startup.m matlab/windows |
diffstat | 22 files changed, 246 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/forever Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,7 @@ +#!/bin/sh +# Usage: forever <command> <arg> ... +# This will run a command plus any arguments repeatedly for ever unless command returns non-zero exit code +if $*; then + exec forever $* +fi +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/runin Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,8 @@ +#!/bin/sh +# usage: runin <directory> <command> <args> ... +# Runs <command> after cd-ing into <directory> +cd $1 +shift 1 +stty ek +exec $* +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/rc.local Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,17 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +if [ -x ~dml/.boot ]; then + echo "Executing boot script for user dml" + sudo -u dml mkdir -p ~dml/var/log + sudo -u dml -H bash -l -c '~/.boot >> ~/var/log/boot.log' +fi +exit 0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/setup.sh Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,2 @@ +sudo sh ./setup_as_root.sh +sh ./setup_as_dml.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/setup_as_dml.sh Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,25 @@ +#!/bin/sh + +echo 'THIS IS NOT READY YET!' +exit 1 + + +#build SWI Prolog +cd /tmp +wget http://www.swi-prolog.org/download/devel/src/pl-7.1.28.tar.gz +tar xzf pl-7.1.28.tar.gz +cd pl-7.1.28 +cp build.templ build +patch build ~/etc/swipl-build.patch +./build + +# DOWNLOADS FROM REPOs + +cd ~/src/github +git clone --recursive https://github.com/humdrum-tools/humdrum-tools + +cd ~/src/hg +hg clone <dml-cliopatria> +hg clone <ishara> + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/setup_as_root.sh Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,54 @@ +#!/bin/sh + +echo 'THIS IS NOT READY YET!' +exit 1 +# ---------------------- CONFIGURATION PART ---------------------- + +HAVE_MATLAB=yes +SWI_GUI=no + +# ------------------- END OF CONFIGURATION PART ------------------ +# APT GET installs +apt-get install build-essential autoconf mercurial git pkg-config +apt-get install libossp-uuid-dev libssl-dev zlib1g-dev unixodbc-dev libsmf-dev libsqlite3-dev +apt-get install graphviz lilypond pdf2svg texlive-font-utils p7zip-full +apt-get install vorbis-tools lame sox faad flac libsox-fmt-all fluidsynth + +# Only if you want SWI Prolog GUI +#sudo apt-get install libxpm-dev libxt-dev libjpeg-dev libx11-dev libxft-dev libxinerama1 libfontconfig1-dev + +# If you have MATLAB +if [ $HAVE_MATLAB == yes ]; then + MATLAB_ROOT=$(matlab -e | grep '^MATLAB=') + apt-get csh libtritonus-java libvorbisspi-java libmp3spi-java + ln -s /lib/x86_64-linux-gnu/libc.so.6 /lib64 + ln -s $(MATLAB_ROOT)/bin/matlab /usr/local/bin + + # MATLAB (R2012a at least) looks for Java extension jars in this directory + mkdir -p /usr/java/packages/lib/ext + # NB - there may be some duplication of service providers here - I'm not sure + # which of them works best. + ln -s /usr/shara/java/{vorbisspi,mp3spi}.jar /usr/java/packages/lib/ext + ln -s /usr/shara/java/tritonus_{aos,core,jorbis,mp3,remaining,share}.jar /usr/java/packages/lib/ext + + # need to add native library paths to this file + if [ ! grep '/usr/lib/jni' $(MATLAB_ROOT)/toolbox/local/librarypath.txt ]; then + echo '/usr/lib/jni' >> $(MATLAB_ROOT)/toolbox/local/librarypath.txt + end +fi + +#if [ -x ~dml/.boot ]; then +# sudo -u dml -H mkdir -p ~dml/var/log +# sudo -u dml -H bash -l -c '~/.boot >> ~/var/log/boot.log' +#fi + +if $SETUP_X; then + if $HEADLESS; then + apt-get install xinit xserver-xorg-video-dummy + cp ~/etc/xorg.conf /etc/X11 + else + apt-get install xinit blackbox + fi + + dpkg-reconfigure x11-common +fi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/swipl-build.patch Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,24 @@ +--- build.templ 2014-12-19 09:22:30.000000000 +0000 ++++ build 2014-11-17 15:10:30.621687200 +0000 +@@ -16,9 +16,8 @@ + # remainder of the commandline as privilaged user. E.g., if you change + # PREFIX to /usr/local you typically must change SUDO to "sudo" + +-PREFIX=$HOME +-SUDO= +-#SUDO="sudo" ++PREFIX=/usr/local ++SUDO="sudo" + + # [EDIT] Version of make to use. This must be GNU-make. On many Unix + # systems this is installed as 'gmake'. On most GNU-based systems (e.g., +@@ -109,7 +108,7 @@ + # export PKG= + + # [EDIT] Packages to skip. Leaving it blank compiles all default packages. +-# export DISABLE_PKGS="jpl ssl odbc utf8proc" ++export DISABLE_PKGS="jasmine PDT R jpl" + + # [EDIT] Packages to add. + # export EXTRA_PKGS="db ltx2htm space" +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/xorg.conf Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,50 @@ +# This xorg configuration file is meant to be used +# to start a dummy X11 server. + +Section "ServerFlags" + Option "DontVTSwitch" "true" + Option "AllowMouseOpenFail" "true" + Option "PciForceNone" "true" + Option "AutoEnableDevices" "false" + Option "AutoAddDevices" "false" +EndSection + +Section "Device" + Identifier "DummyDevice" + Driver "dummy" + VideoRam 16384 + Option "NoDDC" "true" + Option "IgnoreEDID" "true" +EndSection + +Section "InputDevice" + Identifier "DummyKeyboard" + Option "CoreKeyboard" "true" + Driver "void" +EndSection + +Section "Monitor" + Identifier "DummyMonitor" + HorizSync 10.0 - 300.0 + VertRefresh 10.0 - 200.0 + Modeline "800x600@25" 14.50 800 832 880 912 600 614 617 631 +EndSection + +Section "Screen" + Identifier "Screen0" + Monitor "DummyMonitor" + Device "DummyDevice" + DefaultDepth 24 + SubSection "Display" + Viewport 0 0 + Depth 24 + Modes "800x600" + Virtual 800 600 + EndSubSection +EndSection + +Section "ServerLayout" + Identifier "DummyLayout" + Screen "Screen0" + InputDevice "DummyKeyboard" +EndSection
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/matlab/arrows Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,1 @@ +../src/hg/ishara/arrows \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/matlab/audio Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,1 @@ +../src/hg/ishara/audio \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/matlab/dsp Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,1 @@ +../src/hg/ishara/dsp \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/matlab/general Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,1 @@ +../src/hg/ishara/general \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/matlab/graphics Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,1 @@ +../src/hg//ishara/graphics \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/matlab/padd.m Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,13 @@ +function padd(varargin) +% padd - Add directories to Matlab path. +% +% Directories are interpreted relative to the directory where this +% function is found. + +Root=fileparts(which('padd')); +for i=1:nargin + arg = varargin{i}; + disp(['adding path ' arg]); + path(fullfile(Root,arg),path); +end; +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/matlab/pitch Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,1 @@ +../src/hg//ishara/pitch \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/matlab/sched Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,1 @@ +../src/hg/ishara/sched \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/matlab/sequences Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,1 @@ +../src/hg/ishara/sequences \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/matlab/signals Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,1 @@ +../src/hg/ishara/signals \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/matlab/sinks Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,1 @@ +../src/hg/ishara/sinks \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/matlab/startup.m Sun Jan 18 16:18:01 2015 +0000 @@ -0,0 +1,35 @@ +% startup script. + +padd general graphics graphics/colour +padd sequences signals sinks arrows audio dsp pitch +%padd opt dsp/synth +%padd stats stats/models time stats/markov +%padd cluster distance sched arrows/dsp arrows/stats +%padd 3rdparty/lightspeed +general all + +whitebg(0,'k'); +setcolours('k',0.75*white(1)); +setuicolours(0.15*[1,1,1],0.75*white(1)); + +set(0,'DefaultLineMarkerSize',3); +%set(0,'DefaultAxesFontSize',9); +%set(0,'DefaultAxesFontName','Helvetica'); +%set(0,'DefaultLineLineWidth',0.3); +%set(0,'DefaultAxesLineWidth',0.2); +%set(0,'DefaultLineLineSmoothing','on'); % antialiased lines + + +set(0,'DefaultFigurePaperType','A4'); +set(0,'DefaultFigureMenubar','none'); +set(0,'DefaultFigureColormap',hot(256)); + +% allows undocumented properties to show up in get/set +%set(0,'HideUndocumented','off'); + +opengl neverselect +[status,hostname]=system('hostname'); + +setup_ishara_java + +%addpath(genpath(fullfile(matlabroot,'toolbox','plotly')),'-end');