Skip to content

Commit

Permalink
chore:修改引用版本
Browse files Browse the repository at this point in the history
  • Loading branch information
wxh0402 committed Jan 4, 2021
1 parent 9135fd9 commit 8de2585
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
21 changes: 9 additions & 12 deletions main.py
Expand Up @@ -403,19 +403,16 @@ def show_progress(self,file_name, total_size, now_size):
import PyQt5.QtCore as qtc
if __name__ == '__main__':
主进程PID = os.getpid()
# print(主进程PID)
# logger.info(sys.argv)
# 带参数传入打开程序
if len(sys.argv) > 1:
try:
#杀老进程
os.system("taskkill /pid {} -f".format(sys.argv[1]))
time.sleep(5)
if "main.py" not in sys.argv[2]:
# 删除老版本
os.remove(sys.argv[2])
except Exception as error:
logger.error("error={} \n detail {}".format(error,traceback.print_exc()))
try:
#杀老进程
os.system("taskkill /pid {} -f".format(sys.argv[1]))
time.sleep(5)
if "main.py" not in sys.argv[2]:
# 删除老版本
os.remove(sys.argv[2])
except Exception as error:
logger.error("error={} \n detail {}".format(error,traceback.print_exc()))
if 窗口显示模式 == 1:
if hasattr(qtc.Qt, 'AA_EnableHighDpiScaling'):
QtWidgets.QApplication.setAttribute(qtc.Qt.AA_EnableHighDpiScaling, True)
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
@@ -1,6 +1,6 @@
# pip install --user -i https://pypi.mirrors.ustc.edu.cn/simple/ -r requirements.txt
# pip install wheel==0.35.1
# pip install -i https://pypi.mirrors.ustc.edu.cn/simple/ -r requirements.txt
lanzou-api==2.5.8.2
wheel==0.35.1
pyinstaller==4.0
pypiwin32==223
PyQt5==5.15.1
PyQt5==5.15.2

0 comments on commit 8de2585

Please sign in to comment.