[Interest] QtIFW: Can not process @TargetDir@ that contain windows paths
Mike Jackson
imikejackson at gmail.com
Fri Apr 15 15:31:15 CEST 2016
I am trying to run a post install script from a QtIFW generated
installer. In it I need to work with a Windows path of the form
"C:\DREAM3D_SDK/Qt5.6.0" in order to pass the path into the Qt5.6.0
online installer so that the version of Qt gets installed into the
proper location on the users system. The issue is that JavaScript will
remove the "\" character because JS thinks that it starts an escape
sequence. For example some code:
var Path= "@TargetDir@/Qt5.6.0"; // TargetDir = C:\DREAM3D_SDK
var replaced = Path.replace(/\\/g, "/");
// replaced = C:DREAM3D_SDK/Qt5.6.0
The only solution I have found is to use String.raw`` BUT the version of
JS that QtIFW uses does not support that function. Is there some way of
getting @TargetDir@ to hand back either "\\" style or "/" style paths?
Thanks
Mike Jackson
BlueQuartz Software.
More information about the Interest
mailing list