Build Vaa3D Qt6 version on Mac - Vaa3D/Vaa3D_Wiki GitHub Wiki

Build Vaa3D on Mac

Step1

Download qt6. You can choose to download using the online installer.

https://download.qt.io/archive/online_installers/.

Step2

Use qt creator to open the v3d_qt6.pro. This file is in v3d_external/v3d_main/v3d.

Step3

Change the address of the generated project according to your own needs and build it. If successful, the app will be generated.

If you run the app on QT Creator and it crashed with the error libtiff.5.dylb not found. You should install the libtiff library and add a softlink of libtiff.5.dylb to system lib paths.

Build plugins on Mac

If you just want to build a specific plugin, you can open the .pro file of the plugin with qtcreator and click on build. If you want to build all the plugins in vaa3d_tools. You can run build_plugins.sh to do the build. The script file is in the vaa3d_tools/released_plugins folder.

You should put the sourcecode of vaa3d in the same folder of the plugin sourcecode and then run the build_plugins.sh script

(Note that due to the specific nature of the mac, you may be required to make allowable security settings before this script can be run.)

Packing Vaa3D on Mac

Step1

Move teem and TIFF dynamic libraries to v3d_qt6.app/content/MacOS directory, and change the address of the dynamic library. You need to use the following instructions in the packaging folder directory.

$PATH is v3d_ external address

install_name_tool -change "$PATH/v3d_external/v3d_main/common_lib/src_packages/teem/bin/libteem.1.dylib" "@executable_path/libteem.1.dylib" v3d_qt6.app/Contents/MacOS/v3d_qt6

install_name_tool -change "$PATH/v3d_external/v3d_main/common_lib/src_packages/teem/bin/libtiff.5.dylib" "@executable_path/libtiff.5.dylib" v3d_qt6.app/Contents/MacOS/v3d_qt6

Step2

Use macdeployqt to package the v3d_app. You need to use the following instructions in the packaging folder directory.

 macdeployqt ./v3d_qt6.app

Step3

Move the compiled plugins folders to path Vaa3d-X.app/Contents/Macos. Make sure the pugins folder is named to "plugins", otherwise Vaa3d may not be able to find plugins.

Step4

You can use Apple's own disk utility to pack it into dmg format or you can just compress the .app file;

Troubleshooting

  1. If you open the .app file and it gives error of can not open .dylib file, you should input the command 'sudo spctl --master-disable' in the terminal to allow Vaa3d to use dynamic libraries of plugins.