()
| 318 | return project_config |
| 319 | |
| 320 | def _generate_main_config(): |
| 321 | install_path = inspect.getfile(_find_installed_software).replace('\\', '/').split('/') |
| 322 | install_path = '/'.join(install_path[0:-2]) + '/' |
| 323 | slicap_home = expanduser("~").replace('\\', '/') |
| 324 | home_path = slicap_home + '/' |
| 325 | install_paths = {"install" : install_path, |
| 326 | "user" : home_path, |
| 327 | "docs" : os.path.join(install_path, 'SLiCAP/docs/html/'), |
| 328 | "mainlibs" : os.path.join(install_path, 'SLiCAP/files/lib/'), |
| 329 | "kicadsyms" : os.path.join(install_path, 'SLiCAP/files/kicad/SLiCAP.kicad_sym'), |
| 330 | "ngspicesyms" : os.path.join(install_path, 'SLiCAP/files/kicad/SPICE.kicad_sym'), |
| 331 | "gedasyms" : os.path.join(install_path, 'SLiCAP/files/gSchem/'), |
| 332 | "leptonsyms" : os.path.join(install_path, 'SLiCAP/files/lepton-eda/'), |
| 333 | "ltspicesyms" : os.path.join(install_path, 'SLiCAP/files/LTspice/'), |
| 334 | "latexfiles" : os.path.join(install_path, 'SLiCAP/files/tex/'), |
| 335 | "sphinxfiles" : os.path.join(install_path, 'SLiCAP/files/sphinx/'), |
| 336 | } |
| 337 | |
| 338 | if platform.system() == 'Windows': |
| 339 | commands = _find_installed_windows_software() |
| 340 | else: |
| 341 | commands = _find_installed_software() |
| 342 | main_config = configparser.ConfigParser() |
| 343 | main_config['version'] = {"install_version" : INSTALLVERSION, |
| 344 | "latest_version" : _check_version()} |
| 345 | main_config['installpaths'] = install_paths |
| 346 | main_config['commands'] = commands |
| 347 | return main_config |
| 348 | |
| 349 | def _generate_default_config(): |
| 350 | default_config = {'version':{'install_version' : '', |
no test coverage detected