diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..359bb53
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..105ce2d
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..a6218fe
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..614b3c1
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/python.iml b/.idea/python.iml
new file mode 100644
index 0000000..d0876a7
--- /dev/null
+++ b/.idea/python.iml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.en.md b/README.en.md
deleted file mode 100644
index a614913..0000000
--- a/README.en.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# Python_flie
-
-#### Description
-{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
-
-#### Software Architecture
-Software architecture description
-
-#### Installation
-
-1. xxxx
-2. xxxx
-3. xxxx
-
-#### Instructions
-
-1. xxxx
-2. xxxx
-3. xxxx
-
-#### Contribution
-
-1. Fork the repository
-2. Create Feat_xxx branch
-3. Commit your code
-4. Create Pull Request
-
-
-#### Gitee Feature
-
-1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
-2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
-3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
-4. The most valuable open source project [GVP](https://gitee.com/gvp)
-5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
-6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
diff --git a/README.md b/README.md
index 69b76cd..00c74d6 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,3 @@
+**_本仓库为私人仓库_**
+
**b667c019058732967262412c7aee4475**
\ No newline at end of file
diff --git a/change.py b/change.py
deleted file mode 100644
index 7c6ff11..0000000
--- a/change.py
+++ /dev/null
@@ -1,65 +0,0 @@
-import ctypes
-import sys
-import os
-from time import sleep
-import shelve
-
-path = os.getcwd()
-with shelve.open('main.db') as db:
- bin_name = db['bin_name']
- db.close()
-print(path)
-
-def is_admin():
- # 检查当前是否有管理员权限
- try:
- return ctypes.windll.shell32.IsUserAnAdmin()
- except:
- return False
-
-if is_admin():
- # 如果已经是管理员,执行主要的逻辑
- while True:
- print("已获得管理员权限")
- print(f"当前模式(1为cs原版,2为csso):{bin_name}")
- print("请选择模式")
- print("1.改为csso 2.改回原版 3.退出")
- ip = input(int('>>>'))
-
- # 逻辑系统bin2为csso文件 bin1为cs原版文件 bin为现在使用的游戏文件
- if ip == int(1):
- if bin_name == int(1):
- print('错误,你已是原版')
- sleep(1.5)
- sys.exit()
- os.system(f"ren {path}/bin {path}/bin1")
- os.system(f"ren {path}/bin2 {path}/bin")
- with shelve.open('main.db') as db:
- db['bin_name'] = int(1)
- db.close()
- print("完成!")
- sleep(1.85)
- sys.exit()
- elif ip == int(2):
- if bin_name == int(2):
- print("错误,你已是csso!")
- sleep(1.5)
- sys.exit()
- os.system(f"ren {path}/bin {path}/bin2")
- os.system(f"ren {path}/bin1 {path}/bin")
- with shelve.open('main.db') as db:
- db['bin_name'] = int(2)
- db.close()
- print("完成!")
- sleep(1.55)
- sys.exit()
- elif ip == int(3):
- sys.exit()
- else:
- print("输入错误!")
-
-else:
- # 如果没有管理员权限,重新以管理员权限运行脚本
- print("请求管理员权限...")
- # 使用 `ctypes` 模块提升权限,重新运行脚本
- ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, " ".join(sys.argv), None, 1)
\ No newline at end of file
diff --git a/change/change.py b/change/change.py
new file mode 100644
index 0000000..41b3fd8
--- /dev/null
+++ b/change/change.py
@@ -0,0 +1,82 @@
+import ctypes
+import sys
+import os
+from time import sleep
+import shelve
+
+
+def get_path(relative_path):
+ try:
+ path = sys._MEIPASS # pyinstaller 打包后的路径
+ except AttributeError:
+ path = os.path.abspath(".") # 当前工作目录的路径
+
+ return os.path.normpath(os.path.join(path, relative_path)) # 返回实际路径
+
+
+with shelve.open('main.db') as db:
+ # 如果数据库中没有 'bin_name',返回 '1'(默认值)
+ bin_name = db.get('bin_name', '1')
+
+ if bin_name is None:
+ os.startfile(get_path('load.exe'))
+
+
+def is_admin():
+ """检查当前是否有管理员权限"""
+ try:
+ return ctypes.windll.shell32.IsUserAnAdmin()
+ except:
+ return False
+
+
+if is_admin():
+ # 如果已经是管理员,执行主要的逻辑
+ print("已获得管理员权限")
+ print(f"当前模式(1为CS原版, 2为CS:SO): {bin_name}")
+ print("请选择模式")
+ print("1. 改为CS:SO\n2. 改回原版\n3. 退出")
+
+ choice = input('>>> ')
+
+ path = get_path('') # 获取当前工作目录的实际路径
+
+ if choice == '1':
+ if bin_name == '2':
+ print('错误,你已是CS:SO!')
+ sleep(1.5)
+ sys.exit()
+ # 切换到 CS:SO
+ os.system(f"ren {path}/bin {path}/bin1")
+ os.system(f"ren {path}/bin2 {path}/bin")
+ with shelve.open('main.db') as db:
+ db['bin_name'] = '2' # 切换至 CS:SO
+ print("完成!")
+ sleep(1.85)
+ sys.exit()
+
+ elif choice == '2':
+ if bin_name == '1':
+ print("错误,你已是原版!")
+ sleep(1.5)
+ sys.exit()
+ # 切换到原版 CS
+ os.system(f"ren {path}/bin {path}/bin2")
+ os.system(f"ren {path}/bin1 {path}/bin")
+ with shelve.open('main.db') as db:
+ db['bin_name'] = '1' # 切换至 CS 原版
+ print("完成!")
+ sleep(1.55)
+ sys.exit()
+
+ elif choice == '3':
+ sys.exit()
+
+ else:
+ print("输入错误!")
+
+else:
+ # 如果没有管理员权限,重新以管理员权限运行脚本
+ print("请求管理员权限...")
+ # 使用 `ctypes` 模块提升权限,重新运行脚本
+ ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, " ".join(sys.argv), None, 1)
diff --git a/change/load.py b/change/load.py
new file mode 100644
index 0000000..580cf3f
--- /dev/null
+++ b/change/load.py
@@ -0,0 +1,8 @@
+import shelve
+
+#初始化数据库文件
+with shelve.open('main') as db:
+ db['bin_name'] = 1
+ db.close()
+
+exit()
\ No newline at end of file
diff --git a/pyinstaller_sys.py b/pyinstaller_sys.py
new file mode 100644
index 0000000..cf03202
--- /dev/null
+++ b/pyinstaller_sys.py
@@ -0,0 +1,10 @@
+import sys
+import os
+
+def get_path(relative_path):
+ try:
+ base_path = sys._MEIPASS # pyinstaller打包后的路径
+ except AttributeError:
+ base_path = os.path.abspath(".") # 当前工作目录的路径
+
+ return os.path.normpath(os.path.join(base_path, relative_path)) # 返回实际路径
\ No newline at end of file