This commit is contained in:
恍兮惚兮 2024-07-25 15:48:39 +08:00
parent f2f93afca1
commit f8c54a991d
2 changed files with 6 additions and 3 deletions

View File

@ -129,8 +129,11 @@ def checkintegrity():
def switchdir():
dirname = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
os.chdir(dirname)
sys.path.append("./")
sys.path.append("./userconfig")
sys.path.insert(1, "./")
sys.path.insert(1, "./userconfig")
# 0 是当前目录
# 后面的是系统库或runtime
# 由于自动更新不会删除runtime下可能有历史遗留的同名文件被优先导入
if __name__ == "__main__":

View File

@ -130,7 +130,7 @@ for dependency in all_dependencies:
with open(os.path.join(runtime, f"python{pyversion2}._pth"), "w") as ff:
ff.write(".\n..")
ff.write("..\n.")
copycheck(os.path.join(py37Path, "python3.dll"), runtime)
copycheck(os.path.join(py37Path, f"python{pyversion2}.dll"), runtime)