Installation/Discretizer/Ubuntu

From OpenFOAMWiki

1 Introduction

This page is dedicated to explaining how to install Discretizer in Ubuntu.

If you do not yet feel comfortable using Linux, then perhaps you better first read the page Working with the Shell and train a bit with the shell/terminal environments, so you can have a better perception of the steps shown below.


2 Copy-Paste steps

A few notes before you start copy-pasting:

  1. Lines that start with # don't have to be copy-pasted. They are just comments to let you know what's going on.
  2. One wrong character is enough for breaking this guide, so make sure you can read the characters properly or that the installed language system does not break the copied characters!


2.1 Ubuntu 12.04

Discussion thread where you can ask questions about these steps: Installing Discretizer

Note: The following instructions have only been tested in Ubuntu 12.04 x86_64. Steps:

  1. Install the necessary packages:
    sudo apt-get install build-essential libxrandr-dev ruby-full libruby ruby-dev  rubygems \
    libopengl-ruby libfox-1.6-0 libfox-1.6-dev libfox-1.6-doc libfxscintilla19 libfxscintilla-dev \
    subversion subversion-tools libgl1-mesa-dri libglu1-mesa freeglut3  libgl1-mesa-dev \
    libglu1-mesa-dev freeglut3-dev
  2. Need to fix a missing symbolic link for libfxscintilla.so:
    sudo ln -s /usr/lib/libfxscintilla.so.19 /usr/lib/libfxscintilla.so
  3. Go into a good working folder. For example, $HOME/OpenFOAM:
    cd "$HOME/OpenFOAM"
  4. Clone the SVN repository:
    svn co https://svn.code.sf.net/p/discretizer/code/discretizer/
  5. Go into the discretizer folder:
    cd discretizer
  6. Build/install fxruby (automatically downloaded and built by gem!):
    sudo gem install fxruby
  7. Same for opengl for Ruby:
    sudo gem install opengl -v 0.7.0
  8. Then for running Discretizer and Discretizer::Setup manually:
    • Discretizer:
      cd lib
      ruby discretizer.rb
    • Discretizer::Setup:
      cd discretizer200
      ruby discretizersetup.rb
  9. For running them with a script, unpack the file Discretizer_scripts.tar.gz into the folder discretizer and then simply run:
    • Discretizer:
      ./discretizer.sh
    • Discretizer::Setup:
      ./discretizersetup.sh

Discussion thread where you can ask questions about these steps: Installing Discretizer


2.2 Ubuntu 12.10

Discussion thread where you can ask questions about these steps: Installing Discretizer

Note: The following instructions have only been tested in Ubuntu 12.10 x86_64. Steps:

  1. Install the necessary packages:
    sudo apt-get install build-essential libxrandr-dev ruby1.8-full libruby1.8 ruby1.8-dev  rubygems1.8 \
    libopengl-ruby1.8 libfox-1.6-0 libfox-1.6-dev libfox-1.6-doc libfxscintilla19 libfxscintilla-dev \
    subversion subversion-tools libgl1-mesa-dri libglu1-mesa freeglut3  libgl1-mesa-dev \
    libglu1-mesa-dev freeglut3-dev

    Note: If you had already installed the default Ruby 1.9, then run the following command to remove this version:

    sudo apt-get remove ruby-full libruby ruby-dev libruby1.9.1-dbg libtcltk-ruby1.9.1 ruby1.9.1-full \
    libopengl-ruby libruby1.9.1 libyaml-0-2 ri1.9.1 ruby-opengl ruby1.9.1 ruby1.9.1-dev ruby1.9.1-examples
  2. Need to fix a missing symbolic link for libstcc++.so:
    sudo ln -s libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so
  3. Need to fix a missing symbolic link for libfxscintilla.so:
    sudo ln -s /usr/lib/libfxscintilla.so.19 /usr/lib/libfxscintilla.so
  4. Need to fix an excess build option rbconfig.rb:
    sudo sed -i -e 's/\-Werror=format\-security//g' /usr/lib/ruby/1.8/x86_64-linux/rbconfig.rb

    (Source of this fix: Installing Discretizer - post #23)

  5. Go into a good working folder. For example, $HOME/OpenFOAM:
    cd "$HOME/OpenFOAM"
  6. Clone the SVN repository:
    svn co https://svn.code.sf.net/p/discretizer/code/discretizer/
  7. Go into the discretizer folder:
    cd discretizer
  8. Build/install fxruby (automatically downloaded and built by gem!):
    sudo gem install fxruby
  9. Same for opengl for Ruby:
    sudo gem install opengl -v 0.7.0
  10. Then for running Discretizer and Discretizer::Setup manually:
    • Discretizer:
      cd lib
      ruby discretizer.rb
    • Discretizer::Setup:
      cd discretizer200
      ruby discretizersetup.rb
  11. For running them with a script, unpack the file Discretizer_scripts.tar.gz into the folder discretizer and then simply run:
    • Discretizer:
      ./discretizer.sh
    • Discretizer::Setup:
      ./discretizersetup.sh

Discussion thread where you can ask questions about these steps: Installing Discretizer


2.3 Ubuntu 13.04

Discussion thread where you can ask questions about these steps: Installing Discretizer

Note: The following instructions have only been tested in Ubuntu 13.04 x86_64. Steps:

  1. Install the necessary packages:
    sudo apt-get install build-essential libxrandr-dev ruby1.8-full libruby1.8 ruby1.8-dev  rubygems1.8 \
    libopengl-ruby1.8 libfox-1.6-0 libfox-1.6-dev libfox-1.6-doc libfxscintilla19 libfxscintilla-dev \
    subversion subversion-tools libgl1-mesa-dri libglu1-mesa freeglut3  libgl1-mesa-dev \
    libglu1-mesa-dev freeglut3-dev

    Note: If you had already installed the default Ruby 1.9, then run the following command to remove this version:

    sudo apt-get remove ruby-full libruby ruby-dev libruby1.9.1-dbg libtcltk-ruby1.9.1 ruby1.9.1-full \
    libopengl-ruby libruby1.9.1 libyaml-0-2 ri1.9.1 ruby-opengl ruby1.9.1 ruby1.9.1-dev ruby1.9.1-examples
  2. Need to fix a missing symbolic link for libfxscintilla.so:
    sudo ln -s /usr/lib/libfxscintilla.so.19 /usr/lib/libfxscintilla.so
  3. Need to fix an excess build option rbconfig.rb:
    sudo sed -i -e 's/\-Werror=format\-security//g' /usr/lib/ruby/1.8/x86_64-linux/rbconfig.rb

    (Source of this fix: Installing Discretizer - post #23)

  4. Go into a good working folder. For example, $HOME/OpenFOAM:
    cd "$HOME/OpenFOAM"
  5. Clone the SVN repository:
    svn co https://svn.code.sf.net/p/discretizer/code/discretizer/
  6. Go into the discretizer folder:
    cd discretizer
  7. Build/install fxruby (automatically downloaded and built by gem!):
    sudo gem install fxruby
  8. Same for opengl for Ruby:
    sudo gem install opengl -v 0.7.0
  9. Then for running Discretizer and Discretizer::Setup manually:
    • Discretizer:
      cd lib
      ruby discretizer.rb
    • Discretizer::Setup:
      cd discretizer200
      ruby discretizersetup.rb
  10. For running them with a script, unpack the file Discretizer_scripts.tar.gz into the folder discretizer and then simply run:
    • Discretizer:
      ./discretizer.sh
    • Discretizer::Setup:
      ./discretizersetup.sh

Discussion thread where you can ask questions about these steps: Installing Discretizer


2.4 Ubuntu 13.10

Discussion thread where you can ask questions about these steps: Installing Discretizer

Note: The following instructions have only been tested in Ubuntu 13.10 x86_64. Steps:

  1. Install the necessary packages:
    sudo apt-get install build-essential libxrandr-dev ruby1.8-full libruby1.8 ruby1.8-dev  rubygems1.8 \
    libfox-1.6-0 libfox-1.6-dev libfox-1.6-doc libfxscintilla19 libfxscintilla-dev \
    subversion subversion-tools libgl1-mesa-dri libglu1-mesa freeglut3  libgl1-mesa-dev \
    libglu1-mesa-dev freeglut3-dev

    Note: If you had already installed the default Ruby 1.9, then run the following command to remove this version:

    sudo apt-get remove ruby-full libruby ruby-dev libruby1.9.1-dbg libtcltk-ruby1.9.1 ruby1.9.1-full \
    libruby1.9.1 libyaml-0-2 ri1.9.1 ruby-opengl ruby1.9.1 ruby1.9.1-dev ruby1.9.1-examples
  2. Need to fix a missing symbolic link for libfxscintilla.so:
    sudo ln -s /usr/lib/libfxscintilla.so.19 /usr/lib/libfxscintilla.so
  3. Need to fix an excess build option rbconfig.rb:
    sudo sed -i -e 's/\-Werror=format\-security//g' /usr/lib/ruby/1.8/x86_64-linux/rbconfig.rb

    (Source of this fix: Installing Discretizer - post #23)

  4. Go into a good working folder. For example, $HOME/OpenFOAM:
    cd "$HOME/OpenFOAM"
  5. Clone the SVN repository:
    svn co https://svn.code.sf.net/p/discretizer/code/discretizer/
  6. Go into the discretizer folder:
    cd discretizer
  7. Build/install fxruby (automatically downloaded and built by gem!):
    sudo gem install fxruby
  8. Same for opengl for Ruby:
    sudo gem install opengl -v 0.7.0
  9. Then for running Discretizer and Discretizer::Setup manually:
    • Discretizer:
      cd lib
      ruby discretizer.rb
    • Discretizer::Setup:
      cd discretizer200
      ruby discretizersetup.rb
  10. For running them with a script, unpack the file Discretizer_scripts.tar.gz into the folder discretizer and then simply run:
    • Discretizer:
      ./discretizer.sh
    • Discretizer::Setup:
      ./discretizersetup.sh

Discussion thread where you can ask questions about these steps: Installing Discretizer