electron package is modified

This commit is contained in:
병준 박 2019-12-31 14:15:29 +09:00
parent 2c7797d8f8
commit 32f1400f84
42 changed files with 36 additions and 22 deletions

View File

@ -82,7 +82,7 @@ const mainConfig: webpack.Configuration = {
),
new CopyWebpackPlugin([
{
from: 'ucap-webmessenger-electron/resources/**/*',
from: 'ucap-webmessenger-electron/assets/**/*',
to: path.resolve(__dirname, '..', 'dist'),
context: 'electron-projects'
}

View File

@ -23,9 +23,25 @@
"!**/.awcache",
"!**/.vscode",
"!config/",
"!dist/",
"!docker/",
"!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": {
"name": "DS Talk",

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -165,11 +165,7 @@ export class AppWindow {
} else {
this.window.loadURL(
url.format({
pathname: path.join(
__dirname,
'..',
'ucap-webmessenger-app/index.html'
),
pathname: path.join(__dirname, '..', 'renderer/index.html'),
protocol: 'file:',
slashes: true
})

View File

@ -52,13 +52,18 @@ const appIconPath = __LINUX__
? path.join(
__dirname,
'../../',
'config/build/linux/icon/woori/',
'config/build/linux/icon/daesang/',
'256x256.png'
)
: path.join(__dirname, 'resources/linuxicon', '256x256.png')
: path.join(__dirname, '..', '/assets/icon/', '256x256.png')
: __DEV__
? path.join(__dirname, 'resources/image', '64_64.png')
: path.join(__dirname, 'resources/image', '64_64.png');
? path.join(
__dirname,
'../../',
'config/build/win/icon/daesang/',
'16x16.ico'
)
: path.join(__dirname, '..', '/assets/icon/', '16x16.ico');
let appWindow: AppWindow | null = null;
let appTray: Tray | null = null;
@ -266,12 +271,12 @@ app.on(ElectronAppChannel.Ready, () => {
notificationService.options.defaultWindow.webPreferences.preload = path.join(
__dirname,
'resources/notification/preload.js'
'assets/notification/preload.js'
);
notificationService.templatePath = path.join(
__dirname,
'resources/notification/template.html'
'assets/notification/template.html'
);
updateWindowService = new ElectronUpdateWindowService({
@ -299,7 +304,7 @@ app.on(ElectronAppChannel.Ready, () => {
updateWindowService.templatePath = path.join(
__dirname,
'resources/update-window/template.html'
'assets/update-window/template.html'
);
// updateWindowService.show();
@ -589,15 +594,12 @@ ipcMain.on(
text: noti.contents,
image:
noti.image ||
path.join(
__dirname,
'resources/notification/images/img_nophoto_50.png'
),
path.join(__dirname, 'assets/notification/images/img_nophoto_50.png'),
sound: noti.useSound
? path.join(
'file://',
__dirname,
'resources/notification/sounds/messageAlarm.mp3'
'assets/notification/sounds/messageAlarm.mp3'
)
: '',
displayTime: !!noti.displayTime ? noti.displayTime : undefined,

View File

@ -3,7 +3,7 @@ import * as path from 'path';
// tslint:disable-next-line: variable-name
const _root = __DEV__
? path.resolve(__dirname, '..', '..')
: path.resolve(__dirname, '..', '..');
: path.resolve(__dirname, '..');
export function root(...paths: string[]) {
const args = Array.prototype.slice.call(paths, 0);

View File

@ -145,5 +145,5 @@
"webpack-node-externals": "^1.7.2",
"zone.js": "~0.9.1"
},
"main": "./dist/ucap-webmessenger-electron/main.js"
"main": "./electron/main.js"
}

View File

@ -19,7 +19,7 @@ export function createTranslateLoader(nativeService: NativeService) {
break;
case NativeType.Electron:
prefix = environment.production
? '/dist/ucap-webmessenger-app/assets/i18n/'
? '/renderer/assets/i18n/'
: '/projects/ucap-webmessenger-app/src/assets/i18n/';
break;