Getting Started on Linux - VirtualPhotonics/MieSimulatorGUI GitHub Wiki
Getting the MieSimulatorGUI App from GitHub:
Compressed Application Package:
- Download the latest "MieSimulatorGUI_vX_X.tar.xz" file.
- Type
./MieSimulatorGUI_vX_X.sh &to execute (Version 1.1 and after) ../MieSimulator_vX_X &to execute (Up to version 1.0.8).
If Qt is not installed, you may have to install Qt. Bring up a terminal window and type:sudo apt install qt6-base-dev. Depending on your Linux distribution, you may need to grant execute permissions by running the commandchmod +x MieSimulator_vX_X.
AppImage:
- Download the latest "MieSimulatorGUI_vX_X.AppImage".
- Type
chmod +x MieSimulatorGUI_vX_X.AppImage. - If
libfuse2t64library is not available, typesudo apt install libfuse2t64. - Double-click or type
./MieSimulatorGUI_vX_X.AppImage &to execute.
Getting the MieSimulatorGUI Source Code from GitHub:
Installing Prerequisites
These instructions are for Ubuntu 16.04 or later. If you are using a different Linux distribution, adapt the syntax as needed.
- Update and install System Dependencies: Open a terminal and execute the following commands to ensure your compiler and graphics libraries are up to date.
sudo apt-get update
sudo apt-get install gcc
sudo apt-get install libgl1-mesa-dev
sudo apt-get install mesa-common-dev
sudo apt-get install build-essential
- Install Qt 6: Use one of the following two methods:
- Terminal Installation: Run the following command to install the development libraries and the IDE directly.
sudo apt install qt6-base-dev qtcreator - Manual Installation: Visit the Qt download page and select Qt 6 Desktop gcc 64-bit or a version compatible with your environment. Run the Installer and follow the setup prompts to install Qt 6. Ensure that the Qt Creator IDE is selected during the installation process.
- Terminal Installation: Run the following command to install the development libraries and the IDE directly.
- Obtain the Source Code: Use one of the following two methods:
- git Clone: Clone the source code from GitHub using the command:
git clone https://github.com/VirtualPhotonics/MieSimulatorGUI.git. This will create a 'MieSimulatorGUI' directory in your current directory. - ZIP Download: Navigate to the GitHub repository and select Code > Download ZIP. Extract the files to your preferred directory.
- git Clone: Clone the source code from GitHub using the command:
Building the Project
- Launch Qt Creator and open the "MieSimulatorGUI.pro" file.
- In the next window, select proper project kit and click Configure Project.
- Select Build > Run qmake, and then select Build > Build Project "MieSimulatorGUI" or press CTRL+B.
Running Tests and the Application
- To run tests: Select Tools > Tests > Run All Tests.
- To run the application: Select Build > Run or press CTRL+R.
Building and Running Tests from the Command Line
- Open Terminal
- From the root directory of the project (where MieSimulatorGUI.pro is located), run the following commands:
chmod +x MieSimulatorGUI.pro
mkdir -p build
cd build
qmake ../MieSimulatorGUI.pro
make -j$(nproc)
cd test
chmod +x MieSimulatorGUI_test
./MieSimulatorGUI_test
Note: - If you get lGL error, bring up a terminal window and type "sudo apt-get install libgl1-mesa-dev" to install "GL" library. - If you get any errors, check whether Qt and its debugger is working properly (Generate a sample Qt program and run).