electron package is modified
|
@ -82,7 +82,7 @@ const mainConfig: webpack.Configuration = {
|
||||||
),
|
),
|
||||||
new CopyWebpackPlugin([
|
new CopyWebpackPlugin([
|
||||||
{
|
{
|
||||||
from: 'ucap-webmessenger-electron/resources/**/*',
|
from: 'ucap-webmessenger-electron/assets/**/*',
|
||||||
to: path.resolve(__dirname, '..', 'dist'),
|
to: path.resolve(__dirname, '..', 'dist'),
|
||||||
context: 'electron-projects'
|
context: 'electron-projects'
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,9 +23,25 @@
|
||||||
"!**/.awcache",
|
"!**/.awcache",
|
||||||
"!**/.vscode",
|
"!**/.vscode",
|
||||||
"!config/",
|
"!config/",
|
||||||
|
"!dist/",
|
||||||
"!docker/",
|
"!docker/",
|
||||||
"!tsconfig.json",
|
"!tsconfig.json",
|
||||||
"!tslint.json"
|
"!tslint.json",
|
||||||
|
{
|
||||||
|
"filter": ["**/*"],
|
||||||
|
"from": "./dist/ucap-webmessenger-app/",
|
||||||
|
"to": "./renderer/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filter": ["**/*"],
|
||||||
|
"from": "./dist/ucap-webmessenger-electron/",
|
||||||
|
"to": "./electron/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filter": ["**/*"],
|
||||||
|
"from": "./config/build/${os}/icon/daesang/",
|
||||||
|
"to": "./assets/icon/"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"protocols": {
|
"protocols": {
|
||||||
"name": "DS Talk",
|
"name": "DS Talk",
|
||||||
|
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 503 B After Width: | Height: | Size: 503 B |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 886 B After Width: | Height: | Size: 886 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 999 B After Width: | Height: | Size: 999 B |
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 551 B After Width: | Height: | Size: 551 B |
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 999 B After Width: | Height: | Size: 999 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 842 B After Width: | Height: | Size: 842 B |
Before Width: | Height: | Size: 643 B After Width: | Height: | Size: 643 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 226 B |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
@ -165,11 +165,7 @@ export class AppWindow {
|
||||||
} else {
|
} else {
|
||||||
this.window.loadURL(
|
this.window.loadURL(
|
||||||
url.format({
|
url.format({
|
||||||
pathname: path.join(
|
pathname: path.join(__dirname, '..', 'renderer/index.html'),
|
||||||
__dirname,
|
|
||||||
'..',
|
|
||||||
'ucap-webmessenger-app/index.html'
|
|
||||||
),
|
|
||||||
protocol: 'file:',
|
protocol: 'file:',
|
||||||
slashes: true
|
slashes: true
|
||||||
})
|
})
|
||||||
|
|
|
@ -52,13 +52,18 @@ const appIconPath = __LINUX__
|
||||||
? path.join(
|
? path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'../../',
|
'../../',
|
||||||
'config/build/linux/icon/woori/',
|
'config/build/linux/icon/daesang/',
|
||||||
'256x256.png'
|
'256x256.png'
|
||||||
)
|
)
|
||||||
: path.join(__dirname, 'resources/linuxicon', '256x256.png')
|
: path.join(__dirname, '..', '/assets/icon/', '256x256.png')
|
||||||
: __DEV__
|
: __DEV__
|
||||||
? path.join(__dirname, 'resources/image', '64_64.png')
|
? path.join(
|
||||||
: path.join(__dirname, 'resources/image', '64_64.png');
|
__dirname,
|
||||||
|
'../../',
|
||||||
|
'config/build/win/icon/daesang/',
|
||||||
|
'16x16.ico'
|
||||||
|
)
|
||||||
|
: path.join(__dirname, '..', '/assets/icon/', '16x16.ico');
|
||||||
|
|
||||||
let appWindow: AppWindow | null = null;
|
let appWindow: AppWindow | null = null;
|
||||||
let appTray: Tray | null = null;
|
let appTray: Tray | null = null;
|
||||||
|
@ -266,12 +271,12 @@ app.on(ElectronAppChannel.Ready, () => {
|
||||||
|
|
||||||
notificationService.options.defaultWindow.webPreferences.preload = path.join(
|
notificationService.options.defaultWindow.webPreferences.preload = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'resources/notification/preload.js'
|
'assets/notification/preload.js'
|
||||||
);
|
);
|
||||||
|
|
||||||
notificationService.templatePath = path.join(
|
notificationService.templatePath = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'resources/notification/template.html'
|
'assets/notification/template.html'
|
||||||
);
|
);
|
||||||
|
|
||||||
updateWindowService = new ElectronUpdateWindowService({
|
updateWindowService = new ElectronUpdateWindowService({
|
||||||
|
@ -299,7 +304,7 @@ app.on(ElectronAppChannel.Ready, () => {
|
||||||
|
|
||||||
updateWindowService.templatePath = path.join(
|
updateWindowService.templatePath = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'resources/update-window/template.html'
|
'assets/update-window/template.html'
|
||||||
);
|
);
|
||||||
|
|
||||||
// updateWindowService.show();
|
// updateWindowService.show();
|
||||||
|
@ -589,15 +594,12 @@ ipcMain.on(
|
||||||
text: noti.contents,
|
text: noti.contents,
|
||||||
image:
|
image:
|
||||||
noti.image ||
|
noti.image ||
|
||||||
path.join(
|
path.join(__dirname, 'assets/notification/images/img_nophoto_50.png'),
|
||||||
__dirname,
|
|
||||||
'resources/notification/images/img_nophoto_50.png'
|
|
||||||
),
|
|
||||||
sound: noti.useSound
|
sound: noti.useSound
|
||||||
? path.join(
|
? path.join(
|
||||||
'file://',
|
'file://',
|
||||||
__dirname,
|
__dirname,
|
||||||
'resources/notification/sounds/messageAlarm.mp3'
|
'assets/notification/sounds/messageAlarm.mp3'
|
||||||
)
|
)
|
||||||
: '',
|
: '',
|
||||||
displayTime: !!noti.displayTime ? noti.displayTime : undefined,
|
displayTime: !!noti.displayTime ? noti.displayTime : undefined,
|
||||||
|
|
|
@ -3,7 +3,7 @@ import * as path from 'path';
|
||||||
// tslint:disable-next-line: variable-name
|
// tslint:disable-next-line: variable-name
|
||||||
const _root = __DEV__
|
const _root = __DEV__
|
||||||
? path.resolve(__dirname, '..', '..')
|
? path.resolve(__dirname, '..', '..')
|
||||||
: path.resolve(__dirname, '..', '..');
|
: path.resolve(__dirname, '..');
|
||||||
|
|
||||||
export function root(...paths: string[]) {
|
export function root(...paths: string[]) {
|
||||||
const args = Array.prototype.slice.call(paths, 0);
|
const args = Array.prototype.slice.call(paths, 0);
|
||||||
|
|
|
@ -145,5 +145,5 @@
|
||||||
"webpack-node-externals": "^1.7.2",
|
"webpack-node-externals": "^1.7.2",
|
||||||
"zone.js": "~0.9.1"
|
"zone.js": "~0.9.1"
|
||||||
},
|
},
|
||||||
"main": "./dist/ucap-webmessenger-electron/main.js"
|
"main": "./electron/main.js"
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ export function createTranslateLoader(nativeService: NativeService) {
|
||||||
break;
|
break;
|
||||||
case NativeType.Electron:
|
case NativeType.Electron:
|
||||||
prefix = environment.production
|
prefix = environment.production
|
||||||
? '/dist/ucap-webmessenger-app/assets/i18n/'
|
? '/renderer/assets/i18n/'
|
||||||
: '/projects/ucap-webmessenger-app/src/assets/i18n/';
|
: '/projects/ucap-webmessenger-app/src/assets/i18n/';
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|