![]() |
AntiMicroX
|
Most of these packages are already built and available on Release Page, but if you want, you can also build AntiMicroX by yourself.
This program is written in C++ using the Qt framework. A C++ compiler and a proper C++ build environment will need to be installed on your system prior to building this program. Under Debian and Debian-based distributions like Ubuntu, the easiest way to get a base build environment set up is to install the meta-package build-essential. The following packages are required to be installed on your system in order to build this program:
g++ from gcc (or clang compiler)cmakeextra-cmake-modulesqt6-base-dev, qt6-tools-dev-tools libqt6core5compat6-dev qt6-tools-devqttools5-dev and qttools5-dev-tools (qt5-tools on distros based on Arch Linux)libsdl2-dev (sdl2 on distros based on Arch Linux) (SDL2)libxi-dev (libxi on distros based on Arch Linux) (Optional. Needed to compile with X11 and uinput support)libxtst-dev (libxtst on distros based on Arch Linux) (Optional. Needed to compile with XTest support)libx11-dev (libx11 on distros based on Arch Linux) (Needed to compile with Qt5 support)itstool (extracts messages from XML files and outputs PO template files, then merges translations from MO files to create translated XML files)gettextOne-liner for installing above dependencies:
One-liner for installing above dependencies:
QT5 Variant:
In case of Windows you need QT, SDL2 libraries, cmake and compiler (mingw for example).
For setting up your environment you may use msys2. Alternatively, you may use MSVC.
This way of building is useful for testing purposes.
In order to build this program, open a terminal and cd into the antimicrox directory. Enter the following commands in order to:
Clone repository
Build the program:
Run built binaries
Recent versions of Visual Studio (2017+) have support for cmake projects. Under Visual Studio 2022, building AntiMicroX is quite straight forward.
CMakeLists.txt and offer an option to open the CMake settings editor. If it doesn't, right click on CMakeLists.txt in the solution explorer and select CMake settings for antimicrox.Command arguments section, add an argument to tell CMake where to find your Qt; E.g.: "-DCMAKE_PREFIX_PATH=C:\Qt\5.9\msvc2017_64\lib\cmake". As of writing, Qt's msvc2017 works properly through vs22.Cmake variables and cache section, click the link labeled Save and generate cmake cache to load variables.If the CMake generation fails due to SDL2, find the variables namedSDL2_PATH,SDL2_INCLUDE_DIR, andSDL2_DLL_LOCATION_DIRin the list view, and set them properly. You may also need to move the headers in the SDL2 include dir inside a folder namedSDL2to match their include paths on other systems.At this point you should be able to save your changes to regenerate the cmake cache, which will then allow you to buildantimicrox.exe` through Visual Studio.A recommended way of installation is building package typical for for your system (or building universal one like an AppImage).
This way of installation is not recommended, because it doesn't integrate very well with some environments.
Install:
Uninstall:
There are a few application specific options that can be used when running cmake to build antimicrox. The following file will attempt to list some of those options and describe their use in the project.
-DBUILD_DOCS
Default: OFF. Build documentation using doxygen (installed doxygen and dot required). Generated files can be found in docs directory
-DUPDATE_TRANSLATIONS
Default: OFF. Set updateqm target to call lupdate in order to update translation files from source.
-DCMAKE_BUILD_TYPE
Default: Not defined. You can define build type.
Debug builds are compiled with enabled debug flags, disabled optimizations and better printing stack trace in case of crash.
-DTRANS_REMOVE_OBSOLETE
Default: OFF. Do not specify -noobsolete option when calling lupdate command for qm files. -noobsolete is a method for getting rid of obsolete text entries
-DCHECK_FOR_UPDATES
Default: OFF. Show update button in GUI when newer version is available. Recommended for builds distributed without package management systems.
-DWITH_TESTS
Default: OFF. Allows for the launch of test sources with unit tests
-DANTIMICROX_PKG_VERSION
Default: Not defined. (feature intended for packagers) Manually define version of package displayed in info tab. When not defined building time is displayed instead. Example: -DANTIMICROX_PKG_VERSION=3.1.7-appimage
-DAPPDATA
Default: ON. Build the project with AppData support.
-DWITH_UINPUT
Default: ON. Compile the program with uinput support.
-DINSTALL_UINPUT_UDEV_RULES
Default: ON. During installation process create new udev rule allowing regular users using uinput.
-DWITH_X11
Default: ON. Compile the program with X11 support.
-DWITH_XTEST
Default: ON. Compile the program with XTest support.
qDebug output on terminal:
On some systems, particularly if you do not have QtCreator installed, you may notice that some debug info (in particular qDebug() statements) do not generate any output on a Linux terminal. To fix this, you can create a qtlogging.ini file:
mkdir ~/.config/QtProject printf '[Rules]\n*.debug=true\nqt.*.debug=false\n' > ~/.config/QtProject/qtlogging.ini
Once this file is created and has the debug rules present, it should be picked up and applied automatically the next time you run cmake to create a build.
If your distribution doesn't yet have an RPM package, you can easily build one for yourself.
Create build directory
Download tools used for creating appimages (and make them executable)
Build antimicrox and install it in AppDir directory
Create AppImage file
The command builds the package into the build folder and installs the created flatpak. The Flathub manifest can be located in Flathub's Github repo.
In case of building Windows package you will need NSIS.