Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0cc85e2
third-party: add ARM64 support for FTDI library download
idlethread Apr 30, 2026
a45762c
third-party: fix FTDI static lib glob to search recursively
idlethread Apr 30, 2026
050c449
cmake: fix qt_generate_deploy_app_script compat with Qt < 6.5
idlethread Apr 30, 2026
30e5c65
qcommon: select QCheckBox signal compatible with Qt < 6.7 and >= 6.7
idlethread Apr 30, 2026
e4dc8ea
cmake: replace hardcoded x64 link path with STATIC_LIBPATH
idlethread May 4, 2026
c292eed
cmake: qualify build/output dirs by distro ID for container testing
idlethread May 6, 2026
ffa3965
build: parallelize cmake build across all available CPUs
idlethread May 6, 2026
4dde09c
build: add --pristine/--incremental options to build.sh and build.bat
idlethread Apr 30, 2026
1afa848
cmake: add macOS CONFIGURATION branch in Common.cmake
idlethread May 4, 2026
edf970b
third-party: add macOS FTDI D2XX support
idlethread May 4, 2026
723a25f
third-party: link CoreFoundation and IOKit via ftd2xx INTERFACE on macOS
idlethread May 4, 2026
bc545a1
updatedevicelist: fix platform-specific path constants on macOS
idlethread May 4, 2026
a9c9a2b
TACDev: fix TACDEV_EXPORT macro for macOS
idlethread May 6, 2026
36b9065
cmake: lower Qt minimum version to 6.8
idlethread Apr 30, 2026
e64d657
build: add --no-gui flag to build.sh and build.bat
idlethread Apr 28, 2026
0db0464
build: skip Debug build by default, add --debug flag to opt in
idlethread May 6, 2026
671aa31
TACDev: declare library as STATIC
idlethread May 8, 2026
cfeb8e7
cmake: add install rules for TACDev and QCommonConsole
idlethread Apr 20, 2026
bef6778
build: add --install option to build.sh and build.bat
idlethread May 8, 2026
78cdcf3
cmake: add MACOSX_BUNDLE to GUI apps only on macOS
idlethread May 8, 2026
76b5ba1
cmake: skip Qt deploy script on Linux system installs
idlethread May 8, 2026
11978c4
build: add --deploy flag to opt in to Qt runtime bundling
idlethread May 8, 2026
e4632b4
build: pristine clean only the current platform's build directories
idlethread May 8, 2026
1ae35e2
docs: document new build options
idlethread May 6, 2026
1a5bb4a
docs: document Linux build prerequisites
idlethread May 8, 2026
2ca50ad
docs: document Windows build prerequisites
idlethread May 8, 2026
fb47bdf
docs: add macOS guide and build prerequisites
idlethread May 8, 2026
3d5274d
docs: document cmake install target per platform
idlethread May 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,26 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core Multimedia)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Concurrent Gui Multimedia MultimediaWidgets Network SerialPort Widgets Xml)
option(BUILD_UI "Build GUI applications and UI libraries" ON)

qt_standard_project_setup(REQUIRES 6.9)
if(BUILD_UI)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core Multimedia)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Concurrent Gui Multimedia MultimediaWidgets Network SerialPort Widgets Xml)
else()
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Concurrent Core Network SerialPort Xml)
endif()

qt_standard_project_setup(REQUIRES 6.8)
include(GNUInstallDirs)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing binaries on the setup is still in discussion and we're reviewing options on ways to do it. As part of the build requirement outlined in the PR description, the generated binaries should help. We would like to review multiple options before comitting in this case.


add_subdirectory(third-party)
add_subdirectory(src/libraries)
add_subdirectory(src/applications)
if(BUILD_UI)
add_subdirectory(src/applications)
endif()
add_subdirectory(interfaces)

install(DIRECTORY configurations/
DESTINATION ${CMAKE_INSTALL_DATADIR}/qtac/configurations
)
269 changes: 245 additions & 24 deletions README.md

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Is this PR validated on MacOS for correctness?
  2. Why are we asking users to downgrade Qt to 6.8 from 6.9?
  3. Was Visual Studio 2022 guide not clear in its previous form?
  4. We have a separate documentation for installation using Qt GUI. Does that not help?
  5. The readme seems over explained. The PR description outlines to add --no-gui flag but introduces several others
  6. Each of these flags, will require a separate review on their effectiveness in the build process

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Biswajit Roy (@Biswajee) If distro hosted versions of Qt work for QTAC, IMO we should prefer those versions instead and not unnecessarily require the use of Qt Creator. IMO, it increases the difficulty of building and using Qtac for no gain that I can see.

Are there specific features that we need from Qt 6.9 instead of using what Debian/Ubuntu/Fedora/MacOS already have available in their repos?

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- [Common Prerequisites](#common-prerequisites)
- [Windows Guide](#windows-guide)
- [Linux Guide](#linux-guide)
- [macOS Guide](#macos-guide)
- [Installing QTAC](#installing-qtac)
- [Repository Structure](#repository-structure)
- [Application Dependency Architecture](#application-dependency-architecture)
- [Advanced Topics](#advanced-topics)
Expand Down Expand Up @@ -80,16 +82,33 @@ git clone https://github.com/qualcomm/qcom-test-automation-controller.git

### Configuration

1. **Visual Studio**: Install **Desktop development with C++** and **.NET desktop development**.
1. **Git**: Install [Git for Windows](https://git-scm.com/download/win).

2. **Visual Studio 2022**: Install the
[Community](https://aka.ms/vs/17/release/vs_community.exe),
Professional, or Enterprise edition and select the following workloads:
- **Desktop development with C++** (required — provides MSVC compiler, CMake, and Ninja)
- **.NET desktop development** (required for C# interop builds)

![Desktop development with C++](./docs/resources/qtac-msvc-2022-requirements.png)
2. **Qt**: Install Qt 6.9+ for **MSVC 2022 64-bit**, **Qt Serial Port** and **Qt Multimedia** components.

> [!NOTE]
> Installation using Qt Online Installer will require users to create a Qt account.
3. **Environment Variable**:

> [!NOTE]
> CMake 3.16+ and Ninja are bundled with Visual Studio; no separate installation needed.

3. **Qt 6.8+**: Use the [Qt Online Installer](https://www.qt.io/download-qt-installer-oss)
and select the following for the **MSVC 2022 64-bit** target:
- Qt 6.8.x → **MSVC 2022 64-bit** (compiler binaries)
- Qt 6.8.x → **Qt Serial Port**
- Qt 6.8.x → **Qt Multimedia**

> [!NOTE]
> Installation using Qt Online Installer requires a Qt account.

4. **Environment Variable** — set `QTBIN` permanently in your user environment:
```cmd
setx QTBIN C:\Qt\<version>\msvc2022_64\bin
```
Open a new command prompt after running `setx` for the change to take effect.

### Build & Usage

Expand All @@ -99,8 +118,18 @@ Execute `build.bat` to generate executables:
build.bat
```

**Build options**:
| Flag | Description |
| :-- | :-- |
| `--pristine` | Delete `build\`, `__Builds\`, and cached downloads before building (default) |
| `--incremental` | Reuse existing build tree and downloaded libraries |
| `--no-gui` | Build only headless libraries (`QCommonConsole`, `TACDev`) without Qt GUI modules or applications |
| `--debug` | Also build a Debug configuration (Release is always built) |
| `--install` | Install binaries, libraries, headers, and configs to `CMAKE_INSTALL_PREFIX` (default: `C:\Program Files\QTAC`); requires Administrator |
| `--deploy` | Run `windeployqt` to bundle Qt DLLs into each app directory (slow; use for distribution packages) |

**Build output**:
- Debug: `__Builds\x64\Debug`
- Debug (with `--debug`): `__Builds\x64\Debug`
- Release: `__Builds\x64\Release`

**Usage**:
Expand All @@ -115,25 +144,57 @@ __Builds\x64\Release\QTAC.exe
> [!IMPORTANT]
> - Installation using Qt Online Installer will require users to create a Qt account.
> - If you're frequently working with Qt on Linux, consider adding the environment variables to `.bashrc`.
> - Using `sudo apt install <package>` will update setup packages. Review command usage to prevent issues with other applications.

1. **Qt Installation** (choose one):

**Option A**: Qt Online Installer
- Install Qt 6.9+ for **GCC 64-bit** and **Qt Serial Port** component using [Qt Online Installer](https://www.qt.io/download-qt-installer-oss)

**Option B**: Quick Installation via apt

1. **Build Tools**:
```bash
sudo apt install qt6-base-dev qt6-serialport-dev
sudo apt install cmake build-essential ninja-build git
```
2. **Runtime Dependencies**:
- `cmake` 3.16 or later
- `build-essential` — GCC/G++ 11 or later and make
- `ninja-build` — faster parallel builds (recommended)

2. **Qt 6.8+** (choose one):

**Option A**: System Qt via apt (Ubuntu 24.04+ / Debian 13+)
```bash
sudo apt install qt6-base-dev qt6-multimedia-dev qt6-serialport-dev qt6-tools-dev
```
> [!NOTE]
> Ubuntu 22.04 ships Qt 6.2 which is too old. Use Option B or C on 22.04.

For `--no-gui` builds only `QCommonConsole` and `TACDev` are compiled, so fewer Qt
packages are needed:
```bash
sudo apt install qt6-base-dev qt6-serialport-dev qt6-tools-dev
```

**Option B**: Qt Online Installer (any distro / Ubuntu version)
- Install Qt 6.8+ for **GCC 64-bit**, selecting the **Qt Serial Port** and
**Qt Multimedia** components using the
[Qt Online Installer](https://www.qt.io/download-qt-installer-oss)

**Option C**: aqtinstall (scriptable, no Qt account required)
```bash
pip install aqtinstall
aqt install-qt linux desktop 6.8.0 gcc_64 -m qtserialport qtmultimedia
```

3. **USB Access** — install the udev rule so the debug board is accessible without root:
```bash
sudo cp udev-rules/99-QTAC-USB.rules /etc/udev/rules.d/
sudo udevadm control --reload
sudo udevadm trigger
```

4. **Environment Variable** — set `QTBIN` to the Qt `bin/` directory:

System Qt (apt):
```bash
export QTBIN=/usr/lib/qt6/bin
```
4. **Environment Variable**:
Qt Online Installer or aqtinstall:
```bash
export QTBIN=/path/to/Qt/directory/<version>/gcc_64/bin
export QTBIN=~/Qt/6.8.0/gcc_64/bin
```

### Build & Usage
Expand All @@ -144,18 +205,178 @@ Execute `build.sh` to generate executables:
./build.sh
```

**Build options**:
| Flag | Description |
| :-- | :-- |
| `--pristine` | Delete `build/`, `__Builds/`, and cached downloads before building (default) |
| `--incremental` | Reuse the existing build tree; skip the clean step. |
| `--no-gui` | Build only headless libraries (`QCommonConsole`, `TACDev`) without Qt GUI modules or applications; omits Qt Multimedia, Widgets, `qcommon`, `ui-common`, and all GUI apps |
| `--debug` | Also build a Debug configuration (Release is always built). |
| `--install` | Install binaries, libraries, headers, and configs to `CMAKE_INSTALL_PREFIX` (default: `/usr/local`); invokes `sudo cmake --install` |
| `--deploy` | Run `macdeployqt` to bundle Qt frameworks into each app bundle (slow; use for distribution packages; macOS only) |

**No-GUI build** — omits Qt Multimedia, Qt Widgets, `qcommon`, `ui-common`, and all GUI
applications. Only `QCommonConsole` and `TACDev` are compiled:

```bash
./build.sh --no-gui
```

**Build output**:
- Debug: `__Builds/Linux/Debug`
- Release: `__Builds/Linux/Release`
- Release: `__Builds/Linux-<distro>/Release`
- Debug (with `--debug`): `__Builds/Linux-<distro>/Debug`

> [!NOTE]
> Ensure that [make](https://www.gnu.org/software/make/) is available in your environment before building.
**Usage**:
```bash
./__Builds/Linux-$(. /etc/os-release && echo "$ID")/Release/bin/TAC
```

## macOS Guide

### Configuration

1. **Xcode Command Line Tools**:
```bash
xcode-select --install
```

2. **CMake 3.16+** (choose one):
- Download from [cmake.org](https://cmake.org/download/)
- Or install via Homebrew: `brew install cmake`

3. **Qt 6.8+** (choose one):

**Option A**: Homebrew (simplest — includes all required modules)
```bash
brew install qt
```

**Option B**: Qt Online Installer
- Use the [Qt Online Installer](https://www.qt.io/download-qt-installer-oss) and select
the following for the **macOS** target:
- Qt 6.8.x → **macOS** (compiler binaries)
- Qt 6.8.x → **Qt Serial Port**
- Qt 6.8.x → **Qt Multimedia**

> [!NOTE]
> Installation using Qt Online Installer requires a Qt account.

4. **Environment Variable** — set `QTBIN` to the Qt `bin/` directory:

Homebrew:
```bash
export QTBIN=$(brew --prefix qt)/bin
```
Qt Online Installer:
```bash
export QTBIN=~/Qt/6.8.0/macos/bin
```

### Build & Usage

`build.sh` is used on macOS with the same flags as Linux. FTDI D2XX is downloaded
automatically from an FTDI-provided DMG at cmake configure time (requires `hdiutil`,
which is built into macOS).

```bash
./build.sh
```

**Build output**:
- Release: `__Builds/macOS/Release`
- Debug (with `--debug`): `__Builds/macOS/Debug`

**Usage**:
```bash
./__Builds/Linux/Release/QTAC
open __Builds/macOS/Release/bin/TAC.app
```

## Installing QTAC

Pass `--install` to `build.sh` or `build.bat` to run `cmake --install` after a successful
build. The default install prefix is `/usr/local` on Linux/macOS and
`C:\Program Files\QTAC` on Windows. Override it by setting `CMAKE_INSTALL_PREFIX` in your
cmake invocation.

### Linux

```bash
./build.sh --install
# or, to install to a custom prefix:
cmake --install build/debian/Release --prefix /opt/qtac
```

| Installed path | Content |
| :-- | :-- |
| `$PREFIX/bin/TAC` | Test Automation Controller GUI |
| `$PREFIX/bin/TACConfigEditor` | TAC Configuration Editor GUI |
| `$PREFIX/bin/DeviceCatalog` | Device Catalog GUI |
| `$PREFIX/bin/DevList` | List connected debug boards |
| `$PREFIX/bin/TACDump` | Dump TAC configuration |
| `$PREFIX/bin/FTDICheck` | FTDI device diagnostics |
| `$PREFIX/bin/UpdateDeviceList` | Update the device list |
| `$PREFIX/bin/LITEProgrammer` | Program LITE debug boards |
| `$PREFIX/bin/qt.conf` | Qt plugin path for installed binaries |
| `$PREFIX/lib/libTACDev.a` | TACDev C++ static library |
| `$PREFIX/lib/libftd2xx.a` | FTDI D2XX static library |
| `$PREFIX/include/qtac/TACDev.h` | TACDev public header |
| `$PREFIX/share/qtac/configurations/` | Device configuration files (`.tcnf`, `devicelist.json`) |
| `$PREFIX/share/applications/` | `.desktop` files for TAC, TACConfigEditor, DeviceCatalog |
| `$PREFIX/share/icons/` | Application icons |

Installed binaries have RPATH `$ORIGIN:$ORIGIN/../lib` so they find `libftd2xx.a` at
runtime without needing `LD_LIBRARY_PATH`.

### Windows

Run `build.bat --install` from an **Administrator** command prompt. The install step
checks for Administrator privileges and exits if not elevated.

| Installed path | Content |
| :-- | :-- |
| `$PREFIX\bin\TAC.exe` | Test Automation Controller GUI |
| `$PREFIX\bin\TACConfigEditor.exe` | TAC Configuration Editor GUI |
| `$PREFIX\bin\DeviceCatalog.exe` | Device Catalog GUI |
| `$PREFIX\bin\DevList.exe` | List connected debug boards |
| `$PREFIX\bin\TACDump.exe` | Dump TAC configuration |
| `$PREFIX\bin\FTDICheck.exe` | FTDI device diagnostics |
| `$PREFIX\bin\UpdateDeviceList.exe` | Update the device list |
| `$PREFIX\bin\LITEProgrammer.exe` | Program LITE debug boards |
| `$PREFIX\lib\TACDev.lib` | TACDev C++ static library (Release) |
| `$PREFIX\lib\ftd2xx.lib` | FTDI D2XX static library |
| `$PREFIX\include\qtac\TACDev.h` | TACDev public header |
| `$PREFIX\share\qtac\configurations\` | Device configuration files |

> [!NOTE]
> Qt DLLs are **not** bundled unless `--deploy` was also passed. Without `--deploy`,
> ensure Qt's `bin\` directory is on `PATH` when running installed binaries.

### macOS

```bash
./build.sh --install
# or, to install to a custom prefix:
sudo cmake --install build/macOS/Release --prefix /opt/qtac
```

| Installed path | Content |
| :-- | :-- |
| `$PREFIX/bin/TAC.app` | Test Automation Controller GUI (app bundle) |
| `$PREFIX/bin/TACConfigEditor.app` | TAC Configuration Editor GUI (app bundle) |
| `$PREFIX/bin/DeviceCatalog.app` | Device Catalog GUI (app bundle) |
| `$PREFIX/bin/DevList` | List connected debug boards |
| `$PREFIX/bin/TACDump` | Dump TAC configuration |
| `$PREFIX/bin/FTDICheck` | FTDI device diagnostics |
| `$PREFIX/bin/UpdateDeviceList` | Update the device list |
| `$PREFIX/bin/LITEProgrammer` | Program LITE debug boards |
| `$PREFIX/lib/libTACDev.a` | TACDev C++ static library |
| `$PREFIX/lib/libftd2xx.a` | FTDI D2XX static library |
| `$PREFIX/include/qtac/TACDev.h` | TACDev public header |
| `$PREFIX/share/qtac/configurations/` | Device configuration files |

App bundles embed an RPATH pointing to the Qt frameworks directory used at build time.
Pass `--deploy` to run `macdeployqt` and make bundles fully self-contained for distribution.

## Repository Structure

| Directory | Content |
Expand Down
Loading
Loading