Codedesigner en RaspberryLinux » History » Version 2
Version 1 (Txinto Vaz, 03/03/2018 04:38 PM) → Version 2/3 (Txinto Vaz, 10/01/2021 04:50 PM)
h1. Codedesigner en Raspberry/Linux
h1. 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).
{{>toc}}
* sudo apt-get update
* (git ya está instalado).
* sudo apt-get install subversion
* Para lo demás mejor entrar en las XWindows: startx
* Si nos aparece un error GDBus al arrancar: http://raspberrypi.stackexchange.com/questions/27542/raspberry-pi-2-gdbus-error-on-start-up (y reboot).
Preparando para instalar aplicaciones:
* abrimos un terminal
* mkdir install
* cd install.
h2. gtk>3.0
* sudo apt-get install libgtk-3-dev
h2. opengl
* sudo apt-get install libglu1-mesa-dev
h2. sdl
* sudo apt-get install libsdl-dev
h2. 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
h2. 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
<pre>
...
# 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
</pre>
h3. 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
<pre>
...
CONF_SWAPSIZE=512
...
</pre>
* 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.-
warning. The v4.8 alternative has worked, so the v6.10 is cancelled.
h4. Install GCC v4.8
* http://askubuntu.com/questions/26498/choose-gcc-and-g-version
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
<pre>
...
# 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
</pre>
source ~/.profile
h4. -Install GCC v6.10-
warning. The v4.8 alternative has worked, so the v6.10 is cancelled.
* https://solarianprogrammer.com/2016/06/24/raspberry-pi-raspbian-install-gcc-compile-cpp-14-and-cpp-17-programs/
* https://bitbucket.org/sol_prog/raspberry-pi-gcc-6.1.0-binary
<pre>
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
</pre>
<pre>
...
# Prepending GCC 6.1 to path
export PATH=/usr/local/gcc-6.1.0/bin:$PATH
</pre>
h2. Code::Blocks
sudo apt-get install codeblocks
h2. Installing CodeDesigner (needs WxWidgets).
warning. 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/
h1. 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).
{{>toc}}
* sudo apt-get update
* (git ya está instalado).
* sudo apt-get install subversion
* Para lo demás mejor entrar en las XWindows: startx
* Si nos aparece un error GDBus al arrancar: http://raspberrypi.stackexchange.com/questions/27542/raspberry-pi-2-gdbus-error-on-start-up (y reboot).
Preparando para instalar aplicaciones:
* abrimos un terminal
* mkdir install
* cd install.
h2. gtk>3.0
* sudo apt-get install libgtk-3-dev
h2. opengl
* sudo apt-get install libglu1-mesa-dev
h2. sdl
* sudo apt-get install libsdl-dev
h2. 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
h2. 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
<pre>
...
# 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
</pre>
h3. 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
<pre>
...
CONF_SWAPSIZE=512
...
</pre>
* 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.-
warning. The v4.8 alternative has worked, so the v6.10 is cancelled.
h4. Install GCC v4.8
* http://askubuntu.com/questions/26498/choose-gcc-and-g-version
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
<pre>
...
# 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
</pre>
source ~/.profile
h4. -Install GCC v6.10-
warning. The v4.8 alternative has worked, so the v6.10 is cancelled.
* https://solarianprogrammer.com/2016/06/24/raspberry-pi-raspbian-install-gcc-compile-cpp-14-and-cpp-17-programs/
* https://bitbucket.org/sol_prog/raspberry-pi-gcc-6.1.0-binary
<pre>
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
</pre>
<pre>
...
# Prepending GCC 6.1 to path
export PATH=/usr/local/gcc-6.1.0/bin:$PATH
</pre>
h2. Code::Blocks
sudo apt-get install codeblocks
h2. Installing CodeDesigner (needs WxWidgets).
warning. 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/