mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix
This commit is contained in:
parent
fb42729dec
commit
dc34c4d00c
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@ -36,7 +36,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
target_platform: [linux,darwin]
|
target_platform: [linux]
|
||||||
target_arch: [x64, arm64]
|
target_arch: [x64, arm64]
|
||||||
steps:
|
steps:
|
||||||
- name: Clone Main Repository
|
- name: Clone Main Repository
|
||||||
@ -53,6 +53,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Build NuCat Linux
|
- name: Build NuCat Linux
|
||||||
run: |
|
run: |
|
||||||
|
export NAPCAT_BUILDSYS=${{ matrix.target_platform }}
|
||||||
|
export NAPCAT_BUILDARCH=${{ matrix.target_arch }}
|
||||||
npm i --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
|
npm i --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
|
||||||
npm run build:prod
|
npm run build:prod
|
||||||
cd dist
|
cd dist
|
||||||
@ -87,6 +89,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Build NuCat Linux
|
- name: Build NuCat Linux
|
||||||
run: |
|
run: |
|
||||||
|
export NAPCAT_BUILDSYS=${{ matrix.target_platform }}
|
||||||
|
export NAPCAT_BUILDARCH=${{ matrix.target_arch }}
|
||||||
npm i --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
|
npm i --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
|
||||||
npm run build:prod
|
npm run build:prod
|
||||||
cd dist
|
cd dist
|
||||||
|
@ -20,55 +20,42 @@ const nodeModules = [...builtinModules, builtinModules.map(m => `node:${m}`)].fl
|
|||||||
function genCpModule(module: string) {
|
function genCpModule(module: string) {
|
||||||
return { src: `./node_modules/${module}`, dest: `dist/node_modules/${module}`, flatten: false };
|
return { src: `./node_modules/${module}`, dest: `dist/node_modules/${module}`, flatten: false };
|
||||||
}
|
}
|
||||||
const systemPlatform = os.platform();
|
|
||||||
let startScripts: string[] | undefined = undefined;
|
let startScripts: string[] | undefined = undefined;
|
||||||
let baseConfigPlugin: PluginOption[] | undefined = undefined;
|
let MoeHooModule: any = [];
|
||||||
if (systemPlatform == "linux") {
|
if (process.env.NAPCAT_BUILDSYS == "linux") {
|
||||||
|
if (process.env.NAPCAT_BUILDARCH == "x64") {
|
||||||
|
MoeHooModule = [{ src: './src/core.lib/MoeHoo-linux-x64.node', dest: 'dist' }];
|
||||||
|
}
|
||||||
startScripts = ['./script/napcat.sh'];
|
startScripts = ['./script/napcat.sh'];
|
||||||
baseConfigPlugin = [
|
} else if (process.env.NAPCAT_BUILDSYS == "win32") {
|
||||||
// PreprocessorDirectives(),
|
if (process.env.NAPCAT_BUILDARCH == "x64") {
|
||||||
cp({
|
MoeHooModule = [{ src: './src/core.lib/MoeHoo-win32-x64.node', dest: 'dist' }];
|
||||||
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 {
|
|
||||||
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 = [
|
} else {
|
||||||
// PreprocessorDirectives(),
|
MoeHooModule = [{ src: './src/core.lib/MoeHoo-win32-x64.node', dest: 'dist' }, { src: './src/core.lib/MoeHoo-linux-x64.node', dest: 'dist' }];
|
||||||
cp({
|
startScripts = ['./script/napcat.sh', './script/napcat.ps1', './script/napcat.bat', './script/napcat-utf8.bat', './script/napcat-utf8.ps1', './script/napcat-log.ps1'];
|
||||||
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(),
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let 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' },
|
||||||
|
...MoeHooModule,
|
||||||
|
...(startScripts.map((startScript) => {
|
||||||
|
return { src: startScript, dest: 'dist' };
|
||||||
|
})),
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
nodeResolve(),
|
||||||
|
commonjs(),
|
||||||
|
];
|
||||||
// if (os.platform() !== 'win32') {
|
// if (os.platform() !== 'win32') {
|
||||||
// startScripts = ['./script/napcat.sh'];
|
// startScripts = ['./script/napcat.sh'];
|
||||||
// }
|
// }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user