/bundles/plugins-trunk/Console/console/commands/qmake.xml

# · XML · 48 lines · 40 code · 5 blank · 3 comment · 0 complexity · 5173eea16098d828b027ff2eeb2b9e10 MD5 · raw file

  1. <?xml version="1.0" ?>
  2. <!-- Attempt at invoking qmake from the current buffer's directory -->
  3. <!-- Alan Ezust -->
  4. <!DOCTYPE COMMANDO SYSTEM "commando.dtd">
  5. <COMMANDO>
  6. <UI>
  7. <CHOICE LABEL="qmake in" VARNAME="makeIn" DEFAULT="projectroot">
  8. <OPTION LABEL="Project Root" VALUE="projectroot" />
  9. <OPTION LABEL="Source Dir" VALUE="sourcedir" />
  10. <OPTION LABEL="Custom Location" VALUE="customloc" />
  11. </CHOICE>
  12. <DIR_ENTRY LABEL="Source Dir"
  13. VARNAME = "sourcedir"
  14. EVAL = 'new File(buffer.getPath()).getParent()' />
  15. <!-- <CAPTION LABEL="Config"> -->
  16. <DIR_ENTRY LABEL="Project Root"
  17. VARNAME = "projectroot"
  18. EVAL = 'getProjectRoot(view, buffer)' />
  19. <DIR_ENTRY LABEL="Custom Location" VARNAME = "customlocation" />
  20. <TOGGLE LABEL="Build Project file" VARNAME="makeProject" />
  21. <ENTRY LABEL="Project file to use" VARNAME="projectFile"
  22. DEFAULT=" " />
  23. </UI>
  24. <COMMANDS>
  25. <COMMAND CONFIRM="FALSE" SHELL="System">
  26. if (makeIn.equals("projectroot")) {
  27. location = projectroot;
  28. }
  29. else if (makeIn.equals("customloc")) {
  30. location = customlocation;
  31. }
  32. else location=sourcedir;
  33. return "cd \"" + location + "\"";
  34. </COMMAND>
  35. <COMMAND SHELL="System" CONFIRM="FALSE">
  36. buf = new StringBuffer();
  37. buf.append("qmake ");
  38. if (makeProject) buf.append("-project ");
  39. buf.append(projectFile);
  40. buf.toString();
  41. </COMMAND>
  42. </COMMANDS>
  43. </COMMANDO>