package structure is changed

This commit is contained in:
병준 박 2020-01-02 14:26:14 +09:00
parent dbf62d321b
commit 12a864c709
9 changed files with 63 additions and 21 deletions

View File

@ -1,4 +1,5 @@
Function CheckAndDownloadDotNet45 Function CheckAndDownloadDotNet45
# Let's see if the user has the .NET Framework 4.5 installed on their system or not # Let's see if the user has the .NET Framework 4.5 installed on their system or not
# Remember: you need Vista SP2 or 7 SP1. It is built in to Windows 8, and not needed # Remember: you need Vista SP2 or 7 SP1. It is built in to Windows 8, and not needed
# In case you're wondering, running this code on Windows 8 will correctly return is_equal # In case you're wondering, running this code on Windows 8 will correctly return is_equal

View File

@ -1,6 +1,7 @@
import * as path from 'path'; import * as path from 'path';
import { CleanWebpackPlugin } from 'clean-webpack-plugin'; import { CleanWebpackPlugin } from 'clean-webpack-plugin';
import * as CopyWebpackPlugin from 'copy-webpack-plugin'; import * as CopyWebpackPlugin from 'copy-webpack-plugin';
import * as UglifyJsPlugin from 'uglifyjs-webpack-plugin';
import * as webpack from 'webpack'; import * as webpack from 'webpack';
import * as nodeExternals from 'webpack-node-externals'; import * as nodeExternals from 'webpack-node-externals';
import { getEnviroments } from './enviroment'; import { getEnviroments } from './enviroment';
@ -24,9 +25,10 @@ const mainConfig: webpack.Configuration = {
}, },
target: 'electron-main', target: 'electron-main',
mode: enviroments.__DEV__ ? 'development' : 'production', mode: enviroments.__DEV__ ? 'development' : 'production',
devtool: 'source-map', devtool: enviroments.__DEV__ ? 'source-map' : undefined,
optimization: { optimization: {
noEmitOnErrors: true noEmitOnErrors: true,
minimizer: [new UglifyJsPlugin()]
}, },
externals, externals,
output: { output: {

View File

@ -23,20 +23,9 @@
"!**/.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": ["**/*"], "filter": ["**/*"],
"from": "./config/build/${os}/icon/daesang/", "from": "./config/build/${os}/icon/daesang/",

View File

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

View File

@ -55,7 +55,7 @@ const appIconPath = __LINUX__
'config/build/linux/icon/daesang/', 'config/build/linux/icon/daesang/',
'256x256.png' '256x256.png'
) )
: path.join(__dirname, '..', '/assets/icon/', '256x256.png') : path.join(__dirname, '..', '..', '/assets/icon/', '256x256.png')
: __DEV__ : __DEV__
? path.join( ? path.join(
__dirname, __dirname,
@ -63,7 +63,7 @@ const appIconPath = __LINUX__
'config/build/win/icon/daesang/', 'config/build/win/icon/daesang/',
'16x16.ico' '16x16.ico'
) )
: path.join(__dirname, '..', '/assets/icon/', '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;

View File

@ -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);

47
package-lock.json generated
View File

@ -2488,6 +2488,15 @@
} }
} }
}, },
"@types/uglifyjs-webpack-plugin": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@types/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.1.0.tgz",
"integrity": "sha512-QoCJYq+zNtuvKw4nutaIxQXKBpvc0Hd6U7BUVi2Cest2FrkGTYDBD6YpSq5d9IHjo94SjXk+6KDqQVOcEzFJZA==",
"dev": true,
"requires": {
"@types/webpack": "*"
}
},
"@types/webpack": { "@types/webpack": {
"version": "4.39.5", "version": "4.39.5",
"resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.39.5.tgz", "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.39.5.tgz",
@ -14263,7 +14272,6 @@
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz",
"integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"commander": "~2.20.0", "commander": "~2.20.0",
"source-map": "~0.6.1" "source-map": "~0.6.1"
@ -14273,8 +14281,43 @@
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
}
}
},
"uglifyjs-webpack-plugin": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-2.2.0.tgz",
"integrity": "sha512-mHSkufBmBuJ+KHQhv5H0MXijtsoA1lynJt1lXOaotja8/I0pR4L9oGaPIZw+bQBOFittXZg9OC1sXSGO9D9ZYg==",
"dev": true, "dev": true,
"optional": true "requires": {
"cacache": "^12.0.2",
"find-cache-dir": "^2.1.0",
"is-wsl": "^1.1.0",
"schema-utils": "^1.0.0",
"serialize-javascript": "^1.7.0",
"source-map": "^0.6.1",
"uglify-js": "^3.6.0",
"webpack-sources": "^1.4.0",
"worker-farm": "^1.7.0"
},
"dependencies": {
"find-cache-dir": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz",
"integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==",
"dev": true,
"requires": {
"commondir": "^1.0.1",
"make-dir": "^2.0.0",
"pkg-dir": "^3.0.0"
}
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
} }
} }
}, },

View File

@ -1,6 +1,11 @@
{ {
"name": "ucap-webmessenger", "name": "ucap-webmessenger",
"version": "0.0.0", "version": "0.0.0",
"author": {
"name": "LG CNS",
"email": "lgucap@lgcns.com"
},
"description": "Daesang Client for UCap M Messenger",
"scripts": { "scripts": {
"postinstall": "electron-builder install-app-deps", "postinstall": "electron-builder install-app-deps",
"ng": "ng", "ng": "ng",
@ -89,6 +94,7 @@
"@types/moment-timezone": "^0.5.12", "@types/moment-timezone": "^0.5.12",
"@types/node": "^10.14.22", "@types/node": "^10.14.22",
"@types/semver": "^6.0.2", "@types/semver": "^6.0.2",
"@types/uglifyjs-webpack-plugin": "^1.1.0",
"@types/webpack": "^4.39.5", "@types/webpack": "^4.39.5",
"@types/webpack-merge": "^4.1.5", "@types/webpack-merge": "^4.1.5",
"@types/webpack-node-externals": "^1.6.3", "@types/webpack-node-externals": "^1.6.3",
@ -138,6 +144,7 @@
"tslib": "^1.10.0", "tslib": "^1.10.0",
"tslint": "~5.15.0", "tslint": "~5.15.0",
"typescript": "~3.5.3", "typescript": "~3.5.3",
"uglifyjs-webpack-plugin": "^2.2.0",
"wait-on": "^3.3.0", "wait-on": "^3.3.0",
"web-animations-js": "^2.3.2", "web-animations-js": "^2.3.2",
"webpack": "4.39.2", "webpack": "4.39.2",
@ -145,5 +152,5 @@
"webpack-node-externals": "^1.7.2", "webpack-node-externals": "^1.7.2",
"zone.js": "~0.9.1" "zone.js": "~0.9.1"
}, },
"main": "./electron/main.js" "main": "./dist/ucap-webmessenger-electron/main.js"
} }

View File

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