mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 17:39:58 +08:00
274 support spaces in windows paths (#275)
* fix: escape windows commands * fix: allow spaces in path to windres * Update go.mod
This commit is contained in:
parent
f5d3fb0848
commit
2db1624faf
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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
1
cmd/windres.bat
Normal file
@ -0,0 +1 @@
|
|||||||
|
windres.exe -o %1 %2
|
Loading…
Reference in New Issue
Block a user