MCPcopy Create free account
hub / github.com/Inori/GPCS4 / WriteCodeFile

Function WriteCodeFile

Tools/GenerateCode.py:306–325  ·  view source on GitHub ↗
(root_dir, imp_mods)

Source from the content-addressed store, hash-verified

304
305
306def WriteCodeFile(root_dir, imp_mods):
307
308 if not os.path.exists(root_dir):
309 os.mkdir(root_dir)
310
311 for mod_name in imp_mods:
312 mod_folder = GetModFolderName(mod_name)
313 mod_folder = os.path.join(root_dir, mod_folder)
314 if not os.path.exists(mod_folder):
315 os.mkdir(mod_folder)
316
317 mod_h, mod_cpp, mod_exp_cpp = GetCodeFileNames(mod_name)
318 fname_h = os.path.join(mod_folder, mod_h)
319 fname_cpp = os.path.join(mod_folder, mod_cpp)
320 fname_exp = os.path.join(mod_folder, mod_exp_cpp)
321
322 # if not os.path.exists(fname_h) and not os.path.exists(fname_cpp):
323 if True:
324 lib_dic = imp_mods[mod_name]
325 WriteSourceFiles(fname_h, fname_cpp, fname_exp, mod_name, lib_dic)
326
327
328def Main():

Callers 1

MainFunction · 0.85

Calls 3

GetModFolderNameFunction · 0.85
GetCodeFileNamesFunction · 0.85
WriteSourceFilesFunction · 0.85

Tested by

no test coverage detected