Codedesigner en RaspberryLinux » History » Version 2

« Previous - Version 2/3 (diff) - Next » - Current version
Txinto Vaz, 10/01/2021 04:50 PM


Codedesigner en Raspberry/Linux

Raspberry software installation

NOTA: En https://wiki.codelite.org/pmwiki.php/Main/WxWidgets30Binaries#toc2 tienen binarios para instalar por paquetería la versión 3.0.5 de wxWidgets.

En https://github.com/gittiver/CodeDesigner tienen una versión de Codedesigner que funciona con cmake. Estamos probándola. Si nos funciona muchos de estos pasos nos los podríamos evitar (al menos para Linux).

Preparando para instalar aplicaciones:
  • abrimos un terminal
  • mkdir install
  • cd install.

gtk>3.0

  • sudo apt-get install libgtk-3-dev

opengl

  • sudo apt-get install libglu1-mesa-dev

sdl

  • sudo apt-get install libsdl-dev

gstreamer webkit-gtk...

sudo apt-get install gstreamer-tools # (no ha hecho falta?).
sudo apt-get install webkit-image-gtk
sudo apt-get install libgstreamer0.10-dev

wxWidgets >3.0 (necesita gtk, opengl).

Preparando para compilar wxwidgets:

cd ~/install
mkdir wxWidgets
cd wxWidgets

Descargamos: http://sourceforge.net/projects/wxwindows/files/3.0.2/wxWidgets-3.0.2.tar.bz2/download
Lo descomprimimos en ~/install/wxwidgets

cd wx*
./configure
make all
sudo make install
sudo ln -s /usr/local/include/wx-3.0/wx /usr/include/wx
cd ~
nano .profile
...
# Add a path to make libraries be accessible (Codedesigner needs it to find wxwidget libraries)
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib:$LD_LIBRARY_PATH

Issue on Raspberry 3 debian jessie

When executing "make all", a segment violation appears.

We try to increase the swapfile to solve:

http://raspberrypi.stackexchange.com/questions/70/how-to-set-up-swap-space#1605

  • sudo nano /etc/dphys-swapfile
...
CONF_SWAPSIZE=512
...
  • sudo /etc/init.d/dphys-swapfile stop
  • sudo /etc/init.d/dphys-swapfile start

After increasing the swapfile with no success, we are trying to install GCC v4.8 or v6.10.

The v4.8 alternative has worked, so the v6.10 is cancelled.

Install GCC v4.8

Following that instructions:

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
sudo update-alternatives --set cc /usr/bin/gcc
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
sudo update-alternatives --set c++ /usr/bin/g++
sudo update-alternatives --config gcc
sudo update-alternatives --config g++
cd ~/install/wxWidgets/wxWidgets-3.0.2
make clean
./configure
make all
sudo make install
sudo ln -s /usr/local/include/wx-3.0/wx /usr/include/wx
cd ~
nano .profile
...
# Add a path to make libraries be accessible (Codedesigner needs it to find wxwidget libraries)
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib:$LD_LIBRARY_PATH
source ~/.profile

Install GCC v6.10

The v4.8 alternative has worked, so the v6.10 is cancelled.
wget https://bitbucket.org/sol_prog/raspberry-pi-gcc-6.1.0-binary/raw/6a47f053b578661a6a2ad41f43d14afd460e1978/gcc-6.1.0.tar.7z
sudo apt-get install p7zip-full
export PATH=/usr/local/gcc-6.1.0/bin:$PATH
nano ~/.profile
...
# Prepending GCC 6.1 to path
export PATH=/usr/local/gcc-6.1.0/bin:$PATH

Code::Blocks

sudo apt-get install codeblocks

Installing CodeDesigner (needs WxWidgets).

As the WxWidget failed using GCC v4.9, and worked downgrading to GCC v4.8, the same v4.8 version will be used to compile CodeDesigner.
cd ~
cd install/
mkdir codedesigner
cd codedesigner/
svn checkout svn://svn.code.sf.net/p/codedesigner/code/trunk codedesigner-code
cd coded*
cd build
./create_build_files.sh
make all
cd ..
cd output/
sudo cp -R bin/* /usr/local/bin/
sudo cp -R lib/* /usr/local/lib/
sudo cp -R share/* /usr/local/share/
sudo rm /usr/local/share/codedesigner/*
sudo mkdir /usr/local/share/codedesigner/app
sudo mkdir /usr/local/share/codedesigner/plugins
sudo cp -R share/codedesigner/app/* /usr/local/share/codedesigner/app/
sudo cp -R share/codedesigner/plugins/* /usr/local/share/codedesigner/plugins/
; Fallará por los links simbólicos, pero habrá creado /usr/local/share/codedesigner
sudo cp -R share/codedesigner/app/* /usr/local/share/codedesigner/app/
sudo cp -R share/codedesigner/plugins/* /usr/local/share/codedesigner/plugins/