mirror of
https://github.com/DevL0rd/SkyNX
synced 2024-11-13 23:17:06 +00:00
Added is dev. Greatly reduced package size.
This commit is contained in:
parent
83ba64b75d
commit
3e0a43a738
6 changed files with 26 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
@echo off
|
||||
cls
|
||||
electron-packager . SkyNXStreamer --platform=win32 --arch=ia32
|
||||
electron-packager . SkyNXStreamer --platform=win32 --arch=ia32 --icon=./icon.ico
|
||||
pause
|
BIN
SkyNX-Streamer/icon.ico
Normal file
BIN
SkyNX-Streamer/icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
|
@ -4,6 +4,7 @@ const elevate = require("windows-elevate");
|
|||
const windowStateKeeper = require('electron-window-state');
|
||||
const fs = require('fs');
|
||||
const DB = require('./Devlord_modules/DB.js');
|
||||
const isDev = require('electron-is-dev');
|
||||
var AU = require('ansi_up');
|
||||
var ansi_up = new AU.default;
|
||||
// Modules to control application life and create native browser window
|
||||
|
@ -81,11 +82,16 @@ app.on('browser-window-created', function (e, window) {
|
|||
});
|
||||
var streamerProcess;
|
||||
var clientSender;
|
||||
|
||||
function startStreamer(arg) {
|
||||
var cwd = './NxStreamingService/';
|
||||
if (!isDev) {
|
||||
cwd = "./resources/app/NxStreamingService"
|
||||
}
|
||||
streamerProcess = spawn(
|
||||
"./NxStreamingService.exe",
|
||||
["/ip", arg.ip, "/q", arg.q],
|
||||
{ cwd: './NxStreamingService/', stdio: "pipe" }
|
||||
{ cwd: cwd, stdio: "pipe" }
|
||||
);
|
||||
streamerProcess.stdout.on("data", data => {
|
||||
log(`${data}`);
|
||||
|
@ -114,6 +120,9 @@ ipcMain.on('kill', (event, arg) => {
|
|||
ipcMain.on('installScpVBus', (event, arg) => {
|
||||
log("Installing ScpVBus driver..")
|
||||
var df = __dirname + "\\NxStreamingService\\lib\\"
|
||||
if (!isDev) {
|
||||
df = __dirname + ".\\resources\\app\\NxStreamingService\\lib\\"
|
||||
}
|
||||
elevate.exec(df + "devcon.exe", ["install", df + "ScpVBus.inf", "Root\\ScpVBus"],
|
||||
function (error, stdout, stderr) {
|
||||
log(`${stdout}`);
|
||||
|
@ -128,6 +137,9 @@ ipcMain.on('installScpVBus', (event, arg) => {
|
|||
ipcMain.on('unInstallScpVBus', (event, arg) => {
|
||||
log("Un-Installing ScpVBus driver..")
|
||||
var df = __dirname + "\\NxStreamingService\\lib\\"
|
||||
if (!isDev) {
|
||||
df = __dirname + ".\\resources\\app\\NxStreamingService\\lib\\"
|
||||
}
|
||||
elevate.exec(df + "devcon.exe", ["remove", "Root\\ScpVBus"],
|
||||
function (error, stdout, stderr) {
|
||||
if (error !== null) {
|
||||
|
@ -142,6 +154,9 @@ ipcMain.on('unInstallScpVBus', (event, arg) => {
|
|||
ipcMain.on('installAudioDriver', (event, arg) => {
|
||||
log("Installing audio driver..")
|
||||
var df = __dirname + "\\NxStreamingService\\lib\\"
|
||||
if (!isDev) {
|
||||
df = __dirname + ".\\resources\\app\\NxStreamingService\\lib\\"
|
||||
}
|
||||
elevate.exec("regsvr32", [df + "audio_sniffer.dll"],
|
||||
function (error, stdout, stderr) {
|
||||
if (error !== null) {
|
||||
|
@ -154,6 +169,9 @@ ipcMain.on('installAudioDriver', (event, arg) => {
|
|||
ipcMain.on('unInstallAudioDriver', (event, arg) => {
|
||||
log("Un-Installing audio driver..")
|
||||
var df = __dirname + "\\NxStreamingService\\lib\\"
|
||||
if (!isDev) {
|
||||
df = __dirname + ".\\resources\\app\\NxStreamingService\\lib\\"
|
||||
}
|
||||
elevate.exec("regsvr32", ["/u", df + "audio_sniffer.dll"],
|
||||
function (error, stdout, stderr) {
|
||||
if (error !== null) {
|
||||
|
|
5
SkyNX-Streamer/package-lock.json
generated
5
SkyNX-Streamer/package-lock.json
generated
|
@ -183,6 +183,11 @@
|
|||
"extract-zip": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"electron-is-dev": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-1.2.0.tgz",
|
||||
"integrity": "sha512-R1oD5gMBPS7PVU8gJwH6CtT0e6VSoD0+SzSnYpNm+dBkcijgA+K7VAMHDfnRq/lkKPZArpzplTW6jfiMYosdzw=="
|
||||
},
|
||||
"electron-window-state": {
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/electron-window-state/-/electron-window-state-5.0.3.tgz",
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
"ansi_up": "^4.0.4",
|
||||
"bootstrap": "latest",
|
||||
"electron": "latest",
|
||||
"electron-is-dev": "^1.2.0",
|
||||
"electron-window-state": "latest",
|
||||
"formidable": "latest",
|
||||
"jquery": "latest",
|
||||
|
|
BIN
icon.png
BIN
icon.png
Binary file not shown.
Before Width: | Height: | Size: 7.4 KiB |
Loading…
Reference in a new issue