luni, 18 noiembrie 2024

Visual Studio Code instalare in Ubuntu via CLI

sudo dpkg -i code_1.95.3-1731513102_amd64.deb

code --install-extension ms-vscode.cpptools

code --install-extension ms-python.python

code --install-extension platformio.platformio-ide

(cd /home/cata-lin/.vscode/extensions) 

(sudo rm -r -f ms-vscode.cpptools-1.22.11-linux-x64)

code 


sudo rm -r -f ms-python.debugpy-2024.12.0-linux-x64
sudo rm -r -f ms-python.vscode-pylance-2024.11.2
sudo rm -r -f platformio.platformio-ide-3.3.3-linux-x64
sudo rm -r -f ms-vscode.cpptools-1.22.11-linux-x64
sudo rm -r -f ms-python.python-2024.20.0-linux-x64
sudo rm extensions.json

sudo apt remove code

 

sudo rm -rf .config/Code
cd ~

sudo rm -rf .vscode

duminică, 17 noiembrie 2024

Instalare simulator de zbor CRRCsim in Ubuntu

System: Ubuntu 24.04.1 LTS

crrcsim 0.9.13-3.2build1 (from https://launchpad.net/ubuntu/+source/crrcsim/0.9.13-3.2build1)

Here are the steps that I did (some are indicated here https://sourceforge.net/projects/crrcsim/reviews/): ​ 

1, Read compile.txt in the documentation folder. 

2, Install required packages: 

* SDL 1.2.x : 

sudo apt-get install libsdl1.2-dev 

sudo apt-get install libsdl-image1.2-dev 

sudo apt-get install libsdl-mixer1.2-dev 

sudo apt-get install libsdl-ttf2.0-dev 

sudo apt-get install libsdl-gfx1.2-dev  ​ 

* PLIB 1.8.4 or later: 

sudo apt install libplib-dev 

* libjpeg 6b : 

sudo apt update 

sudo apt install libjpeg-dev 

* BOOST necessary for the installation of CGAL: 

sudo apt-get install libboost-all-dev 

libboost_thread-mt.so no longer exists therefore a link is made: run this line in the folder where libboost_thread.so is located in your system (in my case : usr/lib/x86_64-linux-gnu/) 

sudo ln -s libboost_thread.so libboost_thread-mt.so 

* CGAL : 

sudo apt-get install libcgal-dev 

3, Compile: 

make

 

3A. Compilation errors where due to missing g++, then I installed it:

sudo apt install g++ 


3B. Compilation error in:

src/mod_video/crrc_animation.cpp:87:35 

The original code: 

​std::cerr << "createAnimation: unknown animation type \'" ​<< type << "\'" << std::cerr; 

I used instead: 

​std::cerr << "createAnimation: unknown animation type \'"<< type << "\'"; 

After that, it can be recompiled.


3C. Compilation errors where due to missing g++, then I installed it:

 sudo apt install libfl-dev

 

3D. Compilation error:

 /usr/bin/ld: cannot find -lCGAL
collect2: error: ld returned 1 exit status

Cleared after changed in configure.ac line 233 or so from:

CGAL_CFLAGS=-frounding-math

CGAL_LIBS=-lCGAL

to:

CGAL_CFLAGS="-frounding-math -DCGAL_HEADER_ONLY=1"
CGAL_LIBS=

(as per https://sourceforge.net/p/crrcsim/bugs/44/)

4. Installation:
sudo make install


If none will work, install prodly using snap :D