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

Resource linking ignores installation prefix

Created by: OPNA2608

Describe the bug https://github.com/OpenXRay/xray-16/blob/705d957fbbbb01cc5b86e83708917a5d17c4428e/src/xrCore/xrCore.cpp#L265-L287

This code ignores the user-configurable prefix for the build to which these file & directories actually get installed to.

https://github.com/OpenXRay/xray-16/blob/705d957fbbbb01cc5b86e83708917a5d17c4428e/CMakeLists.txt#L15-L16

https://github.com/OpenXRay/xray-16/blob/705d957fbbbb01cc5b86e83708917a5d17c4428e/res/CMakeLists.txt#L3-L7

We currently need to patch this in Nixpkgs to point to our build's prefix instead.

https://github.com/NixOS/nixpkgs/blob/ce93c98ce2243a8228419fcfbe97fd87f3c5f99e/pkgs/games/openxray/default.nix#L57-L60

To Reproduce

  1. Pass -DCMAKE_INSTALL_PREFIX=/some/path/that/isnt/the/default to CMake
  2. Build & install OpenXRay
  3. Launch OpenXRay in a way that would enter the mentioned block of code

The created symlinks should point to invalid (or at least for this particular build incorrect) paths.

Expected behavior The code should use the prefix the user passed to CMake (e.g. /nix/store/v9s3qr21cf15lx3lgp1x4d4k8pdcc2an-openxray-822-december-preview) instead of hardcoding /usr.

Screenshots n/a

BugTrap error report n/a

Desktop (please complete the following information):

  • OS: Ubuntu 18.04.5 (with Nixpkgs) & NixOS 20.09
  • OpenXRay build version: 822

Additional context I think CMAKE_INSTALL_FULL_DATAROOTDIR is the CMake variable the fixed code should somehow get access to. CMAKE_INSTALL_DATAROOTDIR works for moving files but it may be a relative path, while CMAKE_INSTALL_FULL_DATAROOTDIR is guaranteed to be an absolute one.

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