Compare commits
7 Commits
v3.2.6
...
e3b5820d8b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3b5820d8b | ||
|
|
4ee3ac066e | ||
|
|
30aab5f9b2 | ||
|
|
207c3c604e | ||
|
|
4e11deb530 | ||
|
|
4531f12c0d | ||
|
|
e3058b9e39 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -17,4 +17,6 @@ venv/
|
|||||||
env/
|
env/
|
||||||
|
|
||||||
# Local development settings
|
# Local development settings
|
||||||
.env
|
.env
|
||||||
|
|
||||||
|
testversion.txt
|
||||||
@@ -50,9 +50,41 @@ class AccountSwitcher:
|
|||||||
self.package_json = self.app_path / "package.json"
|
self.package_json = self.app_path / "package.json"
|
||||||
self.auth_manager = CursorAuthManager()
|
self.auth_manager = CursorAuthManager()
|
||||||
self.config = Config()
|
self.config = Config()
|
||||||
self.hardware_id = get_hardware_id()
|
self.hardware_id = self.get_hardware_id() # 先获取硬件ID
|
||||||
self.registry = CursorRegistry() # 添加注册表操作工具类
|
self.registry = CursorRegistry() # 添加注册表操作工具类
|
||||||
|
|
||||||
|
logging.info(f"初始化硬件ID: {self.hardware_id}")
|
||||||
|
|
||||||
|
def get_hardware_id(self) -> str:
|
||||||
|
"""获取硬件唯一标识"""
|
||||||
|
try:
|
||||||
|
# 创建startupinfo对象来隐藏命令行窗口
|
||||||
|
startupinfo = None
|
||||||
|
if sys.platform == "win32":
|
||||||
|
startupinfo = subprocess.STARTUPINFO()
|
||||||
|
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||||
|
startupinfo.wShowWindow = subprocess.SW_HIDE
|
||||||
|
|
||||||
|
# 获取CPU信息
|
||||||
|
cpu_info = subprocess.check_output('wmic cpu get ProcessorId', startupinfo=startupinfo).decode()
|
||||||
|
cpu_id = cpu_info.split('\n')[1].strip()
|
||||||
|
|
||||||
|
# 获取主板序列号
|
||||||
|
board_info = subprocess.check_output('wmic baseboard get SerialNumber', startupinfo=startupinfo).decode()
|
||||||
|
board_id = board_info.split('\n')[1].strip()
|
||||||
|
|
||||||
|
# 获取BIOS序列号
|
||||||
|
bios_info = subprocess.check_output('wmic bios get SerialNumber', startupinfo=startupinfo).decode()
|
||||||
|
bios_id = bios_info.split('\n')[1].strip()
|
||||||
|
|
||||||
|
# 组合信息并生成哈希
|
||||||
|
combined = f"{cpu_id}:{board_id}:{bios_id}"
|
||||||
|
return hashlib.md5(combined.encode()).hexdigest()
|
||||||
|
except Exception as e:
|
||||||
|
logging.error(f"获取硬件ID失败: {str(e)}")
|
||||||
|
# 如果获取失败,使用UUID作为备选方案
|
||||||
|
return str(uuid.uuid4())
|
||||||
|
|
||||||
def get_cursor_version(self) -> str:
|
def get_cursor_version(self) -> str:
|
||||||
"""获取Cursor版本号"""
|
"""获取Cursor版本号"""
|
||||||
try:
|
try:
|
||||||
@@ -71,199 +103,126 @@ class AccountSwitcher:
|
|||||||
import platform
|
import platform
|
||||||
import socket
|
import socket
|
||||||
import requests
|
import requests
|
||||||
|
import subprocess
|
||||||
|
|
||||||
# 获取操作系统信息
|
# 获取操作系统信息
|
||||||
os_info = f"{platform.system()} {platform.version()}"
|
os_info = f"{platform.system()} {platform.release()}"
|
||||||
|
|
||||||
# 获取设备名称
|
# 获取设备名称
|
||||||
device_name = platform.node()
|
|
||||||
|
|
||||||
# 获取地理位置(可选)
|
|
||||||
try:
|
try:
|
||||||
ip_info = requests.get('https://ipapi.co/json/', timeout=5).json()
|
# 在Windows上使用wmic获取更详细的计算机名称
|
||||||
|
if platform.system() == "Windows":
|
||||||
|
startupinfo = subprocess.STARTUPINFO()
|
||||||
|
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||||
|
computer_info = subprocess.check_output('wmic computersystem get model', startupinfo=startupinfo).decode()
|
||||||
|
device_name = computer_info.split('\n')[1].strip()
|
||||||
|
else:
|
||||||
|
device_name = platform.node()
|
||||||
|
except:
|
||||||
|
device_name = platform.node()
|
||||||
|
|
||||||
|
# 获取IP地址
|
||||||
|
try:
|
||||||
|
ip_response = requests.get('https://api.ipify.org?format=json', timeout=5)
|
||||||
|
ip_address = ip_response.json()['ip']
|
||||||
|
except:
|
||||||
|
ip_address = "未知"
|
||||||
|
|
||||||
|
# 获取地理位置
|
||||||
|
try:
|
||||||
|
ip_info = requests.get(f'https://ipapi.co/{ip_address}/json/', timeout=5).json()
|
||||||
location = f"{ip_info.get('country_name', '')}-{ip_info.get('region', '')}-{ip_info.get('city', '')}"
|
location = f"{ip_info.get('country_name', '')}-{ip_info.get('region', '')}-{ip_info.get('city', '')}"
|
||||||
except:
|
except:
|
||||||
location = ""
|
location = "未知"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"os": os_info,
|
"os": os_info,
|
||||||
"device_name": device_name,
|
"device_name": device_name,
|
||||||
|
"ip": ip_address,
|
||||||
"location": location
|
"location": location
|
||||||
}
|
}
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(f"获取设备信息失败: {str(e)}")
|
logging.error(f"获取设备信息失败: {str(e)}")
|
||||||
return {
|
return {
|
||||||
"os": "Windows 10",
|
"os": "Windows",
|
||||||
"device_name": "未知设备",
|
"device_name": "未知设备",
|
||||||
"location": ""
|
"ip": "未知",
|
||||||
|
"location": "未知"
|
||||||
}
|
}
|
||||||
|
|
||||||
def check_activation_code(self, code: str) -> Tuple[bool, str, Optional[Dict]]:
|
def check_activation_code(self, code: str) -> tuple:
|
||||||
"""验证激活码
|
"""检查激活码
|
||||||
|
|
||||||
|
Args:
|
||||||
|
code: 激活码
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Tuple[bool, str, Optional[Dict]]: (是否成功, 提示消息, 账号信息)
|
tuple: (成功标志, 消息, 账号信息)
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
# 获取当前状态和历史记录
|
data = {
|
||||||
member_info = self.config.load_member_info()
|
"machine_id": self.hardware_id,
|
||||||
activation_history = member_info.get("activation_records", []) if member_info else []
|
"code": code
|
||||||
|
}
|
||||||
|
|
||||||
# 分割多个激活码
|
# 禁用SSL警告
|
||||||
codes = [c.strip() for c in code.split(',')]
|
import urllib3
|
||||||
success_codes = []
|
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||||
failed_codes = []
|
|
||||||
activation_results = []
|
# 设置请求参数
|
||||||
|
request_kwargs = {
|
||||||
# 获取设备信息
|
"json": data,
|
||||||
device_info = self.get_device_info()
|
"headers": {"Content-Type": "application/json"},
|
||||||
|
"timeout": 5, # 减少超时时间从10秒到5秒
|
||||||
# 逐个验证激活码
|
"verify": False # 禁用SSL验证
|
||||||
for single_code in codes:
|
}
|
||||||
if not single_code:
|
|
||||||
continue
|
# 尝试发送请求
|
||||||
|
|
||||||
# 验证激活码
|
|
||||||
endpoint = "https://cursorapi.nosqli.com/admin/api.member/activate"
|
|
||||||
data = {
|
|
||||||
"code": single_code,
|
|
||||||
"machine_id": self.hardware_id,
|
|
||||||
"os": device_info["os"],
|
|
||||||
"device_name": device_info["device_name"],
|
|
||||||
"location": device_info["location"]
|
|
||||||
}
|
|
||||||
|
|
||||||
headers = {
|
|
||||||
"Content-Type": "application/json"
|
|
||||||
}
|
|
||||||
|
|
||||||
try:
|
|
||||||
response = requests.post(
|
|
||||||
endpoint,
|
|
||||||
json=data,
|
|
||||||
headers=headers,
|
|
||||||
timeout=10
|
|
||||||
)
|
|
||||||
|
|
||||||
response_data = response.json()
|
|
||||||
if response_data.get("code") == 200:
|
|
||||||
result_data = response_data.get("data", {})
|
|
||||||
logging.info(f"激活码 {single_code} 验证成功: {response_data.get('msg', '')}")
|
|
||||||
activation_results.append(result_data)
|
|
||||||
success_codes.append(single_code)
|
|
||||||
elif response_data.get("code") == 400:
|
|
||||||
error_msg = response_data.get("msg", "参数错误")
|
|
||||||
if "已被使用" in error_msg or "已激活" in error_msg:
|
|
||||||
logging.warning(f"激活码 {single_code} 已被使用")
|
|
||||||
failed_codes.append(f"{single_code} (已被使用)")
|
|
||||||
else:
|
|
||||||
logging.error(f"激活码 {single_code} 验证失败: {error_msg}")
|
|
||||||
failed_codes.append(f"{single_code} ({error_msg})")
|
|
||||||
elif response_data.get("code") == 500:
|
|
||||||
error_msg = response_data.get("msg", "系统错误")
|
|
||||||
logging.error(f"激活码 {single_code} 验证失败: {error_msg}")
|
|
||||||
failed_codes.append(f"{single_code} ({error_msg})")
|
|
||||||
else:
|
|
||||||
error_msg = response_data.get("msg", "未知错误")
|
|
||||||
logging.error(f"激活码 {single_code} 验证失败: {error_msg}")
|
|
||||||
failed_codes.append(f"{single_code} ({error_msg})")
|
|
||||||
|
|
||||||
except requests.RequestException as e:
|
|
||||||
logging.error(f"激活码 {single_code} 请求失败: {str(e)}")
|
|
||||||
failed_codes.append(f"{single_code} (网络请求失败)")
|
|
||||||
except Exception as e:
|
|
||||||
logging.error(f"激活码 {single_code} 处理失败: {str(e)}")
|
|
||||||
failed_codes.append(f"{single_code} (处理失败)")
|
|
||||||
|
|
||||||
if not success_codes:
|
|
||||||
failed_msg = "\n".join(failed_codes)
|
|
||||||
return False, f"激活失败:\n{failed_msg}", None
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# 使用最后一次激活的结果作为最终状态
|
response = requests.post(
|
||||||
final_result = activation_results[-1]
|
self.config.get_api_url("activate"),
|
||||||
|
**request_kwargs
|
||||||
|
)
|
||||||
|
except requests.exceptions.SSLError:
|
||||||
|
# 如果发生SSL错误,创建自定义SSL上下文
|
||||||
|
import ssl
|
||||||
|
ssl_context = ssl.create_default_context()
|
||||||
|
ssl_context.check_hostname = False
|
||||||
|
ssl_context.verify_mode = ssl.CERT_NONE
|
||||||
|
|
||||||
# 合并历史记录
|
# 使用自定义SSL上下文重试请求
|
||||||
new_activation_records = final_result.get("activation_records", [])
|
session = requests.Session()
|
||||||
if activation_history:
|
session.verify = False
|
||||||
# 保留旧的激活记录,避免重复
|
response = session.post(
|
||||||
existing_codes = {record.get("code") for record in activation_history}
|
self.config.get_api_url("activate"),
|
||||||
for record in new_activation_records:
|
**request_kwargs
|
||||||
if record.get("code") not in existing_codes:
|
)
|
||||||
activation_history.append(record)
|
|
||||||
else:
|
result = response.json()
|
||||||
activation_history = new_activation_records
|
# 激活成功
|
||||||
|
if result["code"] == 200:
|
||||||
# 保存会员信息,包含完整的历史记录
|
api_data = result["data"]
|
||||||
member_info = {
|
# 构造标准的返回数据结构
|
||||||
"hardware_id": final_result.get("machine_id", self.hardware_id),
|
account_info = {
|
||||||
"expire_time": final_result.get("expire_time", ""),
|
"status": "active",
|
||||||
"days_left": final_result.get("days_left", 0),
|
"expire_time": api_data.get("expire_time", ""),
|
||||||
"total_days": final_result.get("total_days", 0),
|
"total_days": api_data.get("total_days", 0),
|
||||||
"status": final_result.get("status", "inactive"),
|
"days_left": api_data.get("days_left", 0),
|
||||||
"device_info": final_result.get("device_info", device_info),
|
"device_info": self.get_device_info()
|
||||||
"activation_time": final_result.get("activation_time", ""),
|
|
||||||
"activation_records": activation_history # 使用合并后的历史记录
|
|
||||||
}
|
}
|
||||||
self.config.save_member_info(member_info)
|
return True, result["msg"], account_info
|
||||||
|
# 激活码无效或已被使用
|
||||||
# 生成结果消息
|
elif result["code"] == 400:
|
||||||
message = f"激活成功\n"
|
logging.warning(f"激活码无效或已被使用: {result.get('msg', '未知错误')}")
|
||||||
|
return False, result.get("msg", "激活码无效或已被使用"), None
|
||||||
# 显示每个成功激活码的信息
|
# 其他错误情况
|
||||||
for i, result in enumerate(activation_results, 1):
|
else:
|
||||||
message += f"\n第{i}个激活码:\n"
|
logging.error(f"激活失败: {result.get('msg', '未知错误')}")
|
||||||
message += f"- 新增天数: {result.get('added_days', 0)}天\n"
|
return False, result["msg"], None # 返回 None 而不是空的账号信息
|
||||||
activation_time = result.get('activation_time', '')
|
|
||||||
if activation_time:
|
|
||||||
try:
|
|
||||||
from datetime import datetime
|
|
||||||
dt = datetime.strptime(activation_time, "%Y-%m-%d %H:%M:%S")
|
|
||||||
activation_time = dt.strftime("%Y-%m-%d %H:%M:%S")
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
message += f"- 激活时间: {activation_time}\n"
|
|
||||||
|
|
||||||
message += f"\n最终状态:"
|
|
||||||
message += f"\n- 总天数: {final_result.get('total_days', 0)}天"
|
|
||||||
message += f"\n- 剩余天数: {final_result.get('days_left', 0)}天"
|
|
||||||
|
|
||||||
# 格式化到期时间显示
|
|
||||||
expire_time = final_result.get('expire_time', '')
|
|
||||||
if expire_time:
|
|
||||||
try:
|
|
||||||
dt = datetime.strptime(expire_time, "%Y-%m-%d %H:%M:%S")
|
|
||||||
expire_time = dt.strftime("%Y-%m-%d %H:%M:%S")
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
message += f"\n- 到期时间: {expire_time}"
|
|
||||||
|
|
||||||
# 显示完整的激活记录历史
|
|
||||||
message += "\n\n历史激活记录:"
|
|
||||||
for record in activation_history:
|
|
||||||
activation_time = record.get('activation_time', '')
|
|
||||||
if activation_time:
|
|
||||||
try:
|
|
||||||
dt = datetime.strptime(activation_time, "%Y-%m-%d %H:%M:%S")
|
|
||||||
activation_time = dt.strftime("%Y-%m-%d %H:%M:%S")
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
message += f"\n- 激活码: {record.get('code', '')}"
|
|
||||||
message += f"\n 天数: {record.get('days', 0)}天"
|
|
||||||
message += f"\n 时间: {activation_time}\n"
|
|
||||||
|
|
||||||
if failed_codes:
|
|
||||||
message += f"\n\n以下激活码验证失败:\n" + "\n".join(failed_codes)
|
|
||||||
|
|
||||||
return True, message, member_info
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
logging.error(f"处理激活结果时出错: {str(e)}")
|
|
||||||
return False, f"处理激活结果时出错: {str(e)}", None
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(f"验证激活码时出错: {str(e)}")
|
logging.error(f"激活失败: {str(e)}")
|
||||||
return False, f"验证激活码时出错: {str(e)}", None
|
return False, f"激活失败: {str(e)}", None # 返回 None 而不是空的账号信息
|
||||||
|
|
||||||
def reset_machine_id(self) -> bool:
|
def reset_machine_id(self) -> bool:
|
||||||
"""重置机器码"""
|
"""重置机器码"""
|
||||||
@@ -356,93 +315,86 @@ class AccountSwitcher:
|
|||||||
logging.error(f"激活过程出错: {str(e)}")
|
logging.error(f"激活过程出错: {str(e)}")
|
||||||
return False, f"激活失败: {str(e)}"
|
return False, f"激活失败: {str(e)}"
|
||||||
|
|
||||||
def get_member_status(self) -> Optional[Dict]:
|
def get_member_status(self) -> dict:
|
||||||
"""获取会员状态
|
"""获取会员状态
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Optional[Dict]: 会员状态信息
|
dict: 会员状态信息,包含:
|
||||||
|
- status: 状态(active/inactive/expired)
|
||||||
|
- expire_time: 到期时间
|
||||||
|
- total_days: 总天数
|
||||||
|
- days_left: 剩余天数
|
||||||
|
- device_info: 设备信息
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
# 读取保存的会员信息
|
|
||||||
member_info = self.config.load_member_info()
|
|
||||||
|
|
||||||
# 构造状态检查请求
|
|
||||||
endpoint = "https://cursorapi.nosqli.com/admin/api.member/status"
|
|
||||||
data = {
|
data = {
|
||||||
"machine_id": self.hardware_id
|
"machine_id": self.hardware_id
|
||||||
}
|
}
|
||||||
headers = {
|
|
||||||
"Content-Type": "application/json"
|
api_url = self.config.get_api_url("status")
|
||||||
|
logging.info(f"正在检查会员状态...")
|
||||||
|
|
||||||
|
# 设置请求参数
|
||||||
|
request_kwargs = {
|
||||||
|
"json": data,
|
||||||
|
"headers": {"Content-Type": "application/json"},
|
||||||
|
"timeout": 2, # 减少超时时间到2秒
|
||||||
|
"verify": False
|
||||||
}
|
}
|
||||||
|
|
||||||
try:
|
# 使用session来复用连接
|
||||||
response = requests.post(endpoint, json=data, headers=headers, timeout=10)
|
session = requests.Session()
|
||||||
response_data = response.json()
|
session.verify = False
|
||||||
|
|
||||||
if response_data.get("code") == 200:
|
|
||||||
# 正常状态
|
|
||||||
data = response_data.get("data", {})
|
|
||||||
status = data.get("status", "inactive")
|
|
||||||
|
|
||||||
# 构造会员信息
|
|
||||||
member_info = {
|
|
||||||
"hardware_id": data.get("machine_id", self.hardware_id),
|
|
||||||
"expire_time": data.get("expire_time", ""),
|
|
||||||
"days_left": data.get("days_left", 0), # 使用days_left
|
|
||||||
"total_days": data.get("total_days", 0), # 使用total_days
|
|
||||||
"status": status,
|
|
||||||
"activation_records": data.get("activation_records", []) # 保存激活记录
|
|
||||||
}
|
|
||||||
|
|
||||||
# 打印调试信息
|
|
||||||
logging.info(f"API返回数据: {data}")
|
|
||||||
logging.info(f"处理后的会员信息: {member_info}")
|
|
||||||
|
|
||||||
self.config.save_member_info(member_info)
|
|
||||||
return member_info
|
|
||||||
|
|
||||||
elif response_data.get("code") == 401:
|
|
||||||
# 未激活或已过期
|
|
||||||
logging.warning("会员未激活或已过期")
|
|
||||||
return self._get_inactive_status()
|
|
||||||
|
|
||||||
elif response_data.get("code") == 400:
|
|
||||||
# 参数错误
|
|
||||||
error_msg = response_data.get("msg", "参数错误")
|
|
||||||
logging.error(f"获取会员状态失败: {error_msg}")
|
|
||||||
return self._get_inactive_status()
|
|
||||||
|
|
||||||
elif response_data.get("code") == 500:
|
|
||||||
# 系统错误
|
|
||||||
error_msg = response_data.get("msg", "系统错误")
|
|
||||||
logging.error(f"获取会员状态失败: {error_msg}")
|
|
||||||
return self._get_inactive_status()
|
|
||||||
|
|
||||||
else:
|
|
||||||
# 其他未知错误
|
|
||||||
error_msg = response_data.get("msg", "未知错误")
|
|
||||||
logging.error(f"获取会员状态失败: {error_msg}")
|
|
||||||
return self._get_inactive_status()
|
|
||||||
|
|
||||||
except requests.RequestException as e:
|
|
||||||
logging.error(f"请求会员状态失败: {str(e)}")
|
|
||||||
return self._get_inactive_status()
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
logging.error(f"获取会员状态出错: {str(e)}")
|
|
||||||
return self._get_inactive_status()
|
|
||||||
|
|
||||||
def _get_inactive_status(self) -> Dict:
|
# 尝试发送请求
|
||||||
"""获取未激活状态的默认信息"""
|
try:
|
||||||
return {
|
response = session.post(api_url, **request_kwargs)
|
||||||
"hardware_id": self.hardware_id,
|
except requests.exceptions.Timeout:
|
||||||
"expire_time": "",
|
# 超时后快速重试一次
|
||||||
"days": 0,
|
logging.warning("首次请求超时,正在重试...")
|
||||||
"total_days": 0,
|
response = session.post(api_url, **request_kwargs)
|
||||||
"status": "inactive",
|
|
||||||
"last_activation": {},
|
result = response.json()
|
||||||
"activation_records": []
|
logging.info(f"状态检查响应: {result}")
|
||||||
}
|
|
||||||
|
if result.get("code") in [1, 200]:
|
||||||
|
api_data = result.get("data", {})
|
||||||
|
return {
|
||||||
|
"status": api_data.get("status", "inactive"),
|
||||||
|
"expire_time": api_data.get("expire_time", ""),
|
||||||
|
"total_days": api_data.get("total_days", 0),
|
||||||
|
"days_left": api_data.get("days_left", 0),
|
||||||
|
"device_info": self.get_device_info()
|
||||||
|
}
|
||||||
|
else:
|
||||||
|
error_msg = result.get("msg", "未知错误")
|
||||||
|
logging.error(f"获取状态失败: {error_msg}")
|
||||||
|
return {
|
||||||
|
"status": "inactive",
|
||||||
|
"expire_time": "",
|
||||||
|
"total_days": 0,
|
||||||
|
"days_left": 0,
|
||||||
|
"device_info": self.get_device_info()
|
||||||
|
}
|
||||||
|
|
||||||
|
except requests.exceptions.RequestException as e:
|
||||||
|
logging.error(f"API请求失败: {str(e)}")
|
||||||
|
return {
|
||||||
|
"status": "inactive",
|
||||||
|
"expire_time": "",
|
||||||
|
"total_days": 0,
|
||||||
|
"days_left": 0,
|
||||||
|
"device_info": self.get_device_info()
|
||||||
|
}
|
||||||
|
except Exception as e:
|
||||||
|
logging.error(f"获取会员状态失败: {str(e)}")
|
||||||
|
return {
|
||||||
|
"status": "inactive",
|
||||||
|
"expire_time": "",
|
||||||
|
"total_days": 0,
|
||||||
|
"days_left": 0,
|
||||||
|
"device_info": self.get_device_info()
|
||||||
|
}
|
||||||
|
|
||||||
def restart_cursor(self) -> bool:
|
def restart_cursor(self) -> bool:
|
||||||
"""重启Cursor编辑器
|
"""重启Cursor编辑器
|
||||||
@@ -509,17 +461,33 @@ class AccountSwitcher:
|
|||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 禁用SSL警告
|
||||||
|
import urllib3
|
||||||
|
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||||
|
|
||||||
|
# 设置请求参数
|
||||||
|
request_kwargs = {
|
||||||
|
"json": data,
|
||||||
|
"headers": headers,
|
||||||
|
"timeout": 30, # 增加超时时间
|
||||||
|
"verify": False # 禁用SSL验证
|
||||||
|
}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# 添加SSL验证选项和超时设置
|
# 尝试发送请求
|
||||||
response = requests.post(
|
try:
|
||||||
endpoint,
|
response = requests.post(endpoint, **request_kwargs)
|
||||||
json=data,
|
except requests.exceptions.SSLError:
|
||||||
headers=headers,
|
# 如果发生SSL错误,创建自定义SSL上下文
|
||||||
timeout=30, # 增加超时时间
|
import ssl
|
||||||
verify=False, # 禁用SSL验证
|
ssl_context = ssl.create_default_context()
|
||||||
)
|
ssl_context.check_hostname = False
|
||||||
# 禁用SSL警告
|
ssl_context.verify_mode = ssl.CERT_NONE
|
||||||
requests.packages.urllib3.disable_warnings()
|
|
||||||
|
# 使用自定义SSL上下文重试请求
|
||||||
|
session = requests.Session()
|
||||||
|
session.verify = False
|
||||||
|
response = session.post(endpoint, **request_kwargs)
|
||||||
|
|
||||||
response_data = response.json()
|
response_data = response.json()
|
||||||
|
|
||||||
|
|||||||
@@ -1,202 +0,0 @@
|
|||||||
{
|
|
||||||
"package_json": {
|
|
||||||
"C:\\Users\\huangzhen\\AppData\\Local\\Programs\\Cursor\\resources\\app\\package.json": {
|
|
||||||
"homepage": "https://cursor.so",
|
|
||||||
"author": {
|
|
||||||
"name": "Cursor AI, Inc.",
|
|
||||||
"email": "hiring@cursor.so"
|
|
||||||
},
|
|
||||||
"productName": "Cursor",
|
|
||||||
"description": "Cursor is an AI-first coding environment.",
|
|
||||||
"main": "./out/main.js",
|
|
||||||
"dependencies": {
|
|
||||||
"@todesktop/runtime": "=1.6.1",
|
|
||||||
"@electron/asar": "^3.2.3",
|
|
||||||
"@anysphere/file-service": "0.0.0-73d604b6",
|
|
||||||
"@microsoft/1ds-core-js": "^3.2.13",
|
|
||||||
"@microsoft/1ds-post-js": "^3.2.13",
|
|
||||||
"@parcel/watcher": "2.5.0",
|
|
||||||
"@sentry/electron": "5.7.0",
|
|
||||||
"@sentry/node": "8.35.0",
|
|
||||||
"@types/semver": "^7.5.8",
|
|
||||||
"@vscode/deviceid": "^0.1.1",
|
|
||||||
"@vscode/iconv-lite-umd": "0.7.0",
|
|
||||||
"@vscode/policy-watcher": "^1.1.8",
|
|
||||||
"@vscode/proxy-agent": "^0.27.0",
|
|
||||||
"@vscode/ripgrep": "^1.15.10",
|
|
||||||
"@vscode/spdlog": "^0.15.0",
|
|
||||||
"@vscode/sqlite3": "5.1.8-vscode",
|
|
||||||
"@vscode/sudo-prompt": "9.3.1",
|
|
||||||
"@vscode/tree-sitter-wasm": "^0.0.4",
|
|
||||||
"@vscode/vscode-languagedetection": "1.0.21",
|
|
||||||
"@vscode/windows-mutex": "^0.5.0",
|
|
||||||
"@vscode/windows-process-tree": "^0.6.0",
|
|
||||||
"@vscode/windows-registry": "^1.1.0",
|
|
||||||
"@xterm/addon-clipboard": "^0.2.0-beta.53",
|
|
||||||
"@xterm/addon-image": "^0.9.0-beta.70",
|
|
||||||
"@xterm/addon-ligatures": "^0.10.0-beta.70",
|
|
||||||
"@xterm/addon-search": "^0.16.0-beta.70",
|
|
||||||
"@xterm/addon-serialize": "^0.14.0-beta.70",
|
|
||||||
"@xterm/addon-unicode11": "^0.9.0-beta.70",
|
|
||||||
"@xterm/addon-webgl": "^0.19.0-beta.70",
|
|
||||||
"@xterm/headless": "^5.6.0-beta.70",
|
|
||||||
"@xterm/xterm": "^5.6.0-beta.70",
|
|
||||||
"http-proxy-agent": "^7.0.0",
|
|
||||||
"https-proxy-agent": "^7.0.2",
|
|
||||||
"jschardet": "3.1.4",
|
|
||||||
"kerberos": "2.1.1",
|
|
||||||
"minimist": "^1.2.6",
|
|
||||||
"multiformats": "^13.3.1",
|
|
||||||
"native-is-elevated": "0.7.0",
|
|
||||||
"native-keymap": "^3.3.5",
|
|
||||||
"native-watchdog": "^1.4.1",
|
|
||||||
"node-fetch": "2.7.0",
|
|
||||||
"node-pty": "1.1.0-beta22",
|
|
||||||
"open": "^8.4.2",
|
|
||||||
"tas-client-umd": "0.2.0",
|
|
||||||
"v8-inspect-profiler": "^0.1.1",
|
|
||||||
"vscode-oniguruma": "1.7.0",
|
|
||||||
"vscode-regexpp": "^3.1.0",
|
|
||||||
"vscode-textmate": "9.1.0",
|
|
||||||
"yauzl": "^3.0.0",
|
|
||||||
"yazl": "^2.4.3"
|
|
||||||
},
|
|
||||||
"name": "cursor",
|
|
||||||
"version": "0.45.11",
|
|
||||||
"type": "module",
|
|
||||||
"desktopName": "cursor-url-handler.desktop",
|
|
||||||
"overrides": {},
|
|
||||||
"tdBuildId": "250207y6nbaw5qc",
|
|
||||||
"email": "jrxqnsoz250264@nosqli.com",
|
|
||||||
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSktTUEJLQlIxOTNKMjY3RENSVDRTR1YyIiwidGltZSI6IjE3MzkyNTAzNDgiLCJyYW5kb21uZXNzIjoiYWIyNWVhYTYtNDQzZC00Y2Q0IiwiZXhwIjo0MzMxMjUwMzQ4LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20ifQ.f3VIttCJLWqhkEZpPmWJlYw32FuV_gLWl9E0N-O9oIc",
|
|
||||||
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSktTUEJLQlIxOTNKMjY3RENSVDRTR1YyIiwidGltZSI6IjE3MzkyNTAzNDgiLCJyYW5kb21uZXNzIjoiYWIyNWVhYTYtNDQzZC00Y2Q0IiwiZXhwIjo0MzMxMjUwMzQ4LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20ifQ.f3VIttCJLWqhkEZpPmWJlYw32FuV_gLWl9E0N-O9oIc"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"storage_json": {
|
|
||||||
"telemetry.machineId": "758a7f7f7f79078f9f2c690514878ea3e8f064c0a49e837dd396db89df58429c",
|
|
||||||
"telemetry.macMachineId": "ff2a4a580f6e9e484c830204bb502866e9a333d3e0299ef81c34e01940da953e",
|
|
||||||
"telemetry.sqmId": "{D73E6881-666C-4182-8CB2-E2A3EED5AEFF}",
|
|
||||||
"telemetry.devDeviceId": "1ae7f91c-3ab8-448c-bbd3-ef34345a5b05",
|
|
||||||
"backupWorkspaces": {
|
|
||||||
"workspaces": [],
|
|
||||||
"folders": [
|
|
||||||
{
|
|
||||||
"folderUri": "file:///d%3A/W/python/001cursro.app/interactive"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"emptyWindows": [
|
|
||||||
{
|
|
||||||
"backupFolder": "1739332115293"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"windowControlHeight": 35,
|
|
||||||
"profileAssociations": {
|
|
||||||
"workspaces": {
|
|
||||||
"file:///d%3A/W/python/001cursro.app/interactive": "__default__profile__"
|
|
||||||
},
|
|
||||||
"emptyWindows": {
|
|
||||||
"1739332115293": "__default__profile__"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"theme": "vs-dark",
|
|
||||||
"themeBackground": "#1f1f1f",
|
|
||||||
"windowSplash": {
|
|
||||||
"zoomLevel": 0,
|
|
||||||
"baseTheme": "vs-dark",
|
|
||||||
"colorInfo": {
|
|
||||||
"foreground": "#cccccc",
|
|
||||||
"background": "#1f1f1f",
|
|
||||||
"editorBackground": "#1f1f1f",
|
|
||||||
"titleBarBackground": "#181818",
|
|
||||||
"titleBarBorder": "#2b2b2b",
|
|
||||||
"activityBarBackground": "#181818",
|
|
||||||
"activityBarBorder": "#2b2b2b",
|
|
||||||
"sideBarBackground": "#181818",
|
|
||||||
"sideBarBorder": "#2b2b2b",
|
|
||||||
"statusBarBackground": "#181818",
|
|
||||||
"statusBarBorder": "#2b2b2b",
|
|
||||||
"statusBarNoFolderBackground": "#1f1f1f"
|
|
||||||
},
|
|
||||||
"layoutInfo": {
|
|
||||||
"sideBarSide": "left",
|
|
||||||
"editorPartMinWidth": 220,
|
|
||||||
"titleBarHeight": 35,
|
|
||||||
"activityBarWidth": 0,
|
|
||||||
"sideBarWidth": 170,
|
|
||||||
"statusBarHeight": 22,
|
|
||||||
"windowBorder": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"registry": {
|
|
||||||
"HKLM_MachineGuid": {
|
|
||||||
"exists": true,
|
|
||||||
"value": "776c6b6c-195f-42dc-94d6-72b70c3aca74"
|
|
||||||
},
|
|
||||||
"HKCU_cursor_shell": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
},
|
|
||||||
"HKCU_cursor_command": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
},
|
|
||||||
"HKCU_cursor_auth": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
},
|
|
||||||
"HKCU_cursor_updates": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
},
|
|
||||||
"HKCU_cursor_main": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"files": {
|
|
||||||
"storage": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": false,
|
|
||||||
"size": 1891,
|
|
||||||
"modified_time": "2025-02-12T11:48:42.627574"
|
|
||||||
},
|
|
||||||
"storage_backup": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T11:48:26.403770"
|
|
||||||
},
|
|
||||||
"user_data": {
|
|
||||||
"exists": false,
|
|
||||||
"is_dir": null,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": null
|
|
||||||
},
|
|
||||||
"global_storage": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T11:48:47.490659"
|
|
||||||
},
|
|
||||||
"cache": {
|
|
||||||
"exists": false,
|
|
||||||
"is_dir": null,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": null
|
|
||||||
},
|
|
||||||
"updater": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": false,
|
|
||||||
"size": 0,
|
|
||||||
"modified_time": "2025-02-10T17:19:39.071580"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"telemetry": {
|
|
||||||
"machineId": "758a7f7f7f79078f9f2c690514878ea3e8f064c0a49e837dd396db89df58429c",
|
|
||||||
"macMachineId": "ff2a4a580f6e9e484c830204bb502866e9a333d3e0299ef81c34e01940da953e",
|
|
||||||
"devDeviceId": "1ae7f91c-3ab8-448c-bbd3-ef34345a5b05",
|
|
||||||
"sqmId": "{D73E6881-666C-4182-8CB2-E2A3EED5AEFF}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,216 +0,0 @@
|
|||||||
{
|
|
||||||
"package_json": {
|
|
||||||
"C:\\Users\\huangzhen\\AppData\\Local\\Programs\\Cursor\\resources\\app\\package.json": {
|
|
||||||
"homepage": "https://cursor.so",
|
|
||||||
"author": {
|
|
||||||
"name": "Cursor AI, Inc.",
|
|
||||||
"email": "hiring@cursor.so"
|
|
||||||
},
|
|
||||||
"productName": "Cursor",
|
|
||||||
"description": "Cursor is an AI-first coding environment.",
|
|
||||||
"main": "./out/main.js",
|
|
||||||
"dependencies": {
|
|
||||||
"@todesktop/runtime": "=1.6.1",
|
|
||||||
"@electron/asar": "^3.2.3",
|
|
||||||
"@anysphere/file-service": "0.0.0-73d604b6",
|
|
||||||
"@microsoft/1ds-core-js": "^3.2.13",
|
|
||||||
"@microsoft/1ds-post-js": "^3.2.13",
|
|
||||||
"@parcel/watcher": "2.5.0",
|
|
||||||
"@sentry/electron": "5.7.0",
|
|
||||||
"@sentry/node": "8.35.0",
|
|
||||||
"@types/semver": "^7.5.8",
|
|
||||||
"@vscode/deviceid": "^0.1.1",
|
|
||||||
"@vscode/iconv-lite-umd": "0.7.0",
|
|
||||||
"@vscode/policy-watcher": "^1.1.8",
|
|
||||||
"@vscode/proxy-agent": "^0.27.0",
|
|
||||||
"@vscode/ripgrep": "^1.15.10",
|
|
||||||
"@vscode/spdlog": "^0.15.0",
|
|
||||||
"@vscode/sqlite3": "5.1.8-vscode",
|
|
||||||
"@vscode/sudo-prompt": "9.3.1",
|
|
||||||
"@vscode/tree-sitter-wasm": "^0.0.4",
|
|
||||||
"@vscode/vscode-languagedetection": "1.0.21",
|
|
||||||
"@vscode/windows-mutex": "^0.5.0",
|
|
||||||
"@vscode/windows-process-tree": "^0.6.0",
|
|
||||||
"@vscode/windows-registry": "^1.1.0",
|
|
||||||
"@xterm/addon-clipboard": "^0.2.0-beta.53",
|
|
||||||
"@xterm/addon-image": "^0.9.0-beta.70",
|
|
||||||
"@xterm/addon-ligatures": "^0.10.0-beta.70",
|
|
||||||
"@xterm/addon-search": "^0.16.0-beta.70",
|
|
||||||
"@xterm/addon-serialize": "^0.14.0-beta.70",
|
|
||||||
"@xterm/addon-unicode11": "^0.9.0-beta.70",
|
|
||||||
"@xterm/addon-webgl": "^0.19.0-beta.70",
|
|
||||||
"@xterm/headless": "^5.6.0-beta.70",
|
|
||||||
"@xterm/xterm": "^5.6.0-beta.70",
|
|
||||||
"http-proxy-agent": "^7.0.0",
|
|
||||||
"https-proxy-agent": "^7.0.2",
|
|
||||||
"jschardet": "3.1.4",
|
|
||||||
"kerberos": "2.1.1",
|
|
||||||
"minimist": "^1.2.6",
|
|
||||||
"multiformats": "^13.3.1",
|
|
||||||
"native-is-elevated": "0.7.0",
|
|
||||||
"native-keymap": "^3.3.5",
|
|
||||||
"native-watchdog": "^1.4.1",
|
|
||||||
"node-fetch": "2.7.0",
|
|
||||||
"node-pty": "1.1.0-beta22",
|
|
||||||
"open": "^8.4.2",
|
|
||||||
"tas-client-umd": "0.2.0",
|
|
||||||
"v8-inspect-profiler": "^0.1.1",
|
|
||||||
"vscode-oniguruma": "1.7.0",
|
|
||||||
"vscode-regexpp": "^3.1.0",
|
|
||||||
"vscode-textmate": "9.1.0",
|
|
||||||
"yauzl": "^3.0.0",
|
|
||||||
"yazl": "^2.4.3"
|
|
||||||
},
|
|
||||||
"name": "cursor",
|
|
||||||
"version": "0.45.11",
|
|
||||||
"type": "module",
|
|
||||||
"desktopName": "cursor-url-handler.desktop",
|
|
||||||
"overrides": {},
|
|
||||||
"tdBuildId": "250207y6nbaw5qc",
|
|
||||||
"email": "jrxqnsoz250264@nosqli.com",
|
|
||||||
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSktTUEJLQlIxOTNKMjY3RENSVDRTR1YyIiwidGltZSI6IjE3MzkyNTAzNDgiLCJyYW5kb21uZXNzIjoiYWIyNWVhYTYtNDQzZC00Y2Q0IiwiZXhwIjo0MzMxMjUwMzQ4LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20ifQ.f3VIttCJLWqhkEZpPmWJlYw32FuV_gLWl9E0N-O9oIc",
|
|
||||||
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSktTUEJLQlIxOTNKMjY3RENSVDRTR1YyIiwidGltZSI6IjE3MzkyNTAzNDgiLCJyYW5kb21uZXNzIjoiYWIyNWVhYTYtNDQzZC00Y2Q0IiwiZXhwIjo0MzMxMjUwMzQ4LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20ifQ.f3VIttCJLWqhkEZpPmWJlYw32FuV_gLWl9E0N-O9oIc",
|
|
||||||
"updateUrl": "",
|
|
||||||
"disableUpdate": true,
|
|
||||||
"enableNodeApiUncaughtExceptionPolicy": true,
|
|
||||||
"nodeOptions": [
|
|
||||||
"--force-node-api-uncaught-exceptions-policy=true"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"storage_json": {
|
|
||||||
"telemetry.machineId": "b0cbb2d13ca4c983be40d31e010819f16adb3d6083598f1457094837bdaa3def",
|
|
||||||
"telemetry.macMachineId": "ff2a4a580f6e9e484c830204bb502866e9a333d3e0299ef81c34e01940da953e",
|
|
||||||
"telemetry.sqmId": "{D73E6881-666C-4182-8CB2-E2A3EED5AEFF}",
|
|
||||||
"telemetry.devDeviceId": "1ae7f91c-3ab8-448c-bbd3-ef34345a5b05",
|
|
||||||
"backupWorkspaces": {
|
|
||||||
"workspaces": [],
|
|
||||||
"folders": [
|
|
||||||
{
|
|
||||||
"folderUri": "file:///d%3A/W/python/001cursro.app/interactive"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"emptyWindows": []
|
|
||||||
},
|
|
||||||
"windowControlHeight": 35,
|
|
||||||
"profileAssociations": {
|
|
||||||
"workspaces": {
|
|
||||||
"file:///d%3A/W/python/001cursro.app/interactive": "__default__profile__"
|
|
||||||
},
|
|
||||||
"emptyWindows": {}
|
|
||||||
},
|
|
||||||
"theme": "vs-dark",
|
|
||||||
"themeBackground": "#1f1f1f",
|
|
||||||
"windowSplash": {
|
|
||||||
"zoomLevel": 0,
|
|
||||||
"baseTheme": "vs-dark",
|
|
||||||
"colorInfo": {
|
|
||||||
"foreground": "#cccccc",
|
|
||||||
"background": "#1f1f1f",
|
|
||||||
"editorBackground": "#1f1f1f",
|
|
||||||
"titleBarBackground": "#181818",
|
|
||||||
"titleBarBorder": "#2b2b2b",
|
|
||||||
"activityBarBackground": "#181818",
|
|
||||||
"activityBarBorder": "#2b2b2b",
|
|
||||||
"sideBarBackground": "#181818",
|
|
||||||
"sideBarBorder": "#2b2b2b",
|
|
||||||
"statusBarBackground": "#181818",
|
|
||||||
"statusBarBorder": "#2b2b2b",
|
|
||||||
"statusBarNoFolderBackground": "#1f1f1f"
|
|
||||||
},
|
|
||||||
"layoutInfo": {
|
|
||||||
"sideBarSide": "left",
|
|
||||||
"editorPartMinWidth": 220,
|
|
||||||
"titleBarHeight": 35,
|
|
||||||
"activityBarWidth": 0,
|
|
||||||
"sideBarWidth": 300,
|
|
||||||
"statusBarHeight": 22,
|
|
||||||
"windowBorder": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"windowsState": {
|
|
||||||
"lastActiveWindow": {
|
|
||||||
"folder": "file:///d%3A/W/python/001cursro.app/interactive",
|
|
||||||
"backupPath": "C:\\Users\\huangzhen\\AppData\\Roaming\\Cursor\\Backups\\385f155a4a13070be99ee4e76a057235",
|
|
||||||
"uiState": {
|
|
||||||
"mode": 0,
|
|
||||||
"x": 512,
|
|
||||||
"y": 192,
|
|
||||||
"width": 1024,
|
|
||||||
"height": 768
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"openedWindows": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"registry": {
|
|
||||||
"HKLM_MachineGuid": {
|
|
||||||
"exists": true,
|
|
||||||
"value": "1deb25e7-cdd4-4367-a347-fba8b33b9b03"
|
|
||||||
},
|
|
||||||
"HKCU_cursor_shell": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
},
|
|
||||||
"HKCU_cursor_command": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
},
|
|
||||||
"HKCU_cursor_auth": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
},
|
|
||||||
"HKCU_cursor_updates": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
},
|
|
||||||
"HKCU_cursor_main": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"files": {
|
|
||||||
"storage": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": false,
|
|
||||||
"size": 1980,
|
|
||||||
"modified_time": "2025-02-12T12:37:17.428609"
|
|
||||||
},
|
|
||||||
"storage_backup": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T12:37:17.371311"
|
|
||||||
},
|
|
||||||
"user_data": {
|
|
||||||
"exists": false,
|
|
||||||
"is_dir": null,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": null
|
|
||||||
},
|
|
||||||
"global_storage": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T12:37:14.253083"
|
|
||||||
},
|
|
||||||
"cache": {
|
|
||||||
"exists": false,
|
|
||||||
"is_dir": null,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": null
|
|
||||||
},
|
|
||||||
"updater": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": false,
|
|
||||||
"size": 0,
|
|
||||||
"modified_time": "2025-02-10T17:19:39.071580"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"telemetry": {
|
|
||||||
"machineId": "b0cbb2d13ca4c983be40d31e010819f16adb3d6083598f1457094837bdaa3def",
|
|
||||||
"macMachineId": "ff2a4a580f6e9e484c830204bb502866e9a333d3e0299ef81c34e01940da953e",
|
|
||||||
"devDeviceId": "1ae7f91c-3ab8-448c-bbd3-ef34345a5b05",
|
|
||||||
"sqmId": "{D73E6881-666C-4182-8CB2-E2A3EED5AEFF}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BIN
banbenjietu.png
Normal file
BIN
banbenjietu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
@@ -1,244 +0,0 @@
|
|||||||
{
|
|
||||||
"package_json": {
|
|
||||||
"C:\\Users\\huangzhen\\AppData\\Local\\Programs\\Cursor\\resources\\app\\package.json": {
|
|
||||||
"homepage": "https://cursor.so",
|
|
||||||
"author": {
|
|
||||||
"name": "Cursor AI, Inc.",
|
|
||||||
"email": "hiring@cursor.so"
|
|
||||||
},
|
|
||||||
"productName": "Cursor",
|
|
||||||
"description": "Cursor is an AI-first coding environment.",
|
|
||||||
"main": "./out/main.js",
|
|
||||||
"dependencies": {
|
|
||||||
"@todesktop/runtime": "=1.6.1",
|
|
||||||
"@electron/asar": "^3.2.3",
|
|
||||||
"@anysphere/file-service": "0.0.0-73d604b6",
|
|
||||||
"@microsoft/1ds-core-js": "^3.2.13",
|
|
||||||
"@microsoft/1ds-post-js": "^3.2.13",
|
|
||||||
"@parcel/watcher": "2.5.0",
|
|
||||||
"@sentry/electron": "5.7.0",
|
|
||||||
"@sentry/node": "8.35.0",
|
|
||||||
"@types/semver": "^7.5.8",
|
|
||||||
"@vscode/deviceid": "^0.1.1",
|
|
||||||
"@vscode/iconv-lite-umd": "0.7.0",
|
|
||||||
"@vscode/policy-watcher": "^1.1.8",
|
|
||||||
"@vscode/proxy-agent": "^0.27.0",
|
|
||||||
"@vscode/ripgrep": "^1.15.10",
|
|
||||||
"@vscode/spdlog": "^0.15.0",
|
|
||||||
"@vscode/sqlite3": "5.1.8-vscode",
|
|
||||||
"@vscode/sudo-prompt": "9.3.1",
|
|
||||||
"@vscode/tree-sitter-wasm": "^0.0.4",
|
|
||||||
"@vscode/vscode-languagedetection": "1.0.21",
|
|
||||||
"@vscode/windows-mutex": "^0.5.0",
|
|
||||||
"@vscode/windows-process-tree": "^0.6.0",
|
|
||||||
"@vscode/windows-registry": "^1.1.0",
|
|
||||||
"@xterm/addon-clipboard": "^0.2.0-beta.53",
|
|
||||||
"@xterm/addon-image": "^0.9.0-beta.70",
|
|
||||||
"@xterm/addon-ligatures": "^0.10.0-beta.70",
|
|
||||||
"@xterm/addon-search": "^0.16.0-beta.70",
|
|
||||||
"@xterm/addon-serialize": "^0.14.0-beta.70",
|
|
||||||
"@xterm/addon-unicode11": "^0.9.0-beta.70",
|
|
||||||
"@xterm/addon-webgl": "^0.19.0-beta.70",
|
|
||||||
"@xterm/headless": "^5.6.0-beta.70",
|
|
||||||
"@xterm/xterm": "^5.6.0-beta.70",
|
|
||||||
"http-proxy-agent": "^7.0.0",
|
|
||||||
"https-proxy-agent": "^7.0.2",
|
|
||||||
"jschardet": "3.1.4",
|
|
||||||
"kerberos": "2.1.1",
|
|
||||||
"minimist": "^1.2.6",
|
|
||||||
"multiformats": "^13.3.1",
|
|
||||||
"native-is-elevated": "0.7.0",
|
|
||||||
"native-keymap": "^3.3.5",
|
|
||||||
"native-watchdog": "^1.4.1",
|
|
||||||
"node-fetch": "2.7.0",
|
|
||||||
"node-pty": "1.1.0-beta22",
|
|
||||||
"open": "^8.4.2",
|
|
||||||
"tas-client-umd": "0.2.0",
|
|
||||||
"v8-inspect-profiler": "^0.1.1",
|
|
||||||
"vscode-oniguruma": "1.7.0",
|
|
||||||
"vscode-regexpp": "^3.1.0",
|
|
||||||
"vscode-textmate": "9.1.0",
|
|
||||||
"yauzl": "^3.0.0",
|
|
||||||
"yazl": "^2.4.3"
|
|
||||||
},
|
|
||||||
"name": "cursor",
|
|
||||||
"version": "0.45.11",
|
|
||||||
"type": "module",
|
|
||||||
"desktopName": "cursor-url-handler.desktop",
|
|
||||||
"overrides": {},
|
|
||||||
"tdBuildId": "250207y6nbaw5qc",
|
|
||||||
"email": "jrxqnsoz250264@nosqli.com",
|
|
||||||
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSktTUEJLQlIxOTNKMjY3RENSVDRTR1YyIiwidGltZSI6IjE3MzkyNTAzNDgiLCJyYW5kb21uZXNzIjoiYWIyNWVhYTYtNDQzZC00Y2Q0IiwiZXhwIjo0MzMxMjUwMzQ4LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20ifQ.f3VIttCJLWqhkEZpPmWJlYw32FuV_gLWl9E0N-O9oIc",
|
|
||||||
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSktTUEJLQlIxOTNKMjY3RENSVDRTR1YyIiwidGltZSI6IjE3MzkyNTAzNDgiLCJyYW5kb21uZXNzIjoiYWIyNWVhYTYtNDQzZC00Y2Q0IiwiZXhwIjo0MzMxMjUwMzQ4LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20ifQ.f3VIttCJLWqhkEZpPmWJlYw32FuV_gLWl9E0N-O9oIc"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"storage_json": {
|
|
||||||
"telemetry.machineId": "31b3701f1790cdb754bd8a02bad4913a9f8a3f04c9e19c519996be8c7b8cb561",
|
|
||||||
"telemetry.macMachineId": "ff2a4a580f6e9e484c830204bb502866e9a333d3e0299ef81c34e01940da953e",
|
|
||||||
"telemetry.sqmId": "{D73E6881-666C-4182-8CB2-E2A3EED5AEFF}",
|
|
||||||
"telemetry.devDeviceId": "1ae7f91c-3ab8-448c-bbd3-ef34345a5b05",
|
|
||||||
"backupWorkspaces": {
|
|
||||||
"workspaces": [],
|
|
||||||
"folders": [
|
|
||||||
{
|
|
||||||
"folderUri": "file:///d%3A/W/python/001cursro.app/interactive"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folderUri": "file:///d%3A/W/python/003cursorapiadmin"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"emptyWindows": [
|
|
||||||
{
|
|
||||||
"backupFolder": "1739329218500"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"backupFolder": "1739329245089"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"windowControlHeight": 35,
|
|
||||||
"profileAssociations": {
|
|
||||||
"workspaces": {
|
|
||||||
"file:///d%3A/W/python/001cursro.app/interactive": "__default__profile__",
|
|
||||||
"file:///d%3A/W/python/003cursorapiadmin": "__default__profile__"
|
|
||||||
},
|
|
||||||
"emptyWindows": {}
|
|
||||||
},
|
|
||||||
"theme": "vs-dark",
|
|
||||||
"themeBackground": "#1f1f1f",
|
|
||||||
"windowSplash": {
|
|
||||||
"zoomLevel": 0,
|
|
||||||
"baseTheme": "vs-dark",
|
|
||||||
"colorInfo": {
|
|
||||||
"foreground": "#cccccc",
|
|
||||||
"background": "#1f1f1f",
|
|
||||||
"editorBackground": "#1f1f1f",
|
|
||||||
"titleBarBackground": "#181818",
|
|
||||||
"titleBarBorder": "#2b2b2b",
|
|
||||||
"activityBarBackground": "#181818",
|
|
||||||
"activityBarBorder": "#2b2b2b",
|
|
||||||
"sideBarBackground": "#181818",
|
|
||||||
"sideBarBorder": "#2b2b2b",
|
|
||||||
"statusBarBackground": "#181818",
|
|
||||||
"statusBarBorder": "#2b2b2b",
|
|
||||||
"statusBarNoFolderBackground": "#1f1f1f"
|
|
||||||
},
|
|
||||||
"layoutInfo": {
|
|
||||||
"sideBarSide": "left",
|
|
||||||
"editorPartMinWidth": 220,
|
|
||||||
"titleBarHeight": 35,
|
|
||||||
"activityBarWidth": 0,
|
|
||||||
"sideBarWidth": 170,
|
|
||||||
"statusBarHeight": 22,
|
|
||||||
"windowBorder": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"windowsState": {
|
|
||||||
"lastActiveWindow": {
|
|
||||||
"folder": "file:///d%3A/W/python/001cursro.app/interactive",
|
|
||||||
"backupPath": "C:\\Users\\huangzhen\\AppData\\Roaming\\Cursor\\Backups\\385f155a4a13070be99ee4e76a057235",
|
|
||||||
"uiState": {
|
|
||||||
"mode": 0,
|
|
||||||
"x": 512,
|
|
||||||
"y": 192,
|
|
||||||
"width": 1024,
|
|
||||||
"height": 768
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"openedWindows": [
|
|
||||||
{
|
|
||||||
"folder": "file:///d%3A/W/python/001cursro.app/interactive",
|
|
||||||
"backupPath": "C:\\Users\\huangzhen\\AppData\\Roaming\\Cursor\\Backups\\385f155a4a13070be99ee4e76a057235",
|
|
||||||
"uiState": {
|
|
||||||
"mode": 0,
|
|
||||||
"x": 512,
|
|
||||||
"y": 192,
|
|
||||||
"width": 1024,
|
|
||||||
"height": 768
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folder": "file:///d%3A/W/python/003cursorapiadmin",
|
|
||||||
"backupPath": "C:\\Users\\huangzhen\\AppData\\Roaming\\Cursor\\Backups\\b6b8cfb24ed2ddb05d90d45cce5443e7",
|
|
||||||
"uiState": {
|
|
||||||
"mode": 0,
|
|
||||||
"x": 512,
|
|
||||||
"y": 192,
|
|
||||||
"width": 1024,
|
|
||||||
"height": 768
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"registry": {
|
|
||||||
"HKLM_MachineGuid": {
|
|
||||||
"exists": true,
|
|
||||||
"value": "d890ab3d-43cd-40c8-a9ef-f5683b5a64e3"
|
|
||||||
},
|
|
||||||
"HKCU_cursor_shell": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
},
|
|
||||||
"HKCU_cursor_command": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
},
|
|
||||||
"HKCU_cursor_auth": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
},
|
|
||||||
"HKCU_cursor_updates": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
},
|
|
||||||
"HKCU_cursor_main": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"files": {
|
|
||||||
"storage": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": false,
|
|
||||||
"size": 3427,
|
|
||||||
"modified_time": "2025-02-12T11:40:57.046415"
|
|
||||||
},
|
|
||||||
"storage_backup": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T11:00:01.555876"
|
|
||||||
},
|
|
||||||
"user_data": {
|
|
||||||
"exists": false,
|
|
||||||
"is_dir": null,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": null
|
|
||||||
},
|
|
||||||
"global_storage": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T11:47:27.627883"
|
|
||||||
},
|
|
||||||
"cache": {
|
|
||||||
"exists": false,
|
|
||||||
"is_dir": null,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": null
|
|
||||||
},
|
|
||||||
"updater": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": false,
|
|
||||||
"size": 0,
|
|
||||||
"modified_time": "2025-02-10T17:19:39.071580"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"telemetry": {
|
|
||||||
"machineId": "31b3701f1790cdb754bd8a02bad4913a9f8a3f04c9e19c519996be8c7b8cb561",
|
|
||||||
"macMachineId": "ff2a4a580f6e9e484c830204bb502866e9a333d3e0299ef81c34e01940da953e",
|
|
||||||
"devDeviceId": "1ae7f91c-3ab8-448c-bbd3-ef34345a5b05",
|
|
||||||
"sqmId": "{D73E6881-666C-4182-8CB2-E2A3EED5AEFF}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,216 +0,0 @@
|
|||||||
{
|
|
||||||
"package_json": {
|
|
||||||
"C:\\Users\\huangzhen\\AppData\\Local\\Programs\\Cursor\\resources\\app\\package.json": {
|
|
||||||
"homepage": "https://cursor.so",
|
|
||||||
"author": {
|
|
||||||
"name": "Cursor AI, Inc.",
|
|
||||||
"email": "hiring@cursor.so"
|
|
||||||
},
|
|
||||||
"productName": "Cursor",
|
|
||||||
"description": "Cursor is an AI-first coding environment.",
|
|
||||||
"main": "./out/main.js",
|
|
||||||
"dependencies": {
|
|
||||||
"@todesktop/runtime": "=1.6.1",
|
|
||||||
"@electron/asar": "^3.2.3",
|
|
||||||
"@anysphere/file-service": "0.0.0-73d604b6",
|
|
||||||
"@microsoft/1ds-core-js": "^3.2.13",
|
|
||||||
"@microsoft/1ds-post-js": "^3.2.13",
|
|
||||||
"@parcel/watcher": "2.5.0",
|
|
||||||
"@sentry/electron": "5.7.0",
|
|
||||||
"@sentry/node": "8.35.0",
|
|
||||||
"@types/semver": "^7.5.8",
|
|
||||||
"@vscode/deviceid": "^0.1.1",
|
|
||||||
"@vscode/iconv-lite-umd": "0.7.0",
|
|
||||||
"@vscode/policy-watcher": "^1.1.8",
|
|
||||||
"@vscode/proxy-agent": "^0.27.0",
|
|
||||||
"@vscode/ripgrep": "^1.15.10",
|
|
||||||
"@vscode/spdlog": "^0.15.0",
|
|
||||||
"@vscode/sqlite3": "5.1.8-vscode",
|
|
||||||
"@vscode/sudo-prompt": "9.3.1",
|
|
||||||
"@vscode/tree-sitter-wasm": "^0.0.4",
|
|
||||||
"@vscode/vscode-languagedetection": "1.0.21",
|
|
||||||
"@vscode/windows-mutex": "^0.5.0",
|
|
||||||
"@vscode/windows-process-tree": "^0.6.0",
|
|
||||||
"@vscode/windows-registry": "^1.1.0",
|
|
||||||
"@xterm/addon-clipboard": "^0.2.0-beta.53",
|
|
||||||
"@xterm/addon-image": "^0.9.0-beta.70",
|
|
||||||
"@xterm/addon-ligatures": "^0.10.0-beta.70",
|
|
||||||
"@xterm/addon-search": "^0.16.0-beta.70",
|
|
||||||
"@xterm/addon-serialize": "^0.14.0-beta.70",
|
|
||||||
"@xterm/addon-unicode11": "^0.9.0-beta.70",
|
|
||||||
"@xterm/addon-webgl": "^0.19.0-beta.70",
|
|
||||||
"@xterm/headless": "^5.6.0-beta.70",
|
|
||||||
"@xterm/xterm": "^5.6.0-beta.70",
|
|
||||||
"http-proxy-agent": "^7.0.0",
|
|
||||||
"https-proxy-agent": "^7.0.2",
|
|
||||||
"jschardet": "3.1.4",
|
|
||||||
"kerberos": "2.1.1",
|
|
||||||
"minimist": "^1.2.6",
|
|
||||||
"multiformats": "^13.3.1",
|
|
||||||
"native-is-elevated": "0.7.0",
|
|
||||||
"native-keymap": "^3.3.5",
|
|
||||||
"native-watchdog": "^1.4.1",
|
|
||||||
"node-fetch": "2.7.0",
|
|
||||||
"node-pty": "1.1.0-beta22",
|
|
||||||
"open": "^8.4.2",
|
|
||||||
"tas-client-umd": "0.2.0",
|
|
||||||
"v8-inspect-profiler": "^0.1.1",
|
|
||||||
"vscode-oniguruma": "1.7.0",
|
|
||||||
"vscode-regexpp": "^3.1.0",
|
|
||||||
"vscode-textmate": "9.1.0",
|
|
||||||
"yauzl": "^3.0.0",
|
|
||||||
"yazl": "^2.4.3"
|
|
||||||
},
|
|
||||||
"name": "cursor",
|
|
||||||
"version": "0.45.11",
|
|
||||||
"type": "module",
|
|
||||||
"desktopName": "cursor-url-handler.desktop",
|
|
||||||
"overrides": {},
|
|
||||||
"tdBuildId": "250207y6nbaw5qc",
|
|
||||||
"email": "jrxqnsoz250264@nosqli.com",
|
|
||||||
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSktTUEJLQlIxOTNKMjY3RENSVDRTR1YyIiwidGltZSI6IjE3MzkyNTAzNDgiLCJyYW5kb21uZXNzIjoiYWIyNWVhYTYtNDQzZC00Y2Q0IiwiZXhwIjo0MzMxMjUwMzQ4LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20ifQ.f3VIttCJLWqhkEZpPmWJlYw32FuV_gLWl9E0N-O9oIc",
|
|
||||||
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSktTUEJLQlIxOTNKMjY3RENSVDRTR1YyIiwidGltZSI6IjE3MzkyNTAzNDgiLCJyYW5kb21uZXNzIjoiYWIyNWVhYTYtNDQzZC00Y2Q0IiwiZXhwIjo0MzMxMjUwMzQ4LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20ifQ.f3VIttCJLWqhkEZpPmWJlYw32FuV_gLWl9E0N-O9oIc",
|
|
||||||
"updateUrl": "",
|
|
||||||
"disableUpdate": true,
|
|
||||||
"enableNodeApiUncaughtExceptionPolicy": true,
|
|
||||||
"nodeOptions": [
|
|
||||||
"--force-node-api-uncaught-exceptions-policy=true"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"storage_json": {
|
|
||||||
"telemetry.machineId": "9eb67b11924f32572a67e6480ce4f1cabf3f61503aa4918af506b259527a4745",
|
|
||||||
"telemetry.macMachineId": "ff2a4a580f6e9e484c830204bb502866e9a333d3e0299ef81c34e01940da953e",
|
|
||||||
"telemetry.sqmId": "{D73E6881-666C-4182-8CB2-E2A3EED5AEFF}",
|
|
||||||
"telemetry.devDeviceId": "1ae7f91c-3ab8-448c-bbd3-ef34345a5b05",
|
|
||||||
"backupWorkspaces": {
|
|
||||||
"workspaces": [],
|
|
||||||
"folders": [
|
|
||||||
{
|
|
||||||
"folderUri": "file:///d%3A/W/python/001cursro.app/interactive"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"emptyWindows": []
|
|
||||||
},
|
|
||||||
"windowControlHeight": 35,
|
|
||||||
"profileAssociations": {
|
|
||||||
"workspaces": {
|
|
||||||
"file:///d%3A/W/python/001cursro.app/interactive": "__default__profile__"
|
|
||||||
},
|
|
||||||
"emptyWindows": {}
|
|
||||||
},
|
|
||||||
"theme": "vs-dark",
|
|
||||||
"themeBackground": "#1f1f1f",
|
|
||||||
"windowSplash": {
|
|
||||||
"zoomLevel": 0,
|
|
||||||
"baseTheme": "vs-dark",
|
|
||||||
"colorInfo": {
|
|
||||||
"foreground": "#cccccc",
|
|
||||||
"background": "#1f1f1f",
|
|
||||||
"editorBackground": "#1f1f1f",
|
|
||||||
"titleBarBackground": "#181818",
|
|
||||||
"titleBarBorder": "#2b2b2b",
|
|
||||||
"activityBarBackground": "#181818",
|
|
||||||
"activityBarBorder": "#2b2b2b",
|
|
||||||
"sideBarBackground": "#181818",
|
|
||||||
"sideBarBorder": "#2b2b2b",
|
|
||||||
"statusBarBackground": "#181818",
|
|
||||||
"statusBarBorder": "#2b2b2b",
|
|
||||||
"statusBarNoFolderBackground": "#1f1f1f"
|
|
||||||
},
|
|
||||||
"layoutInfo": {
|
|
||||||
"sideBarSide": "left",
|
|
||||||
"editorPartMinWidth": 220,
|
|
||||||
"titleBarHeight": 35,
|
|
||||||
"activityBarWidth": 0,
|
|
||||||
"sideBarWidth": 300,
|
|
||||||
"statusBarHeight": 22,
|
|
||||||
"windowBorder": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"windowsState": {
|
|
||||||
"lastActiveWindow": {
|
|
||||||
"folder": "file:///d%3A/W/python/001cursro.app/interactive",
|
|
||||||
"backupPath": "C:\\Users\\huangzhen\\AppData\\Roaming\\Cursor\\Backups\\385f155a4a13070be99ee4e76a057235",
|
|
||||||
"uiState": {
|
|
||||||
"mode": 0,
|
|
||||||
"x": 512,
|
|
||||||
"y": 192,
|
|
||||||
"width": 1024,
|
|
||||||
"height": 768
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"openedWindows": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"registry": {
|
|
||||||
"HKLM_MachineGuid": {
|
|
||||||
"exists": true,
|
|
||||||
"value": "948b93c1-ee34-4a48-95d0-a2fce9af92b1"
|
|
||||||
},
|
|
||||||
"HKCU_cursor_shell": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
},
|
|
||||||
"HKCU_cursor_command": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
},
|
|
||||||
"HKCU_cursor_auth": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
},
|
|
||||||
"HKCU_cursor_updates": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
},
|
|
||||||
"HKCU_cursor_main": {
|
|
||||||
"exists": false,
|
|
||||||
"values": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"files": {
|
|
||||||
"storage": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": false,
|
|
||||||
"size": 2214,
|
|
||||||
"modified_time": "2025-02-12T12:36:27.187387"
|
|
||||||
},
|
|
||||||
"storage_backup": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T12:33:10.408749"
|
|
||||||
},
|
|
||||||
"user_data": {
|
|
||||||
"exists": false,
|
|
||||||
"is_dir": null,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": null
|
|
||||||
},
|
|
||||||
"global_storage": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T12:37:14.253083"
|
|
||||||
},
|
|
||||||
"cache": {
|
|
||||||
"exists": false,
|
|
||||||
"is_dir": null,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": null
|
|
||||||
},
|
|
||||||
"updater": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": false,
|
|
||||||
"size": 0,
|
|
||||||
"modified_time": "2025-02-10T17:19:39.071580"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"telemetry": {
|
|
||||||
"machineId": "9eb67b11924f32572a67e6480ce4f1cabf3f61503aa4918af506b259527a4745",
|
|
||||||
"macMachineId": "ff2a4a580f6e9e484c830204bb502866e9a333d3e0299ef81c34e01940da953e",
|
|
||||||
"devDeviceId": "1ae7f91c-3ab8-448c-bbd3-ef34345a5b05",
|
|
||||||
"sqmId": "{D73E6881-666C-4182-8CB2-E2A3EED5AEFF}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
# -*- mode: python ; coding: utf-8 -*-
|
# -*- mode: python ; coding: utf-8 -*-
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
from PyInstaller.utils.hooks import collect_all
|
||||||
|
|
||||||
def get_version():
|
def get_version():
|
||||||
with open('version.txt', 'r', encoding='utf-8') as f:
|
with open('version.txt', 'r', encoding='utf-8') as f:
|
||||||
@@ -8,26 +10,43 @@ def get_version():
|
|||||||
|
|
||||||
version = get_version()
|
version = get_version()
|
||||||
|
|
||||||
|
# 收集所有需要的依赖
|
||||||
|
datas = [('icon', 'icon'), ('version.txt', '.')]
|
||||||
|
binaries = []
|
||||||
|
hiddenimports = [
|
||||||
|
'win32gui', 'win32con', 'win32process', 'psutil', # Windows API 相关
|
||||||
|
'PyQt5', 'PyQt5.QtCore', 'PyQt5.QtGui', 'PyQt5.QtWidgets', # GUI 相关
|
||||||
|
'PyQt5.sip', # PyQt5 必需
|
||||||
|
'PyQt5.QtNetwork', # 网络相关
|
||||||
|
'PIL', # Pillow 相关
|
||||||
|
'PIL._imaging', # Pillow 核心
|
||||||
|
'requests', 'urllib3', 'certifi', # 网络请求相关
|
||||||
|
'json', 'uuid', 'hashlib', 'logging', # 基础功能相关
|
||||||
|
'importlib', # 导入相关
|
||||||
|
'pkg_resources', # 包资源
|
||||||
|
]
|
||||||
|
|
||||||
|
# 主要的分析对象
|
||||||
a = Analysis(
|
a = Analysis(
|
||||||
['main.py'],
|
['main.py'],
|
||||||
pathex=[],
|
pathex=[],
|
||||||
binaries=[],
|
binaries=binaries,
|
||||||
datas=[('icon', 'icon'), ('version.txt', '.')],
|
datas=datas,
|
||||||
hiddenimports=[
|
hiddenimports=hiddenimports,
|
||||||
'win32gui', 'win32con', 'win32process', 'psutil', # Windows API 相关
|
|
||||||
'PyQt5', 'PyQt5.QtCore', 'PyQt5.QtGui', 'PyQt5.QtWidgets', # GUI 相关
|
|
||||||
'requests', 'urllib3', 'certifi', # 网络请求相关
|
|
||||||
'json', 'uuid', 'hashlib', 'logging' # 基础功能相关
|
|
||||||
],
|
|
||||||
hookspath=[],
|
hookspath=[],
|
||||||
hooksconfig={},
|
hooksconfig={},
|
||||||
runtime_hooks=[],
|
runtime_hooks=[],
|
||||||
excludes=[],
|
excludes=['_tkinter', 'tkinter', 'Tkinter'],
|
||||||
|
win_no_prefer_redirects=False,
|
||||||
|
win_private_assemblies=False,
|
||||||
noarchive=False,
|
noarchive=False,
|
||||||
optimize=0,
|
module_collection_mode={'PyQt5': 'pyz+py'},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# 创建PYZ
|
||||||
pyz = PYZ(a.pure)
|
pyz = PYZ(a.pure)
|
||||||
|
|
||||||
|
# 创建EXE
|
||||||
exe = EXE(
|
exe = EXE(
|
||||||
pyz,
|
pyz,
|
||||||
a.scripts,
|
a.scripts,
|
||||||
|
|||||||
@@ -1,59 +0,0 @@
|
|||||||
{
|
|
||||||
"package_json_changes": {},
|
|
||||||
"registry_changes": {
|
|
||||||
"HKLM_MachineGuid": {
|
|
||||||
"before": {
|
|
||||||
"exists": true,
|
|
||||||
"value": "d890ab3d-43cd-40c8-a9ef-f5683b5a64e3"
|
|
||||||
},
|
|
||||||
"after": {
|
|
||||||
"exists": true,
|
|
||||||
"value": "776c6b6c-195f-42dc-94d6-72b70c3aca74"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"file_changes": {
|
|
||||||
"storage": {
|
|
||||||
"before": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": false,
|
|
||||||
"size": 3427,
|
|
||||||
"modified_time": "2025-02-12T11:40:57.046415"
|
|
||||||
},
|
|
||||||
"after": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": false,
|
|
||||||
"size": 1891,
|
|
||||||
"modified_time": "2025-02-12T11:48:42.627574"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"storage_backup": {
|
|
||||||
"before": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T11:00:01.555876"
|
|
||||||
},
|
|
||||||
"after": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T11:48:26.403770"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"global_storage": {
|
|
||||||
"before": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T11:47:27.627883"
|
|
||||||
},
|
|
||||||
"after": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T11:48:47.490659"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
1291
gui/main_window.py
1291
gui/main_window.py
File diff suppressed because it is too large
Load Diff
BIN
icon/logo1.ico
Normal file
BIN
icon/logo1.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
BIN
icon/logo2.ico
Normal file
BIN
icon/logo2.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
BIN
icon/logo3.ico
Normal file
BIN
icon/logo3.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
57
main.py
57
main.py
@@ -5,10 +5,17 @@ import os
|
|||||||
import atexit
|
import atexit
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
|
import urllib3
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from PyQt5.QtWidgets import QApplication, QMessageBox
|
from PyQt5.QtWidgets import QApplication, QMessageBox, QSystemTrayIcon, QMenu
|
||||||
|
from PyQt5.QtGui import QIcon
|
||||||
|
from PyQt5.QtCore import Qt
|
||||||
from gui.main_window import MainWindow
|
from gui.main_window import MainWindow
|
||||||
|
|
||||||
|
# 禁用所有 SSL 相关警告
|
||||||
|
urllib3.disable_warnings()
|
||||||
|
logging.getLogger('urllib3').setLevel(logging.ERROR)
|
||||||
|
|
||||||
def cleanup_temp():
|
def cleanup_temp():
|
||||||
"""清理临时文件"""
|
"""清理临时文件"""
|
||||||
try:
|
try:
|
||||||
@@ -50,6 +57,18 @@ def main():
|
|||||||
# 注册退出时的清理函数
|
# 注册退出时的清理函数
|
||||||
atexit.register(cleanup_temp)
|
atexit.register(cleanup_temp)
|
||||||
|
|
||||||
|
# 创建QApplication实例
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
|
||||||
|
# 检查系统托盘是否可用
|
||||||
|
if not QSystemTrayIcon.isSystemTrayAvailable():
|
||||||
|
logging.error("系统托盘不可用")
|
||||||
|
QMessageBox.critical(None, "错误", "系统托盘不可用,程序无法正常运行。")
|
||||||
|
return 1
|
||||||
|
|
||||||
|
# 设置应用程序不会在最后一个窗口关闭时退出
|
||||||
|
app.setQuitOnLastWindowClosed(False)
|
||||||
|
|
||||||
setup_logging()
|
setup_logging()
|
||||||
|
|
||||||
# 检查Python版本
|
# 检查Python版本
|
||||||
@@ -64,20 +83,46 @@ def main():
|
|||||||
logging.info(f" - {p}")
|
logging.info(f" - {p}")
|
||||||
|
|
||||||
logging.info("正在初始化主窗口...")
|
logging.info("正在初始化主窗口...")
|
||||||
app = QApplication(sys.argv)
|
|
||||||
|
# 设置应用程序ID (在设置图标之前)
|
||||||
|
if sys.platform == "win32":
|
||||||
|
import ctypes
|
||||||
|
myappid = u'nezha.cursor.helper.v3'
|
||||||
|
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
|
||||||
|
logging.info(f"设置应用程序ID: {myappid}")
|
||||||
|
|
||||||
|
# 设置应用程序图标
|
||||||
|
try:
|
||||||
|
icon_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "icon", "two.ico")
|
||||||
|
if os.path.exists(icon_path):
|
||||||
|
app_icon = QIcon(icon_path)
|
||||||
|
if not app_icon.isNull():
|
||||||
|
app.setWindowIcon(app_icon)
|
||||||
|
logging.info(f"成功设置应用程序图标: {icon_path}")
|
||||||
|
else:
|
||||||
|
logging.error("图标文件加载失败")
|
||||||
|
else:
|
||||||
|
logging.error(f"图标文件不存在: {icon_path}")
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
logging.error(f"设置应用程序图标失败: {str(e)}")
|
||||||
|
|
||||||
window = MainWindow()
|
window = MainWindow()
|
||||||
|
window.setWindowIcon(app.windowIcon()) # 确保窗口使用相同的图标
|
||||||
|
|
||||||
logging.info("正在启动主窗口...")
|
logging.info("正在启动主窗口...")
|
||||||
window.show()
|
window.show()
|
||||||
sys.exit(app.exec_())
|
|
||||||
|
return app.exec_()
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
error_msg = f"程序运行出错: {str(e)}\n{traceback.format_exc()}"
|
error_msg = f"程序运行出错: {str(e)}\n{traceback.format_exc()}"
|
||||||
logging.error(error_msg)
|
logging.error(error_msg)
|
||||||
# 使用 QMessageBox 显示错误
|
# 使用 QMessageBox 显示错误
|
||||||
app = QApplication(sys.argv)
|
if QApplication.instance() is None:
|
||||||
|
app = QApplication(sys.argv)
|
||||||
QMessageBox.critical(None, "错误", error_msg)
|
QMessageBox.critical(None, "错误", error_msg)
|
||||||
sys.exit(1)
|
return 1
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
sys.exit(main())
|
||||||
@@ -1,4 +1,10 @@
|
|||||||
|
# Use Tsinghua mirror for faster download in China:
|
||||||
|
# pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
|
||||||
|
|
||||||
requests==2.31.0
|
requests==2.31.0
|
||||||
|
setuptools>=68.0.0
|
||||||
|
altgraph>=0.17.4
|
||||||
pyinstaller==6.3.0
|
pyinstaller==6.3.0
|
||||||
pillow==10.2.0 # 用于处理图标
|
pillow==10.2.0
|
||||||
setuptools==65.5.1 # 解决pkg_resources.extern问题
|
PyQt5==5.15.10
|
||||||
|
pywin32==306
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
{
|
|
||||||
"github_changes": {
|
|
||||||
"package_json_changes": {},
|
|
||||||
"registry_changes": {
|
|
||||||
"HKLM_MachineGuid": {
|
|
||||||
"before": {
|
|
||||||
"exists": true,
|
|
||||||
"value": "d890ab3d-43cd-40c8-a9ef-f5683b5a64e3"
|
|
||||||
},
|
|
||||||
"after": {
|
|
||||||
"exists": true,
|
|
||||||
"value": "776c6b6c-195f-42dc-94d6-72b70c3aca74"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"file_changes": {
|
|
||||||
"storage": {
|
|
||||||
"before": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": false,
|
|
||||||
"size": 3427,
|
|
||||||
"modified_time": "2025-02-12T11:40:57.046415"
|
|
||||||
},
|
|
||||||
"after": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": false,
|
|
||||||
"size": 1891,
|
|
||||||
"modified_time": "2025-02-12T11:48:42.627574"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"storage_backup": {
|
|
||||||
"before": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T11:00:01.555876"
|
|
||||||
},
|
|
||||||
"after": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T11:48:26.403770"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"global_storage": {
|
|
||||||
"before": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T11:47:27.627883"
|
|
||||||
},
|
|
||||||
"after": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T11:48:47.490659"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"our_changes": {
|
|
||||||
"package_json_changes": {},
|
|
||||||
"registry_changes": {
|
|
||||||
"HKLM_MachineGuid": {
|
|
||||||
"before": {
|
|
||||||
"exists": true,
|
|
||||||
"value": "948b93c1-ee34-4a48-95d0-a2fce9af92b1"
|
|
||||||
},
|
|
||||||
"after": {
|
|
||||||
"exists": true,
|
|
||||||
"value": "1deb25e7-cdd4-4367-a347-fba8b33b9b03"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"file_changes": {
|
|
||||||
"storage_backup": {
|
|
||||||
"before": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T12:33:10.408749"
|
|
||||||
},
|
|
||||||
"after": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": true,
|
|
||||||
"size": null,
|
|
||||||
"modified_time": "2025-02-12T12:37:17.371311"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"storage": {
|
|
||||||
"before": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": false,
|
|
||||||
"size": 2214,
|
|
||||||
"modified_time": "2025-02-12T12:36:27.187387"
|
|
||||||
},
|
|
||||||
"after": {
|
|
||||||
"exists": true,
|
|
||||||
"is_dir": false,
|
|
||||||
"size": 1980,
|
|
||||||
"modified_time": "2025-02-12T12:37:17.428609"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
51
testbuild.bat
Normal file
51
testbuild.bat
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
@echo off
|
||||||
|
chcp 65001 >nul
|
||||||
|
setlocal EnableDelayedExpansion
|
||||||
|
|
||||||
|
REM 激活虚拟环境
|
||||||
|
call venv\Scripts\activate.bat
|
||||||
|
|
||||||
|
REM 确保安装了必要的包
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
REM 读取当前版本号
|
||||||
|
set /p VERSION=<version.txt
|
||||||
|
echo 当前正式版本: %VERSION%
|
||||||
|
|
||||||
|
REM 读取测试版本号(如果存在)
|
||||||
|
if exist testversion.txt (
|
||||||
|
set /p TEST_VERSION=<testversion.txt
|
||||||
|
) else (
|
||||||
|
set TEST_VERSION=0
|
||||||
|
)
|
||||||
|
|
||||||
|
REM 增加测试版本号
|
||||||
|
set /a TEST_VERSION+=1
|
||||||
|
echo !TEST_VERSION!>testversion.txt
|
||||||
|
echo 测试版本号: !TEST_VERSION!
|
||||||
|
|
||||||
|
REM 组合完整版本号
|
||||||
|
set FULL_VERSION=%VERSION%.!TEST_VERSION!
|
||||||
|
echo 完整版本号: !FULL_VERSION!
|
||||||
|
|
||||||
|
REM 创建测试版本输出目录
|
||||||
|
if not exist "dist\test" mkdir "dist\test"
|
||||||
|
|
||||||
|
REM 清理旧文件
|
||||||
|
if exist "dist\听泉cursor助手%VERSION%.exe" del "dist\听泉cursor助手%VERSION%.exe"
|
||||||
|
if exist "build" rmdir /s /q "build"
|
||||||
|
|
||||||
|
REM 执行打包
|
||||||
|
venv\Scripts\python.exe -m PyInstaller build_nezha.spec --clean
|
||||||
|
|
||||||
|
REM 移动并重命名文件
|
||||||
|
move "dist\听泉cursor助手%VERSION%.exe" "dist\test\听泉cursor助手v!FULL_VERSION!.exe"
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo 测试版本构建完成!
|
||||||
|
echo 版本号: v!FULL_VERSION!
|
||||||
|
echo 文件位置: dist\test\听泉cursor助手v!FULL_VERSION!.exe
|
||||||
|
|
||||||
|
REM 退出虚拟环境
|
||||||
|
deactivate
|
||||||
|
pause
|
||||||
@@ -4,8 +4,15 @@ import logging
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
|
"""配置类"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.api_base_url = "https://cursorapi.nosqli.com/admin"
|
self.base_url = "https://cursorapi.nosqli.com"
|
||||||
|
self.api_endpoints = {
|
||||||
|
"activate": f"{self.base_url}/admin/api.member/activate",
|
||||||
|
"status": f"{self.base_url}/admin/api.member/status",
|
||||||
|
"get_unused": f"{self.base_url}/admin/api.account/getUnused"
|
||||||
|
}
|
||||||
self.config_dir = Path(os.path.expanduser("~")) / ".cursor_switcher"
|
self.config_dir = Path(os.path.expanduser("~")) / ".cursor_switcher"
|
||||||
self.config_file = self.config_dir / "config.json"
|
self.config_file = self.config_dir / "config.json"
|
||||||
self.member_file = self.config_dir / "member.json"
|
self.member_file = self.config_dir / "member.json"
|
||||||
@@ -64,4 +71,15 @@ class Config:
|
|||||||
}
|
}
|
||||||
with open(self.config_file, "w", encoding="utf-8") as f:
|
with open(self.config_file, "w", encoding="utf-8") as f:
|
||||||
json.dump(config, f, indent=2, ensure_ascii=False)
|
json.dump(config, f, indent=2, ensure_ascii=False)
|
||||||
self.api_token = api_token
|
self.api_token = api_token
|
||||||
|
|
||||||
|
def get_api_url(self, endpoint_name: str) -> str:
|
||||||
|
"""获取API端点URL
|
||||||
|
|
||||||
|
Args:
|
||||||
|
endpoint_name: 端点名称
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: 完整的API URL
|
||||||
|
"""
|
||||||
|
return self.api_endpoints.get(endpoint_name, "")
|
||||||
@@ -1 +1 @@
|
|||||||
3.2.8
|
3.4.0
|
||||||
Reference in New Issue
Block a user