Skip to content
Open
Changes from all commits
Commits
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
84 changes: 82 additions & 2 deletions Building-on-Linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sudo pacman -S cmake git opencv procps-ng qt6-base qt6-tools
### On Fedora:

```sh
dnf install cmake git opencv-devel procps-ng-devel qt6-qtbase-private-devel qt6-qttools-devel
dnf install cmake git opencv-devel procps-ng-devel qt5-linguist qt5-qtbase-private-devel qt6-qtbase-private-devel qt6-qttools-devel
```

Users of other distributions are encouraged to expand upon this guide.
Expand All @@ -38,7 +38,8 @@ You'll also need to install the following optional dependencies:

Debian/Ubuntu | Arch/Manjaro | Fedora | Description
---------------|--------------|--------|------------------------------------------------------
`wine64-tools` | ??? | ??? | Needed to set SDK_WINE=ON config, as described below.
`wine64-tools` | ??? | `wine-devel` | Needed to set SDK_WINE=ON config, as described below.
??? | ??? | `onnxruntime-devel` | Needed to build the neuralnet tracker.

(i.e. repeat the apt/pacman/dnf command from above, with the optional dependencies
you need appended to the end.)
Expand Down Expand Up @@ -98,5 +99,84 @@ modify the `CMAKE_INSTALL_PREFIX` configuration, e.g:
cmake . -DSDK_WINE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=$HOME/.local
```

To enable the neuralnet tracker also add the ONNXRuntime cmake and include dirs, for example `-DONNXRuntime_DIR=/usr/lib64/cmake/onnxruntime -DONNXRuntime_INCLUDE_DIR=/usr/include/onnxruntime`

and then recompile, etc.

## 9. Package Builds

### Debian/Ubuntu
???

### Arch/Manjaro
???

### Fedora
- Install rpm-build and dnf-plugins-core `sudo dnf -y install rpm-build dnf-plugins-core`
- Download https://github.com/opentrack/opentrack/archive/refs/tags/opentrack-2023.3.0.tar.gz to `~/rpmbuild/SOURCES/opentrack-2023.3.0.tar.gz`
- Create `~/rpmbuild/SPECS/opentrack.spec` with the following contents.
```
Name: opentrack
Version: 2023.3.0
Release: 1%{?dist}
Summary: opentrack is a program for tracking user's head rotation and transmitting it to flight simulation software and military-themed video games.

License: ISC
URL: https://github.com/opentrack/opentrack
Source0: https://github.com/%{name}/%{name}/archive/refs/tags/%{name}-%{version}.tar.gz

BuildRequires: cmake
BuildRequires: git
BuildRequires: onnxruntime-devel
BuildRequires: opencv-devel
BuildRequires: procps-ng-devel
BuildRequires: qt5-linguist
BuildRequires: qt5-qtbase-private-devel
BuildRequires: qt6-qtbase-private-devel
BuildRequires: qt6-qttools-devel
BuildRequires: wine-devel
Requires: onnxruntime

%description
opentrack is a program for tracking user's head rotation and transmitting it to flight simulation software and military-themed video games.

%prep
%setup -q -n %{name}-%{name}-%{version}

%build
%cmake -DSDK_WINE:BOOL=ON -DONNXRuntime_DIR=%{_libdir}/cmake/onnxruntime -DONNXRuntime_INCLUDE_DIR=%{_includedir}/onnxruntime
cd redhat-linux-build
make %{?_smp_mflags}

%install
cat << EOF > opentrack.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Opentrack
Comment="opentrack is a program for tracking user's head rotation and transmitting it to flight simulation software and military-themed video games."
Exec=opentrack
Categories=Game
Keywords=gaming
Icon=opentrack
EOF
desktop-file-install --dir=%{buildroot}%{_datadir}/applications opentrack.desktop
install -Dpm 0644 gui/images/opentrack.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
cd redhat-linux-build
%make_install

%files
%{_bindir}/opentrack
%{_datadir}/applications/opentrack.desktop
%{_datadir}/icons/hicolor/256x256/apps/opentrack.png
%{_datadir}/opentrack
%{_libexecdir}/opentrack
%doc %{_datadir}/doc/opentrack
%license

%changelog
* Mon Sep 22 2025 Jason Montleon <jason@montleon.com> [2023.3.0-1]
- Initial Build
```
- Install build dependencies `sudo dnf builddep -y ~/rpmbuild/SPECS/opentrack.spec`
- Build the package `rpmbuild -ba ~/rpmbuild/SPECS/opentrack.spec`