File tree 2 files changed +12
-5
lines changed
2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1
1
2
- # Executable
2
+ # build output
3
3
linux_installer
4
4
go-installer
5
5
installer
6
+ win /
6
7
7
8
# goland project files
8
9
.idea /
Original file line number Diff line number Diff line change @@ -5,7 +5,10 @@ package linux_installer
5
5
// this code is untested!!
6
6
7
7
import (
8
+ "errors"
9
+ "log"
8
10
"os"
11
+ "os/exec"
9
12
"path/filepath"
10
13
"syscall"
11
14
"unsafe"
@@ -44,15 +47,18 @@ func osDiskSpace(path string) (availableBytes int64) {
44
47
return
45
48
}
46
49
47
- func osRunHookIfExists (scriptFile string ) error {
48
- if _ , err := os .Stat (scriptFile + ".bat" ); os .IsNotExist (err ) {
50
+ func osCreateLauncherEntry (variables ... StringMap ) (desktopFilepath string , err error ) { return }
51
+ func osCreateUninstaller (installDir string , variables ... StringMap ) (err error ) { return }
52
+
53
+ func osRunHookIfExists (scriptFile string ) (err error ) {
54
+ if _ , err = os .Stat (scriptFile + ".bat" ); os .IsNotExist (err ) {
49
55
return
50
56
}
51
57
out , err := exec .Command (scriptFile + ".bat" ).Output ()
52
58
log .Println ("hook output:\n " , string (out [:]))
53
59
if err != nil {
54
- if exitErr , ok := (* exec .ExitError )( err ); ok {
55
- return errors .New (err .Stderr )
60
+ if exitErr , ok := err . (* exec.ExitError ); ok {
61
+ return errors .New (string ( exitErr .Stderr ) )
56
62
} else {
57
63
return err
58
64
}
You can’t perform that action at this time.
0 commit comments