Renaming to be ND_PACKAGE_TYPE so we can reuse this for the

.deb/.rpm stats as well
This commit is contained in:
Rob Emery 2025-03-17 10:08:33 +00:00
parent 9aa81eb4e0
commit 93e3590465
3 changed files with 6 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import (
"encoding/json"
"math"
"net/http"
"os"
"path/filepath"
"runtime"
"runtime/debug"
@ -153,6 +154,9 @@ var staticData = sync.OnceValue(func() insights.Data {
data.Build.Settings, data.Build.GoVersion = buildInfo()
data.OS.Containerized = consts.InContainer
// Install info
data.OS.Packaged = os.Getenv("ND_PACKAGE_TYPE")
// OS info
data.OS.Type = runtime.GOOS
data.OS.Arch = runtime.GOARCH

View File

@ -16,6 +16,7 @@ type Data struct {
Containerized bool `json:"containerized"`
Arch string `json:"arch"`
NumCPU int `json:"numCPU"`
Packaged string `json:"packaged,omitempty"`
} `json:"os"`
Mem struct {
Alloc uint64 `json:"alloc"`

View File

@ -61,7 +61,7 @@
Arguments='service execute --configfile "[INSTALLDIR]navidrome.ini" --logfile "[ND_DATAFOLDER]\navidrome.log"'
/>
<ServiceControl Id='StartNavidromeService' Start='install' Stop='both' Remove='uninstall' Name='$(var.ProductName)' Wait='yes' />
<Environment Action='create' Name='ND_MSI_INSTALL' Value='1' />
<Environment Action='create' Name='ND_PACKAGE_TYPE' Value='MSI' />
</Component>
<Component Id='FFMpegExecutable' Guid='d17358f7-abdc-4080-acd3-6427903a7dd8' Win64="$(var.Win64)">