Skip to content

Commit

Permalink
release: 1.6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
MliKiowa committed Jul 3, 2024
1 parent 0a01b8a commit 61cfa0e
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 4 deletions.
18 changes: 18 additions & 0 deletions docs/changelogs/CHANGELOG.v1.6.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# v1.6.4

QQ Version: Windows 9.9.12-26000 / Linux 3.2.9-26000
## 使用前警告
1. 在最近版本由于QQ本体大幅变动,为了保证NapCat可用性,NapCat近期启动与安装方式将将大幅变动,请关注文档和社群获取。
2. 在Core上完全执行开源,请不要用于违法用途,如此可能造成NapCat完全停止更新。
3. 针对原启动方式的围堵,NapCat研发了多种方式,除此其余理论与扩展的分析和思路将部分展示于Docs,以便各位参与开发与维护NapCat。
## 其余·备注
启动方式: WayBoot.03 (Electron Main进程为Node 直接注入代码 同理项目: LiteLoader)

## 修复与优化
1. 支持Win平台 9.9.12
2. 修复部分发送图片下载异常情况

## 新增与调整
没有哦

新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "napcat",
"private": true,
"type": "module",
"version": "1.6.3",
"version": "1.6.4",
"scripts": {
"watch:dev": "vite --mode development",
"watch:prod": "vite --mode production",
Expand Down
45 changes: 45 additions & 0 deletions script/BootWay.03.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Dont Use This Script
# 2024.7.3
function Get-QQpath {
try {
$key = Get-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ"
$uninstallString = $key.UninstallString
return [System.IO.Path]::GetDirectoryName($uninstallString) + "\QQ.exe"
}
catch {
throw "get QQ path error: $_"
}
}
function Select-QQPath {
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.Application]::EnableVisualStyles()

$dialogTitle = "Select QQ.exe"

$filePicker = New-Object System.Windows.Forms.OpenFileDialog
$filePicker.Title = $dialogTitle
$filePicker.Filter = "Executable Files (*.exe)|*.exe|All Files (*.*)|*.*"
$filePicker.FilterIndex = 1
$null = $filePicker.ShowDialog()
if (-not ($filePicker.FileName)) {
throw "User did not select an .exe file."
}
return $filePicker.FileName
}

$params = $args -join " "
Try {
$QQpath = Get-QQpath
}
Catch {
$QQpath = Select-QQPath
}

if (!(Test-Path $QQpath)) {
throw "provided QQ path is invalid: $QQpath"
}

$Bootfile = Join-Path $PSScriptRoot "napcat.mjs"
$env:ELECTRON_RUN_AS_NODE = 1
$commandInfo = Get-Command $QQpath -ErrorAction Stop
Start-Process powershell -ArgumentList "-noexit", "-noprofile", "-command &{& chcp 65001;& '$($commandInfo.Path)' --enable-logging $params}"
20 changes: 20 additions & 0 deletions script/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// --------------------
// 2024.7.3 9.9.12 BootWay.03 其余方法暂不公开(此方案为临时方案 Win平台已验证)
// 缺陷 (已知)
// 1.与非入侵式不同 现在破坏本体代码
// 2.重启代码与正常启动代码失效
// 3.Win需要补丁
// 4.更新后丢失内容 需要重写此文件
// 5.安装难度上升与周围基础设施失效
// --------------------

const path = require('path');
const CurrentPath = path.dirname(__filename)
const hasNapcatParam = process.argv.includes('--enable-logging');
if (hasNapcatParam) {
(async () => {
await import("file://" + path.join(CurrentPath, './napcat/napcat.mjs'));
})();
} else {
require('./launcher.node').load('external_index', module);
}
2 changes: 1 addition & 1 deletion src/onebot11/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = '1.6.3';
export const version = '1.6.4';
2 changes: 1 addition & 1 deletion src/webui/ui/NapCat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function onSettingWindowCreated(view: Element) {
SettingItem(
'<span id="napcat-update-title">Napcat</span>',
undefined,
SettingButton('V1.6.3', 'napcat-update-button', 'secondary')
SettingButton('V1.6.4', 'napcat-update-button', 'secondary')
),
]),
SettingList([
Expand Down
2 changes: 1 addition & 1 deletion static/assets/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ async function onSettingWindowCreated(view) {
SettingItem(
'<span id="napcat-update-title">Napcat</span>',
void 0,
SettingButton("V1.6.3", "napcat-update-button", "secondary")
SettingButton("V1.6.4", "napcat-update-button", "secondary")
)
]),
SettingList([
Expand Down

0 comments on commit 61cfa0e

Please sign in to comment.