mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-12-19 05:05:44 +08:00
Add napiloader scripts and binaries, update Vite config
Introduces napiloader batch scripts and binaries (napiloader.dll, napimain.exe) for Windows integration. Updates vite.config.ts to include napiloader files in the Framework build output and refactors plugin target lists for improved distribution packaging.
This commit is contained in:
parent
d76a2170a0
commit
5dc33e78ad
30
napiloader/napiLoader-debug.bat
Normal file
30
napiloader/napiLoader-debug.bat
Normal file
@ -0,0 +1,30 @@
|
||||
@echo off
|
||||
chcp 65001
|
||||
set NAPCAT_INJECT_PATH=%cd%\napiloader.dll
|
||||
set NAPCAT_LAUNCHER_PATH=%cd%\napimain.exe
|
||||
set NAPCAT_MAIN_PATH=%cd%\nativeLoader.cjs
|
||||
set NAPCAT_DEBUG_CONSOLE=1
|
||||
:loop_read
|
||||
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
|
||||
set "RetString=%%~b"
|
||||
goto :napcat_boot
|
||||
)
|
||||
|
||||
:napcat_boot
|
||||
for %%a in ("%RetString%") do (
|
||||
set "pathWithoutUninstall=%%~dpa"
|
||||
)
|
||||
|
||||
set "QQPath=%pathWithoutUninstall%QQ.exe"
|
||||
|
||||
if not exist "%QQpath%" (
|
||||
echo provided QQ path is invalid
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
set NAPCAT_MAIN_PATH=%NAPCAT_MAIN_PATH:\=/%
|
||||
|
||||
"%NAPCAT_LAUNCHER_PATH%" "%QQPath%" "%NAPCAT_INJECT_PATH%" "%NAPCAT_MAIN_PATH%"
|
||||
|
||||
pause
|
||||
27
napiloader/napiLoader.bat
Normal file
27
napiloader/napiLoader.bat
Normal file
@ -0,0 +1,27 @@
|
||||
@echo off
|
||||
chcp 65001
|
||||
set NAPCAT_INJECT_PATH=%cd%\napiloader.dll
|
||||
set NAPCAT_LAUNCHER_PATH=%cd%\napimain.exe
|
||||
set NAPCAT_MAIN_PATH=%cd%\nativeLoader.cjs
|
||||
:loop_read
|
||||
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
|
||||
set "RetString=%%~b"
|
||||
goto :napcat_boot
|
||||
)
|
||||
|
||||
:napcat_boot
|
||||
for %%a in ("%RetString%") do (
|
||||
set "pathWithoutUninstall=%%~dpa"
|
||||
)
|
||||
|
||||
set "QQPath=%pathWithoutUninstall%QQ.exe"
|
||||
|
||||
if not exist "%QQpath%" (
|
||||
echo provided QQ path is invalid
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
set NAPCAT_MAIN_PATH=%NAPCAT_MAIN_PATH:\=/%
|
||||
|
||||
start "" "%NAPCAT_LAUNCHER_PATH%" "%QQPath%" "%NAPCAT_INJECT_PATH%" "%NAPCAT_MAIN_PATH%"
|
||||
BIN
napiloader/napiloader.dll
Normal file
BIN
napiloader/napiloader.dll
Normal file
Binary file not shown.
BIN
napiloader/napimain.exe
Normal file
BIN
napiloader/napimain.exe
Normal file
Binary file not shown.
@ -56,6 +56,7 @@ const FrameworkBaseConfigPlugin: PluginOption[] = [
|
||||
// }),
|
||||
cp({
|
||||
targets: [
|
||||
{ src: './napiloader/', dest: 'dist', flatten: true },
|
||||
{ src: './src/native/', dest: 'dist/native', flatten: false },
|
||||
{ src: './manifest.json', dest: 'dist' },
|
||||
{ src: './src/core/external/napcat.json', dest: 'dist/config/' },
|
||||
|
||||
Loading…
Reference in New Issue
Block a user