diff --git a/config/build/linux/after-install.tpl b/config/build/linux/after-install.tpl deleted file mode 100644 index 69275c5..0000000 --- a/config/build/linux/after-install.tpl +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -setcap cap_net_raw,cap_net_admin=eip '/opt/${productFilename}/bin/probe' \ No newline at end of file diff --git a/config/build/linux/AppRun.sh b/config/build/linux/debian/AppRun.sh similarity index 100% rename from config/build/linux/AppRun.sh rename to config/build/linux/debian/AppRun.sh diff --git a/config/build/linux/debian/after-install.tpl b/config/build/linux/debian/after-install.tpl new file mode 100644 index 0000000..0119df6 --- /dev/null +++ b/config/build/linux/debian/after-install.tpl @@ -0,0 +1,3 @@ +#!/bin/bash + +setcap cap_net_raw,cap_net_admin=eip '/opt/${productFilename}/resources/bin/probe' diff --git a/config/build/linux/after-remove.tpl b/config/build/linux/debian/after-remove.tpl similarity index 100% rename from config/build/linux/after-remove.tpl rename to config/build/linux/debian/after-remove.tpl diff --git a/config/build/linux/desktop.tpl b/config/build/linux/debian/desktop.tpl similarity index 100% rename from config/build/linux/desktop.tpl rename to config/build/linux/debian/desktop.tpl diff --git a/config/build/mac/icon/background/background.png b/config/build/mac/dmg/background.png similarity index 100% rename from config/build/mac/icon/background/background.png rename to config/build/mac/dmg/background.png diff --git a/config/build/mac/icon/background/background@2x.png b/config/build/mac/dmg/background@2x.png similarity index 100% rename from config/build/mac/icon/background/background@2x.png rename to config/build/mac/dmg/background@2x.png diff --git a/config/build/mac/icon/dmg.icns b/config/build/mac/dmg/icon.icns similarity index 100% rename from config/build/mac/icon/dmg.icns rename to config/build/mac/dmg/icon.icns diff --git a/config/build/windows/icon/overflow_128.ico b/config/build/windows/icon/overflow_128.ico deleted file mode 100644 index 77d3f07..0000000 Binary files a/config/build/windows/icon/overflow_128.ico and /dev/null differ diff --git a/config/build/windows/icon/overflow_16.ico b/config/build/windows/icon/overflow_16.ico deleted file mode 100644 index 6af282e..0000000 Binary files a/config/build/windows/icon/overflow_16.ico and /dev/null differ diff --git a/config/build/windows/icon/overflow_24.ico b/config/build/windows/icon/overflow_24.ico deleted file mode 100644 index 1c976a0..0000000 Binary files a/config/build/windows/icon/overflow_24.ico and /dev/null differ diff --git a/config/build/windows/icon/overflow_32.ico b/config/build/windows/icon/overflow_32.ico deleted file mode 100644 index 3e8baa1..0000000 Binary files a/config/build/windows/icon/overflow_32.ico and /dev/null differ diff --git a/config/build/windows/icon/overflow_40.ico b/config/build/windows/icon/overflow_40.ico deleted file mode 100644 index 486d765..0000000 Binary files a/config/build/windows/icon/overflow_40.ico and /dev/null differ diff --git a/config/build/windows/icon/overflow_48.ico b/config/build/windows/icon/overflow_48.ico deleted file mode 100644 index 875524e..0000000 Binary files a/config/build/windows/icon/overflow_48.ico and /dev/null differ diff --git a/config/build/windows/icon/overflow_64.ico b/config/build/windows/icon/overflow_64.ico deleted file mode 100644 index 64d70a4..0000000 Binary files a/config/build/windows/icon/overflow_64.ico and /dev/null differ diff --git a/config/build/windows/icon/overflow_96.ico b/config/build/windows/icon/overflow_96.ico deleted file mode 100644 index a3cb189..0000000 Binary files a/config/build/windows/icon/overflow_96.ico and /dev/null differ diff --git a/electron-builder.env b/electron-builder.env new file mode 100644 index 0000000..7cf0cee --- /dev/null +++ b/electron-builder.env @@ -0,0 +1 @@ +BUILD_NUMBER=0.0.1-SNAPSHOT \ No newline at end of file diff --git a/electron-builder.json b/electron-builder.json index ce486d0..a2bb86a 100644 --- a/electron-builder.json +++ b/electron-builder.json @@ -1,74 +1,80 @@ { "appId": "com.loafle.overflow.scanner", - "productName": "overFlow Network Scanner", + "productName": "overFlow-NetworkScanner", "copyright": "Copyright © 2016 LOAFLE", - "asar": false, + "asar": true, "compression": "normal", "npmRebuild": false, "npmSkipBuildFromSource": false, - "artifactName": "${name}-${version}-${os}-${arch}.${ext}", + "artifactName": "${productName}-${version}-${os}-${arch}.${ext}", "directories": { "buildResources": "./config/build/", "output": "./build/package" }, "files": [ + "packages.json", { - "filter": ["**/*", "!*.ts", "!*.scss", "!yarn.lock"], + "filter": [ + "**/*", + "!*.ts", + "!*.scss", + "!yarn.lock" + ], "from": "./build/dist/", "to": "." }, - "packages.json" + { + "filter": [ + "**/*" + ], + "from": "config/build/${os}/icon/", + "to": "./assets/image/icon/" + } ], - "extraFiles": [ + "extraResources": [ { "from": "config/_database.sqlite", "to": "./bin/database.sqlite" }, { - "filter": ["**/*"], - "from": "config/build/${os}/icon/", - "to": "./icon/" + "from": "config/build/${os}/bin/probe-${os}-${arch}", + "to": "./bin/probe" } ], "linux": { "target": [ { "target": "deb", - "arch": ["ia32", "x64"] + "arch": [ + "ia32", + "x64" + ] } ], - "executableName": "overFlow-NetworkScanner", - "icon": "config/build/linux/icon/", - "synopsis": "overFlow Network Scanner", - "category": "Utility", - "extraFiles": [ - { - "from": "config/build/linux/bin/probe-${os}-${arch}", - "to": "./bin/probe" - } - ] + "category": "Network;Monitor;", + "synopsis": "The network scanner from LOAFLE", + "icon": "config/build/linux/icon/" }, "deb": { - "depends": ["libpcap0.8"], - "afterInstall": "config/build/linux/after-install.tpl" + "depends": [ + "libpcap0.8" + ], + "afterInstall": "config/build/linux/debian/after-install.tpl" }, "mac": { + "target": [ + "dmg" + ], "category": "public.app-category.utilities", - "artifactName": "${productName}-${version}-${arch}.${ext}", "minimumSystemVersion": "10.12.0", "extendInfo": "config/build/mac/Info.plist", - "icon": "config/build/mac/icon/overflow_1024.icns", - "target": ["dmg"], - "extraFiles": [ - { - "from": "config/build/mac/bin/probe-${os}-${arch}", - "to": "./bin/probe" - } - ] + "icon": "config/build/mac/icon/overflow_1024.icns" }, "dmg": { - "icon": null, - "iconSize": 150, + "background": "config/build/mac/dmg/background.png", + "icon": "config/build/mac/dmg/icon.icns", + "iconSize": 80, + "iconTextSize": 12, "contents": [ { "x": 480, @@ -81,28 +87,30 @@ "y": 240, "type": "file" } - ], - "background": "config/build/mac/icon/background/background.png" + ] }, "win": { "target": [ { "target": "nsis", - "arch": ["x64", "ia32"] + "arch": [ + "x64", + "ia32" + ] } ], "legalTrademarks": "overFlow", "publisherName": "LOAFLE", - "icon": "config/build/windows/icon/icon.ico" + "icon": "config/build/windows/icon/overflow_256.ico" }, "nsis": { "oneClick": false, "perMachine": true, - "allowToChangeInstallationDirectory": true, - "installerIcon": "config/build/windows/icon/icon.ico", - "uninstallerIcon": "config/build/windows/icon/icon.ico", + "allowToChangeInstallationDirectory": false, + "installerIcon": "config/build/windows/icon/overflow_256.ico", + "installerHeader": "installerHeader.bmp", + "uninstallerIcon": "config/build/windows/icon/overflow_256.ico", "include": "config/build/windows/nsis/installer.nsh", - "artifactName": "${productName} Setup ${version}.${ext}", "menuCategory": "overFlow" } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 79f00fe..8496b38 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "overflow-network-scanner-app", + "name": "@overflow/network-scanner", "version": "0.0.1", "private": true, "author": { @@ -8,7 +8,7 @@ "url": "https://www.loafle.com" }, "homepage": "https://www.loafle.com", - "description": "Desktop App for overFlow Network Scanner", + "description": "overFlow Network Scanner is a utility that finds and manages network resources.", "scripts": { "postinstall": "npm-run-all -s electron:builder:install-app-deps", "ng": "ng", diff --git a/src/electron/app-window.ts b/src/electron/app-window.ts index b98fa33..b88c58b 100644 --- a/src/electron/app-window.ts +++ b/src/electron/app-window.ts @@ -79,8 +79,8 @@ export class AppWindow { ) : path.join( __dirname, - '..', - '..', + 'assets', + 'image', 'icon', '512x512.png' ) diff --git a/src/electron/main.ts b/src/electron/main.ts index 4b80fbc..3da8699 100644 --- a/src/electron/main.ts +++ b/src/electron/main.ts @@ -190,7 +190,7 @@ app.on('ready', () => { const dbPath = __DEV__ ? path.join(__dirname, '..', '..', 'config', '_database.sqlite') - : path.join(__dirname, '..', '..', 'bin', 'database.sqlite'); + : path.join(__dirname, '..', 'bin', 'database.sqlite'); db = new sqlite3.Database(dbPath, sqlite3.OPEN_READONLY, (err: Error) => { if (err) { @@ -200,7 +200,7 @@ app.on('ready', () => { }); if (!__DEV__) { - const probePath = path.join(__dirname, '..', '..', 'bin', 'probe'); + const probePath = path.join(__dirname, '..', 'bin', 'probe'); probeProcess = ChildProcess.spawn(probePath, [], { stdio: ['ignore', 'ignore', 'ignore'], detached: true }); }