This commit is contained in:
crusader 2018-10-03 18:27:37 +09:00
parent 9f823903bb
commit 5aea46b568
21 changed files with 60 additions and 51 deletions

View File

@ -1,3 +0,0 @@
#!/bin/bash
setcap cap_net_raw,cap_net_admin=eip '/opt/${productFilename}/bin/probe'

View File

@ -0,0 +1,3 @@
#!/bin/bash
setcap cap_net_raw,cap_net_admin=eip '/opt/${productFilename}/resources/bin/probe'

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

1
electron-builder.env Normal file
View File

@ -0,0 +1 @@
BUILD_NUMBER=0.0.1-SNAPSHOT

View File

@ -1,74 +1,80 @@
{ {
"appId": "com.loafle.overflow.scanner", "appId": "com.loafle.overflow.scanner",
"productName": "overFlow Network Scanner", "productName": "overFlow-NetworkScanner",
"copyright": "Copyright © 2016 LOAFLE", "copyright": "Copyright © 2016 LOAFLE",
"asar": false, "asar": true,
"compression": "normal", "compression": "normal",
"npmRebuild": false, "npmRebuild": false,
"npmSkipBuildFromSource": false, "npmSkipBuildFromSource": false,
"artifactName": "${name}-${version}-${os}-${arch}.${ext}", "artifactName": "${productName}-${version}-${os}-${arch}.${ext}",
"directories": { "directories": {
"buildResources": "./config/build/", "buildResources": "./config/build/",
"output": "./build/package" "output": "./build/package"
}, },
"files": [ "files": [
"packages.json",
{ {
"filter": ["**/*", "!*.ts", "!*.scss", "!yarn.lock"], "filter": [
"**/*",
"!*.ts",
"!*.scss",
"!yarn.lock"
],
"from": "./build/dist/", "from": "./build/dist/",
"to": "." "to": "."
}, },
"packages.json" {
"filter": [
"**/*"
], ],
"extraFiles": [ "from": "config/build/${os}/icon/",
"to": "./assets/image/icon/"
}
],
"extraResources": [
{ {
"from": "config/_database.sqlite", "from": "config/_database.sqlite",
"to": "./bin/database.sqlite" "to": "./bin/database.sqlite"
}, },
{ {
"filter": ["**/*"], "from": "config/build/${os}/bin/probe-${os}-${arch}",
"from": "config/build/${os}/icon/", "to": "./bin/probe"
"to": "./icon/"
} }
], ],
"linux": { "linux": {
"target": [ "target": [
{ {
"target": "deb", "target": "deb",
"arch": ["ia32", "x64"] "arch": [
"ia32",
"x64"
]
} }
], ],
"executableName": "overFlow-NetworkScanner", "category": "Network;Monitor;",
"icon": "config/build/linux/icon/", "synopsis": "The network scanner from LOAFLE",
"synopsis": "overFlow Network Scanner", "icon": "config/build/linux/icon/"
"category": "Utility",
"extraFiles": [
{
"from": "config/build/linux/bin/probe-${os}-${arch}",
"to": "./bin/probe"
}
]
}, },
"deb": { "deb": {
"depends": ["libpcap0.8"], "depends": [
"afterInstall": "config/build/linux/after-install.tpl" "libpcap0.8"
],
"afterInstall": "config/build/linux/debian/after-install.tpl"
}, },
"mac": { "mac": {
"target": [
"dmg"
],
"category": "public.app-category.utilities", "category": "public.app-category.utilities",
"artifactName": "${productName}-${version}-${arch}.${ext}",
"minimumSystemVersion": "10.12.0", "minimumSystemVersion": "10.12.0",
"extendInfo": "config/build/mac/Info.plist", "extendInfo": "config/build/mac/Info.plist",
"icon": "config/build/mac/icon/overflow_1024.icns", "icon": "config/build/mac/icon/overflow_1024.icns"
"target": ["dmg"],
"extraFiles": [
{
"from": "config/build/mac/bin/probe-${os}-${arch}",
"to": "./bin/probe"
}
]
}, },
"dmg": { "dmg": {
"icon": null, "background": "config/build/mac/dmg/background.png",
"iconSize": 150, "icon": "config/build/mac/dmg/icon.icns",
"iconSize": 80,
"iconTextSize": 12,
"contents": [ "contents": [
{ {
"x": 480, "x": 480,
@ -81,28 +87,30 @@
"y": 240, "y": 240,
"type": "file" "type": "file"
} }
], ]
"background": "config/build/mac/icon/background/background.png"
}, },
"win": { "win": {
"target": [ "target": [
{ {
"target": "nsis", "target": "nsis",
"arch": ["x64", "ia32"] "arch": [
"x64",
"ia32"
]
} }
], ],
"legalTrademarks": "overFlow", "legalTrademarks": "overFlow",
"publisherName": "LOAFLE", "publisherName": "LOAFLE",
"icon": "config/build/windows/icon/icon.ico" "icon": "config/build/windows/icon/overflow_256.ico"
}, },
"nsis": { "nsis": {
"oneClick": false, "oneClick": false,
"perMachine": true, "perMachine": true,
"allowToChangeInstallationDirectory": true, "allowToChangeInstallationDirectory": false,
"installerIcon": "config/build/windows/icon/icon.ico", "installerIcon": "config/build/windows/icon/overflow_256.ico",
"uninstallerIcon": "config/build/windows/icon/icon.ico", "installerHeader": "installerHeader.bmp",
"uninstallerIcon": "config/build/windows/icon/overflow_256.ico",
"include": "config/build/windows/nsis/installer.nsh", "include": "config/build/windows/nsis/installer.nsh",
"artifactName": "${productName} Setup ${version}.${ext}",
"menuCategory": "overFlow" "menuCategory": "overFlow"
} }
} }

View File

@ -1,5 +1,5 @@
{ {
"name": "overflow-network-scanner-app", "name": "@overflow/network-scanner",
"version": "0.0.1", "version": "0.0.1",
"private": true, "private": true,
"author": { "author": {
@ -8,7 +8,7 @@
"url": "https://www.loafle.com" "url": "https://www.loafle.com"
}, },
"homepage": "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": { "scripts": {
"postinstall": "npm-run-all -s electron:builder:install-app-deps", "postinstall": "npm-run-all -s electron:builder:install-app-deps",
"ng": "ng", "ng": "ng",

View File

@ -79,8 +79,8 @@ export class AppWindow {
) )
: path.join( : path.join(
__dirname, __dirname,
'..', 'assets',
'..', 'image',
'icon', 'icon',
'512x512.png' '512x512.png'
) )

View File

@ -190,7 +190,7 @@ app.on('ready', () => {
const dbPath = __DEV__ const dbPath = __DEV__
? path.join(__dirname, '..', '..', 'config', '_database.sqlite') ? 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) => { db = new sqlite3.Database(dbPath, sqlite3.OPEN_READONLY, (err: Error) => {
if (err) { if (err) {
@ -200,7 +200,7 @@ app.on('ready', () => {
}); });
if (!__DEV__) { 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 }); probeProcess = ChildProcess.spawn(probePath, [], { stdio: ['ignore', 'ignore', 'ignore'], detached: true });
} }