diff options
-rw-r--r-- | INSTALL | 2 | ||||
-rw-r--r-- | README.md | 7 | ||||
-rwxr-xr-x | install-linux.sh | 2 | ||||
-rwxr-xr-x | src/frontEnd/Application.py | 46 | ||||
-rw-r--r-- | src/ngspicetoModelica/ModelicaUI.py | 2 | ||||
-rw-r--r-- | src/ngspicetoModelica/NgspicetoModelica.py | 2 | ||||
-rw-r--r-- | src/projManagement/Kicad.py | 2 |
7 files changed, 52 insertions, 11 deletions
@@ -34,7 +34,7 @@ Table of contents B. Double click eSim desktop icon - C. From command line : Do `cd src/fronEnd` and type `python Application.py` to open eSim. + C. From command line : Do `cd src/fronEnd` and type `python3 Application.py` to open eSim. 2. eSim installation in Windows @@ -10,12 +10,7 @@ eSim is an open source EDA tool for circuit design, simulation, analysis and PCB * It also has a feature of Model builder and Subcircuit builder. * eSim has been successfully ported to low cost FOSSEE [laptop](http://laptop.fossee.in) -## Open-Source Software Used -* Python. -* KiCad. -* Ngspice. - -## Pre-requisites +##Pre-requisites 1. Python 3.0+ 2. PyQt4 3. Matplotlib diff --git a/install-linux.sh b/install-linux.sh index eb5a02e0..4af3e85b 100755 --- a/install-linux.sh +++ b/install-linux.sh @@ -150,7 +150,7 @@ function createDesktopStartScript #Generating new esim-start.sh echo "#!/bin/bash" > esim-start.sh echo "cd $eSim_Home/src/frontEnd" >> esim-start.sh - echo "python Application.py" >> esim-start.sh + echo "python3 Application.py" >> esim-start.sh #Make it executable sudo chmod 755 esim-start.sh diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index b440902f..c2790a80 100755 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -408,6 +408,52 @@ class Application(QtGui.QMainWindow): self.projDir, self.projName + ".cir.out") self.modelicaNetlist = os.path.join( self.projDir, self.projName + ".mo") + + """ + try: + # Creating a command for Ngspice to Modelica converter + self.cmd1 = " + python3 ../ngspicetoModelica/NgspicetoModelica.py "\ + +self.ngspiceNetlist + self.obj_workThread1 = Worker.WorkerThread(self.cmd1) + self.obj_workThread1.start() + + + if self.obj_validation.validateTool("OMEdit"): + # Creating command to run OMEdit + self.cmd2 = "OMEdit "+self.modelicaNetlist + self.obj_workThread2 = Worker.WorkerThread(self.cmd2) + self.obj_workThread2.start() + else: + self.msg = QtGui.QMessageBox() + self.msgContent = "There was an error while + opening OMEdit.<br/>\ + Please make sure OpenModelica is installed in your\ + system. <br/>\ + To install it on Linux : Go to\ + <a href=https://www.openmodelica.org/download/\ + download-linux>OpenModelica Linux</a> and \ + install nigthly build release.<br/>\ + To install it on Windows : Go to\ + <a href=https://www.openmodelica.org/download/\ + download-windows>OpenModelica Windows</a>\ + and install latest version.<br/>" + self.msg.setTextFormat(QtCore.Qt.RichText) + self.msg.setText(self.msgContent) + self.msg.setWindowTitle("Missing OpenModelica") + self.obj_appconfig.print_info(self.msgContent) + self.msg.exec_() + + except Exception as e: + self.msg = QtGui.QErrorMessage() + self.msg.showMessage( + 'Unable to convert NgSpice netlist to\ + Modelica netlist :'+str(e)) + self.msg.setWindowTitle( + "Ngspice to Modelica conversion error") + self.obj_appconfig.print_error(str(e)) + """ + self.obj_Mainview.obj_dockarea.modelicaEditor(self.projDir) else: diff --git a/src/ngspicetoModelica/ModelicaUI.py b/src/ngspicetoModelica/ModelicaUI.py index daef6e76..1d860fb7 100644 --- a/src/ngspicetoModelica/ModelicaUI.py +++ b/src/ngspicetoModelica/ModelicaUI.py @@ -52,7 +52,7 @@ class OpenModelicaEditor(QtGui.QWidget): def callConverter(self): try: - self.cmd1 = "python ../ngspicetoModelica/NgspicetoModelica.py " + \ + self.cmd1 = "python3 ../ngspicetoModelica/NgspicetoModelica.py " + \ self.ngspiceNetlist + ' ' + self.map_json # self.obj_workThread1 = Worker.WorkerThread(self.cmd1) # self.obj_workThread1.start() diff --git a/src/ngspicetoModelica/NgspicetoModelica.py b/src/ngspicetoModelica/NgspicetoModelica.py index dfeafb53..007c5a74 100644 --- a/src/ngspicetoModelica/NgspicetoModelica.py +++ b/src/ngspicetoModelica/NgspicetoModelica.py @@ -1268,7 +1268,7 @@ def main(args): map_json = sys.argv[2] else: print("USAGE:") - print("python NgspicetoModelica.py <filename>") + print("python3 NgspicetoModelica.py <filename>") sys.exit() dir_name = os.path.dirname(os.path.realpath(filename)) diff --git a/src/projManagement/Kicad.py b/src/projManagement/Kicad.py index d8c413c3..8b20112e 100644 --- a/src/projManagement/Kicad.py +++ b/src/projManagement/Kicad.py @@ -180,7 +180,7 @@ class Kicad: # Creating a command to run """ - self.cmd = ("python ../kicadtoNgspice/KicadtoNgspice.py " + self.cmd = ("python3 ../kicadtoNgspice/KicadtoNgspice.py " + "self.project+".cir ") self.obj_workThread = Worker.WorkerThread(self.cmd) self.obj_workThread.start() |