| 107 | class PuppetLauncher: |
| 108 | """Handles launching the puppet process.""" |
| 109 | |
| 110 | def __init__(self): |
| 111 | self.process = None |
| 112 | self.httpd = None |
| 113 | self.lockfile = None |
| 114 | self.owns_lockfile = False |
| 115 | self.webview_path = None |
| 116 | self.models_dir = None |
| 117 | self.log_file = None |
| 118 | |
| 119 | # Set paths |
| 120 | project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
| 121 | self.webview_path = viewer_path_for_project(project_root) |
| 122 | self.models_dir = os.path.join(self.webview_path, "models") |
| 123 | self.main_py = os.path.join(project_root, "src", "main.py") |
| 124 | self.cli_sh = os.path.join(project_root, "src", "cli.sh") |
| 125 | self.lockfile = os.path.join(project_root, "src", "nyarchlinux-desktop-puppet.lock") |
| 126 | |