5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 03:01:45 +08:00

[windows-x] Simplify build assets

This commit is contained in:
Lea Anthony 2021-08-14 19:35:00 +10:00
parent c2ac4961ef
commit 1d6cce7c52
16 changed files with 10 additions and 7 deletions

View File

Before

Width:  |  Height:  |  Size: 780 B

After

Width:  |  Height:  |  Size: 780 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 764 B

After

Width:  |  Height:  |  Size: 764 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 941 B

After

Width:  |  Height:  |  Size: 941 B

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 930 B

After

Width:  |  Height:  |  Size: 930 B

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 830 B

After

Width:  |  Height:  |  Size: 830 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 720 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -2,7 +2,6 @@ package build
import (
"fmt"
"github.com/leaanthony/slicer"
"log"
"os"
"path/filepath"
@ -114,12 +113,9 @@ func Build(options *Options) (string, error) {
}
// Build the base assets
userTags := slicer.String(options.UserTags)
if !userTags.Contains("experimental") {
err = builder.BuildAssets(options)
if err != nil {
return "", err
}
err = builder.BuildAssets(options)
if err != nil {
return "", err
}
// If we are building for windows, we will need to generate the asset bundle before

View File

@ -2,6 +2,7 @@ package build
import (
"fmt"
"github.com/leaanthony/slicer"
"github.com/wailsapp/wails/v2/pkg/buildassets"
"io/ioutil"
"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
assets, err := d.BaseBuilder.ExtractAssets()
if err != nil {