-
Notifications
You must be signed in to change notification settings - Fork 370
Description
Currently, the SITL binaries are delivered for all architectures and a decision is made at runtime which one will be executed. However, we do not have any logic to filter by architecture, only by OS:
Lines 140 to 156 in 5422e56
| if (GUI.operating_system == 'Windows') { | |
| sitlExePath = path.join(__dirname, './../resources/sitl/windows/inav_SITL.exe'); | |
| eepromPath = `${app.getPath('userData')}\\${eepromFileName}` | |
| } else if (GUI.operating_system == 'Linux') { | |
| sitlExePath = path.join(__dirname, './../resources/sitl/linux/inav_SITL'); | |
| eepromPath = `${app.getPath('userData')}/${eepromFileName}` | |
| chmod(sitlExePath, 0o755, err => { | |
| 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); | |
| }); |
This is not a problem under MacOS, as the Mac binaries are universal for Intel/Arm64, but it is a problem under Linux (x64/ARM) and we do not have Windows 32-bit SITL. Is Windows 32-bit still relevant at all? Should we keep it?
It would make more sense to only deliver the SITL for the corresponding OS and architecture. In addition, the SITLs are fixed in the repo, so the nightlys always have an outdated SITL until someone updates them manually.
Suggestion: Do not include the SITL binaries in the repository.
Option 1: Add the appropriate SITL binary in the CI action. Disadvantage: If someone builds the configurator locally, the SITL still has to be added manually.
Option 2: Integrate the SITL binaries via submodule and add a step in electron forge to include only the appropriate SITL. To do this, the SITL binaries must not only be created as zip assets in the release in the INAV nightly repository, but a commit must always be created and stored directly in the repository.
Option 3: Ship out the Configurator without SITL binaries and add a option to download the binary on demand.