|
@@ -25,12 +25,12 @@ if len(sys.argv) == 1:
|
|
install_prefix = sys.argv[1]
|
|
install_prefix = sys.argv[1]
|
|
if install_prefix.endswith(os.sep) or install_prefix.endswith('/'):
|
|
if install_prefix.endswith(os.sep) or install_prefix.endswith('/'):
|
|
install_prefix = os.path.join(install_prefix[:-1], "HGSSystem")
|
|
install_prefix = os.path.join(install_prefix[:-1], "HGSSystem")
|
|
|
|
+
|
|
print(f"安装位置: {install_prefix}")
|
|
print(f"安装位置: {install_prefix}")
|
|
if input("[Y/n] ") != "Y":
|
|
if input("[Y/n] ") != "Y":
|
|
exit(1)
|
|
exit(1)
|
|
|
|
|
|
if len(sys.argv) == 2:
|
|
if len(sys.argv) == 2:
|
|
- install_prefix = sys.argv[1]
|
|
|
|
install = ["garbage", "manager", "rank", "website"]
|
|
install = ["garbage", "manager", "rank", "website"]
|
|
else:
|
|
else:
|
|
install = []
|
|
install = []
|
|
@@ -59,14 +59,14 @@ def delete(path):
|
|
os.remove(path)
|
|
os.remove(path)
|
|
|
|
|
|
|
|
|
|
|
|
+check_make_dir(install_prefix)
|
|
|
|
+src = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
+
|
|
for i in os.listdir(install_prefix):
|
|
for i in os.listdir(install_prefix):
|
|
if i in ['app', 'conf', 'core', 'equipment',
|
|
if i in ['app', 'conf', 'core', 'equipment',
|
|
'init.py', 'init.sql', 'LICENSE', 'main.py', 'README.md', 'sql', 'tk_ui', 'tool']:
|
|
'init.py', 'init.sql', 'LICENSE', 'main.py', 'README.md', 'sql', 'tk_ui', 'tool']:
|
|
delete(os.path.join(install_prefix, i))
|
|
delete(os.path.join(install_prefix, i))
|
|
|
|
|
|
-check_make_dir(install_prefix)
|
|
|
|
-src = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
-
|
|
|
|
|
|
|
|
def copy_file(src_path, dest_path):
|
|
def copy_file(src_path, dest_path):
|
|
print(f"复制文件: {src_path} -> {dest_path}")
|
|
print(f"复制文件: {src_path} -> {dest_path}")
|