Build Vaa3D Qt6 version on Ubuntu 20.04 - Vaa3D/Vaa3D_Wiki GitHub Wiki

Qt

sudo chmod +x qt-unified-linux-x64-4.2.0-online.run
./qt-unified-linux-x64-4.2.0-online.run
  • Then follow the instructions on the operating screen and wait for the installation
  • The online installer will automatically install QtCreator

Vaa3D Source Code

  • Maybe you need to install git first
$ sudo apt-get install git
  • Then clone the code from the Qt6_New branch
$ git clone -b QT6_NEW https://github.com/Vaa3D/v3d_external.git

Preparing the operating environment

Basic compilation environment

$ sudo apt-get install gcc
$ sudo apt-get install g++

Note

If you need CMake environment

$ sudo apt-get install cmake

OpenGL

$ sudo apt-get install build-essential
$ sudo apt-get install libgl1-mesa-dev
$ sudo apt-get install libglu1-mesa-dev
$ sudo apt-get install libglut-dev

If there is an error installing libglut-dev, execute

$ sudo apt-get install freeglut3-dev

Some External Libraries

You may need to install SDL2

$ sudo apt-get install libsdl2-2.0
$ sudo apt-get install libsdl2-dev

HDF5

$ sudo apt-get install libhdf5-dev

Vaa3D Compilation

  • Use QtCreator to open v3d_qt6.pro in ~/v3d_main/v3d/
  • Configure
  • Just click the Run or Build button, the Vaa3D will run.

Vaa3D Plug-in

  • Clone the Vaa3D plugin source code from here
$ git clone -b vaa3d_tools_qt6 https://github.com/Vaa3D/vaa3d_tools.git

Note

Vaa3D's main program folder (for example) needs to be placed at the same level as the plugins folder, which is needed to compile the script, and the file structure is shown in the diagram

+ ----------------
+ v3d_external/...
+ vaa3d_tool/...
+ ----------------
  • Configure Qt environment variables so that the script can execute qmake globally
$ sudo vim /etc/profile
---------------------------------------
...
# in profile file add
export QTDIR=/<your path>/Qt/6.2.2
export PATH="$QTDIR/gcc_64/bin:$PATH"
export LD_LIBRARY_PATH=$QTDIR/gcc_64/lib
----------------------------------------
$ sudo source /etc/profile

Note: You can verify that the settings are successful by using qmake -v

  • Setting soft links to documents
$ cd vaa3d_tools
$ ln -s ../v3d_external/v3d_main v3d_main
$ ln -s ../v3d_external/bin bin
$ cd ../v3d_external
$ ln -s ../vaa3d_tools/released_plugins released_plugins_more
  • Execute the compilation script
$ cd vaa3d_tools/released_plugins
$ ./build_plugindemo.sh
⚠️ **GitHub.com Fallback** ⚠️