Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved more complex appimage stuff to seperate package (github.com/CalebQ42/GoAppImage) Moved settings to a seperate file for organization Some work to allow asyncronouse app loading (Since goappimage is super slow) Comments to show what's going to be there in the future.
- Loading branch information
Showing
4 changed files
with
111 additions
and
165 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package main | ||
|
||
import ( | ||
"encoding/gob" | ||
"os" | ||
) | ||
|
||
var ( | ||
wine bool | ||
wineAvail bool | ||
portableHide bool | ||
betaUpdate bool | ||
versionNewest = true | ||
paDirs = true | ||
) | ||
|
||
func savePrefs() { | ||
os.Remove("PortableApps/LinuxPACom/Prefs.gob") | ||
fil, err := os.Create("PortableApps/LinuxPACom/Prefs.gob") | ||
if err != nil { | ||
return | ||
} | ||
enc := gob.NewEncoder(fil) | ||
err = enc.Encode(wine) | ||
if err != nil { | ||
return | ||
} | ||
err = enc.Encode(portableHide) | ||
if err != nil { | ||
return | ||
} | ||
err = enc.Encode(versionNewest) | ||
if err != nil { | ||
return | ||
} | ||
err = enc.Encode(paDirs) | ||
if err != nil { | ||
return | ||
} | ||
err = enc.Encode(betaUpdate) | ||
if err != nil { | ||
return | ||
} | ||
} | ||
|
||
func loadPrefs() { | ||
fil, err := os.Open("PortableApps/LinuxPACom/Prefs.gob") | ||
if err != nil { | ||
return | ||
} | ||
dec := gob.NewDecoder(fil) | ||
err = dec.Decode(&wine) | ||
if err != nil { | ||
return | ||
} | ||
err = dec.Decode(&portableHide) | ||
if err != nil { | ||
return | ||
} | ||
err = dec.Decode(&versionNewest) | ||
if err != nil { | ||
return | ||
} | ||
err = dec.Decode(&paDirs) | ||
if err != nil { | ||
return | ||
} | ||
err = dec.Decode(&betaUpdate) | ||
if err != nil { | ||
return | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters