Skip to content

Commit 167d978

Browse files
committed
[mod]优化了win下自动复制的脚本
1 parent c807723 commit 167d978

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

copy_bins_win.bat

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
@echo this is for envs on which python is not registered to PATH
2-
python ./scripts/copy_bins_win.py
1+
@echo off
2+
set despath=%1
3+
if "%despath%"=="" set despath="../wtpy"
4+
python ./scripts/copy_bins_win.py %despath%

scripts/copy_bins_win.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import shutil
33
from datetime import datetime
4+
import sys
45

56
'''
67
!!!!重要提示!!!!
@@ -57,17 +58,17 @@ def copyBin(srcDir:str, desDir:str, pdbBakDir:str):
5758
print("pdb copied: %s -> %s" % (pdb_path, os.path.join(pdbBakDir, pdbname)))
5859

5960

60-
61+
despath = sys.argv[1]
6162

6263
now = datetime.now().strftime("%m%d_%H%M")
63-
pdbBakDir = os.path.join("../wtpy", "pdb_"+now)
64+
pdbBakDir = os.path.join(despath, "pdb_"+now)
6465
if not os.path.exists(pdbBakDir):
6566
os.mkdir(pdbBakDir)
6667

6768
#复制x86
68-
copyBin("./src/Win32/Release", "../wtpy/wtpy/wrapper/x86", os.path.join(pdbBakDir,"x86"))
69+
copyBin("./src/Win32/Release", os.path.join(despath, "wtpy/wrapper/x86"), os.path.join(pdbBakDir,"x86"))
6970
#复制x64
70-
copyBin("./src/x64/Release", "../wtpy/wtpy/wrapper/x64", os.path.join(pdbBakDir,"x64"))
71+
copyBin("./src/x64/Release", os.path.join(despath, "wtpy/wrapper/x64"), os.path.join(pdbBakDir,"x64"))
7172

7273
#压缩pdb备份目录
7374
paths = os.path.split(__file__)

0 commit comments

Comments
 (0)