mirror of
https://github.com/yuaotian/go-cursor-help.git
synced 2025-06-08 12:32:06 +08:00
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9a0a1260e0 | ||
![]() |
a864cf9284 | ||
![]() |
f3953cd838 | ||
![]() |
a48185e6a5 | ||
![]() |
c1b7e42e27 | ||
![]() |
776ecb0434 | ||
![]() |
86b2bae098 | ||
![]() |
291c6198bc | ||
![]() |
bc787f2076 | ||
![]() |
9204cef000 | ||
![]() |
363518ad40 | ||
![]() |
d01dcdb7ba | ||
![]() |
234ec180a0 | ||
![]() |
974852944b |
@ -15,8 +15,8 @@
|
||||
> ⚠️ **IMPORTANT NOTICE**
|
||||
>
|
||||
> This tool currently supports:
|
||||
> - ✅ Windows: Latest 0.49.x versions (Supported)
|
||||
> - ✅ Mac/Linux: Latest 0.49.x versions (Supported, feedback welcome)
|
||||
> - ✅ Windows: Latest 0.50.x versions (Supported)
|
||||
> - ✅ Mac/Linux: Latest 0.50.x versions (Supported, feedback welcome)
|
||||
>
|
||||
> Please check your Cursor version before using this tool.
|
||||
|
||||
@ -503,8 +503,8 @@ Modifying this registry key may affect:
|
||||
</td>
|
||||
<td align="center">
|
||||
<b>WeChat</b><br>
|
||||
<img src="img/qun11.jpg" width="500" alt="WeChat"><br>
|
||||
<em>二维码7天内(4月25日前)有效,过期请加微信</em>
|
||||
<img src="img/qun13.png" width="500" alt="WeChat"><br>
|
||||
<em>二维码7天内(5月30日前)有效,过期请加微信</em>
|
||||
</td>
|
||||
<!-- <td align="center">
|
||||
<b>ETC</b><br>
|
||||
|
@ -15,8 +15,8 @@
|
||||
> ⚠️ **重要提示**
|
||||
>
|
||||
> 本工具当前支持版本:
|
||||
> - ✅ Windows: 最新的 0.49.x 版本(已支持)
|
||||
> - ✅ Mac/Linux: 最新的 0.49.x 版本(已支持,欢迎测试并反馈问题)
|
||||
> - ✅ Windows: 最新的 0.50.x 版本(已支持)
|
||||
> - ✅ Mac/Linux: 最新的 0.50.x 版本(已支持,欢迎测试并反馈问题)
|
||||
|
||||
> 使用前请确认您的 Cursor 版本。
|
||||
|
||||
@ -442,8 +442,8 @@ irm https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/
|
||||
</td>
|
||||
<td align="center">
|
||||
<b>微信交流群</b><br>
|
||||
<img src="img/qun11.jpg" width="500" alt="WeChat"><br>
|
||||
<small>二维码7天内(4月25日前)有效,过期请加微信</small>
|
||||
<img src="img/qun13.png" width="500" alt="WeChat"><br>
|
||||
<small>二维码7天内(5月30日前)有效,过期请加微信</small>
|
||||
</td>
|
||||
<td align="center">
|
||||
<b>公众号</b><br>
|
||||
|
@ -15,8 +15,8 @@
|
||||
> ⚠️ **重要なお知らせ**
|
||||
>
|
||||
> このツールは現在以下のバージョンをサポートしています:
|
||||
> - ✅ Windows: 最新の0.49.xバージョン(サポート済み)
|
||||
> - ✅ Mac/Linux: 最新の0.49.xバージョン(サポート済み、フィードバック歓迎)
|
||||
> - ✅ Windows: 最新の0.50.xバージョン(サポート済み)
|
||||
> - ✅ Mac/Linux: 最新の0.50.xバージョン(サポート済み、フィードバック歓迎)
|
||||
>
|
||||
> このツールを使用する前に、Cursorのバージョンを確認してください。
|
||||
|
||||
@ -500,8 +500,8 @@ macOS/Linuxユーザーはシステム内で同様の`cursor-updater`ディレ
|
||||
</td>
|
||||
<td align="center">
|
||||
<b>WeChat</b><br>
|
||||
<img src="img/qun11.jpg" width="500" alt="WeChat"><br>
|
||||
<em>二维码7天内(4月25日前)有效,过期请加微信</em>
|
||||
<img src="img/qun13.png" width="500" alt="WeChat"><br>
|
||||
<em>二维码7天内(5月30日前)有效,过期请加微信</em>
|
||||
</td>
|
||||
<!-- <td align="center">
|
||||
<b>ETC</b><br>
|
||||
|
BIN
img/qun-12.png
Normal file
BIN
img/qun-12.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 124 KiB |
BIN
img/qun13.png
Normal file
BIN
img/qun13.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 127 KiB |
@ -3,7 +3,7 @@
|
||||
AppImage instructions:
|
||||
mkdir -p ~/Downloads/Cursor
|
||||
cd ~/Downloads/Cursor
|
||||
cd Cursor && ./Cursor-0.49.5-x86_64.AppImage --appimage-extract
|
||||
cd Cursor && ./Cursor-0.50.5-x86_64.AppImage --appimage-extract
|
||||
mkdir -p ~/.local
|
||||
rsync -rt ~/Downloads/Cursor/squashfs-root/usr/ ~/.local
|
||||
# ^ copy the subfolders not usr itself, so the resulting executable should be ~/.local/bin/cursor
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -13,6 +13,70 @@ $NC = "`e[0m"
|
||||
$STORAGE_FILE = "$env:APPDATA\Cursor\User\globalStorage\storage.json"
|
||||
$BACKUP_DIR = "$env:APPDATA\Cursor\User\globalStorage\backups"
|
||||
|
||||
# 新增 Cursor 初始化函数
|
||||
function Cursor-初始化 {
|
||||
Write-Host "$GREEN[信息]$NC 正在执行 Cursor 初始化清理..."
|
||||
$BASE_PATH = "$env:APPDATA\Cursor\User"
|
||||
|
||||
$filesToDelete = @(
|
||||
(Join-Path -Path $BASE_PATH -ChildPath "globalStorage\\state.vscdb"),
|
||||
(Join-Path -Path $BASE_PATH -ChildPath "globalStorage\\state.vscdb.backup")
|
||||
)
|
||||
|
||||
$folderToCleanContents = Join-Path -Path $BASE_PATH -ChildPath "History"
|
||||
$folderToDeleteCompletely = Join-Path -Path $BASE_PATH -ChildPath "workspaceStorage"
|
||||
|
||||
Write-Host "$BLUE[调试]$NC 基础路径: $BASE_PATH"
|
||||
|
||||
# 删除指定文件
|
||||
foreach ($file in $filesToDelete) {
|
||||
Write-Host "$BLUE[调试]$NC 检查文件: $file"
|
||||
if (Test-Path $file) {
|
||||
try {
|
||||
Remove-Item -Path $file -Force -ErrorAction Stop
|
||||
Write-Host "$GREEN[成功]$NC 已删除文件: $file"
|
||||
}
|
||||
catch {
|
||||
Write-Host "$RED[错误]$NC 删除文件 $file 失败: $($_.Exception.Message)"
|
||||
}
|
||||
} else {
|
||||
Write-Host "$YELLOW[警告]$NC 文件不存在,跳过删除: $file"
|
||||
}
|
||||
}
|
||||
|
||||
# 清空指定文件夹内容
|
||||
Write-Host "$BLUE[调试]$NC 检查待清空文件夹: $folderToCleanContents"
|
||||
if (Test-Path $folderToCleanContents) {
|
||||
try {
|
||||
# 获取子项进行删除,以避免删除 History 文件夹本身
|
||||
Get-ChildItem -Path $folderToCleanContents -Recurse | Remove-Item -Recurse -Force -ErrorAction Stop
|
||||
Write-Host "$GREEN[成功]$NC 已清空文件夹内容: $folderToCleanContents"
|
||||
}
|
||||
catch {
|
||||
Write-Host "$RED[错误]$NC 清空文件夹 $folderToCleanContents 内容失败: $($_.Exception.Message)"
|
||||
}
|
||||
} else {
|
||||
Write-Host "$YELLOW[警告]$NC 文件夹不存在,跳过清空: $folderToCleanContents"
|
||||
}
|
||||
|
||||
# 删除指定文件夹及其内容
|
||||
Write-Host "$BLUE[调试]$NC 检查待删除文件夹: $folderToDeleteCompletely"
|
||||
if (Test-Path $folderToDeleteCompletely) {
|
||||
try {
|
||||
Remove-Item -Path $folderToDeleteCompletely -Recurse -Force -ErrorAction Stop
|
||||
Write-Host "$GREEN[成功]$NC 已删除文件夹: $folderToDeleteCompletely"
|
||||
}
|
||||
catch {
|
||||
Write-Host "$RED[错误]$NC 删除文件夹 $folderToDeleteCompletely 失败: $($_.Exception.Message)"
|
||||
}
|
||||
} else {
|
||||
Write-Host "$YELLOW[警告]$NC 文件夹不存在,跳过删除: $folderToDeleteCompletely"
|
||||
}
|
||||
|
||||
Write-Host "$GREEN[信息]$NC Cursor 初始化清理完成。"
|
||||
Write-Host "" # 添加空行以改善输出格式
|
||||
}
|
||||
|
||||
# 检查管理员权限
|
||||
function Test-Administrator {
|
||||
$user = [Security.Principal.WindowsIdentity]::GetCurrent()
|
||||
@ -44,14 +108,15 @@ Write-Host "$GREEN Cursor 设备ID 修改工具 $NC"
|
||||
Write-Host "$YELLOW 关注公众号【煎饼果子卷AI】 $NC"
|
||||
Write-Host "$YELLOW 一起交流更多Cursor技巧和AI知识(脚本免费、关注公众号加群有更多技巧和大佬) $NC"
|
||||
Write-Host "$YELLOW [重要提示] 本工具免费,如果对您有帮助,请关注公众号【煎饼果子卷AI】 $NC"
|
||||
Write-Host "$BLUE================================$NC"
|
||||
Write-Host ""
|
||||
Write-Host "$YELLOW [小小广告] 出售CursorPro教育号一年质保三个月,有需要找我(86),WeChat:JavaRookie666 $NC"
|
||||
Write-Host "$BLUE================================$NC"
|
||||
|
||||
# 获取并显示 Cursor 版本
|
||||
function Get-CursorVersion {
|
||||
try {
|
||||
# 主要检测路径
|
||||
$packagePath = "$env:LOCALAPPDATA\Programs\cursor\resources\app\package.json"
|
||||
$packagePath = "$env:LOCALAPPDATA\\Programs\\cursor\\resources\\app\\package.json"
|
||||
|
||||
if (Test-Path $packagePath) {
|
||||
$packageJson = Get-Content $packagePath -Raw | ConvertFrom-Json
|
||||
@ -62,7 +127,7 @@ function Get-CursorVersion {
|
||||
}
|
||||
|
||||
# 备用路径检测
|
||||
$altPath = "$env:LOCALAPPDATA\cursor\resources\app\package.json"
|
||||
$altPath = "$env:LOCALAPPDATA\\cursor\\resources\\app\\package.json"
|
||||
if (Test-Path $altPath) {
|
||||
$packageJson = Get-Content $altPath -Raw | ConvertFrom-Json
|
||||
if ($packageJson.version) {
|
||||
@ -85,7 +150,7 @@ function Get-CursorVersion {
|
||||
$cursorVersion = Get-CursorVersion
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "$YELLOW[重要提示]$NC 最新的 0.49.x (以支持)"
|
||||
Write-Host "$YELLOW[重要提示]$NC 最新的 0.50.x (以支持)"
|
||||
Write-Host ""
|
||||
|
||||
# 检查并关闭 Cursor 进程
|
||||
@ -139,6 +204,9 @@ function Close-CursorProcess {
|
||||
Close-CursorProcess "Cursor"
|
||||
Close-CursorProcess "cursor"
|
||||
|
||||
# 执行 Cursor 初始化清理
|
||||
# Cursor-初始化
|
||||
|
||||
# 创建备份目录
|
||||
if (-not (Test-Path $BACKUP_DIR)) {
|
||||
New-Item -ItemType Directory -Path $BACKUP_DIR | Out-Null
|
||||
@ -536,13 +604,4 @@ function Write-ConfigFile {
|
||||
catch {
|
||||
throw "写入配置文件失败: $_"
|
||||
}
|
||||
}
|
||||
|
||||
# 获取并显示版本信息
|
||||
$cursorVersion = Get-CursorVersion
|
||||
Write-Host ""
|
||||
if ($cursorVersion) {
|
||||
Write-Host "$GREEN[信息]$NC 检测到 Cursor 版本: $cursorVersion,继续执行..."
|
||||
} else {
|
||||
Write-Host "$YELLOW[警告]$NC 无法检测版本,将继续执行..."
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user