Skip to content

Commit

Permalink
Merge pull request #7 from lolamtisch/pkg
Browse files Browse the repository at this point in the history
Pkg
  • Loading branch information
henrik9999 committed Aug 9, 2019
2 parents fe4d064 + 4b49744 commit dc3d2e3
Show file tree
Hide file tree
Showing 9 changed files with 376 additions and 34 deletions.
3 changes: 3 additions & 0 deletions Extension/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ async function websocketReady(){
websocketOk = true;
setPresenceIcon();
};
websocket.onmessage = function (evt) {
console.log("Connected", JSON.parse(evt.data));
};
})
}

Expand Down
11 changes: 9 additions & 2 deletions Extension/popup/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@
}
body{
width: 250px;
margin: 0;
padding: 0;
color: white;
font-size: 14px;
}
#main{
margin: 10px;
}
</style>

</head>
<body id="main">
<div><b>Loading</b></div>
<body>
<div id="main">
<div><b>Loading</b></div>
</div>
<script type="text/javascript" src="popup.js"></script>
</body>
</html>
23 changes: 23 additions & 0 deletions Server/pkg/pack.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const archiver = require('archiver');
const fs = require('fs');
const path = require('path');

const dist = path.join(__dirname, '../../dist');

var archive = archiver('zip', {
zlib: { level: 9 }
});

archive.pipe(fs.createWriteStream(path.join(dist, '/windows_64bit.zip')));
archive.file(path.join(dist, 'server_win_64bit.exe'), { name: 'server_win.exe' });
archive.file(path.join(__dirname, 'startup_windows.bat'), { name: 'startup_windows.bat' });
archive.finalize();

archive = archiver('zip', {
zlib: { level: 9 }
});

archive.pipe(fs.createWriteStream(path.join(dist, '/windows_32bit.zip')));
archive.file(path.join(dist, 'server_win_32bit.exe'), { name: 'server_win.exe' });
archive.file(path.join(__dirname, 'startup_windows.bat'), { name: 'startup_windows.bat' });
archive.finalize();
39 changes: 39 additions & 0 deletions Server/pkg/startup_windows.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
:begin
cls
@echo off
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)

Set keyname=MAL Sync Program

echo MAL-Sync
echo 1. Add MAL-Sync Program to Startup
echo 2. Remove MAL-Sync Program From Startup
echo x. Exit

set /p choice= Choose A Service:
if not '%choice%'== set %choice%=choice:~0,1%

if '%choice%'=='1' goto :addstartup
if '%choice%'=='2' goto :delstartup
if '%choice%'=='x' goto :exit

:addstartup
cls

if exist %~dp0server_win.exe (
reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Run\ /v "%keyname%" /t REG_SZ /d %~dp0server_win.exe
) else (
echo File not found!
)

timeout /t 2 >nul

goto begin

:delstartup
cls
reg delete HKLM\Software\Microsoft\Windows\CurrentVersion\Run\ /v "%keyname%" /f

timeout /t 2 >nul

goto begin
8 changes: 8 additions & 0 deletions Server/pkg/win.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "server_win_64bit_debug",
"pkg": {
"assets": [
"./../../node_modules/systray/traybin/**/*release.exe"
]
}
}
27 changes: 27 additions & 0 deletions Server/win_tray_server.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dc3d2e3

Please sign in to comment.