158 | );
159 | }
160 | }
161 |
162 | function mapStateToProps(state) {
163 | return {
164 | isRecording: state.recorder.isRecording
165 | };
166 | }
167 |
168 | export default connect(mapStateToProps)(SettingLayout);
169 |
--------------------------------------------------------------------------------
/configs/webpack.config.renderer.prod.babel.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Build config for electron renderer process
3 | */
4 |
5 | import path from 'path';
6 | import webpack from 'webpack';
7 | import MiniCssExtractPlugin from 'mini-css-extract-plugin';
8 | import OptimizeCSSAssetsPlugin from 'optimize-css-assets-webpack-plugin';
9 | import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
10 | import merge from 'webpack-merge';
11 | import TerserPlugin from 'terser-webpack-plugin';
12 | import baseConfig from './webpack.config.base';
13 | import CheckNodeEnv from '../internals/scripts/CheckNodeEnv';
14 |
15 | CheckNodeEnv('production');
16 |
17 | export default merge.smart(baseConfig, {
18 | devtool: 'source-map',
19 |
20 | mode: 'production',
21 |
22 | target: 'electron-renderer',
23 |
24 | entry: path.join(__dirname, '..', 'app/index'),
25 |
26 | output: {
27 | path: path.join(__dirname, '..', 'app/dist'),
28 | publicPath: './dist/',
29 | filename: 'renderer.prod.js'
30 | },
31 |
32 | module: {
33 | rules: [
34 | // Extract all .global.css to style.css as is
35 | {
36 | test: /\.global\.css$/,
37 | use: [
38 | {
39 | loader: MiniCssExtractPlugin.loader,
40 | options: {
41 | publicPath: './'
42 | }
43 | },
44 | {
45 | loader: 'css-loader',
46 | options: {
47 | sourceMap: true
48 | }
49 | }
50 | ]
51 | },
52 | // Pipe other styles through css modules and append to style.css
53 | {
54 | test: /^((?!\.global).)*\.css$/,
55 | use: [
56 | {
57 | loader: MiniCssExtractPlugin.loader
58 | },
59 | {
60 | loader: 'css-loader',
61 | options: {
62 | modules: {
63 | localIdentName: '[name]__[local]__[hash:base64:5]'
64 | },
65 | sourceMap: true
66 | }
67 | }
68 | ]
69 | },
70 | // Add SASS support - compile all .global.scss files and pipe it to style.css
71 | {
72 | test: /\.global\.(scss|sass)$/,
73 | use: [
74 | {
75 | loader: MiniCssExtractPlugin.loader
76 | },
77 | {
78 | loader: 'css-loader',
79 | options: {
80 | sourceMap: true,
81 | importLoaders: 1
82 | }
83 | },
84 | {
85 | loader: 'sass-loader',
86 | options: {
87 | sourceMap: true
88 | }
89 | }
90 | ]
91 | },
92 | // Add SASS support - compile all other .scss files and pipe it to style.css
93 | {
94 | test: /^((?!\.global).)*\.(scss|sass)$/,
95 | use: [
96 | {
97 | loader: MiniCssExtractPlugin.loader
98 | },
99 | {
100 | loader: 'css-loader',
101 | options: {
102 | /*
103 | modules: {
104 | localIdentName: '[name]__[local]__[hash:base64:5]'
105 | },
106 | importLoaders: 1,
107 | */
108 | sourceMap: true
109 | }
110 | },
111 | {
112 | loader: 'sass-loader',
113 | options: {
114 | sourceMap: true
115 | }
116 | }
117 | ]
118 | },
119 | // WOFF Font
120 | {
121 | test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
122 | use: {
123 | loader: 'url-loader',
124 | options: {
125 | limit: 10000,
126 | mimetype: 'application/font-woff'
127 | }
128 | }
129 | },
130 | // WOFF2 Font
131 | {
132 | test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/,
133 | use: {
134 | loader: 'url-loader',
135 | options: {
136 | limit: 10000,
137 | mimetype: 'application/font-woff'
138 | }
139 | }
140 | },
141 | // TTF Font
142 | {
143 | test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
144 | use: {
145 | loader: 'url-loader',
146 | options: {
147 | limit: 10000,
148 | mimetype: 'application/octet-stream'
149 | }
150 | }
151 | },
152 | // EOT Font
153 | {
154 | test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
155 | use: 'file-loader'
156 | },
157 | // SVG Font
158 | {
159 | test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
160 | use: {
161 | loader: 'url-loader',
162 | options: {
163 | limit: 10000,
164 | mimetype: 'image/svg+xml'
165 | }
166 | }
167 | },
168 | // Common Image Formats
169 | {
170 | test: /\.(?:ico|gif|png|jpg|jpeg|webp)$/,
171 | use: 'url-loader'
172 | }
173 | ]
174 | },
175 |
176 | optimization: {
177 | minimizer: process.env.E2E_BUILD
178 | ? []
179 | : [
180 | new TerserPlugin({
181 | parallel: true,
182 | sourceMap: true,
183 | cache: true
184 | }),
185 | new OptimizeCSSAssetsPlugin({
186 | cssProcessorOptions: {
187 | map: {
188 | inline: false,
189 | annotation: true
190 | }
191 | }
192 | })
193 | ]
194 | },
195 |
196 | plugins: [
197 | /**
198 | * Create global constants which can be configured at compile time.
199 | *
200 | * Useful for allowing different behaviour between development builds and
201 | * release builds
202 | *
203 | * NODE_ENV should be production so that modules do not perform certain
204 | * development checks
205 | */
206 | new webpack.EnvironmentPlugin({
207 | NODE_ENV: 'production'
208 | }),
209 |
210 | new MiniCssExtractPlugin({
211 | filename: 'style.css'
212 | }),
213 |
214 | new BundleAnalyzerPlugin({
215 | analyzerMode:
216 | process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
217 | openAnalyzer: process.env.OPEN_ANALYZER === 'true'
218 | })
219 | ]
220 | });
221 |
--------------------------------------------------------------------------------
/configs/webpack.config.renderer.dev.babel.js:
--------------------------------------------------------------------------------
1 | /* eslint global-require: off, import/no-dynamic-require: off */
2 |
3 | /**
4 | * Build config for development electron renderer process that uses
5 | * Hot-Module-Replacement
6 | *
7 | * https://webpack.js.org/concepts/hot-module-replacement/
8 | */
9 |
10 | import path from 'path';
11 | import fs from 'fs';
12 | import webpack from 'webpack';
13 | import chalk from 'chalk';
14 | import merge from 'webpack-merge';
15 | import { spawn, execSync } from 'child_process';
16 | import baseConfig from './webpack.config.base';
17 | import CheckNodeEnv from '../internals/scripts/CheckNodeEnv';
18 |
19 | // When an ESLint server is running, we can't set the NODE_ENV so we'll check if it's
20 | // at the dev webpack config is not accidentally run in a production environment
21 | if (process.env.NODE_ENV === 'production') {
22 | CheckNodeEnv('development');
23 | }
24 |
25 | const port = process.env.PORT || 1212;
26 | const publicPath = `http://localhost:${port}/dist`;
27 | const dll = path.join(__dirname, '..', 'dll');
28 | const manifest = path.resolve(dll, 'renderer.json');
29 | const requiredByDLLConfig = module.parent.filename.includes(
30 | 'webpack.config.renderer.dev.dll'
31 | );
32 |
33 | /**
34 | * Warn if the DLL is not built
35 | */
36 | if (!requiredByDLLConfig && !(fs.existsSync(dll) && fs.existsSync(manifest))) {
37 | console.log(
38 | chalk.black.bgYellow.bold(
39 | 'The DLL files are missing. Sit back while we build them for you with "yarn build-dll"'
40 | )
41 | );
42 | execSync('yarn build-dll');
43 | }
44 |
45 | export default merge.smart(baseConfig, {
46 | devtool: 'inline-source-map',
47 |
48 | mode: 'development',
49 |
50 | target: 'electron-renderer',
51 |
52 | entry: [
53 | ...(process.env.PLAIN_HMR ? [] : ['react-hot-loader/patch']),
54 | `webpack-dev-server/client?http://localhost:${port}/`,
55 | 'webpack/hot/only-dev-server',
56 | require.resolve('../app/index')
57 | ],
58 |
59 | output: {
60 | publicPath: `http://localhost:${port}/dist/`,
61 | filename: 'renderer.dev.js'
62 | },
63 |
64 | module: {
65 | rules: [
66 | {
67 | test: /\.jsx?$/,
68 | exclude: /node_modules/,
69 | use: {
70 | loader: 'babel-loader',
71 | options: {
72 | cacheDirectory: true
73 | }
74 | }
75 | },
76 | {
77 | test: /\.global\.css$/,
78 | use: [
79 | {
80 | loader: 'style-loader'
81 | },
82 | {
83 | loader: 'css-loader',
84 | options: {
85 | sourceMap: true
86 | }
87 | }
88 | ]
89 | },
90 | {
91 | test: /^((?!\.global).)*\.css$/,
92 | use: [
93 | {
94 | loader: 'style-loader'
95 | },
96 | {
97 | loader: 'css-loader',
98 | options: {
99 | modules: {
100 | localIdentName: '[name]__[local]__[hash:base64:5]'
101 | },
102 | sourceMap: true,
103 | importLoaders: 1
104 | }
105 | }
106 | ]
107 | },
108 | // SASS support - compile all .global.scss files and pipe it to style.css
109 | {
110 | test: /\.global\.(scss|sass)$/,
111 | use: [
112 | {
113 | loader: 'style-loader'
114 | },
115 | {
116 | loader: 'css-loader',
117 | options: {
118 | sourceMap: true
119 | }
120 | },
121 | {
122 | loader: 'sass-loader'
123 | }
124 | ]
125 | },
126 | // SASS support - compile all other .scss files and pipe it to style.css
127 | {
128 | test: /^((?!\.global).)*\.(scss|sass)$/,
129 | use: [
130 | {
131 | loader: 'style-loader'
132 | },
133 | {
134 | loader: 'css-loader',
135 | options: {
136 | /*
137 | modules: {
138 | localIdentName: '[name]__[local]__[hash:base64:5]'
139 | },
140 | importLoaders: 1,
141 | */
142 | sourceMap: true
143 | }
144 | },
145 | {
146 | loader: 'sass-loader'
147 | }
148 | ]
149 | },
150 | // WOFF Font
151 | {
152 | test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
153 | use: {
154 | loader: 'url-loader',
155 | options: {
156 | limit: 10000,
157 | mimetype: 'application/font-woff'
158 | }
159 | }
160 | },
161 | // WOFF2 Font
162 | {
163 | test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/,
164 | use: {
165 | loader: 'url-loader',
166 | options: {
167 | limit: 10000,
168 | mimetype: 'application/font-woff'
169 | }
170 | }
171 | },
172 | // TTF Font
173 | {
174 | test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
175 | use: {
176 | loader: 'url-loader',
177 | options: {
178 | limit: 10000,
179 | mimetype: 'application/octet-stream'
180 | }
181 | }
182 | },
183 | // EOT Font
184 | {
185 | test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
186 | use: 'file-loader'
187 | },
188 | // SVG Font
189 | {
190 | test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
191 | use: {
192 | loader: 'url-loader',
193 | options: {
194 | limit: 10000,
195 | mimetype: 'image/svg+xml'
196 | }
197 | }
198 | },
199 | // Common Image Formats
200 | {
201 | test: /\.(?:ico|gif|png|jpg|jpeg|webp)$/,
202 | use: 'url-loader'
203 | }
204 | ]
205 | },
206 | resolve: {
207 | alias: {
208 | 'react-dom': '@hot-loader/react-dom'
209 | }
210 | },
211 | plugins: [
212 | requiredByDLLConfig
213 | ? null
214 | : new webpack.DllReferencePlugin({
215 | context: path.join(__dirname, '..', 'dll'),
216 | manifest: require(manifest),
217 | sourceType: 'var'
218 | }),
219 |
220 | new webpack.HotModuleReplacementPlugin({
221 | multiStep: true
222 | }),
223 |
224 | new webpack.NoEmitOnErrorsPlugin(),
225 |
226 | /**
227 | * Create global constants which can be configured at compile time.
228 | *
229 | * Useful for allowing different behaviour between development builds and
230 | * release builds
231 | *
232 | * NODE_ENV should be production so that modules do not perform certain
233 | * development checks
234 | *
235 | * By default, use 'development' as NODE_ENV. This can be overriden with
236 | * 'staging', for example, by changing the ENV variables in the npm scripts
237 | */
238 | new webpack.EnvironmentPlugin({
239 | NODE_ENV: 'development'
240 | }),
241 |
242 | new webpack.LoaderOptionsPlugin({
243 | debug: true
244 | })
245 | ],
246 |
247 | node: {
248 | __dirname: false,
249 | __filename: false
250 | },
251 |
252 | devServer: {
253 | port,
254 | publicPath,
255 | compress: true,
256 | noInfo: true,
257 | stats: 'errors-only',
258 | inline: true,
259 | lazy: false,
260 | hot: true,
261 | headers: { 'Access-Control-Allow-Origin': '*' },
262 | contentBase: path.join(__dirname, 'dist'),
263 | watchOptions: {
264 | aggregateTimeout: 300,
265 | ignored: /node_modules/,
266 | poll: 100
267 | },
268 | historyApiFallback: {
269 | verbose: true,
270 | disableDotRule: false
271 | },
272 | before() {
273 | if (process.env.START_HOT) {
274 | console.log('Starting Main Process...');
275 | spawn('npm', ['run', 'start-main-dev'], {
276 | shell: true,
277 | env: process.env,
278 | stdio: 'inherit'
279 | })
280 | .on('close', code => process.exit(code))
281 | .on('error', spawnError => console.error(spawnError));
282 | }
283 | }
284 | }
285 | });
286 |
--------------------------------------------------------------------------------
/app/menu.js:
--------------------------------------------------------------------------------
1 | // @flow
2 | import { app, Menu, shell, BrowserWindow } from 'electron';
3 |
4 | export default class MenuBuilder {
5 | mainWindow: BrowserWindow;
6 |
7 | constructor(mainWindow: BrowserWindow) {
8 | this.mainWindow = mainWindow;
9 | }
10 |
11 | buildMenu() {
12 | if (
13 | process.env.NODE_ENV === 'development' ||
14 | process.env.DEBUG_PROD === 'true'
15 | ) {
16 | this.setupDevelopmentEnvironment();
17 | }
18 |
19 | const template =
20 | process.platform === 'darwin'
21 | ? this.buildDarwinTemplate()
22 | : this.buildDefaultTemplate();
23 |
24 | const menu = Menu.buildFromTemplate(template);
25 | Menu.setApplicationMenu(menu);
26 |
27 | return menu;
28 | }
29 |
30 | setupDevelopmentEnvironment() {
31 | this.mainWindow.openDevTools();
32 | this.mainWindow.webContents.on('context-menu', (e, props) => {
33 | const { x, y } = props;
34 |
35 | Menu.buildFromTemplate([
36 | {
37 | label: 'Inspect element',
38 | click: () => {
39 | this.mainWindow.inspectElement(x, y);
40 | }
41 | }
42 | ]).popup(this.mainWindow);
43 | });
44 | }
45 |
46 | buildDarwinTemplate() {
47 | const subMenuAbout = {
48 | label: 'Electron',
49 | submenu: [
50 | {
51 | label: 'About ElectronReact',
52 | selector: 'orderFrontStandardAboutPanel:'
53 | },
54 | { type: 'separator' },
55 | { label: 'Services', submenu: [] },
56 | { type: 'separator' },
57 | {
58 | label: 'Hide ElectronReact',
59 | accelerator: 'Command+H',
60 | selector: 'hide:'
61 | },
62 | {
63 | label: 'Hide Others',
64 | accelerator: 'Command+Shift+H',
65 | selector: 'hideOtherApplications:'
66 | },
67 | { label: 'Show All', selector: 'unhideAllApplications:' },
68 | { type: 'separator' },
69 | {
70 | label: 'Quit',
71 | accelerator: 'Command+Q',
72 | click: () => {
73 | app.quit();
74 | }
75 | }
76 | ]
77 | };
78 | const subMenuEdit = {
79 | label: 'Edit',
80 | submenu: [
81 | { label: 'Undo', accelerator: 'Command+Z', selector: 'undo:' },
82 | { label: 'Redo', accelerator: 'Shift+Command+Z', selector: 'redo:' },
83 | { type: 'separator' },
84 | { label: 'Cut', accelerator: 'Command+X', selector: 'cut:' },
85 | { label: 'Copy', accelerator: 'Command+C', selector: 'copy:' },
86 | { label: 'Paste', accelerator: 'Command+V', selector: 'paste:' },
87 | {
88 | label: 'Select All',
89 | accelerator: 'Command+A',
90 | selector: 'selectAll:'
91 | }
92 | ]
93 | };
94 | const subMenuViewDev = {
95 | label: 'View',
96 | submenu: [
97 | {
98 | label: 'Reload',
99 | accelerator: 'Command+R',
100 | click: () => {
101 | this.mainWindow.webContents.reload();
102 | }
103 | },
104 | {
105 | label: 'Toggle Full Screen',
106 | accelerator: 'Ctrl+Command+F',
107 | click: () => {
108 | this.mainWindow.setFullScreen(!this.mainWindow.isFullScreen());
109 | }
110 | },
111 | {
112 | label: 'Toggle Developer Tools',
113 | accelerator: 'Alt+Command+I',
114 | click: () => {
115 | this.mainWindow.toggleDevTools();
116 | }
117 | }
118 | ]
119 | };
120 | const subMenuViewProd = {
121 | label: 'View',
122 | submenu: [
123 | {
124 | label: 'Toggle Full Screen',
125 | accelerator: 'Ctrl+Command+F',
126 | click: () => {
127 | this.mainWindow.setFullScreen(!this.mainWindow.isFullScreen());
128 | }
129 | }
130 | ]
131 | };
132 | const subMenuWindow = {
133 | label: 'Window',
134 | submenu: [
135 | {
136 | label: 'Minimize',
137 | accelerator: 'Command+M',
138 | selector: 'performMiniaturize:'
139 | },
140 | { label: 'Close', accelerator: 'Command+W', selector: 'performClose:' },
141 | { type: 'separator' },
142 | { label: 'Bring All to Front', selector: 'arrangeInFront:' }
143 | ]
144 | };
145 | const subMenuHelp = {
146 | label: 'Help',
147 | submenu: [
148 | {
149 | label: 'Learn More',
150 | click() {
151 | shell.openExternal('http://electron.atom.io');
152 | }
153 | },
154 | {
155 | label: 'Documentation',
156 | click() {
157 | shell.openExternal(
158 | 'https://github.com/atom/electron/tree/master/docs#readme'
159 | );
160 | }
161 | },
162 | {
163 | label: 'Community Discussions',
164 | click() {
165 | shell.openExternal('https://discuss.atom.io/c/electron');
166 | }
167 | },
168 | {
169 | label: 'Search Issues',
170 | click() {
171 | shell.openExternal('https://github.com/atom/electron/issues');
172 | }
173 | }
174 | ]
175 | };
176 |
177 | const subMenuView =
178 | process.env.NODE_ENV === 'development' ? subMenuViewDev : subMenuViewProd;
179 |
180 | return [subMenuAbout, subMenuEdit, subMenuView, subMenuWindow, subMenuHelp];
181 | }
182 |
183 | buildDefaultTemplate() {
184 | const templateDefault = [
185 | {
186 | label: '&File',
187 | submenu: [
188 | {
189 | label: '&Open',
190 | accelerator: 'Ctrl+O'
191 | },
192 | {
193 | label: '&Close',
194 | accelerator: 'Ctrl+W',
195 | click: () => {
196 | this.mainWindow.close();
197 | }
198 | }
199 | ]
200 | },
201 | {
202 | label: '&View',
203 | submenu:
204 | process.env.NODE_ENV === 'development'
205 | ? [
206 | {
207 | label: '&Reload',
208 | accelerator: 'Ctrl+R',
209 | click: () => {
210 | this.mainWindow.webContents.reload();
211 | }
212 | },
213 | {
214 | label: 'Toggle &Full Screen',
215 | accelerator: 'F11',
216 | click: () => {
217 | this.mainWindow.setFullScreen(
218 | !this.mainWindow.isFullScreen()
219 | );
220 | }
221 | },
222 | {
223 | label: 'Toggle &Developer Tools',
224 | accelerator: 'Alt+Ctrl+I',
225 | click: () => {
226 | this.mainWindow.toggleDevTools();
227 | }
228 | }
229 | ]
230 | : [
231 | {
232 | label: 'Toggle &Full Screen',
233 | accelerator: 'F11',
234 | click: () => {
235 | this.mainWindow.setFullScreen(
236 | !this.mainWindow.isFullScreen()
237 | );
238 | }
239 | }
240 | ]
241 | },
242 | {
243 | label: 'Help',
244 | submenu: [
245 | {
246 | label: 'Learn More',
247 | click() {
248 | shell.openExternal('http://electron.atom.io');
249 | }
250 | },
251 | {
252 | label: 'Documentation',
253 | click() {
254 | shell.openExternal(
255 | 'https://github.com/atom/electron/tree/master/docs#readme'
256 | );
257 | }
258 | },
259 | {
260 | label: 'Community Discussions',
261 | click() {
262 | shell.openExternal('https://discuss.atom.io/c/electron');
263 | }
264 | },
265 | {
266 | label: 'Search Issues',
267 | click() {
268 | shell.openExternal('https://github.com/atom/electron/issues');
269 | }
270 | }
271 | ]
272 | }
273 | ];
274 |
275 | return templateDefault;
276 | }
277 | }
278 |
--------------------------------------------------------------------------------
/app/containers/Content/Settings/setting-form.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable react/no-unused-prop-types */
2 | import React, { Component } from 'react';
3 | import { ipcRenderer } from 'electron';
4 | import { Form, Button, Input, Icon, Slider, Checkbox } from 'antd';
5 |
6 | import { DeviceItem, EncoderItem } from '../../../utils/types';
7 |
8 | import DeviceSelect from '../../../components/DeviceSelect';
9 |
10 | type State = {
11 | isMicEnabled: boolean,
12 | isSpeakerEnabled: boolean
13 | };
14 |
15 | type SettingFormData = {
16 | mic: DeviceItem,
17 | speaker: DeviceItem,
18 | vencoder: EncoderItem,
19 | fps: number,
20 | quality: number,
21 | isMicEnabled: boolean,
22 | isSpeakerEnabled: boolean,
23 | output: string
24 | };
25 |
26 | type Props = {
27 | disabled: boolean,
28 | mics: Array,
29 | speakers: Array,
30 | vEncoders: Array,
31 | currentMic: DeviceItem,
32 | currentSpeaker: DeviceItem,
33 | currentVEncoder: EncoderItem,
34 | fps: number,
35 | quality: number,
36 | output: string,
37 | isMicEnabled: boolean,
38 | isSpeakerEnabled: boolean,
39 | onSubmit: SettingFormData => void
40 | };
41 |
42 | class SettingForm extends Component {
43 | props: Props;
44 |
45 | constructor(props) {
46 | super(props);
47 |
48 | this.state = {
49 | isMicEnabled: props.isMicEnabled,
50 | isSpeakerEnabled: props.isSpeakerEnabled
51 | };
52 |
53 | this.onSubmit = this.onSubmit.bind(this);
54 | }
55 |
56 | componentDidMount() {
57 | // eslint-disable-next-line react/prop-types
58 | const { form } = this.props;
59 |
60 | ipcRenderer.on('custom-open-folder-res', (event, arg) => {
61 | // eslint-disable-next-line react/prop-types
62 | form.setFieldsValue({ output: arg[0] });
63 | });
64 | }
65 |
66 | componentWillUnmount() {
67 | ipcRenderer.removeAllListeners('custom-open-folder-res');
68 | }
69 |
70 | onSubmit(e) {
71 | // eslint-disable-next-line react/prop-types
72 | const { onSubmit, form } = this.props;
73 | const { isMicEnabled, isSpeakerEnabled } = this.state;
74 | e.preventDefault();
75 |
76 | // eslint-disable-next-line react/prop-types
77 | form.validateFields((err, values) => {
78 | if (!err) {
79 | if (onSubmit) onSubmit({ ...values, isMicEnabled, isSpeakerEnabled });
80 | }
81 | });
82 | }
83 |
84 | render() {
85 | const {
86 | disabled,
87 | mics,
88 | speakers,
89 | vEncoders,
90 | // eslint-disable-next-line react/prop-types
91 | form
92 | } = this.props;
93 |
94 | const { isMicEnabled, isSpeakerEnabled } = this.state;
95 |
96 | // eslint-disable-next-line react/prop-types
97 | const { getFieldDecorator, setFieldsValue, getFieldValue } = form;
98 |
99 | return (
100 | {
106 | this.setState({ isMicEnabled: !isMicEnabled });
107 | }}
108 | disabled={disabled}
109 | >
110 | Microphones
111 |
112 | }
113 | >
114 | {getFieldDecorator('mic', {
115 | rules: [
116 | {
117 | required: true && isMicEnabled,
118 | message: 'Must select a microphone'
119 | }
120 | ]
121 | })(
122 | setFieldsValue({ mic })}
127 | />
128 | )}
129 |
130 |
131 |
136 | this.setState({ isSpeakerEnabled: !isSpeakerEnabled })
137 | }
138 | disabled={disabled}
139 | >
140 | Speakers
141 |
142 | }
143 | >
144 | {getFieldDecorator('speaker', {
145 | rules: [
146 | {
147 | required: true && isSpeakerEnabled,
148 | message: 'Must select a speaker'
149 | }
150 | ]
151 | })(
152 | setFieldsValue({ speaker })}
157 | />
158 | )}
159 |
160 |
161 |
162 | {getFieldDecorator('vencoder', {
163 | rules: [
164 | {
165 | required: true && isSpeakerEnabled,
166 | message: 'Must select a vencoder'
167 | }
168 | ]
169 | })(
170 | setFieldsValue({ vencoder })}
175 | />
176 | )}
177 |
178 |
179 |
180 | {getFieldDecorator('fps', {
181 | rules: [
182 | {
183 | required: true
184 | }
185 | ]
186 | })(
187 |
198 | )}
199 |
200 |
201 |
202 | {getFieldDecorator('quality', {
203 | rules: [
204 | {
205 | required: true
206 | }
207 | ]
208 | })(
209 |
219 | )}
220 |
221 |
222 |
223 | {getFieldDecorator('output', {
224 | rules: [
225 | {
226 | required: true,
227 | message: 'Must set a output directory'
228 | }
229 | ]
230 | })(
231 | {
237 | if (disabled === true) return;
238 | ipcRenderer.send('custom-open-folder-req');
239 | }}
240 | />
241 | }
242 | readOnly
243 | disabled={disabled}
244 | />
245 | )}
246 |
247 |
248 |
249 |
252 |
253 |
254 | );
255 | }
256 | }
257 |
258 | export default Form.create({
259 | name: 'setting_form',
260 | mapPropsToFields(props) {
261 | return {
262 | mic: Form.createFormField({
263 | ...props.currentMic,
264 | value: props.currentMic ? props.currentMic : null
265 | }),
266 | speaker: Form.createFormField({
267 | ...props.currentSpeaker,
268 | value: props.currentSpeaker ? props.currentSpeaker : null
269 | }),
270 | vencoder: Form.createFormField({
271 | ...props.currentVEncoder,
272 | value: props.currentVEncoder ? props.currentVEncoder : null
273 | }),
274 | fps: Form.createFormField({
275 | ...props.fps,
276 | value: props.fps ? props.fps : 20
277 | }),
278 | quality: Form.createFormField({
279 | ...props.quality,
280 | value: props.quality ? props.quality : 60
281 | }),
282 | output: Form.createFormField({
283 | ...props.output,
284 | value: props.output ? props.output : ''
285 | })
286 | };
287 | }
288 | })(SettingForm);
289 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "easy-recorder",
3 | "productName": "EasyRecorder",
4 | "version": "1.0.0",
5 | "description": "EasyRecorder depends on react and screen-recorder",
6 | "scripts": {
7 | "build": "concurrently \"yarn build-main\" \"yarn build-renderer\"",
8 | "build-dll": "cross-env NODE_ENV=development webpack --config ./configs/webpack.config.renderer.dev.dll.babel.js --colors",
9 | "build-e2e": "cross-env E2E_BUILD=true yarn build",
10 | "build-main": "cross-env NODE_ENV=production webpack --config ./configs/webpack.config.main.prod.babel.js --colors",
11 | "build-renderer": "cross-env NODE_ENV=production webpack --config ./configs/webpack.config.renderer.prod.babel.js --colors",
12 | "dev": "cross-env START_HOT=1 node -r @babel/register ./internals/scripts/CheckPortInUse.js && cross-env START_HOT=1 yarn start-renderer-dev",
13 | "electron-rebuild": "electron-rebuild --parallel --force --types prod,dev,optional --module-dir app",
14 | "flow": "flow",
15 | "flow-typed": "rimraf flow-typed/npm && flow-typed install --overwrite || true",
16 | "lint": "cross-env NODE_ENV=development eslint --cache --format=pretty .",
17 | "lint-fix": "yarn --silent lint --fix; exit 0",
18 | "lint-styles": "stylelint --ignore-path .eslintignore '**/*.*(css|scss)' --syntax scss",
19 | "lint-styles-fix": "yarn --silent lint-styles --fix; exit 0",
20 | "package": "yarn build && electron-builder build --publish never",
21 | "package-all": "yarn build && electron-builder build -mwl",
22 | "package-ci": "yarn postinstall && yarn build && electron-builder --publish always",
23 | "package-linux": "yarn build && electron-builder build --linux",
24 | "package-win": "yarn build && electron-builder build --win --x64",
25 | "postinstall": "node -r @babel/register internals/scripts/CheckNativeDep.js && yarn flow-typed && electron-builder install-app-deps && yarn build-dll && opencollective-postinstall",
26 | "postlint-fix": "prettier --ignore-path .eslintignore --single-quote --write '**/*.{js,jsx,json,html,css,less,scss,yml}'",
27 | "postlint-styles-fix": "prettier --ignore-path .eslintignore --single-quote --write '**/*.{css,scss}'",
28 | "preinstall": "node ./internals/scripts/CheckYarn.js",
29 | "prestart": "yarn build",
30 | "start": "cross-env NODE_ENV=production electron ./app/main.prod.js",
31 | "start-main-dev": "cross-env START_HOT=1 NODE_ENV=development electron -r @babel/register ./app/main.dev.js",
32 | "start-renderer-dev": "cross-env NODE_ENV=development webpack-dev-server --config configs/webpack.config.renderer.dev.babel.js",
33 | "test": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 jest",
34 | "test-all": "yarn lint && yarn flow && yarn build && yarn test && yarn build-e2e && yarn test-e2e",
35 | "test-e2e": "node -r @babel/register ./internals/scripts/CheckBuildsExist.js && cross-env NODE_ENV=test testcafe electron:./app ./test/e2e/HomePage.e2e.js",
36 | "test-e2e-live": "node -r @babel/register ./internals/scripts/CheckBuildsExist.js && cross-env NODE_ENV=test testcafe --live electron:./app ./test/e2e/HomePage.e2e.js",
37 | "test-watch": "yarn test --watch"
38 | },
39 | "lint-staged": {
40 | "*.{js,jsx}": [
41 | "cross-env NODE_ENV=development eslint --cache --format=pretty",
42 | "git add"
43 | ],
44 | "{*.json,.{babelrc,eslintrc,prettierrc,stylelintrc}}": [
45 | "prettier --ignore-path .eslintignore --parser json --write",
46 | "git add"
47 | ],
48 | "*.{css,scss}": [
49 | "stylelint --ignore-path .eslintignore --syntax scss --fix",
50 | "prettier --ignore-path .eslintignore --single-quote --write",
51 | "git add"
52 | ],
53 | "*.{html,md,yml}": [
54 | "prettier --ignore-path .eslintignore --single-quote --write",
55 | "git add"
56 | ]
57 | },
58 | "build": {
59 | "productName": "EasyRecorder",
60 | "appId": "org.sylar.EasyRecorder",
61 | "files": [
62 | "dist/",
63 | "node_modules/",
64 | "app.html",
65 | "main.prod.js",
66 | "main.prod.js.map",
67 | "package.json"
68 | ],
69 | "dmg": {
70 | "contents": [
71 | {
72 | "x": 130,
73 | "y": 220
74 | },
75 | {
76 | "x": 410,
77 | "y": 220,
78 | "type": "link",
79 | "path": "/Applications"
80 | }
81 | ]
82 | },
83 | "win": {
84 | "target": [
85 | "nsis",
86 | "msi"
87 | ]
88 | },
89 | "linux": {
90 | "target": [
91 | "deb",
92 | "rpm",
93 | "AppImage"
94 | ],
95 | "category": "Development"
96 | },
97 | "directories": {
98 | "buildResources": "resources",
99 | "output": "release"
100 | },
101 | "publish": {
102 | "provider": "github",
103 | "owner": "sylar",
104 | "repo": "EasyRecorder",
105 | "private": false
106 | }
107 | },
108 | "repository": {
109 | "type": "git",
110 | "url": "git+git@github.com:peilinok/EasyRecorder.git"
111 | },
112 | "author": {
113 | "name": "Sylar",
114 | "email": "peilinok@gmail.com",
115 | "url": "https://github.com/peilinok/EasyRecorder"
116 | },
117 | "license": "MIT",
118 | "bugs": {
119 | "url": "https://github.com/peilinok/EasyRecorder/issues"
120 | },
121 | "keywords": [
122 | "electron",
123 | "boilerplate",
124 | "react",
125 | "redux",
126 | "flow",
127 | "sass",
128 | "webpack",
129 | "hot",
130 | "reload"
131 | ],
132 | "homepage": "https://github.com/peilinok/EasyRecorder",
133 | "jest": {
134 | "testURL": "http://localhost/",
135 | "moduleNameMapper": {
136 | "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/internals/mocks/fileMock.js",
137 | "\\.(css|less|sass|scss)$": "identity-obj-proxy"
138 | },
139 | "moduleFileExtensions": [
140 | "js",
141 | "jsx",
142 | "json"
143 | ],
144 | "moduleDirectories": [
145 | "node_modules",
146 | "app/node_modules"
147 | ],
148 | "transform": {
149 | "^.+\\.jsx?$": "babel-jest"
150 | },
151 | "setupFiles": [
152 | "./internals/scripts/CheckBuildsExist.js"
153 | ]
154 | },
155 | "devDependencies": {
156 | "@babel/core": "^7.7.5",
157 | "@babel/plugin-proposal-class-properties": "^7.7.4",
158 | "@babel/plugin-proposal-decorators": "^7.7.4",
159 | "@babel/plugin-proposal-do-expressions": "^7.7.4",
160 | "@babel/plugin-proposal-export-default-from": "^7.7.4",
161 | "@babel/plugin-proposal-export-namespace-from": "^7.7.4",
162 | "@babel/plugin-proposal-function-bind": "^7.7.4",
163 | "@babel/plugin-proposal-function-sent": "^7.7.4",
164 | "@babel/plugin-proposal-json-strings": "^7.7.4",
165 | "@babel/plugin-proposal-logical-assignment-operators": "^7.7.4",
166 | "@babel/plugin-proposal-nullish-coalescing-operator": "^7.7.4",
167 | "@babel/plugin-proposal-numeric-separator": "^7.7.4",
168 | "@babel/plugin-proposal-optional-chaining": "^7.7.5",
169 | "@babel/plugin-proposal-pipeline-operator": "^7.7.4",
170 | "@babel/plugin-proposal-throw-expressions": "^7.7.4",
171 | "@babel/plugin-syntax-dynamic-import": "^7.7.4",
172 | "@babel/plugin-syntax-import-meta": "^7.7.4",
173 | "@babel/plugin-transform-react-constant-elements": "^7.7.4",
174 | "@babel/plugin-transform-react-inline-elements": "^7.7.4",
175 | "@babel/preset-env": "^7.7.6",
176 | "@babel/preset-flow": "^7.7.4",
177 | "@babel/preset-react": "^7.7.4",
178 | "@babel/register": "^7.7.4",
179 | "babel-core": "7.0.0-bridge.0",
180 | "babel-eslint": "^10.0.3",
181 | "babel-jest": "^24.9.0",
182 | "babel-loader": "^8.0.6",
183 | "babel-plugin-dev-expression": "^0.2.2",
184 | "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
185 | "chalk": "^3.0.0",
186 | "concurrently": "^5.0.1",
187 | "cross-env": "^6.0.3",
188 | "cross-spawn": "^7.0.1",
189 | "css-loader": "^3.3.2",
190 | "detect-port": "^1.3.0",
191 | "electron": "7.1.4",
192 | "electron-builder": "^22.2.0",
193 | "electron-devtools-installer": "^2.2.4",
194 | "electron-rebuild": "^1.8.8",
195 | "enzyme": "^3.7.0",
196 | "enzyme-adapter-react-16": "^1.7.0",
197 | "enzyme-to-json": "^3.3.4",
198 | "eslint": "^6.7.2",
199 | "eslint-config-airbnb": "^18.0.1",
200 | "eslint-config-erb": "^0.1.1",
201 | "eslint-config-prettier": "^6.6.0",
202 | "eslint-formatter-pretty": "^3.0.0",
203 | "eslint-import-resolver-webpack": "^0.12.0",
204 | "eslint-plugin-compat": "^3.3.0",
205 | "eslint-plugin-flowtype": "^4.5.2",
206 | "eslint-plugin-import": "^2.19.1",
207 | "eslint-plugin-jest": "^23.1.1",
208 | "eslint-plugin-jsx-a11y": "6.2.3",
209 | "eslint-plugin-prettier": "^3.1.1",
210 | "eslint-plugin-promise": "^4.2.1",
211 | "eslint-plugin-react": "^7.17.0",
212 | "eslint-plugin-testcafe": "^0.2.1",
213 | "fbjs-scripts": "^1.2.0",
214 | "file-loader": "^5.0.2",
215 | "flow-bin": "^0.113.0",
216 | "flow-runtime": "^0.17.0",
217 | "flow-typed": "^2.6.2",
218 | "husky": "^3.1.0",
219 | "identity-obj-proxy": "^3.0.0",
220 | "jest": "^24.9.0",
221 | "lint-staged": "^9.5.0",
222 | "mini-css-extract-plugin": "^0.8.0",
223 | "node-sass": "^4.13.0",
224 | "opencollective-postinstall": "^2.0.2",
225 | "optimize-css-assets-webpack-plugin": "^5.0.3",
226 | "prettier": "^1.19.1",
227 | "react-test-renderer": "^16.12.0",
228 | "redux-logger": "^3.0.6",
229 | "rimraf": "^3.0.0",
230 | "sass-loader": "^8.0.0",
231 | "sinon": "^7.5.0",
232 | "spectron": "^9.0.0",
233 | "style-loader": "^1.0.1",
234 | "stylelint": "^12.0.0",
235 | "stylelint-config-prettier": "^8.0.0",
236 | "stylelint-config-standard": "^19.0.0",
237 | "terser-webpack-plugin": "^2.3.0",
238 | "testcafe": "^1.6.1",
239 | "testcafe-browser-provider-electron": "^0.0.13",
240 | "testcafe-react-selectors": "^3.3.0",
241 | "url-loader": "^3.0.0",
242 | "webpack": "^4.41.2",
243 | "webpack-bundle-analyzer": "^3.6.0",
244 | "webpack-cli": "^3.3.10",
245 | "webpack-dev-server": "^3.9.0",
246 | "webpack-merge": "^4.2.2",
247 | "yarn": "^1.21.1"
248 | },
249 | "dependencies": {
250 | "@fortawesome/fontawesome-free": "^5.12.0",
251 | "@hot-loader/react-dom": "^16.11.0",
252 | "antd": "^3.26.4",
253 | "babel-plugin-import": "^1.13.0",
254 | "classnames": "^2.2.6",
255 | "connected-react-router": "^6.6.1",
256 | "core-js": "^3.5.0",
257 | "devtron": "^1.4.0",
258 | "electron-debug": "^3.0.1",
259 | "electron-log": "^4.0.0",
260 | "electron-store": "^5.1.0",
261 | "electron-updater": "^4.2.0",
262 | "history": "^4.10.1",
263 | "moment": "^2.24.0",
264 | "react": "^16.12.0",
265 | "react-dom": "^16.12.0",
266 | "react-hot-loader": "^4.12.18",
267 | "react-redux": "^7.1.3",
268 | "react-router": "^5.1.2",
269 | "react-router-dom": "^5.1.2",
270 | "redux": "^4.0.4",
271 | "redux-thunk": "^2.3.0",
272 | "source-map-support": "^0.5.16"
273 | },
274 | "devEngines": {
275 | "node": ">=7.x",
276 | "npm": ">=4.x",
277 | "yarn": ">=0.21.3"
278 | },
279 | "browserslist": "electron 1.6",
280 | "husky": {
281 | "hooks": {
282 | "pre-commit": "lint-staged"
283 | }
284 | },
285 | "ffmpeg_recorder": {
286 | "electron_version": "7.1.4",
287 | "platform": "win32",
288 | "runtime": "electron",
289 | "msvs_version": "2015",
290 | "debug": false,
291 | "silent": false
292 | }
293 | }
294 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # 0.18.1 (2019.12.12)
2 |
3 | - Fix HMR env bug ([#2343](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/2343))
4 | - Bump all deps to latest semver
5 | - Bump to `electron@7`
6 |
7 | # 0.18.0 (2019.11.19)
8 |
9 | - Bump electron to `electron@6` (`electron@7` introduces breaking changes to testcafe end to end tests)
10 | - Revert back to [two `package.json` structure](https://www.electron.build/tutorials/two-package-structure)
11 | - Bump all deps to latest semver
12 |
13 | # 0.17.1 (2018.11.20)
14 |
15 | - Fix `yarn test-e2e` and testcafe for single package.json structure
16 | - Fixes incorrect path in `yarn start` script
17 | - Bumped deps
18 | - Bump g++ in travis
19 | - Change clone arguments to clone only master
20 | - Change babel config to target current electron version
21 |
22 | For full change list, see https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/2021
23 |
24 | # 0.17.0 (2018.10.30)
25 |
26 | - upgraded to `babel@7` (thanks to @vikr01 🎉🎉🎉)
27 | - migrated from [two `package.json` structure](https://www.electron.build/tutorials/two-package-structure) (thanks to @HyperSprite!)
28 | - initial auto update support (experimental)
29 | - migrate from greenkeeper to [renovate](https://renovatebot.com)
30 | - added issue template
31 | - use `babel-preset-env` to target current electron version
32 | - add [opencollective](https://opencollective.com/electron-react-boilerplate-594) banner message display in postinstall script (help support ERB 🙏)
33 | - fix failing ci issues
34 |
35 | # 0.16.0 (2018.10.3)
36 |
37 | - removed unused dependencies
38 | - migrate from `react-redux-router` to `connect-react-router`
39 | - move webpack configs to `./webpack` dir
40 | - use `g++` on travis when testing linux
41 | - migrate from `spectron` to `testcafe` for e2e tests
42 | - add linting support for config styles
43 | - changed stylelint config
44 | - temporarily disabled flow in appveyor to make ci pass
45 | - added necessary infra to publish releases from ci
46 |
47 | # 0.15.0 (2018.8.25)
48 |
49 | - Performance: cache webpack uglify results
50 | - Feature: add start minimized feature
51 | - Feature: lint and fix styles with prettier and stylelint
52 | - Feature: add greenkeeper support
53 |
54 | # 0.14.0 (2018.5.24)
55 |
56 | - Improved CI timings
57 | - Migrated README commands to yarn from npm
58 | - Improved vscode config
59 | - Updated all dependencies to latest semver
60 | - Fix `electron-rebuild` script bug
61 | - Migrated to `mini-css-extract-plugin` from `extract-text-plugin`
62 | - Added `optimize-css-assets-webpack-plugin`
63 | - Run `prettier` on json, css, scss, and more filetypes
64 |
65 | # 0.13.3 (2018.5.24)
66 |
67 | - Add git precommit hook, when git commit will use `prettier` to format git add code
68 | - Add format code function in `lint-fix` npm script which can use `prettier` to format project js code
69 |
70 | # 0.13.2 (2018.1.31)
71 |
72 | - Hot Module Reload (HMR) fixes
73 | - Bumped all dependencies to latest semver
74 | - Prevent error propagation of `CheckNativeDeps` script
75 |
76 | # 0.13.1 (2018.1.13)
77 |
78 | - Hot Module Reload (HMR) fixes
79 | - Bumped all dependencies to latest semver
80 | - Fixed electron-rebuild script
81 | - Fixed tests scripts to run on all platforms
82 | - Skip redux logs in console in test ENV
83 |
84 | # 0.13.0 (2018.1.6)
85 |
86 | #### Additions
87 |
88 | - Add native dependencies check on postinstall
89 | - Updated all dependencies to latest semver
90 |
91 | # 0.12.0 (2017.7.8)
92 |
93 | #### Misc
94 |
95 | - Removed `babel-polyfill`
96 | - Renamed and alphabetized npm scripts
97 |
98 | #### Breaking
99 |
100 | - Changed node dev `__dirname` and `__filename` to node built in fn's (https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/1035)
101 | - Renamed `app/bundle.js` to `app/renderer.prod.js` for consistency
102 | - Renamed `dll/vendor.js` to `dll/renderer.dev.dll.js` for consistency
103 |
104 | #### Additions
105 |
106 | - Enable node_modules cache on CI
107 |
108 | # 0.11.2 (2017.5.1)
109 |
110 | Yay! Another patch release. This release mostly includes refactorings and router bug fixes. Huge thanks to @anthonyraymond!
111 |
112 | ⚠️ Windows electron builds are failing because of [this issue](https://github.com/electron/electron/issues/9321). This is not an issue with the boilerplate ⚠️
113 |
114 | #### Breaking
115 |
116 | - **Renamed `./app/main.development.js` => `./app/main.{dev,prod}.js`:** [#963](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/963)
117 |
118 | #### Fixes
119 |
120 | - **Fixed reloading when not on `/` path:** [#958](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/958) [#949](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/949)
121 |
122 | #### Additions
123 |
124 | - **Added support for stylefmt:** [#960](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/960)
125 |
126 | # 0.11.1 (2017.4.23)
127 |
128 | You can now debug the production build with devtools like so:
129 |
130 | ```
131 | DEBUG_PROD=true npm run package
132 | ```
133 |
134 | 🎉🎉🎉
135 |
136 | #### Additions
137 |
138 | - **Added support for debugging production build:** [#fab245a](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/941/commits/fab245a077d02a09630f74270806c0c534a4ff95)
139 |
140 | #### Bug Fixes
141 |
142 | - **Fixed bug related to importing native dependencies:** [#933](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/933)
143 |
144 | #### Improvements
145 |
146 | - **Updated all deps to latest semver**
147 |
148 | # 0.11.0 (2017.4.19)
149 |
150 | Here's the most notable changes since `v0.10.0`. Its been about a year since a release has been pushed. Expect a new release to be published every 3-4 weeks.
151 |
152 | #### Breaking Changes
153 |
154 | - **Dropped support for node < 6**
155 | - **Refactored webpack config files**
156 | - **Migrate to two-package.json project structure**
157 | - **Updated all devDeps to latest semver**
158 | - **Migrated to Jest:** [#768](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/768)
159 | - **Migrated to `react-router@4`**
160 | - **Migrated to `electron-builder@4`**
161 | - **Migrated to `webpack@2`**
162 | - **Migrated to `react-hot-loader@3`**
163 | - **Changed default live reload server PORT to `1212` from `3000`**
164 |
165 | #### Additions
166 |
167 | - **Added support for Yarn:** [#451](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/451)
168 | - **Added support for Flow:** [#425](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/425)
169 | - **Added support for stylelint:** [#911](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/911)
170 | - **Added support for electron-builder:** [#876](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/876)
171 | - **Added optional support for SASS:** [#880](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/880)
172 | - **Added support for eslint-plugin-flowtype:** [#911](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/911)
173 | - **Added support for appveyor:** [#280](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/280)
174 | - **Added support for webpack dlls:** [#860](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/860)
175 | - **Route based code splitting:** [#884](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/884)
176 | - **Added support for Webpack Bundle Analyzer:** [#922](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/922)
177 |
178 | #### Improvements
179 |
180 | - **Parallelize renderer and main build processes when running `npm run build`**
181 | - **Dynamically generate electron app menu**
182 | - **Improved vscode integration:** [#856](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/856)
183 |
184 | #### Bug Fixes
185 |
186 | - **Fixed hot module replacement race condition bug:** [#917](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/917) [#920](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/920)
187 |
188 | # 0.10.0 (2016.4.18)
189 |
190 | #### Improvements
191 |
192 | - **Use Babel in main process with Webpack build:** [#201](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/201)
193 | - **Change targets to built-in support by webpack:** [#197](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/197)
194 | - **use es2015 syntax for webpack configs:** [#195](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/195)
195 | - **Open application when webcontent is loaded:** [#192](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/192)
196 | - **Upgraded dependencies**
197 |
198 | #### Bug fixed
199 |
200 | - **Fix `npm list electron-prebuilt` in package.js:** [#188](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/188)
201 |
202 | # 0.9.0 (2016.3.23)
203 |
204 | #### Improvements
205 |
206 | - **Added [redux-logger](https://github.com/fcomb/redux-logger)**
207 | - **Upgraded [react-router-redux](https://github.com/reactjs/react-router-redux) to v4**
208 | - **Upgraded dependencies**
209 | - **Added `npm run dev` command:** [#162](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/162)
210 | - **electron to v0.37.2**
211 |
212 | #### Breaking Changes
213 |
214 | - **css module as default:** [#154](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/154).
215 | - **set default NODE_ENV to production:** [#140](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/140)
216 |
217 | # 0.8.0 (2016.2.17)
218 |
219 | #### Bug fixed
220 |
221 | - **Fix lint errors**
222 | - **Fix Webpack publicPath for production builds**: [#119](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/119).
223 | - **package script now chooses correct OS icon extension**
224 |
225 | #### Improvements
226 |
227 | - **babel 6**
228 | - **Upgrade Dependencies**
229 | - **Enable CSS source maps**
230 | - **Add json-loader**: [#128](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/128).
231 | - **react-router 2.0 and react-router-redux 3.0**
232 |
233 | # 0.7.1 (2015.12.27)
234 |
235 | #### Bug fixed
236 |
237 | - **Fixed npm script on windows 10:** [#103](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/103).
238 | - **history and react-router version bump**: [#109](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/109), [#110](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/110).
239 |
240 | #### Improvements
241 |
242 | - **electron 0.36**
243 |
244 | # 0.7.0 (2015.12.16)
245 |
246 | #### Bug fixed
247 |
248 | - **Fixed process.env.NODE_ENV variable in webpack:** [#74](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/74).
249 | - **add missing object-assign**: [#76](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/76).
250 | - **packaging in npm@3:** [#77](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/77).
251 | - **compatibility in windows:** [#100](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/100).
252 | - **disable chrome debugger in production env:** [#102](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/102).
253 |
254 | #### Improvements
255 |
256 | - **redux**
257 | - **css-modules**
258 | - **upgrade to react-router 1.x**
259 | - **unit tests**
260 | - **e2e tests**
261 | - **travis-ci**
262 | - **upgrade to electron 0.35.x**
263 | - **use es2015**
264 | - **check dev engine for node and npm**
265 |
266 | # 0.6.5 (2015.11.7)
267 |
268 | #### Improvements
269 |
270 | - **Bump style-loader to 0.13**
271 | - **Bump css-loader to 0.22**
272 |
273 | # 0.6.4 (2015.10.27)
274 |
275 | #### Improvements
276 |
277 | - **Bump electron-debug to 0.3**
278 |
279 | # 0.6.3 (2015.10.26)
280 |
281 | #### Improvements
282 |
283 | - **Initialize ExtractTextPlugin once:** [#64](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/64).
284 |
285 | # 0.6.2 (2015.10.18)
286 |
287 | #### Bug fixed
288 |
289 | - **Babel plugins production env not be set properly:** [#57](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/57).
290 |
291 | # 0.6.1 (2015.10.17)
292 |
293 | #### Improvements
294 |
295 | - **Bump electron to v0.34.0**
296 |
297 | # 0.6.0 (2015.10.16)
298 |
299 | #### Breaking Changes
300 |
301 | - **From react-hot-loader to react-transform**
302 |
303 | # 0.5.2 (2015.10.15)
304 |
305 | #### Improvements
306 |
307 | - **Run tests with babel-register:** [#29](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/29).
308 |
309 | # 0.5.1 (2015.10.12)
310 |
311 | #### Bug fixed
312 |
313 | - **Fix #51:** use `path.join(__dirname` instead of `./`.
314 |
315 | # 0.5.0 (2015.10.11)
316 |
317 | #### Improvements
318 |
319 | - **Simplify webpack config** see [#50](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/50).
320 |
321 | #### Breaking Changes
322 |
323 | - **webpack configs**
324 | - **port changed:** changed default port from 2992 to 3000.
325 | - **npm scripts:** remove `start-dev` and `dev-server`. rename `hot-dev-server` to `hot-server`.
326 |
327 | # 0.4.3 (2015.9.22)
328 |
329 | #### Bug fixed
330 |
331 | - **Fix #45 zeromq crash:** bump version of `electron-prebuilt`.
332 |
333 | # 0.4.2 (2015.9.15)
334 |
335 | #### Bug fixed
336 |
337 | - **run start-hot breaks chrome refresh(CTRL+R) (#42)**: bump `electron-debug` to `0.2.1`
338 |
339 | # 0.4.1 (2015.9.11)
340 |
341 | #### Improvements
342 |
343 | - **use electron-prebuilt version for packaging (#33)**
344 |
345 | # 0.4.0 (2015.9.5)
346 |
347 | #### Improvements
348 |
349 | - **update dependencies**
350 |
351 | # 0.3.0 (2015.8.31)
352 |
353 | #### Improvements
354 |
355 | - **eslint-config-airbnb**
356 |
357 | # 0.2.10 (2015.8.27)
358 |
359 | #### Features
360 |
361 | - **custom placeholder icon**
362 |
363 | #### Improvements
364 |
365 | - **electron-renderer as target:** via [webpack-target-electron-renderer](https://github.com/chentsulin/webpack-target-electron-renderer)
366 |
367 | # 0.2.9 (2015.8.18)
368 |
369 | #### Bug fixed
370 |
371 | - **Fix hot-reload**
372 |
373 | # 0.2.8 (2015.8.13)
374 |
375 | #### Improvements
376 |
377 | - **bump electron-debug**
378 | - **babelrc**
379 | - **organize webpack scripts**
380 |
381 | # 0.2.7 (2015.7.9)
382 |
383 | #### Bug fixed
384 |
385 | - **defaultProps:** fix typos.
386 |
387 | # 0.2.6 (2015.7.3)
388 |
389 | #### Features
390 |
391 | - **menu**
392 |
393 | #### Bug fixed
394 |
395 | - **package.js:** include webpack build.
396 |
397 | # 0.2.5 (2015.7.1)
398 |
399 | #### Features
400 |
401 | - **NPM Script:** support multi-platform
402 | - **package:** `--all` option
403 |
404 | # 0.2.4 (2015.6.9)
405 |
406 | #### Bug fixed
407 |
408 | - **Eslint:** typo, [#17](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/17) and improve `.eslintrc`
409 |
410 | # 0.2.3 (2015.6.3)
411 |
412 | #### Features
413 |
414 | - **Package Version:** use latest release electron version as default
415 | - **Ignore Large peerDependencies**
416 |
417 | #### Bug fixed
418 |
419 | - **Npm Script:** typo, [#6](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/6)
420 | - **Missing css:** [#7](https://github.com/electron-react-boilerplate/electron-react-boilerplate/pull/7)
421 |
422 | # 0.2.2 (2015.6.2)
423 |
424 | #### Features
425 |
426 | - **electron-debug**
427 |
428 | #### Bug fixed
429 |
430 | - **Webpack:** add `.json` and `.node` to extensions for imitating node require.
431 | - **Webpack:** set `node_modules` to externals for native module support.
432 |
433 | # 0.2.1 (2015.5.30)
434 |
435 | #### Bug fixed
436 |
437 | - **Webpack:** #1, change build target to `atom`.
438 |
439 | # 0.2.0 (2015.5.30)
440 |
441 | #### Features
442 |
443 | - **Ignore:** `test`, `tools`, `release` folder and devDependencies in `package.json`.
444 | - **Support asar**
445 | - **Support icon**
446 |
447 | # 0.1.0 (2015.5.27)
448 |
449 | #### Features
450 |
451 | - **Webpack:** babel, react-hot, ...
452 | - **Flux:** actions, api, components, containers, stores..
453 | - **Package:** darwin (osx), linux and win32 (windows) platform.
454 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | ### GNU GENERAL PUBLIC LICENSE
2 |
3 | Version 3, 29 June 2007
4 |
5 | Copyright (C) 2007 Free Software Foundation, Inc.
6 |
7 |
8 | Everyone is permitted to copy and distribute verbatim copies of this
9 | license document, but changing it is not allowed.
10 |
11 | ### Preamble
12 |
13 | The GNU General Public License is a free, copyleft license for
14 | software and other kinds of works.
15 |
16 | The licenses for most software and other practical works are designed
17 | to take away your freedom to share and change the works. By contrast,
18 | the GNU General Public License is intended to guarantee your freedom
19 | to share and change all versions of a program--to make sure it remains
20 | free software for all its users. We, the Free Software Foundation, use
21 | the GNU General Public License for most of our software; it applies
22 | also to any other work released this way by its authors. You can apply
23 | it to your programs, too.
24 |
25 | When we speak of free software, we are referring to freedom, not
26 | price. Our General Public Licenses are designed to make sure that you
27 | have the freedom to distribute copies of free software (and charge for
28 | them if you wish), that you receive source code or can get it if you
29 | want it, that you can change the software or use pieces of it in new
30 | free programs, and that you know you can do these things.
31 |
32 | To protect your rights, we need to prevent others from denying you
33 | these rights or asking you to surrender the rights. Therefore, you
34 | have certain responsibilities if you distribute copies of the
35 | software, or if you modify it: responsibilities to respect the freedom
36 | of others.
37 |
38 | For example, if you distribute copies of such a program, whether
39 | gratis or for a fee, you must pass on to the recipients the same
40 | freedoms that you received. You must make sure that they, too, receive
41 | or can get the source code. And you must show them these terms so they
42 | know their rights.
43 |
44 | Developers that use the GNU GPL protect your rights with two steps:
45 | (1) assert copyright on the software, and (2) offer you this License
46 | giving you legal permission to copy, distribute and/or modify it.
47 |
48 | For the developers' and authors' protection, the GPL clearly explains
49 | that there is no warranty for this free software. For both users' and
50 | authors' sake, the GPL requires that modified versions be marked as
51 | changed, so that their problems will not be attributed erroneously to
52 | authors of previous versions.
53 |
54 | Some devices are designed to deny users access to install or run
55 | modified versions of the software inside them, although the
56 | manufacturer can do so. This is fundamentally incompatible with the
57 | aim of protecting users' freedom to change the software. The
58 | systematic pattern of such abuse occurs in the area of products for
59 | individuals to use, which is precisely where it is most unacceptable.
60 | Therefore, we have designed this version of the GPL to prohibit the
61 | practice for those products. If such problems arise substantially in
62 | other domains, we stand ready to extend this provision to those
63 | domains in future versions of the GPL, as needed to protect the
64 | freedom of users.
65 |
66 | Finally, every program is threatened constantly by software patents.
67 | States should not allow patents to restrict development and use of
68 | software on general-purpose computers, but in those that do, we wish
69 | to avoid the special danger that patents applied to a free program
70 | could make it effectively proprietary. To prevent this, the GPL
71 | assures that patents cannot be used to render the program non-free.
72 |
73 | The precise terms and conditions for copying, distribution and
74 | modification follow.
75 |
76 | ### TERMS AND CONDITIONS
77 |
78 | #### 0. Definitions.
79 |
80 | "This License" refers to version 3 of the GNU General Public License.
81 |
82 | "Copyright" also means copyright-like laws that apply to other kinds
83 | of works, such as semiconductor masks.
84 |
85 | "The Program" refers to any copyrightable work licensed under this
86 | License. Each licensee is addressed as "you". "Licensees" and
87 | "recipients" may be individuals or organizations.
88 |
89 | To "modify" a work means to copy from or adapt all or part of the work
90 | in a fashion requiring copyright permission, other than the making of
91 | an exact copy. The resulting work is called a "modified version" of
92 | the earlier work or a work "based on" the earlier work.
93 |
94 | A "covered work" means either the unmodified Program or a work based
95 | on the Program.
96 |
97 | To "propagate" a work means to do anything with it that, without
98 | permission, would make you directly or secondarily liable for
99 | infringement under applicable copyright law, except executing it on a
100 | computer or modifying a private copy. Propagation includes copying,
101 | distribution (with or without modification), making available to the
102 | public, and in some countries other activities as well.
103 |
104 | To "convey" a work means any kind of propagation that enables other
105 | parties to make or receive copies. Mere interaction with a user
106 | through a computer network, with no transfer of a copy, is not
107 | conveying.
108 |
109 | An interactive user interface displays "Appropriate Legal Notices" to
110 | the extent that it includes a convenient and prominently visible
111 | feature that (1) displays an appropriate copyright notice, and (2)
112 | tells the user that there is no warranty for the work (except to the
113 | extent that warranties are provided), that licensees may convey the
114 | work under this License, and how to view a copy of this License. If
115 | the interface presents a list of user commands or options, such as a
116 | menu, a prominent item in the list meets this criterion.
117 |
118 | #### 1. Source Code.
119 |
120 | The "source code" for a work means the preferred form of the work for
121 | making modifications to it. "Object code" means any non-source form of
122 | a work.
123 |
124 | A "Standard Interface" means an interface that either is an official
125 | standard defined by a recognized standards body, or, in the case of
126 | interfaces specified for a particular programming language, one that
127 | is widely used among developers working in that language.
128 |
129 | The "System Libraries" of an executable work include anything, other
130 | than the work as a whole, that (a) is included in the normal form of
131 | packaging a Major Component, but which is not part of that Major
132 | Component, and (b) serves only to enable use of the work with that
133 | Major Component, or to implement a Standard Interface for which an
134 | implementation is available to the public in source code form. A
135 | "Major Component", in this context, means a major essential component
136 | (kernel, window system, and so on) of the specific operating system
137 | (if any) on which the executable work runs, or a compiler used to
138 | produce the work, or an object code interpreter used to run it.
139 |
140 | The "Corresponding Source" for a work in object code form means all
141 | the source code needed to generate, install, and (for an executable
142 | work) run the object code and to modify the work, including scripts to
143 | control those activities. However, it does not include the work's
144 | System Libraries, or general-purpose tools or generally available free
145 | programs which are used unmodified in performing those activities but
146 | which are not part of the work. For example, Corresponding Source
147 | includes interface definition files associated with source files for
148 | the work, and the source code for shared libraries and dynamically
149 | linked subprograms that the work is specifically designed to require,
150 | such as by intimate data communication or control flow between those
151 | subprograms and other parts of the work.
152 |
153 | The Corresponding Source need not include anything that users can
154 | regenerate automatically from other parts of the Corresponding Source.
155 |
156 | The Corresponding Source for a work in source code form is that same
157 | work.
158 |
159 | #### 2. Basic Permissions.
160 |
161 | All rights granted under this License are granted for the term of
162 | copyright on the Program, and are irrevocable provided the stated
163 | conditions are met. This License explicitly affirms your unlimited
164 | permission to run the unmodified Program. The output from running a
165 | covered work is covered by this License only if the output, given its
166 | content, constitutes a covered work. This License acknowledges your
167 | rights of fair use or other equivalent, as provided by copyright law.
168 |
169 | You may make, run and propagate covered works that you do not convey,
170 | without conditions so long as your license otherwise remains in force.
171 | You may convey covered works to others for the sole purpose of having
172 | them make modifications exclusively for you, or provide you with
173 | facilities for running those works, provided that you comply with the
174 | terms of this License in conveying all material for which you do not
175 | control copyright. Those thus making or running the covered works for
176 | you must do so exclusively on your behalf, under your direction and
177 | control, on terms that prohibit them from making any copies of your
178 | copyrighted material outside their relationship with you.
179 |
180 | Conveying under any other circumstances is permitted solely under the
181 | conditions stated below. Sublicensing is not allowed; section 10 makes
182 | it unnecessary.
183 |
184 | #### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
185 |
186 | No covered work shall be deemed part of an effective technological
187 | measure under any applicable law fulfilling obligations under article
188 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
189 | similar laws prohibiting or restricting circumvention of such
190 | measures.
191 |
192 | When you convey a covered work, you waive any legal power to forbid
193 | circumvention of technological measures to the extent such
194 | circumvention is effected by exercising rights under this License with
195 | respect to the covered work, and you disclaim any intention to limit
196 | operation or modification of the work as a means of enforcing, against
197 | the work's users, your or third parties' legal rights to forbid
198 | circumvention of technological measures.
199 |
200 | #### 4. Conveying Verbatim Copies.
201 |
202 | You may convey verbatim copies of the Program's source code as you
203 | receive it, in any medium, provided that you conspicuously and
204 | appropriately publish on each copy an appropriate copyright notice;
205 | keep intact all notices stating that this License and any
206 | non-permissive terms added in accord with section 7 apply to the code;
207 | keep intact all notices of the absence of any warranty; and give all
208 | recipients a copy of this License along with the Program.
209 |
210 | You may charge any price or no price for each copy that you convey,
211 | and you may offer support or warranty protection for a fee.
212 |
213 | #### 5. Conveying Modified Source Versions.
214 |
215 | You may convey a work based on the Program, or the modifications to
216 | produce it from the Program, in the form of source code under the
217 | terms of section 4, provided that you also meet all of these
218 | conditions:
219 |
220 | - a) The work must carry prominent notices stating that you modified
221 | it, and giving a relevant date.
222 | - b) The work must carry prominent notices stating that it is
223 | released under this License and any conditions added under
224 | section 7. This requirement modifies the requirement in section 4
225 | to "keep intact all notices".
226 | - c) You must license the entire work, as a whole, under this
227 | License to anyone who comes into possession of a copy. This
228 | License will therefore apply, along with any applicable section 7
229 | additional terms, to the whole of the work, and all its parts,
230 | regardless of how they are packaged. This License gives no
231 | permission to license the work in any other way, but it does not
232 | invalidate such permission if you have separately received it.
233 | - d) If the work has interactive user interfaces, each must display
234 | Appropriate Legal Notices; however, if the Program has interactive
235 | interfaces that do not display Appropriate Legal Notices, your
236 | work need not make them do so.
237 |
238 | A compilation of a covered work with other separate and independent
239 | works, which are not by their nature extensions of the covered work,
240 | and which are not combined with it such as to form a larger program,
241 | in or on a volume of a storage or distribution medium, is called an
242 | "aggregate" if the compilation and its resulting copyright are not
243 | used to limit the access or legal rights of the compilation's users
244 | beyond what the individual works permit. Inclusion of a covered work
245 | in an aggregate does not cause this License to apply to the other
246 | parts of the aggregate.
247 |
248 | #### 6. Conveying Non-Source Forms.
249 |
250 | You may convey a covered work in object code form under the terms of
251 | sections 4 and 5, provided that you also convey the machine-readable
252 | Corresponding Source under the terms of this License, in one of these
253 | ways:
254 |
255 | - a) Convey the object code in, or embodied in, a physical product
256 | (including a physical distribution medium), accompanied by the
257 | Corresponding Source fixed on a durable physical medium
258 | customarily used for software interchange.
259 | - b) Convey the object code in, or embodied in, a physical product
260 | (including a physical distribution medium), accompanied by a
261 | written offer, valid for at least three years and valid for as
262 | long as you offer spare parts or customer support for that product
263 | model, to give anyone who possesses the object code either (1) a
264 | copy of the Corresponding Source for all the software in the
265 | product that is covered by this License, on a durable physical
266 | medium customarily used for software interchange, for a price no
267 | more than your reasonable cost of physically performing this
268 | conveying of source, or (2) access to copy the Corresponding
269 | Source from a network server at no charge.
270 | - c) Convey individual copies of the object code with a copy of the
271 | written offer to provide the Corresponding Source. This
272 | alternative is allowed only occasionally and noncommercially, and
273 | only if you received the object code with such an offer, in accord
274 | with subsection 6b.
275 | - d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 | - e) Convey the object code using peer-to-peer transmission,
288 | provided you inform other peers where the object code and
289 | Corresponding Source of the work are being offered to the general
290 | public at no charge under subsection 6d.
291 |
292 | A separable portion of the object code, whose source code is excluded
293 | from the Corresponding Source as a System Library, need not be
294 | included in conveying the object code work.
295 |
296 | A "User Product" is either (1) a "consumer product", which means any
297 | tangible personal property which is normally used for personal,
298 | family, or household purposes, or (2) anything designed or sold for
299 | incorporation into a dwelling. In determining whether a product is a
300 | consumer product, doubtful cases shall be resolved in favor of
301 | coverage. For a particular product received by a particular user,
302 | "normally used" refers to a typical or common use of that class of
303 | product, regardless of the status of the particular user or of the way
304 | in which the particular user actually uses, or expects or is expected
305 | to use, the product. A product is a consumer product regardless of
306 | whether the product has substantial commercial, industrial or
307 | non-consumer uses, unless such uses represent the only significant
308 | mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to
312 | install and execute modified versions of a covered work in that User
313 | Product from a modified version of its Corresponding Source. The
314 | information must suffice to ensure that the continued functioning of
315 | the modified object code is in no case prevented or interfered with
316 | solely because modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or
331 | updates for a work that has been modified or installed by the
332 | recipient, or for the User Product in which it has been modified or
333 | installed. Access to a network may be denied when the modification
334 | itself materially and adversely affects the operation of the network
335 | or violates the rules and protocols for communication across the
336 | network.
337 |
338 | Corresponding Source conveyed, and Installation Information provided,
339 | in accord with this section must be in a format that is publicly
340 | documented (and with an implementation available to the public in
341 | source code form), and must require no special password or key for
342 | unpacking, reading or copying.
343 |
344 | #### 7. Additional Terms.
345 |
346 | "Additional permissions" are terms that supplement the terms of this
347 | License by making exceptions from one or more of its conditions.
348 | Additional permissions that are applicable to the entire Program shall
349 | be treated as though they were included in this License, to the extent
350 | that they are valid under applicable law. If additional permissions
351 | apply only to part of the Program, that part may be used separately
352 | under those permissions, but the entire Program remains governed by
353 | this License without regard to the additional permissions.
354 |
355 | When you convey a copy of a covered work, you may at your option
356 | remove any additional permissions from that copy, or from any part of
357 | it. (Additional permissions may be written to require their own
358 | removal in certain cases when you modify the work.) You may place
359 | additional permissions on material, added by you to a covered work,
360 | for which you have or can give appropriate copyright permission.
361 |
362 | Notwithstanding any other provision of this License, for material you
363 | add to a covered work, you may (if authorized by the copyright holders
364 | of that material) supplement the terms of this License with terms:
365 |
366 | - a) Disclaiming warranty or limiting liability differently from the
367 | terms of sections 15 and 16 of this License; or
368 | - b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 | - c) Prohibiting misrepresentation of the origin of that material,
372 | or requiring that modified versions of such material be marked in
373 | reasonable ways as different from the original version; or
374 | - d) Limiting the use for publicity purposes of names of licensors
375 | or authors of the material; or
376 | - e) Declining to grant rights under trademark law for use of some
377 | trade names, trademarks, or service marks; or
378 | - f) Requiring indemnification of licensors and authors of that
379 | material by anyone who conveys the material (or modified versions
380 | of it) with contractual assumptions of liability to the recipient,
381 | for any liability that these contractual assumptions directly
382 | impose on those licensors and authors.
383 |
384 | All other non-permissive additional terms are considered "further
385 | restrictions" within the meaning of section 10. If the Program as you
386 | received it, or any part of it, contains a notice stating that it is
387 | governed by this License along with a term that is a further
388 | restriction, you may remove that term. If a license document contains
389 | a further restriction but permits relicensing or conveying under this
390 | License, you may add to a covered work material governed by the terms
391 | of that license document, provided that the further restriction does
392 | not survive such relicensing or conveying.
393 |
394 | If you add terms to a covered work in accord with this section, you
395 | must place, in the relevant source files, a statement of the
396 | additional terms that apply to those files, or a notice indicating
397 | where to find the applicable terms.
398 |
399 | Additional terms, permissive or non-permissive, may be stated in the
400 | form of a separately written license, or stated as exceptions; the
401 | above requirements apply either way.
402 |
403 | #### 8. Termination.
404 |
405 | You may not propagate or modify a covered work except as expressly
406 | provided under this License. Any attempt otherwise to propagate or
407 | modify it is void, and will automatically terminate your rights under
408 | this License (including any patent licenses granted under the third
409 | paragraph of section 11).
410 |
411 | However, if you cease all violation of this License, then your license
412 | from a particular copyright holder is reinstated (a) provisionally,
413 | unless and until the copyright holder explicitly and finally
414 | terminates your license, and (b) permanently, if the copyright holder
415 | fails to notify you of the violation by some reasonable means prior to
416 | 60 days after the cessation.
417 |
418 | Moreover, your license from a particular copyright holder is
419 | reinstated permanently if the copyright holder notifies you of the
420 | violation by some reasonable means, this is the first time you have
421 | received notice of violation of this License (for any work) from that
422 | copyright holder, and you cure the violation prior to 30 days after
423 | your receipt of the notice.
424 |
425 | Termination of your rights under this section does not terminate the
426 | licenses of parties who have received copies or rights from you under
427 | this License. If your rights have been terminated and not permanently
428 | reinstated, you do not qualify to receive new licenses for the same
429 | material under section 10.
430 |
431 | #### 9. Acceptance Not Required for Having Copies.
432 |
433 | You are not required to accept this License in order to receive or run
434 | a copy of the Program. Ancillary propagation of a covered work
435 | occurring solely as a consequence of using peer-to-peer transmission
436 | to receive a copy likewise does not require acceptance. However,
437 | nothing other than this License grants you permission to propagate or
438 | modify any covered work. These actions infringe copyright if you do
439 | not accept this License. Therefore, by modifying or propagating a
440 | covered work, you indicate your acceptance of this License to do so.
441 |
442 | #### 10. Automatic Licensing of Downstream Recipients.
443 |
444 | Each time you convey a covered work, the recipient automatically
445 | receives a license from the original licensors, to run, modify and
446 | propagate that work, subject to this License. You are not responsible
447 | for enforcing compliance by third parties with this License.
448 |
449 | An "entity transaction" is a transaction transferring control of an
450 | organization, or substantially all assets of one, or subdividing an
451 | organization, or merging organizations. If propagation of a covered
452 | work results from an entity transaction, each party to that
453 | transaction who receives a copy of the work also receives whatever
454 | licenses to the work the party's predecessor in interest had or could
455 | give under the previous paragraph, plus a right to possession of the
456 | Corresponding Source of the work from the predecessor in interest, if
457 | the predecessor has it or can get it with reasonable efforts.
458 |
459 | You may not impose any further restrictions on the exercise of the
460 | rights granted or affirmed under this License. For example, you may
461 | not impose a license fee, royalty, or other charge for exercise of
462 | rights granted under this License, and you may not initiate litigation
463 | (including a cross-claim or counterclaim in a lawsuit) alleging that
464 | any patent claim is infringed by making, using, selling, offering for
465 | sale, or importing the Program or any portion of it.
466 |
467 | #### 11. Patents.
468 |
469 | A "contributor" is a copyright holder who authorizes use under this
470 | License of the Program or a work on which the Program is based. The
471 | work thus licensed is called the contributor's "contributor version".
472 |
473 | A contributor's "essential patent claims" are all patent claims owned
474 | or controlled by the contributor, whether already acquired or
475 | hereafter acquired, that would be infringed by some manner, permitted
476 | by this License, of making, using, or selling its contributor version,
477 | but do not include claims that would be infringed only as a
478 | consequence of further modification of the contributor version. For
479 | purposes of this definition, "control" includes the right to grant
480 | patent sublicenses in a manner consistent with the requirements of
481 | this License.
482 |
483 | Each contributor grants you a non-exclusive, worldwide, royalty-free
484 | patent license under the contributor's essential patent claims, to
485 | make, use, sell, offer for sale, import and otherwise run, modify and
486 | propagate the contents of its contributor version.
487 |
488 | In the following three paragraphs, a "patent license" is any express
489 | agreement or commitment, however denominated, not to enforce a patent
490 | (such as an express permission to practice a patent or covenant not to
491 | sue for patent infringement). To "grant" such a patent license to a
492 | party means to make such an agreement or commitment not to enforce a
493 | patent against the party.
494 |
495 | If you convey a covered work, knowingly relying on a patent license,
496 | and the Corresponding Source of the work is not available for anyone
497 | to copy, free of charge and under the terms of this License, through a
498 | publicly available network server or other readily accessible means,
499 | then you must either (1) cause the Corresponding Source to be so
500 | available, or (2) arrange to deprive yourself of the benefit of the
501 | patent license for this particular work, or (3) arrange, in a manner
502 | consistent with the requirements of this License, to extend the patent
503 | license to downstream recipients. "Knowingly relying" means you have
504 | actual knowledge that, but for the patent license, your conveying the
505 | covered work in a country, or your recipient's use of the covered work
506 | in a country, would infringe one or more identifiable patents in that
507 | country that you have reason to believe are valid.
508 |
509 | If, pursuant to or in connection with a single transaction or
510 | arrangement, you convey, or propagate by procuring conveyance of, a
511 | covered work, and grant a patent license to some of the parties
512 | receiving the covered work authorizing them to use, propagate, modify
513 | or convey a specific copy of the covered work, then the patent license
514 | you grant is automatically extended to all recipients of the covered
515 | work and works based on it.
516 |
517 | A patent license is "discriminatory" if it does not include within the
518 | scope of its coverage, prohibits the exercise of, or is conditioned on
519 | the non-exercise of one or more of the rights that are specifically
520 | granted under this License. You may not convey a covered work if you
521 | are a party to an arrangement with a third party that is in the
522 | business of distributing software, under which you make payment to the
523 | third party based on the extent of your activity of conveying the
524 | work, and under which the third party grants, to any of the parties
525 | who would receive the covered work from you, a discriminatory patent
526 | license (a) in connection with copies of the covered work conveyed by
527 | you (or copies made from those copies), or (b) primarily for and in
528 | connection with specific products or compilations that contain the
529 | covered work, unless you entered into that arrangement, or that patent
530 | license was granted, prior to 28 March 2007.
531 |
532 | Nothing in this License shall be construed as excluding or limiting
533 | any implied license or other defenses to infringement that may
534 | otherwise be available to you under applicable patent law.
535 |
536 | #### 12. No Surrender of Others' Freedom.
537 |
538 | If conditions are imposed on you (whether by court order, agreement or
539 | otherwise) that contradict the conditions of this License, they do not
540 | excuse you from the conditions of this License. If you cannot convey a
541 | covered work so as to satisfy simultaneously your obligations under
542 | this License and any other pertinent obligations, then as a
543 | consequence you may not convey it at all. For example, if you agree to
544 | terms that obligate you to collect a royalty for further conveying
545 | from those to whom you convey the Program, the only way you could
546 | satisfy both those terms and this License would be to refrain entirely
547 | from conveying the Program.
548 |
549 | #### 13. Use with the GNU Affero General Public License.
550 |
551 | Notwithstanding any other provision of this License, you have
552 | permission to link or combine any covered work with a work licensed
553 | under version 3 of the GNU Affero General Public License into a single
554 | combined work, and to convey the resulting work. The terms of this
555 | License will continue to apply to the part which is the covered work,
556 | but the special requirements of the GNU Affero General Public License,
557 | section 13, concerning interaction through a network will apply to the
558 | combination as such.
559 |
560 | #### 14. Revised Versions of this License.
561 |
562 | The Free Software Foundation may publish revised and/or new versions
563 | of the GNU General Public License from time to time. Such new versions
564 | will be similar in spirit to the present version, but may differ in
565 | detail to address new problems or concerns.
566 |
567 | Each version is given a distinguishing version number. If the Program
568 | specifies that a certain numbered version of the GNU General Public
569 | License "or any later version" applies to it, you have the option of
570 | following the terms and conditions either of that numbered version or
571 | of any later version published by the Free Software Foundation. If the
572 | Program does not specify a version number of the GNU General Public
573 | License, you may choose any version ever published by the Free
574 | Software Foundation.
575 |
576 | If the Program specifies that a proxy can decide which future versions
577 | of the GNU General Public License can be used, that proxy's public
578 | statement of acceptance of a version permanently authorizes you to
579 | choose that version for the Program.
580 |
581 | Later license versions may give you additional or different
582 | permissions. However, no additional obligations are imposed on any
583 | author or copyright holder as a result of your choosing to follow a
584 | later version.
585 |
586 | #### 15. Disclaimer of Warranty.
587 |
588 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
589 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
590 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
591 | WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
592 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
593 | A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
594 | PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
595 | DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
596 | CORRECTION.
597 |
598 | #### 16. Limitation of Liability.
599 |
600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
602 | CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
603 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
604 | ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
605 | NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
606 | LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
607 | TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
608 | PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
609 |
610 | #### 17. Interpretation of Sections 15 and 16.
611 |
612 | If the disclaimer of warranty and limitation of liability provided
613 | above cannot be given local legal effect according to their terms,
614 | reviewing courts shall apply local law that most closely approximates
615 | an absolute waiver of all civil liability in connection with the
616 | Program, unless a warranty or assumption of liability accompanies a
617 | copy of the Program in return for a fee.
618 |
619 | END OF TERMS AND CONDITIONS
620 |
621 | ### How to Apply These Terms to Your New Programs
622 |
623 | If you develop a new program, and you want it to be of the greatest
624 | possible use to the public, the best way to achieve this is to make it
625 | free software which everyone can redistribute and change under these
626 | terms.
627 |
628 | To do so, attach the following notices to the program. It is safest to
629 | attach them to the start of each source file to most effectively state
630 | the exclusion of warranty; and each file should have at least the
631 | "copyright" line and a pointer to where the full notice is found.
632 |
633 |
634 | Copyright (C)
635 |
636 | This program is free software: you can redistribute it and/or modify
637 | it under the terms of the GNU General Public License as published by
638 | the Free Software Foundation, either version 3 of the License, or
639 | (at your option) any later version.
640 |
641 | This program is distributed in the hope that it will be useful,
642 | but WITHOUT ANY WARRANTY; without even the implied warranty of
643 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
644 | GNU General Public License for more details.
645 |
646 | You should have received a copy of the GNU General Public License
647 | along with this program. If not, see .
648 |
649 | Also add information on how to contact you by electronic and paper
650 | mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands \`show w' and \`show c' should show the
661 | appropriate parts of the General Public License. Of course, your
662 | program's commands might be different; for a GUI interface, you would
663 | use an "about box".
664 |
665 | You should also get your employer (if you work as a programmer) or
666 | school, if any, to sign a "copyright disclaimer" for the program, if
667 | necessary. For more information on this, and how to apply and follow
668 | the GNU GPL, see .
669 |
670 | The GNU General Public License does not permit incorporating your
671 | program into proprietary programs. If your program is a subroutine
672 | library, you may consider it more useful to permit linking proprietary
673 | applications with the library. If this is what you want to do, use the
674 | GNU Lesser General Public License instead of this License. But first,
675 | please read .
676 |
--------------------------------------------------------------------------------