diff --git a/v3/internal/commands/build-assets.go b/v3/internal/commands/build-assets.go index 1fa9138f5..b9a6283c9 100644 --- a/v3/internal/commands/build-assets.go +++ b/v3/internal/commands/build-assets.go @@ -31,9 +31,15 @@ type BuildAssetsOptions struct { ProductCompany string `description:"The company of the product" default:"My Company"` ProductCopyright string `description:"The copyright notice" default:"\u00a9 now, My Company"` ProductComments string `description:"Comments to add to the generated files" default:"This is a comment"` - ProductIdentifier string `description:"The product identifier, e.g com.mycompany.myproduct"` - Silent bool `description:"Suppress output to console"` - Typescript bool `description:"Use typescript" default:"false"` + ProductIdentifier string `description:"The product identifier, e.g com.mycompany.myproduct"` + Publisher string `description:"Publisher name for MSIX package (e.g., CN=CompanyName)"` + ProcessorArchitecture string `description:"Processor architecture for MSIX package" default:"x64"` + ExecutablePath string `description:"Path to executable for MSIX package"` + ExecutableName string `description:"Name of executable for MSIX package"` + OutputPath string `description:"Output path for MSIX package"` + CertificatePath string `description:"Certificate path for MSIX package"` + Silent bool `description:"Suppress output to console"` + Typescript bool `description:"Use typescript" default:"false"` } type BuildConfig struct { @@ -90,6 +96,28 @@ func GenerateBuildAssets(options *BuildAssetsOptions) error { } } + if options.Publisher == "" { + options.Publisher = fmt.Sprintf("CN=%s", options.ProductCompany) + } + + if options.ProcessorArchitecture == "" { + options.ProcessorArchitecture = "x64" + } + + if options.ExecutableName == "" { + options.ExecutableName = options.BinaryName + } + + if options.ExecutablePath == "" { + options.ExecutablePath = options.BinaryName + } + + if options.OutputPath == "" { + options.OutputPath = fmt.Sprintf("%s.msix", normaliseName(options.Name)) + } + + // CertificatePath is optional, no default needed + config.BuildAssetsOptions = *options tfs, err := fs.Sub(buildAssets, "build_assets") diff --git a/v3/internal/commands/build_assets/windows/msix/app_manifest.xml.tmpl b/v3/internal/commands/build_assets/windows/msix/app_manifest.xml.tmpl index 7697b318f..d68664afb 100644 --- a/v3/internal/commands/build_assets/windows/msix/app_manifest.xml.tmpl +++ b/v3/internal/commands/build_assets/windows/msix/app_manifest.xml.tmpl @@ -6,15 +6,15 @@ xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"> - {{.Info.ProductName}} - {{.Info.CompanyName}} - {{.Info.Description}} + {{.ProductName}} + {{.ProductCompany}} + {{.ProductDescription}} Assets\StoreLogo.png @@ -27,10 +27,10 @@ - + @@ -39,13 +39,13 @@ - + {{if .FileAssociations}} - - {{.Info.ProductName}} + + {{.ProductName}} Assets\FileIcon.png - {{.Info.ProductName}} File + {{.ProductName}} File {{range .FileAssociations}} .{{.Ext}} diff --git a/v3/internal/commands/build_assets/windows/msix/template.xml.tmpl b/v3/internal/commands/build_assets/windows/msix/template.xml.tmpl index 69b57bdf0..92f217499 100644 --- a/v3/internal/commands/build_assets/windows/msix/template.xml.tmpl +++ b/v3/internal/commands/build_assets/windows/msix/template.xml.tmpl @@ -10,15 +10,15 @@ + InstallLocation="C:\Program Files\{{.ProductCompany}}\{{.ProductName}}"> + PackageName="{{.ProductName}}" + PackageDisplayName="{{.ProductName}}" + PublisherName="CN={{.ProductCompany}}" + PublisherDisplayName="{{.ProductCompany}}" + Version="{{.ProductVersion}}.0" + PackageDescription="{{.ProductDescription}}"> {{if .FileAssociations}} @@ -27,15 +27,15 @@ {{if .FileAssociations}} - + {{range .FileAssociations}} .{{.Ext}} @@ -55,9 +55,9 @@ false - {{.Info.ProductName}} - {{.Info.CompanyName}} - {{.Info.Description}} + {{.ProductName}} + {{.ProductCompany}} + {{.ProductDescription}} Assets\AppIcon.png