调整打包脚本使用 packaging 资源路径
This commit is contained in:
@@ -12,10 +12,8 @@ function isLargeBundledResource(entry) {
|
||||
return to.startsWith('resources-bundles/')
|
||||
|| from === 'ziti'
|
||||
|| from === 'bgm'
|
||||
|| from.includes('/common/playwright')
|
||||
|| from.includes('/common/python')
|
||||
|| from.includes('/common/models')
|
||||
|| from.includes('/common/fonts');
|
||||
|| from.startsWith('packaging/vendor/')
|
||||
|| from.includes('/packaging/vendor/');
|
||||
}
|
||||
|
||||
const config = JSON5.parse(fs.readFileSync(sourcePath, 'utf8'));
|
||||
@@ -114,7 +112,7 @@ if (config.win && Array.isArray(config.win.extraResources)) {
|
||||
.filter(entry => !isLargeBundledResource(entry))
|
||||
.map(entry => {
|
||||
const from = String(entry && entry.from || '').replace(/\\/g, '/');
|
||||
if (from.endsWith('electron/resources/extra') && Array.isArray(entry.filter)) {
|
||||
if (from.endsWith('packaging/resources') && Array.isArray(entry.filter)) {
|
||||
return {
|
||||
...entry,
|
||||
filter: entry.filter
|
||||
@@ -134,7 +132,7 @@ if (config.win && Array.isArray(config.win.extraResources)) {
|
||||
.concat(oemCoverTemplateFiles)
|
||||
};
|
||||
}
|
||||
if (from.endsWith('electron/resources/build') && Array.isArray(entry.filter)) {
|
||||
if (from.endsWith('packaging/build-resources') && Array.isArray(entry.filter)) {
|
||||
return {
|
||||
...entry,
|
||||
filter: entry.filter.filter(pattern => String(pattern).replace(/\\/g, '/') !== 'vc_redist.x64.exe'),
|
||||
|
||||
Reference in New Issue
Block a user