Uploaded image for project: 'Qt Installer Framework'
  1. Qt Installer Framework
  2. QTIFW-844

@TargetDir@ that contain Windows file paths become unusable in JavaScript due to the use of Backslash in the path

    XMLWordPrintable

Details

    • 3
    • Qt6 Installer Sprint 9

    Description

      Attempting to use @TargetDir@ in a windows environment will result in backslashes in the returned string. JavaScript will remove these backslash characters which results in an unusable path for any type of processing. The following code will fail:

      Component.prototype.createOperations = function()
      {
        component.createOperations();
      
        var res = "@TargetDir@/Qt5.6.0"; // TargetDir = C:\DREAM3D_SDK
        var replaced = res.replace(/\\/g, "/");// replaced  = C:DREAM3D_SDK/Qt5.6.0
        component.addOperation("Replace", "@TargetDir@/Qt_HeadlessInstall.js", "DREAM3D_INSTALL_LOCATION", replaced);
        component.addOperation("Execute", "@TargetDir@/qt-unified-windows-x86-2.0.3-online.exe", "--script", "@TargetDir@/Qt_HeadlessInstall.js");
      
      }
      

      Attachments

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

        Activity

          People

            kamartti Katja Marttila
            imikejackson Michael Jackson
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes