feat: initial commit
This commit is contained in:
20
pkg/wails3kit/updates/platform/windows/windows.go
Normal file
20
pkg/wails3kit/updates/platform/windows/windows.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package windows
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/Eriyc/rules_wails/pkg/wails3kit/updates"
|
||||
"github.com/Eriyc/rules_wails/pkg/wails3kit/updates/platform"
|
||||
)
|
||||
|
||||
func New() updates.PlatformInstaller {
|
||||
return platform.New(DetectInstallRoot)
|
||||
}
|
||||
|
||||
func DetectInstallRoot(app updates.AppDescriptor) (updates.InstallRoot, error) {
|
||||
if app.ExecutablePath == "" {
|
||||
return updates.InstallRoot{}, errors.New("missing executable path")
|
||||
}
|
||||
return updates.InstallRoot{Path: filepath.Dir(app.ExecutablePath)}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user