diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0604722db..5e5956d03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,7 @@ jobs: name: ${{ env.BUILD_NAME }}_ZIP path: ./out/make/zip/linux/x64/*.zip build-mac: - runs-on: macos-latest + runs-on: macos-13 steps: - uses: actions/checkout@v4 - name: Setup environment diff --git a/js/sitl.js b/js/sitl.js index f80e0e9e5..f9661aad0 100644 --- a/js/sitl.js +++ b/js/sitl.js @@ -65,7 +65,14 @@ var Ser2TCP = { if (err) console.log(err); }); + } else if (GUI.operating_system == 'MacOS') { + path = './../resources/sitl/macos/Ser2TCP' + chmod(path, 0o755, (err) => { + if (err) + console.log(err); + }); } else { + alert(GUI.operating_system); return; } @@ -217,7 +224,16 @@ var SITLProcess = { if (err) console.log(err); }); + } else if (GUI.operating_system == 'MacOS') { + sitlExePath = path.join(__dirname, './../resources/sitl/macos/inav_SITL'); + eepromPath = `${app.getPath('userData')}/${eepromFileName}` + chmod(sitlExePath, 0o755, err => { + if (err) + console.log(err); + }); + } else { + alert(GUI.operating_system); return; } diff --git a/resources/sitl/macos/inav_SITL b/resources/sitl/macos/inav_SITL new file mode 100755 index 000000000..10cd2035b Binary files /dev/null and b/resources/sitl/macos/inav_SITL differ diff --git a/tabs/sitl.js b/tabs/sitl.js index 81ef58b74..5735a3eb2 100644 --- a/tabs/sitl.js +++ b/tabs/sitl.js @@ -78,17 +78,6 @@ TABS.sitl.initialize = (callback) => { GUI.load(path.join(__dirname, "sitl.html"), function () { i18n.localize(); - var os = GUI.operating_system; - if (os != 'Windows' && os != 'Linux') { - - $('.content_wrapper').find('*').remove(); - $('.content_wrapper').append(`

${i18n.getMessage('sitlOSNotSupported')}

`); - - GUI.content_ready(callback); - return; - } - - var currentSim, currentProfile, profiles; var mapping = new Array(28).fill(0); var serialProtocolls = Ser2TCP.getProtocolls(); @@ -524,4 +513,4 @@ TABS.sitl.cleanup = (callback) => { Ser2TCP.stopPollSerialPorts(); if (callback) callback(); -}; \ No newline at end of file +};