5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 20:51:38 +08:00

[windows] Rename assetdir json key

This commit is contained in:
Lea Anthony 2021-08-31 19:47:40 +10:00
parent 627aa06786
commit 604dc6ace3

View File

@ -14,7 +14,7 @@ type Project struct {
/*** Application Data ***/
Name string `json:"name"`
AssetDirectory string `json:"asset_directory"`
AssetDirectory string `json:"assetdir"`
BuildCommand string `json:"frontend:build"`
InstallCommand string `json:"frontend:install"`
@ -79,18 +79,12 @@ func Load(projectPath string) (*Project, error) {
// Fix up our project paths
result.filename = projectFile
result.Path = filepath.ToSlash(projectPath) + "/"
// Create default name if not given
if result.Name == "" {
result.Name = "wailsapp"
}
// Set default assets directory if none given
if result.BuildDir == "" {
result.BuildDir = filepath.Join(result.Path, "build")
}
// Fix up OutputFilename
switch runtime.GOOS {
case "windows":