mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix
This commit is contained in:
@@ -22,10 +22,50 @@ function genCpModule(module: string) {
|
|||||||
}
|
}
|
||||||
const systemPlatform = os.platform();
|
const systemPlatform = os.platform();
|
||||||
let startScripts: string[] | undefined = undefined;
|
let startScripts: string[] | undefined = undefined;
|
||||||
|
let baseConfigPlugin: PluginOption[] | undefined = undefined;
|
||||||
if (systemPlatform == "linux") {
|
if (systemPlatform == "linux") {
|
||||||
startScripts = ['./script/napcat.sh'];
|
startScripts = ['./script/napcat.sh'];
|
||||||
|
baseConfigPlugin = [
|
||||||
|
// PreprocessorDirectives(),
|
||||||
|
cp({
|
||||||
|
targets: [
|
||||||
|
// ...external.map(genCpModule),
|
||||||
|
{ src: './src/napcat.json', dest: 'dist/config/' },
|
||||||
|
{ src: './src/onebot11/onebot11.json', dest: 'dist/config/' },
|
||||||
|
{ src: './package.json', dest: 'dist' },
|
||||||
|
{ src: './README.md', dest: 'dist' },
|
||||||
|
{ src: './logo.png', dest: 'dist/logs' },
|
||||||
|
{ src: './src/core.lib/MoeHoo-linux-x64.node', dest: 'dist' },
|
||||||
|
...(startScripts.map((startScript) => {
|
||||||
|
return { src: startScript, dest: 'dist' };
|
||||||
|
})),
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
nodeResolve(),
|
||||||
|
commonjs(),
|
||||||
|
];
|
||||||
} else {
|
} else {
|
||||||
startScripts = ['./script/napcat.ps1', './script/napcat.bat', './script/napcat-utf8.bat', './script/napcat-utf8.ps1', './script/napcat-log.ps1'];
|
startScripts = ['./script/napcat.ps1', './script/napcat.bat', './script/napcat-utf8.bat', './script/napcat-utf8.ps1', './script/napcat-log.ps1'];
|
||||||
|
baseConfigPlugin = [
|
||||||
|
// PreprocessorDirectives(),
|
||||||
|
cp({
|
||||||
|
targets: [
|
||||||
|
// ...external.map(genCpModule),
|
||||||
|
{ src: './src/napcat.json', dest: 'dist/config/' },
|
||||||
|
{ src: './src/onebot11/onebot11.json', dest: 'dist/config/' },
|
||||||
|
{ src: './package.json', dest: 'dist' },
|
||||||
|
{ src: './README.md', dest: 'dist' },
|
||||||
|
{ src: './logo.png', dest: 'dist/logs' },
|
||||||
|
{ src: './src/core.lib/MoeHoo-win32-x64.node', dest: 'dist' },
|
||||||
|
...(startScripts.map((startScript) => {
|
||||||
|
return { src: startScript, dest: 'dist' };
|
||||||
|
})),
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
nodeResolve(),
|
||||||
|
commonjs(),
|
||||||
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -33,26 +73,7 @@ if (systemPlatform == "linux") {
|
|||||||
// startScripts = ['./script/napcat.sh'];
|
// startScripts = ['./script/napcat.sh'];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
const baseConfigPlugin: PluginOption[] = [
|
|
||||||
// PreprocessorDirectives(),
|
|
||||||
cp({
|
|
||||||
targets: [
|
|
||||||
// ...external.map(genCpModule),
|
|
||||||
{ src: './src/napcat.json', dest: 'dist/config/' },
|
|
||||||
{ src: './src/onebot11/onebot11.json', dest: 'dist/config/' },
|
|
||||||
{ src: './package.json', dest: 'dist' },
|
|
||||||
{ src: './README.md', dest: 'dist' },
|
|
||||||
{ src: './logo.png', dest: 'dist/logs' },
|
|
||||||
{ src: './src/core.lib/MoeHoo-win32-x64.node', dest: 'dist' },
|
|
||||||
{ src: './src/core.lib/MoeHoo-linux-x64.node', dest: 'dist' },
|
|
||||||
...(startScripts.map((startScript) => {
|
|
||||||
return { src: startScript, dest: 'dist' };
|
|
||||||
})),
|
|
||||||
]
|
|
||||||
}),
|
|
||||||
nodeResolve(),
|
|
||||||
commonjs(),
|
|
||||||
];
|
|
||||||
|
|
||||||
let corePath = resolve(__dirname, './src/core/src');
|
let corePath = resolve(__dirname, './src/core/src');
|
||||||
if (!fs.existsSync(corePath)) {
|
if (!fs.existsSync(corePath)) {
|
||||||
|
Reference in New Issue
Block a user