QApplication.instance().dialog.show()
def main():
+ rundir = os.getcwd()
os.chdir(os.path.dirname(os.path.abspath(sys.argv[0])))
app = QApplication(sys.argv)
app.settings = QSettings("Develer", "Bertos Configurator")
os.system("rcc -binary bertos.qrc -o bertos.rcc")
QResource.registerResource("bertos.rcc")
if len(sys.argv) == 3 and sys.argv[1] == "--edit":
- editProject(sys.argv[2])
+ editProject(os.path.join(rundir, sys.argv[2]))
else:
newProject()
\r
def _excepthook(exc_type, exc_value, exc_traceback):\r
project_dir = QApplication.instance().project.info("PROJECT_PATH")\r
+ if not project_dir:\r
+ project_dir = os.getcwd()\r
file_name = os.path.join(project_dir, "wizard_error.log")\r
if os.path.exists(file_name):\r
content = open(file_name, "r").read()\r
f.write(">"*80 + "\n")\r
f.write(content)\r
f.close()\r
+ print>>sys.stderr, message\r
QMessageBox.critical(\r
None,\r
"Exception occurred",\r