agora-toolchain 3.5.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-toolchain",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "agora-tc-transpile": "./scripts/transpile.js",
@@ -52,6 +52,7 @@
52
52
  "dotenv": "^16.3.1",
53
53
  "electron-builder": "^24.13.3",
54
54
  "html-webpack-plugin": "^5.6.0",
55
+ "copy-webpack-plugin": "9.0.1",
55
56
  "karma": "^6.4.2",
56
57
  "karma-chrome-launcher": "^3.2.0",
57
58
  "karma-jasmine": "^5.1.0",
@@ -159,7 +159,7 @@ module.exports = createConfig = ({ entry, port = 3000, analyze }) => {
159
159
  devServer: {
160
160
  static: [
161
161
  {
162
- directory: resolveCwd('public'),
162
+ directory: resolveAtBaseModule('public'),
163
163
  publicPath: '/',
164
164
  },
165
165
  ],
@@ -1,5 +1,6 @@
1
1
  const webpackMerge = require('webpack-merge');
2
2
  const HtmlWebpackPlugin = require('html-webpack-plugin');
3
+ const CopyWebpackPlugin = require('copy-webpack-plugin');
3
4
  const path = require('path');
4
5
  const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
5
6
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
@@ -154,6 +155,22 @@ module.exports = createConfig = ({ entry, analyze, out = 'dist' }) => {
154
155
  new MiniCssExtractPlugin({
155
156
  filename: '[name].[contenthash].css',
156
157
  }),
158
+ new CopyWebpackPlugin({
159
+ patterns: [
160
+ // ai denoiser
161
+ {
162
+ from: resolveAtBaseModule('public/assets'),
163
+ to: resolveCwd('dist/assets'),
164
+ noErrorOnMissing: true,
165
+ },
166
+ //virtual background
167
+ {
168
+ from: resolveAtBaseModule('public/extensions'),
169
+ to: resolveCwd('dist/extensions'),
170
+ noErrorOnMissing: true,
171
+ },
172
+ ],
173
+ }),
157
174
  ...htmlPlugins,
158
175
  ...codeAppendPlugins,
159
176
  ...otherPlugins,
@@ -36,18 +36,6 @@ const options = {
36
36
  await notarizeMac(context);
37
37
  }
38
38
  },
39
- // artifactBuildStarted: (context) => {
40
- // identifyLinuxPackage(context);
41
- // },
42
- // afterAllArtifactBuild: (buildResult) => {
43
- // return stampArtifacts(buildResult);
44
- // },
45
- // force arch build if using electron-rebuild
46
- // beforeBuild: async (context) => {
47
- // const { appDir, electronVersion, arch } = context;
48
- // await electronRebuild.rebuild({ buildPath: appDir, electronVersion, arch });
49
- // return false;
50
- // },
51
39
  nodeGypRebuild: false,
52
40
  buildDependenciesFromSource: false,
53
41
  extraMetadata: {
@@ -73,29 +61,23 @@ const options = {
73
61
  },
74
62
  ]
75
63
  : [
64
+ // 内置资源
76
65
  {
77
- from: path.join(resolveModule('fcr-ui-scene'), 'public/assets/pretest.mp3'),
78
- to: 'assets/pretest.mp3',
66
+ from: path.join(resolveModule('fcr-ui-scene'), 'public/assets/electron/sound_effects/'),
67
+ to: 'assets/sound_effects/',
68
+ },
69
+ {
70
+ from: path.join(resolveModule('fcr-ui-scene'), 'public/assets/electron/images/'),
71
+ to: 'assets/images/',
72
+ },
73
+ {
74
+ from: path.join(resolveModule('fcr-ui-scene'), 'public/assets/electron/videos/'),
75
+ to: 'assets/videos/',
79
76
  },
80
77
  ],
81
78
  files: cpp
82
79
  ? ['!**/node_modules/agora-electron-sdk/**/*', '!**/artifactory_deps/**/*']
83
80
  : ['**/*', '!**/artifactory_deps/**/*'],
84
- // files: [
85
- // // 'node_modules//**/*',
86
- // {
87
- // from: 'node_modules/agora-toolchain/lib/index.js',
88
- // to: 'index.js',
89
- // },
90
- // ],
91
- // extraResources: [webRoot, electronRoot],
92
- // extraFiles: [
93
- // {
94
- // from: resolveCwd('build/Release'),
95
- // to: nodeAddonDir,
96
- // filter: '*.node',
97
- // },
98
- // ],
99
81
  win: {
100
82
  icon: resolveCwd('installer/icons/favicon.png'),
101
83
  target: 'nsis',
@@ -103,8 +85,6 @@ const options = {
103
85
  nsis: {
104
86
  shortcutName: 'FcrMeeting',
105
87
  installerIcon: resolveCwd('installer/icons/favicon.ico'),
106
- // deleteAppDataOnUninstall: true,
107
- // include: 'installer/win/nsis-installer.nsh',
108
88
  },
109
89
  mac: {
110
90
  target: 'dmg',
@@ -124,7 +104,6 @@ const options = {
124
104
  },
125
105
  },
126
106
  dmg: {
127
- // background: resolveCwd('installer/mac/dmg-background.png'),
128
107
  contents: [
129
108
  {
130
109
  x: 130,
@@ -137,11 +116,6 @@ const options = {
137
116
  path: '/Applications',
138
117
  },
139
118
  ],
140
- // iconSize: 100,
141
- // window: {
142
- // width: 500,
143
- // height: 500,
144
- // },
145
119
  },
146
120
  };
147
121
 
@@ -41,19 +41,13 @@ if (fs.existsSync(resolveCwd('public/assets'))) {
41
41
  copyDirSync(resolveCwd('public/assets'), resolveCwd('dist/assets'));
42
42
  }
43
43
 
44
- // fs.copyFileSync(resolveCwd('public/assets/loading.gif'), resolveCwd('dist/assets/loading.gif'));
45
- // fs.copyFileSync(
46
- // resolveCwd('public/assets/fcr_leave2.svg'),
47
- // resolveCwd('dist/assets/fcr_leave2.svg'),
48
- // );
49
-
50
44
  // Let's get that intellisense working
51
45
  /**
52
46
  * @type {import('electron-builder').Configuration}
53
47
  * @see https://www.electron.build/configuration/configuration
54
48
  */
55
49
  const options = {
56
- appId: 'io.agora.meeting',
50
+ appId: 'io.agora.meeting.core',
57
51
  protocols: {
58
52
  name: 'fcr-meeting',
59
53
  // Don't forget to set `MimeType: "x-scheme-handler/deeplink"` for `linux.desktop` entry!
@@ -70,18 +64,6 @@ const options = {
70
64
  await notarizeMac(context);
71
65
  }
72
66
  },
73
- // artifactBuildStarted: (context) => {
74
- // identifyLinuxPackage(context);
75
- // },
76
- // afterAllArtifactBuild: (buildResult) => {
77
- // return stampArtifacts(buildResult);
78
- // },
79
- // force arch build if using electron-rebuild
80
- // beforeBuild: async (context) => {
81
- // const { appDir, electronVersion, arch } = context;
82
- // await electronRebuild.rebuild({ buildPath: appDir, electronVersion, arch });
83
- // return false;
84
- // },
85
67
  nodeGypRebuild: false,
86
68
  buildDependenciesFromSource: false,
87
69
  extraMetadata: {
@@ -95,28 +77,25 @@ const options = {
95
77
  buildResources: resolveCwd('installer/resources'),
96
78
  },
97
79
  files: ['!**/artifactory_deps/**/*'],
98
- // files: [
99
- // // 'node_modules//**/*',
100
- // {
101
- // from: 'node_modules/agora-toolchain/lib/index.js',
102
- // to: 'index.js',
103
- // },
104
- // ],
105
80
  extraResources: [
81
+ // 内置资源
82
+ {
83
+ from: resolveCwd('public/assets/electron/sound_effects/'),
84
+ to: 'assets/sound_effects/',
85
+ },
86
+ {
87
+ from: resolveCwd('public/assets/electron/images/'),
88
+ to: 'assets/images/',
89
+ },
106
90
  {
107
- from: resolveCwd('public/assets/pretest.mp3'),
108
- to: 'assets/pretest.mp3',
91
+ from: resolveCwd('public/assets/electron/videos/'),
92
+ to: 'assets/videos/',
109
93
  },
110
94
  {
111
95
  from: resolveCwd('public/assets/loading.gif'),
112
96
  to: 'assets/loading.gif',
113
97
  },
114
98
  ],
115
- // extraFiles: [
116
- // {
117
- // from: resolveCwd('public/assets'),
118
- // },
119
- // ],
120
99
  win: {
121
100
  icon: resolveCwd('installer/icons/favicon.png'),
122
101
  target: 'nsis',
@@ -124,8 +103,6 @@ const options = {
124
103
  nsis: {
125
104
  shortcutName: 'FcrMeeting',
126
105
  installerIcon: resolveCwd('installer/icons/favicon.ico'),
127
- // deleteAppDataOnUninstall: true,
128
- // include: 'installer/win/nsis-installer.nsh',
129
106
  },
130
107
  mac: {
131
108
  target: 'dmg',
@@ -141,7 +118,6 @@ const options = {
141
118
  },
142
119
  },
143
120
  dmg: {
144
- // background: resolveCwd('installer/mac/dmg-background.png'),
145
121
  contents: [
146
122
  {
147
123
  x: 130,
@@ -154,11 +130,6 @@ const options = {
154
130
  path: '/Applications',
155
131
  },
156
132
  ],
157
- // iconSize: 100,
158
- // window: {
159
- // width: 500,
160
- // height: 500,
161
- // },
162
133
  },
163
134
  };
164
135