mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix:update info&bat script
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
"name": "napcat",
|
"name": "napcat",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"watch:dev": "vite --mode development",
|
"watch:dev": "vite --mode development",
|
||||||
"watch:prod": "vite --mode production",
|
"watch:prod": "vite --mode production",
|
||||||
|
@@ -2,21 +2,17 @@
|
|||||||
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
||||||
chcp 65001
|
chcp 65001
|
||||||
:loop_read
|
:loop_read
|
||||||
for /f "tokens=3" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
|
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
|
||||||
set "RetString=%%a"
|
set "RetString=%%b"
|
||||||
goto :napcat_boot
|
goto :napcat_boot
|
||||||
)
|
)
|
||||||
|
|
||||||
goto :loop_read
|
|
||||||
|
|
||||||
:napcat_boot
|
:napcat_boot
|
||||||
for %%a in ("!RetString!") do (
|
for %%a in ("!RetString!") do (
|
||||||
set "pathWithoutUninstall=%%~dpa"
|
set "pathWithoutUninstall=%%~dpa"
|
||||||
set "fileName=%%~na"
|
|
||||||
set "extension=%%~xa"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set "QQPath=!pathWithoutUninstall!QQ.exe"
|
set "QQPath=!pathWithoutUninstall!QQ.exe"
|
||||||
set ELECTRON_RUN_AS_NODE=1
|
set ELECTRON_RUN_AS_NODE=1
|
||||||
echo !QQPath!
|
echo !QQPath!
|
||||||
!QQPath! ./napcat.cjs %*
|
"!QQPath!" ./napcat.cjs %*
|
||||||
|
@@ -1,22 +1,17 @@
|
|||||||
@echo off
|
@echo off
|
||||||
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
:loop_read
|
:loop_read
|
||||||
for /f "tokens=3" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
|
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
|
||||||
set "RetString=%%a"
|
set "RetString=%%b"
|
||||||
goto :napcat_boot
|
goto :napcat_boot
|
||||||
)
|
)
|
||||||
|
|
||||||
goto :loop_read
|
|
||||||
|
|
||||||
:napcat_boot
|
:napcat_boot
|
||||||
for %%a in ("!RetString!") do (
|
for %%a in ("!RetString!") do (
|
||||||
set "pathWithoutUninstall=%%~dpa"
|
set "pathWithoutUninstall=%%~dpa"
|
||||||
set "fileName=%%~na"
|
|
||||||
set "extension=%%~xa"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set "QQPath=!pathWithoutUninstall!QQ.exe"
|
set "QQPath=!pathWithoutUninstall!QQ.exe"
|
||||||
set ELECTRON_RUN_AS_NODE=1
|
set ELECTRON_RUN_AS_NODE=1
|
||||||
echo !QQPath!
|
echo !QQPath!
|
||||||
!QQPath! ./napcat.cjs %*
|
"!QQPath!" ./napcat.cjs %*
|
||||||
|
@@ -24,11 +24,13 @@ checkVersion().then((remoteVersion: string) => {
|
|||||||
for (const k of [0, 1, 2]) {
|
for (const k of [0, 1, 2]) {
|
||||||
if (parseInt(remoteVersionList[k]) > parseInt(localVersionList[k])) {
|
if (parseInt(remoteVersionList[k]) > parseInt(localVersionList[k])) {
|
||||||
console.log('检测到更新,请前往 https://github.com/NapNeko/NapCatQQ 下载 NapCatQQ V', remoteVersion);
|
console.log('检测到更新,请前往 https://github.com/NapNeko/NapCatQQ 下载 NapCatQQ V', remoteVersion);
|
||||||
|
return;
|
||||||
} else if (parseInt(remoteVersionList[k]) < parseInt(localVersionList[k])) {
|
} else if (parseInt(remoteVersionList[k]) < parseInt(localVersionList[k])) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('当前已是最新版本,版本:', localVersion);
|
console.log('当前已是最新版本,版本:', localVersion);
|
||||||
|
return;
|
||||||
});
|
});
|
||||||
new NapCatOnebot11();
|
new NapCatOnebot11();
|
||||||
napCatCore.addLoginSuccessCallback(() => {
|
napCatCore.addLoginSuccessCallback(() => {
|
||||||
|
Reference in New Issue
Block a user