Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1237

qbs.installPrefix cannot be absolute on Windows without strange consequences

    XMLWordPrintable

Details

    • d0f22778ed84d4aa28ffdb423ecda15cfd2066ea

    Description

      On Windows, if you set, for example:

      qbs.installPrefix: FileInfo.joinPaths(project.buildDirectory, ["qbs", qbsbuildconfig.targetOSFileInfix,
      qbs.architecture, qbsversion.version].join("-"))

      This will result in an error like:

      Directory 'C:\Users\ContainerAdministrator\AppData\Local\Temp\qbs-release-1.11.0\build\release\install-root\C:\Users\ContainerAdministrator\AppData\Local\Temp\qbs-release-1.11.0\build\release\qbs-windows-x86-1.11.0\share\doc\qbs' could not be created.

      The documentation for qbs.installPrefix states "The installPrefix itself is relative to the installRoot in the context of installation." (somewhat implying it is relative) while the Installing Files guide does not actually give any examples of how qbs.installRoot, qbs.installPrefix, and qbs.installDir get combined in practice.

      We should clarify which paths are required/allowed to be absolute/relative and how they get combined in practice.

      In any case, drive letters need to be taken into account when combining Windows paths. Forcibly rebasing paths on Unix is simple: /Users/bob/Builds + /usr/local becomes /Users/bob/Builds/usr/local while on Windows, C:\Users\bob\Builds + C:\Software should become C:\Users\bob\Builds\Software, not C:\Users\bob\Builds\C:\Software, and combining paths with different drive letters should potentially be a fatal error.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            jakepetroules Jake Petroules (DO NOT ASSIGN ISSUES)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes