fixed windows bugs
This commit is contained in:
parent
ad826b3b43
commit
b403befe74
3 changed files with 11 additions and 2 deletions
|
@ -67,8 +67,7 @@ func (inst *Installer) StartDownloadDecompress() {
|
||||||
|
|
||||||
// 3) Decompress
|
// 3) Decompress
|
||||||
spm.UpdateProgress(0, "Decompressing...")
|
spm.UpdateProgress(0, "Decompressing...")
|
||||||
packagePath := filepath.Join(inst.DownloadDir, "browser-amd64-nightly-linux.tar.gz")
|
tempDir, err := spm.DecompressPackage(inst.DownloadDir)
|
||||||
tempDir, err := spm.DecompressToTemp(packagePath)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
inst.LastError = err
|
inst.LastError = err
|
||||||
return
|
return
|
||||||
|
|
3
main.go
3
main.go
|
@ -30,6 +30,9 @@ const finalStep = 3
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
monitor := rl.GetCurrentMonitor()
|
monitor := rl.GetCurrentMonitor()
|
||||||
|
if monitor < 0 {
|
||||||
|
monitor = 0 // Fallback to the primary monitor
|
||||||
|
}
|
||||||
screenW := rl.GetMonitorWidth(monitor)
|
screenW := rl.GetMonitorWidth(monitor)
|
||||||
screenH := rl.GetMonitorHeight(monitor)
|
screenH := rl.GetMonitorHeight(monitor)
|
||||||
|
|
||||||
|
|
|
@ -62,3 +62,10 @@ func GetDefaultInstallDir() (string, error) {
|
||||||
|
|
||||||
return installDir, nil
|
return installDir, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DecompressPackage determines the appropriate package format and decompresses it.
|
||||||
|
func DecompressPackage(downloadDir string) (string, error) {
|
||||||
|
osName := runtime.GOOS
|
||||||
|
packagePath := filepath.Join(downloadDir, fmt.Sprintf("browser-amd64-nightly-%s.tar.gz", osName)) // If file naming changes this will break!!
|
||||||
|
return DecompressToTemp(packagePath)
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue