First of all, as I explain more thoroughly some lines later, it's not necessary to compile anything - MlRawViewer will run as it is, as Python is an interpreted Language - As long as all necessary python libs are installed - and their dependencies - maybe there has to be compiled something..
I have made a basic tutorial how to make it happen in (Debian-based) Linux, which I find is a good start to find out what we will need- Its not so straightforward as I thought (the program changed alot during last year) but its a start.
open a terminal , and enter:
sudo apt-get install build-essential python-opengl python-numpy python-dev python2.7-dev python-tk python-pyaudio git
This will install nearly all dependencies. You will have to enter your user's password here.
python-pyaudio is optional, python-tk needed for GUI.
Now I found out that a recently added dependency is missing and not available in Debian/Ubuntu: scandir
I have made a package for that :
wget http://openartisthq.org/magiclantern/python-scandir_0.9-1_amd64.deb
get it.
sudo dpkg -i python-scandir_0.9-1_amd64.deb
install it.
git clone https://bitbucket.org/baldand/mlrawviewer.git
This will make a mlrawviewer folder in your home directory, and puts the latest source-code in it.
with
git pull
, (you don't have to run this now) you will be able to update your code to the newest version in git. So every time you want the newest version, just do a git pull , and you have the newest code.
cd mlrawviewer
Go into that folder.
Also, glfw3.1 is needed, which is not available in ubuntu 14.04, 14.10 nor 15.04 ( !!!!!!!!!!! )
but, no fear, you just need to get it from me:
wget http://openartisthq.org/magiclantern/libglfw.so.3
wget http://openartisthq.org/magiclantern/libglfw.so.3.1
I am doing this here so that these two already sit in the right directory...
python setup.py build
This optionally compiles the bitunpack module; Remember, Python is an interpreted language, no need to compile,
but playback will be faster if you do compile this module written in C.
cp build/lib.linux-*/bitunpack.so .
copy the bitunpack.so binary from the build/lib.linux-* subfolder to the same place where mlrawviewer.py is.
chmod +x mlrawviewer.py
chmod +x Viewer.py.py
make these executeable
Browser.py is mentioned at webpage and in README, but it's not found? strange..../Viewer.py
run the GUI interface.
./mlrawviewer.py
run the commandline interface.
ln -s Viewer.py ~/Desktop
make a link to the Desktop to run it from there.
This are the basics of getting it run - no menu entry, no packaging. Maybe this is not good for convenience, but good for testing. As explained before, if you skip the part to build the bitunpack[.so/.dll/dylib], MlRawViewer is still fully functional.
Remember:
git pull
will give you instantly the newest version of the code, and if you take this tutorial and make a script out of this (basically just writing everything into a text file), have a symlink / shortcut / alias to that script to run it from e.g. Desktop, you will always have the newest version available - and baldand can do what he's best in.
Now with Windows and Mac - its a bit more complicated to set up (that's why I love my Linux).
How do you get MlRawViewer ? - Git
So installing git is the first thing everyone should do.
What do you need to run MlRawViewer ? - Python.
As I said, I recommend to use
virtualenv.
THE COMPILING PART IS OPTIONAL:
from
https://bitbucket.org/baldand/mlrawviewer/overviewThe playback will be faster if you build the included bitunpack module.
This means compiling the C part of MlRawViewer is
only (please tell me if I am wrong) needed if you want to have faster playback - otherwise run it like it is -
Mac also has package systems like apt: homebrew and port . so these could be used to install external dependencies needed by the virtualenv stuff.
Windows .. there are different ways, I do not know which libraries are available in which form (via pip in virtualenv, or via setup.exe... we have to check this out - it are not so many dependencies so I have hope that we find an elegant solution..