disabled rigctl and direct control on win

also fixed app loading for linux
This commit is contained in:
dj2ls 2022-02-16 11:28:40 +01:00
parent 07a42c20be
commit e9d89941ce
2 changed files with 21 additions and 11 deletions

View file

@ -172,21 +172,23 @@ app.whenReady().then(() => {
createWindow();
// start daemon by checking os
// https://stackoverflow.com/a/5775120
console.log("Trying to start daemon binary")
if(os.platform()=='linux' || os.platform()=='darwin'){
daemonProcess = exec('./tnc/daemon', function callback(err, stdout, stderr) {
if (err) {
console.log(os.platform());
console.error(err);
console.error("Can't start daemon binary");
console.error("--> this is only working with the app bundle and a precompiled binaries");
return;
}
console.log(stdout);
if(os.platform()=='linux'){
daemonProcess = exec('./tnc/daemon', [])
daemonProcess.on('error', (err) => {
console.log(err);
});
daemonProcess.on('message', (data) => {
console.log(data);
});
}
if(os.platform()=='win32' || os.platform()=='win64'){

View file

@ -41,6 +41,14 @@ window.addEventListener('DOMContentLoaded', () => {
})
*/
// DISABLE HAMLIB DIRECT AND RIGCTL ON WINDOWS
if(os.platform()=='win32' || os.platform()=='win64'){
document.getElementById("radio-control-switch1").style.disabled = true;
document.getElementById("radio-control-switch2").style.disabled = true;
}
// ENABLE TOOLTIPS EVERYWHERE
// https://getbootstrap.com/docs/5.1/components/tooltips/
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))