• X xray-16
  • Информация о проекте
    • Информация о проекте
    • Активность
    • Метки
    • Участники
  • Репозиторий
    • Репозиторий
    • Файлы
    • Коммиты
    • Ветки
    • Теги
    • Участники
    • Диаграмма
    • Сравнение
  • Задачи 216
    • Задачи 216
    • Список
    • Доски
    • Спринты
  • Запросы на слияние 31
    • Запросы на слияние 31
  • CI/CD
    • CI/CD
    • Конвейеры
    • Задания
    • Расписания
  • Развертывания
    • Развертывания
    • Окружения
    • Релизы
  • Пакеты и реестры
    • Пакеты и реестры
    • Реестр пакетов
    • Реестр контейнеров
  • Мониторинг
    • Мониторинг
    • Инциденты
  • Аналитика
    • Аналитика
    • Поток ценности
    • CI/CD
    • Репозиторий
  • Wiki
    • Wiki
  • Сниппеты
    • Сниппеты
  • Активность
  • Диаграмма
  • Создать новую задачу
  • Задания
  • Коммиты
  • Доски с задачами
Свернуть панель
  • OpenXRay
  • xray-16
  • Задачи
  • #1298
Закр.
Открыто
Задача созд. Апр 16, 2023 пользователемxottab-duty@xottab-dutyВладелец

CLocatorAPI::setup_fs_path symlinking ignores CMAKE_INSTALL_DATAROOTDIR

Created by: OPNA2608

Describe the bug Introduced by https://github.com/OpenXRay/xray-16/pull/739, https://github.com/OpenXRay/xray-16/commit/c076c7a5780acdf1c95e5cb51982ff1ba7bb0d82: https://github.com/OpenXRay/xray-16/blob/c393d2d8530f8f6795852affc56b33d9a3d6dd61/src/xrCore/LocatorAPI.cpp#L873-L887

This assumes that fsgame.ltx and gamedata/shaders/gl are always installed to /usr/share/openxray, which is not the case: https://github.com/OpenXRay/xray-16/blob/83c0397f2b51e12f1507697c1f2a8e1095a62f5a/res/CMakeLists.txt#L3-L5

Building with a different CMAKE_INSTALL_PREFIX or CMAKE_INSTALL_DATAROOTDIR breaks this assumption and produces bogus symlinks.

To Reproduce Steps to reproduce the behavior:

  1. Build with cmake -DCMAKE_INSTALL_PREFIX=/usr/local and install
  2. Run xr_3da in an environment where the pref path in the user's home doesn't exist
  3. Observe that it produces bogus symlinks to /usr/share/openxray, while the files were actually installed to /usr/local/share/openxray

Expected behavior The CMake script should make the value of CMAKE_INSTALL_FULL_DATAROOTDIR available to this code via a define (either under this or a less CMake-specific name) and the symlinking calls should be

symlink(CMAKE_INSTALL_FULL_DATAROOTDIR "/openxray/...", tmp);

Screenshots image

BugTrap error report n/a

Desktop (please complete the following information):

  • OS: NixOS unstable
  • OpenXRay build version 83c0397f

Additional context Should be replicable on any Linux system.

Ответственный
Назначить
Оценка трудозатрат