Now the wizard can launch the IDE.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 22 Apr 2009 14:17:23 +0000 (14:17 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 22 Apr 2009 14:17:23 +0000 (14:17 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2633 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/bertos.py
wizard/plugins/codelite.py

index 695a862782bfa826359dfd0bea73c1f9e7d69d7a..ca6072e42e73c6a766b36e83a9ea639adc5eee38 100755 (executable)
@@ -38,6 +38,17 @@ def newProject():
     wizard = BWizard.BWizard(page_list)
     wizard.show()
     wizard.exec_()
+    project = QApplication.instance().project
+    to_be_opened = project.info("TO_BE_OPENED")
+    command_lines = project.info("COMMAND_LINES")
+    relevant_files = project.info("RELEVANT_FILES")
+    if to_be_opened:
+        for ide in to_be_opened:
+            command_line = command_lines[ide]
+            relevant_file = relevant_files[ide]
+            import subprocess
+            subprocess.call(command_line + " \"" + relevant_file + "\"")
+    sys.exit()
     
 def editProject():
     page_list = [BOpenPage, BVersionPage, BCpuPage, BToolchainPage, BModulePage, BOutputPage, BCreationPage, BFinalPage]
@@ -71,7 +82,6 @@ def main():
         pass
     else:
         newProject()
-        sys.exit(app.exec_())
 
 if __name__ == '__main__':
     main()
index d286f57e242b703257a599841522b9addc382597..00de3d12705503b9c7633d54723e1f7ff53cd989 100644 (file)
@@ -24,12 +24,12 @@ def createProject(project_info):
     Function that creates codelite projects and return the project relevant file.
     """
     directory = project_info.info("PROJECT_PATH")
-    prjdir = directory + "/" + os.path.basename(directory)
+    prjdir = directory + os.sep + os.path.basename(directory)
     workspace = codeliteWorkspaceGenerator(project_info)
-    open(directory + "/" + os.path.basename(prjdir) + ".workspace", "w").write(workspace)
+    open(directory + os.sep + os.path.basename(prjdir) + ".workspace", "w").write(workspace)
     project = codeliteProjectGenerator(project_info)
-    open(directory + "/" + os.path.basename(prjdir) + ".project", "w").write(project)
-    return directory + "/" + os.path.basename(prjdir) + ".workspace"
+    open(directory + os.sep + os.path.basename(prjdir) + ".project", "w").write(project)
+    return directory + os.sep + os.path.basename(prjdir) + ".workspace"
 
 ####