add build directions to doc

This commit is contained in:
grngxd 2025-06-16 23:57:10 +01:00
parent 6c84e18ce8
commit f858daff59
3 changed files with 18 additions and 4 deletions

View file

@ -5,7 +5,7 @@ tmp_dir = "tmp"
[build] [build]
args_bin = [] args_bin = []
bin = "tmp\\main.exe" bin = "tmp\\main.exe"
cmd = "go build -o ./tmp/main.exe ./example" cmd = "go build -ldflags='-H windowsgui' -o ./tmp/main.exe ./example"
delay = 1000 delay = 1000
exclude_dir = ["assets", "tmp", "vendor", "testdata", "runtime/out", "node_modules", "dist"] exclude_dir = ["assets", "tmp", "vendor", "testdata", "runtime/out", "node_modules", "dist"]
exclude_file = [] exclude_file = []

View file

@ -49,6 +49,20 @@ func main() {
} }
``` ```
## Building
### Windows
Windows users should use the `-ldflags='-H windowsgui'` flag to avoid showing a console window when running the app.
```
go build -ldflags='-H windowsgui' ./example
```
### *nix
```
go build ./example
```
## Contributing & Development ## Contributing & Development
``` ```
git clone ssh://git@git.iwakura.rip:6969/grng/tiramisu.git git clone ssh://git@git.iwakura.rip:6969/grng/tiramisu.git

View file

@ -25,14 +25,14 @@ type Tiramisu struct {
func New(o TiramisuOptions) *Tiramisu { func New(o TiramisuOptions) *Tiramisu {
w := wv.New(o.Debug) w := wv.New(o.Debug)
w.SetSize(o.Width, o.Height, o.Hints)
w.SetTitle(o.Title)
t := &Tiramisu{ t := &Tiramisu{
w: w, w: w,
funcs: make(map[string]FuncHandler), funcs: make(map[string]FuncHandler),
} }
w.SetSize(o.Width, o.Height, o.Hints)
w.SetTitle(o.Title)
return t return t
} }