Compare commits

...

3 Commits

Author SHA1 Message Date
Lea Anthony
020fe182b0 Update go.mod 2019-10-25 17:37:12 +11:00
Lea Anthony
365972619a fix: allow spaces in path to windres 2019-10-25 17:35:37 +11:00
Lea Anthony
11f805a97f fix: escape windows commands 2019-10-25 16:44:46 +11:00
4 changed files with 12 additions and 3 deletions

View File

@@ -191,8 +191,15 @@ func (b *PackageHelper) PackageWindows(po *ProjectOptions, cleanUp bool) error {
// Build syso // Build syso
sysofile := filepath.Join(b.fs.Cwd(), basename+"-res.syso") sysofile := filepath.Join(b.fs.Cwd(), basename+"-res.syso")
windresCommand := []string{"windres", "-o", sysofile, tgtRCFile}
err := NewProgramHelper().RunCommandArray(windresCommand) batfile, err := fs.LocalDir(".")
if err != nil {
return err
}
windresBatFile := filepath.Join(batfile.fullPath, "windres.bat")
windresCommand := []string{windresBatFile, sysofile, tgtRCFile}
err = NewProgramHelper().RunCommandArray(windresCommand)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -128,6 +128,7 @@ func (p *ProgramHelper) RunCommandArray(args []string, dir ...string) error {
fmt.Printf("ERROR: Looks like '%s' isn't installed. Please install and try again.", program) fmt.Printf("ERROR: Looks like '%s' isn't installed. Please install and try again.", program)
return err return err
} }
args = args[1:] args = args[1:]
var stderr string var stderr string
var stdout string var stdout string

1
cmd/windres.bat Normal file
View File

@@ -0,0 +1 @@
windres.exe -o %1 %2