2404 if not os.path.isabs(self.pdata["MAINSCRIPT"]): |
2404 if not os.path.isabs(self.pdata["MAINSCRIPT"]): |
2405 ms = os.path.join( |
2405 ms = os.path.join( |
2406 self.ppath, self.pdata["MAINSCRIPT"]) |
2406 self.ppath, self.pdata["MAINSCRIPT"]) |
2407 else: |
2407 else: |
2408 ms = self.pdata["MAINSCRIPT"] |
2408 ms = self.pdata["MAINSCRIPT"] |
2409 os.makedirs(os.path.dirname(ms)) |
2409 os.makedirs(os.path.dirname(ms), exist_ok=True) |
2410 with open(ms, "w"): |
2410 with open(ms, "w"): |
2411 pass |
2411 pass |
2412 self.appendFile(ms, True) |
2412 self.appendFile(ms, True) |
2413 |
2413 |
2414 if self.pdata["MAKEPARAMS"]["MakeEnabled"]: |
2414 if self.pdata["MAKEPARAMS"]["MakeEnabled"]: |
2416 if mf: |
2416 if mf: |
2417 if not os.path.isabs(mf): |
2417 if not os.path.isabs(mf): |
2418 mf = os.path.join(self.ppath, mf) |
2418 mf = os.path.join(self.ppath, mf) |
2419 else: |
2419 else: |
2420 mf = os.path.join(self.ppath, Project.DefaultMakefile) |
2420 mf = os.path.join(self.ppath, Project.DefaultMakefile) |
2421 os.makedirs(os.path.dirname(mf)) |
2421 os.makedirs(os.path.dirname(mf), exist_ok=True) |
2422 with open(mf, "w"): |
2422 with open(mf, "w"): |
2423 pass |
2423 pass |
2424 self.appendFile(mf) |
2424 self.appendFile(mf) |
2425 |
2425 |
2426 tpd = os.path.join(self.ppath, self.translationsRoot) |
2426 tpd = os.path.join(self.ppath, self.translationsRoot) |
2427 if not self.translationsRoot.endswith(os.sep): |
2427 if not self.translationsRoot.endswith(os.sep): |
2428 tpd = os.path.dirname(tpd) |
2428 tpd = os.path.dirname(tpd) |
2429 if not os.path.isdir(tpd): |
2429 if not os.path.isdir(tpd): |
2430 os.makedirs(tpd) |
2430 os.makedirs(tpd, exist_ok=True) |
2431 if self.pdata["TRANSLATIONSBINPATH"]: |
2431 if self.pdata["TRANSLATIONSBINPATH"]: |
2432 tpd = os.path.join( |
2432 tpd = os.path.join( |
2433 self.ppath, self.pdata["TRANSLATIONSBINPATH"]) |
2433 self.ppath, self.pdata["TRANSLATIONSBINPATH"]) |
2434 if not os.path.isdir(tpd): |
2434 if not os.path.isdir(tpd): |
2435 os.makedirs(tpd) |
2435 os.makedirs(tpd, exist_ok=True) |
2436 |
2436 |
2437 # create management directory if not present |
2437 # create management directory if not present |
2438 self.createProjectManagementDir() |
2438 self.createProjectManagementDir() |
2439 |
2439 |
2440 self.saveProject() |
2440 self.saveProject() |