[Qt-creator] Problems with wizard.json regarding resolution of variables

Stefan uni at stefan-hans.de
Thu Feb 25 10:05:33 CET 2016


using variables within wizard related files works fine with wizard.xml, 
but not with wizard.json regarding resolution of variables.

e.g. %ProjectName% is test

     "version": 1,
     "kind": "project",
     "id": "A.CRN-Modul",
     "category": "A.Project",
     "trDescription": "Creates a console project to develop a CRN modul.",
     "trDisplayName": "CRN-Shell Modul Project",
     "trDisplayCategory": "CRN Projects",
     "icon": "../crn.png",
     "featuresRequired": [ "Plugin.QmakeProjectManager", 
"QtSupport.Wizards.FeatureQt" ],

         { "key": "ProFileName", "value": "%{JS: 
Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
         { "key": "IsTopLevelProject", "value": "%{JS: 
('%{Exists:ProjectExplorer.Profile.Ids}') ? '' : 'yes'}" }

             "trDisplayName": "Project Location",
             "trShortTitle": "Location",
             "typeId": "Project",
             "data": { "trDescription": "This wizard creates a main.cpp 
file to develop a CRN-Shell modul." }
             "trDisplayName": "Kit Selection",
             "trShortTitle": "Kits",
             "typeId": "Kits",
             "enabled": "%{IsTopLevelProject}",
             "data": { "projectFilePath": "%{ProFileName}" }
             "trDisplayName": "Project Management",
             "trShortTitle": "Summary",
             "typeId": "Summary"
             "typeId": "File",
                     "source": "project.pro",
                     "target": "%{ProFileName}",
                     "openAsProject": true
                     "source": "main.cpp",
                     "target": "main.cpp",
                     "openAsProject": false

=> %ProjectName%

<wizard version="1" kind="project"
         class="qmakeproject" firstpage="10"
         id="A.Plain C++" category="A.Project"
     <description>Creates a console project to develop a CRN 
     <displayname>CRN-Shell Modul Project</displayname>;
     <displaycategory>CRN Projects</displaycategory>
         <file source="main.cpp" target="main.%CppSourceSuffix%" 
         <file source="project.pro" target="%ProjectName%.pro" 

=> test

What is the difference in using wizard.json resp. wizard.xml? What am I 
doing wrong?

If you have an idea what it could be or any other hint, always welcome. 
If not, please just ignore me. At the moment I'm fine with wizard.xml.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20160225/2b5fcd0f/attachment.html>

More information about the Qt-creator mailing list