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(); createWindow();
// start daemon by checking os // start daemon by checking os
// https://stackoverflow.com/a/5775120
console.log("Trying to start daemon binary") console.log("Trying to start daemon binary")
if(os.platform()=='linux' || os.platform()=='darwin'){
daemonProcess = exec('./tnc/daemon', function callback(err, stdout, stderr) { if(os.platform()=='linux'){
if (err) {
console.log(os.platform()); daemonProcess = exec('./tnc/daemon', [])
console.error(err);
console.error("Can't start daemon binary"); daemonProcess.on('error', (err) => {
console.error("--> this is only working with the app bundle and a precompiled binaries"); console.log(err);
return;
}
console.log(stdout);
}); });
daemonProcess.on('message', (data) => {
console.log(data);
});
} }
if(os.platform()=='win32' || os.platform()=='win64'){ 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 // ENABLE TOOLTIPS EVERYWHERE
// https://getbootstrap.com/docs/5.1/components/tooltips/ // https://getbootstrap.com/docs/5.1/components/tooltips/
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')) var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))