Add the createBertosProject function. This function create the project directory...
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 11 Dec 2008 19:38:40 +0000 (19:38 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 11 Dec 2008 19:38:40 +0000 (19:38 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2013 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/libbertos.py

index 5951cea36128fea1bf6edb5782bff94d1d86fa2e..4d8e8c37b544bb08e22e86056829d7d5811771ad 100644 (file)
@@ -21,4 +21,14 @@ def bertosVersion(directory):
     qfile = QFile(version_file)
     qfile.open(QIODevice.ReadOnly)
     file = QTextStream(qfile)
-    return file.readLine()
\ No newline at end of file
+    version = file.readLine()
+    qfile.close()
+    return version
+
+def createBertosProject(directory):
+    bertos_directory = directory
+    QDir().mkdir(directory)
+    bertos_project = directory + QDir.separator() + "project.bertos"
+    qfile = QFile(bertos_project)
+    qfile.open(QIODevice.WriteOnly)
+    qfile.close()
\ No newline at end of file