Release 2.7.1: fix macOS DMG launch, cores path and naive download.

Use UDZO DMG via hdiutil, store cores under Application Support, and match new naiveproxy mac asset names.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
M4
2026-07-29 16:31:37 +03:00
co-authored by Cursor
parent 2d4a797eb1
commit 53eb845d04
16 changed files with 182 additions and 34 deletions
+16 -2
View File
@@ -207,11 +207,15 @@ func (c *Config) ActiveProfile() (*Profile, error) {
}
// ResolveBinDir returns an absolute bin directory.
// Relative paths are resolved next to the executable (portable install layout).
// Relative paths are resolved next to the executable (portable install layout),
// or under ~/Library/Application Support/Navis on macOS (.app bundles are read-only).
func ResolveBinDir(cfgPath, binDir string) (string, error) {
if filepath.IsAbs(binDir) {
return binDir, nil
}
if dir, ok := platformNavisDir(); ok {
return filepath.Abs(filepath.Join(dir, binDir))
}
if exe, err := os.Executable(); err == nil {
return filepath.Abs(filepath.Join(filepath.Dir(exe), binDir))
}
@@ -283,9 +287,16 @@ func (c *Config) SetActiveProxy(proxy string) error {
return fmt.Errorf("active profile %q not found", c.Active)
}
// LocateConfig finds configs/config.json next to the executable or in cwd.
// LocateConfig finds configs/config.json next to the executable, in cwd,
// or under ~/Library/Application Support/Navis on macOS.
func LocateConfig() (string, error) {
candidates := []string{}
if dir, ok := platformNavisDir(); ok {
candidates = append(candidates,
filepath.Join(dir, "configs", "config.json"),
filepath.Join(dir, "config.json"),
)
}
if exe, err := os.Executable(); err == nil {
dir := filepath.Dir(exe)
candidates = append(candidates,
@@ -301,6 +312,9 @@ func LocateConfig() (string, error) {
return p, nil
}
}
if dir, ok := platformNavisDir(); ok {
return filepath.Join(dir, "configs", "config.json"), nil
}
// Default path next to executable for first-run create.
if exe, err := os.Executable(); err == nil {
return filepath.Join(filepath.Dir(exe), "configs", "config.json"), nil
+16
View File
@@ -0,0 +1,16 @@
//go:build darwin
package config
import (
"os"
"path/filepath"
)
func platformNavisDir() (string, bool) {
base, err := os.UserConfigDir()
if err != nil {
return "", false
}
return filepath.Join(base, "Navis"), true
}
+7
View File
@@ -0,0 +1,7 @@
//go:build !darwin
package config
func platformNavisDir() (string, bool) {
return "", false
}