Setup & Installation
Relevant source files
The following files were used as context for generating this wiki page:
The SSA Consulta Rapida Cpp project is a modular desktop application built with C++20 and Qt 6/QML. It serves as a high-performance interface for querying SSA (Solicitação de Serviço de Automação) data stored in SQLite databases. The setup process involves configuring a C++20 compliant environment, satisfying Qt 6 dependencies, and utilizing CMake presets for building and testing across different operating systems.
Sources: README.md:1-5, AGENTS.md:1-5
System Requirements & Dependencies
The project requires a modern development environment capable of handling C++20 features and Qt 6.6+ modules. The following table summarizes the mandatory dependencies:
| Dependency | Minimum Version | Description |
|---|---|---|
| CMake | 3.24+ | Build system generator |
| Qt 6 | 6.6+ | Framework (Modules: Concurrent, Core, Gui, Qml, Quick, QuickControls2, Sql, Test) |
| SQLite3 | - | Local database engine |
| C++ Compiler | C++20 | Support for RAII, value semantics, and C++20 standard |
| Ninja | - | Recommended build tool |
Sources: README.md:7-12, CMakeLists.txt:1-12, AGENTS.md:41-45
Platform-Specific Installation
The project provides specific installation commands for major operating systems:
- macOS (Homebrew):
brew install qt cmake ninja sqlite - Debian/Ubuntu: Requires
build-essential,libsqlite3-dev, and severalqt6-*development packages. - Windows 11: Requires Visual Studio 2022 Build Tools with C++ development workload and Qt 6 for MSVC 2022 64-bit.
Sources: README.md:14-31
Build Configuration
The project utilizes CMakePresets.json to standardize build configurations for development and release environments.
The diagram above illustrates the workflow from selecting a preset to executing the build and test suites.
Sources: CMakePresets.json:4-47, README.md:33-40
Build Commands
To build for development, use the following commands:
cmake --preset dev
cmake --build --preset dev
ctest --preset dev --output-on-failure
Sources: README.md:33-40, AGENTS.md:52-55
Application Startup & Execution
The application is a standalone executable that requires a path to a valid SQLite database. Configuration and database paths can be provided via command-line arguments.
Command Line Options
The entry point in main.cpp uses QCommandLineParser to handle the following parameters:
| Option | Description |
|---|---|
--db | Path to the SQLite database file (ssas.db). |
--project-root | Root directory used for calculating default paths. |
--config-dir | Directory for storing user preferences and logs. |
--smoke-exit-ms | Automatic exit timer for smoke testing. |
--screenshot | Path to save a startup window screenshot and exit. |
Sources: app/desktop/main.cpp:32-47, README.md:61-68
Path Resolution Logic
The application uses the AppPaths class to resolve the location of the preferences file based on the provided config-dir.
The diagram shows how startup options propagate into the infrastructure layer for path resolution.
Sources: app/desktop/main.cpp:49-56, src/platform/AppPaths.cpp:11-23
Packaging and Deployment
Deployment strategies vary by platform, focusing on creating self-contained bundles.
- macOS: Generates an
.appbundle. Deployment involves configuring a release preset and running QML smoke tests against a fixture database before zipping the bundle. - Windows: Uses
windeployqt.exeto create an executable folder with all necessary Qt dependencies. - Linux: Plans include AppImage or distribution-specific packages once CI stability is reached.
Sources: packaging/macos/README.md:1-11, packaging/windows/README.md:1-5, packaging/linux/README.md:1-5, README.md:73-75
Summary
Setting up SSA Consulta Rapida Cpp requires a C++20 environment and Qt 6.6. The build system is streamlined via CMake presets, ensuring consistency across macOS, Windows, and Linux. Successful installation is verified through a suite of Catch2 and QtTest automated tests, after which the application can be executed by pointing to a compatible SQLite database.