[windows-x] Simplify build assets
Before Width: | Height: | Size: 780 B After Width: | Height: | Size: 780 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 764 B After Width: | Height: | Size: 764 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 941 B After Width: | Height: | Size: 941 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 930 B After Width: | Height: | Size: 930 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 830 B After Width: | Height: | Size: 830 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 720 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@ -2,7 +2,6 @@ package build
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/leaanthony/slicer"
|
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -114,12 +113,9 @@ func Build(options *Options) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Build the base assets
|
// Build the base assets
|
||||||
userTags := slicer.String(options.UserTags)
|
err = builder.BuildAssets(options)
|
||||||
if !userTags.Contains("experimental") {
|
if err != nil {
|
||||||
err = builder.BuildAssets(options)
|
return "", err
|
||||||
if err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we are building for windows, we will need to generate the asset bundle before
|
// If we are building for windows, we will need to generate the asset bundle before
|
||||||
|
@ -2,6 +2,7 @@ package build
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/leaanthony/slicer"
|
||||||
"github.com/wailsapp/wails/v2/pkg/buildassets"
|
"github.com/wailsapp/wails/v2/pkg/buildassets"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -34,6 +35,12 @@ func (d *DesktopBuilder) BuildAssets(options *Options) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We only build assets for cgo builds
|
||||||
|
userTags := slicer.String(options.UserTags)
|
||||||
|
if userTags.Contains("experimental") {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// Get a list of assets from the HTML
|
// Get a list of assets from the HTML
|
||||||
assets, err := d.BaseBuilder.ExtractAssets()
|
assets, err := d.BaseBuilder.ExtractAssets()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|