From a68d74ffcd626faa75ddd487c99276306b5a8a27 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sat, 2 Nov 2019 06:43:18 +1100 Subject: [PATCH] fix: allow spaces in gcc path --- cmd/package.go | 11 +++++++++-- cmd/windres.bat | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 cmd/windres.bat diff --git a/cmd/package.go b/cmd/package.go index 558a6794..c9b0ef83 100644 --- a/cmd/package.go +++ b/cmd/package.go @@ -191,8 +191,15 @@ func (b *PackageHelper) PackageWindows(po *ProjectOptions, cleanUp bool) error { // Build 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 { return err } diff --git a/cmd/windres.bat b/cmd/windres.bat new file mode 100644 index 00000000..1ce33a4a --- /dev/null +++ b/cmd/windres.bat @@ -0,0 +1 @@ +windres.exe -o %1 %2 \ No newline at end of file