mirror of
https://github.com/meshtastic/firmware.git
synced 2026-10-10 23:56:25 -04:00
Package meshtasticd for Windows as an MSI (#11289)
* Package meshtasticd for Windows as an MSI Adds a --service flag connecting meshtasticd to the Service Control Manager, a WiX MSI installing it as an auto-start LocalSystem service with config in %ProgramData%\Meshtastic, and a CI step attaching the MSI to releases. * Address review comments Bind workflow expressions to env vars in run: bodies, and build the service status per call with an atomic checkpoint. * Fix service stop state and CI lint Latch the stop under a mutex so a startup report cannot walk the state back. Ignore the new workflows in semgrep and checkov, as main_matrix already is. * Drop the checkov ignore for the winget workflow Resolve the newest release inside the job instead of taking workflow_dispatch inputs, so CKV_GHA_7 no longer fires and checkov stays active on the file. * Carry the MSI architecture into the winget manifest Parse it from the asset name instead of defaulting to x64, and fail on a multi-arch release rather than validating one at random. * Restore release/.gitignore * Leave the main matrix alone Release attachment moves to the matrix rework in #11151. The MSI is still built and uploaded as a CI artifact. --------- Co-authored-by: Austin <vidplace7@gmail.com>
This commit is contained in:
1 parent
02ea5baad4
commit
ecd59e3120
10 files changed
+615
No files matched your search
@@ -43,6 +43,7 @@
|
||||
// Defined in WindowsMacAddr.cpp, which keeps <iphlpapi.h> out of this TU: it
|
||||
// pulls in RPC/OLE headers that collide with the Arduino API.
|
||||
bool portduinoWindowsPrimaryMac(uint8_t *dmac);
|
||||
#include "windows/WindowsService.h"
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
@@ -93,6 +94,9 @@ bool checkConfigPort = true;
|
||||
// Long-only option: argp treats any key above the printable ASCII range as having no
|
||||
// single-character equivalent.
|
||||
#define OPT_CONFIG_CHECK 1001
|
||||
#ifdef _WIN32
|
||||
#define OPT_SERVICE 1002
|
||||
#endif
|
||||
|
||||
static error_t parse_opt(int key, char *arg, struct argp_state *state)
|
||||
{
|
||||
@@ -123,6 +127,11 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state)
|
||||
case 'y':
|
||||
yamlOnly = true;
|
||||
break;
|
||||
#ifdef _WIN32
|
||||
case OPT_SERVICE:
|
||||
windowsServiceInit();
|
||||
break;
|
||||
#endif
|
||||
case ARGP_KEY_ARG:
|
||||
return 0;
|
||||
default:
|
||||
@@ -179,6 +188,9 @@ void portduinoCustomInit()
|
||||
{"verbose", 'v', 0, 0, "Set log level to full debug"},
|
||||
{"output-yaml", 'y', 0, 0, "Output config yaml and exit"},
|
||||
{"check", OPT_CONFIG_CHECK, 0, 0, "Check the configuration for problems, print a report, and exit"},
|
||||
#ifdef _WIN32
|
||||
{"service", OPT_SERVICE, 0, 0, "Run as a Windows service"},
|
||||
#endif
|
||||
{0}};
|
||||
static void *childArguments;
|
||||
static char doc[] = "Meshtastic native build.";
|
||||
|
||||
Reference in new issue
Block a user