diff --git a/mkdocs-website/shared/alpha2.csv b/mkdocs-website/shared/alpha2.csv
index 263725a9a..2dd5262c0 100644
--- a/mkdocs-website/shared/alpha2.csv
+++ b/mkdocs-website/shared/alpha2.csv
@@ -1,5 +1,5 @@
" ",Mac,Windows,Linux
-`wails init`,:material-check-bold:," ",:material-check-bold:
-`wails build`,:material-check-bold:," ",:material-check-bold:
+`wails init`,:material-check-bold:,:material-check-bold:,:material-check-bold:
+`wails build`,:material-check-bold:,:material-check-bold:,:material-check-bold:
`wails dev`," "," "," "
-`wails package`," "," "," "
+`wails package`," ",:material-check-bold:," "
diff --git a/v3/internal/commands/build-assets.go b/v3/internal/commands/build-assets.go
index 8954f152e..40dc4eec5 100644
--- a/v3/internal/commands/build-assets.go
+++ b/v3/internal/commands/build-assets.go
@@ -22,7 +22,7 @@ type BuildAssetsOptions struct {
ProductDescription string `description:"The description of the product" default:"My Product Description"`
ProductVersion string `description:"The version of the product" default:"0.1.0"`
ProductCompany string `description:"The company of the product" default:"My Company"`
- ProductCopyright string `description:"The copyright notice"`
+ ProductCopyright string `description:"The copyright notice" default:"(c) 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"`
diff --git a/v3/internal/commands/build_assets/Info.plist.tmpl b/v3/internal/commands/build_assets/Info.plist.tmpl
index 61a60d9dd..243d47bdc 100644
--- a/v3/internal/commands/build_assets/Info.plist.tmpl
+++ b/v3/internal/commands/build_assets/Info.plist.tmpl
@@ -4,7 +4,7 @@
CFBundlePackageType
APPL
CFBundleName
- My Productname
+ {{.ProductName}}
CFBundleExecutable
{{.Name}}
CFBundleIdentifier
diff --git a/v3/internal/commands/build_assets/nsis/project.nsi.tmpl b/v3/internal/commands/build_assets/nsis/project.nsi.tmpl
new file mode 100644
index 000000000..4d18a34ee
--- /dev/null
+++ b/v3/internal/commands/build_assets/nsis/project.nsi.tmpl
@@ -0,0 +1,108 @@
+Unicode true
+
+####
+## Please note: Template replacements don't work in this file. They are provided with default defines like
+## mentioned underneath.
+## If the keyword is not defined, "wails_tools.nsh" will populate them.
+## If they are defined here, "wails_tools.nsh" will not touch them. This allows you to use this project.nsi manually
+## from outside of Wails for debugging and development of the installer.
+##
+## For development first make a wails nsis build to populate the "wails_tools.nsh":
+## > wails build --target windows/amd64 --nsis
+## Then you can call makensis on this file with specifying the path to your binary:
+## For a AMD64 only installer:
+## > makensis -DARG_WAILS_AMD64_BINARY=..\..\bin\app.exe
+## For a ARM64 only installer:
+## > makensis -DARG_WAILS_ARM64_BINARY=..\..\bin\app.exe
+## For a installer with both architectures:
+## > makensis -DARG_WAILS_AMD64_BINARY=..\..\bin\app-amd64.exe -DARG_WAILS_ARM64_BINARY=..\..\bin\app-arm64.exe
+####
+## The following information is taken from the wails_tools.nsh file, but they can be overwritten here.
+####
+## !define INFO_PROJECTNAME "my-project" # Default "{{.Name}}"
+## !define INFO_COMPANYNAME "My Company" # Default "{{.ProductCompany}}"
+## !define INFO_PRODUCTNAME "My Product Name" # Default "{{.ProductName}}"
+## !define INFO_PRODUCTVERSION "1.0.0" # Default "{{.ProductVersion}}"
+## !define INFO_COPYRIGHT "(c) Now, My Company" # Default "{{.ProductCopyright}}"
+###
+## !define PRODUCT_EXECUTABLE "Application.exe" # Default "${INFO_PROJECTNAME}.exe"
+## !define UNINST_KEY_NAME "UninstKeyInRegistry" # Default "${INFO_COMPANYNAME}${INFO_PRODUCTNAME}"
+####
+## !define REQUEST_EXECUTION_LEVEL "admin" # Default "admin" see also https://nsis.sourceforge.io/Docs/Chapter4.html
+####
+## Include the wails tools
+####
+!include "wails_tools.nsh"
+
+# The version information for this two must consist of 4 parts
+VIProductVersion "${INFO_PRODUCTVERSION}.0"
+VIFileVersion "${INFO_PRODUCTVERSION}.0"
+
+VIAddVersionKey "CompanyName" "${INFO_COMPANYNAME}"
+VIAddVersionKey "FileDescription" "${INFO_PRODUCTNAME} Installer"
+VIAddVersionKey "ProductVersion" "${INFO_PRODUCTVERSION}"
+VIAddVersionKey "FileVersion" "${INFO_PRODUCTVERSION}"
+VIAddVersionKey "LegalCopyright" "${INFO_COPYRIGHT}"
+VIAddVersionKey "ProductName" "${INFO_PRODUCTNAME}"
+
+# Enable HiDPI support. https://nsis.sourceforge.io/Reference/ManifestDPIAware
+ManifestDPIAware true
+
+!include "MUI.nsh"
+
+!define MUI_ICON "..\icon.ico"
+!define MUI_UNICON "..\icon.ico"
+# !define MUI_WELCOMEFINISHPAGE_BITMAP "resources\leftimage.bmp" #Include this to add a bitmap on the left side of the Welcome Page. Must be a size of 164x314
+!define MUI_FINISHPAGE_NOAUTOCLOSE # Wait on the INSTFILES page so the user can take a look into the details of the installation steps
+!define MUI_ABORTWARNING # This will warn the user if they exit from the installer.
+
+!insertmacro MUI_PAGE_WELCOME # Welcome to the installer page.
+# !insertmacro MUI_PAGE_LICENSE "resources\eula.txt" # Adds a EULA page to the installer
+!insertmacro MUI_PAGE_DIRECTORY # In which folder install page.
+!insertmacro MUI_PAGE_INSTFILES # Installing page.
+!insertmacro MUI_PAGE_FINISH # Finished installation page.
+
+!insertmacro MUI_UNPAGE_INSTFILES # Uninstalling page
+
+!insertmacro MUI_LANGUAGE "English" # Set the Language of the installer
+
+## The following two statements can be used to sign the installer and the uninstaller. The path to the binaries are provided in %1
+#!uninstfinalize 'signtool --file "%1"'
+#!finalize 'signtool --file "%1"'
+
+Name "${INFO_PRODUCTNAME}"
+OutFile "..\..\bin\${INFO_PROJECTNAME}-${ARCH}-installer.exe" # Name of the installer's file.
+InstallDir "$PROGRAMFILES64\${INFO_COMPANYNAME}\${INFO_PRODUCTNAME}" # Default installing folder ($PROGRAMFILES is Program Files folder).
+ShowInstDetails show # This will always show the installation details.
+
+Function .onInit
+ !insertmacro wails.checkArchitecture
+FunctionEnd
+
+Section
+ !insertmacro wails.setShellContext
+
+ !insertmacro wails.webview2runtime
+
+ SetOutPath $INSTDIR
+
+ !insertmacro wails.files
+
+ CreateShortcut "$SMPROGRAMS\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}"
+ CreateShortCut "$DESKTOP\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}"
+
+ !insertmacro wails.writeUninstaller
+SectionEnd
+
+Section "uninstall"
+ !insertmacro wails.setShellContext
+
+ RMDir /r "$AppData\${PRODUCT_EXECUTABLE}" # Remove the WebView2 DataPath
+
+ RMDir /r $INSTDIR
+
+ Delete "$SMPROGRAMS\${INFO_PRODUCTNAME}.lnk"
+ Delete "$DESKTOP\${INFO_PRODUCTNAME}.lnk"
+
+ !insertmacro wails.deleteUninstaller
+SectionEnd
diff --git a/v3/internal/commands/build_assets/nsis/wails_tools.nsh.tmpl b/v3/internal/commands/build_assets/nsis/wails_tools.nsh.tmpl
new file mode 100644
index 000000000..127d0eec3
--- /dev/null
+++ b/v3/internal/commands/build_assets/nsis/wails_tools.nsh.tmpl
@@ -0,0 +1,179 @@
+# DO NOT EDIT - Generated automatically by `wails build`
+
+!include "x64.nsh"
+!include "WinVer.nsh"
+!include "FileFunc.nsh"
+
+!ifndef INFO_PROJECTNAME
+ !define INFO_PROJECTNAME "{{.Name}}"
+!endif
+!ifndef INFO_COMPANYNAME
+ !define INFO_COMPANYNAME "{{.ProductCompany}}"
+!endif
+!ifndef INFO_PRODUCTNAME
+ !define INFO_PRODUCTNAME "{{.ProductName}}"
+!endif
+!ifndef INFO_PRODUCTVERSION
+ !define INFO_PRODUCTVERSION "{{.ProductVersion}}"
+!endif
+!ifndef INFO_COPYRIGHT
+ !define INFO_COPYRIGHT "{{.ProductCopyright}}"
+!endif
+!ifndef PRODUCT_EXECUTABLE
+ !define PRODUCT_EXECUTABLE "${INFO_PROJECTNAME}.exe"
+!endif
+!ifndef UNINST_KEY_NAME
+ !define UNINST_KEY_NAME "${INFO_COMPANYNAME}${INFO_PRODUCTNAME}"
+!endif
+!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINST_KEY_NAME}"
+
+!ifndef REQUEST_EXECUTION_LEVEL
+ !define REQUEST_EXECUTION_LEVEL "admin"
+!endif
+
+RequestExecutionLevel "${REQUEST_EXECUTION_LEVEL}"
+
+!ifdef ARG_WAILS_AMD64_BINARY
+ !define SUPPORTS_AMD64
+!endif
+
+!ifdef ARG_WAILS_ARM64_BINARY
+ !define SUPPORTS_ARM64
+!endif
+
+!ifdef SUPPORTS_AMD64
+ !ifdef SUPPORTS_ARM64
+ !define ARCH "amd64_arm64"
+ !else
+ !define ARCH "amd64"
+ !endif
+!else
+ !ifdef SUPPORTS_ARM64
+ !define ARCH "arm64"
+ !else
+ !error "Wails: Undefined ARCH, please provide at least one of ARG_WAILS_AMD64_BINARY or ARG_WAILS_ARM64_BINARY"
+ !endif
+!endif
+
+!macro wails.checkArchitecture
+ !ifndef WAILS_WIN10_REQUIRED
+ !define WAILS_WIN10_REQUIRED "This product is only supported on Windows 10 (Server 2016) and later."
+ !endif
+
+ !ifndef WAILS_ARCHITECTURE_NOT_SUPPORTED
+ !define WAILS_ARCHITECTURE_NOT_SUPPORTED "This product can't be installed on the current Windows architecture. Supports: ${ARCH}"
+ !endif
+
+ ${If} ${AtLeastWin10}
+ !ifdef SUPPORTS_AMD64
+ ${if} ${IsNativeAMD64}
+ Goto ok
+ ${EndIf}
+ !endif
+
+ !ifdef SUPPORTS_ARM64
+ ${if} ${IsNativeARM64}
+ Goto ok
+ ${EndIf}
+ !endif
+
+ IfSilent silentArch notSilentArch
+ silentArch:
+ SetErrorLevel 65
+ Abort
+ notSilentArch:
+ MessageBox MB_OK "${WAILS_ARCHITECTURE_NOT_SUPPORTED}"
+ Quit
+ ${else}
+ IfSilent silentWin notSilentWin
+ silentWin:
+ SetErrorLevel 64
+ Abort
+ notSilentWin:
+ MessageBox MB_OK "${WAILS_WIN10_REQUIRED}"
+ Quit
+ ${EndIf}
+
+ ok:
+!macroend
+
+!macro wails.files
+ !ifdef SUPPORTS_AMD64
+ ${if} ${IsNativeAMD64}
+ File "/oname=${PRODUCT_EXECUTABLE}" "${ARG_WAILS_AMD64_BINARY}"
+ ${EndIf}
+ !endif
+
+ !ifdef SUPPORTS_ARM64
+ ${if} ${IsNativeARM64}
+ File "/oname=${PRODUCT_EXECUTABLE}" "${ARG_WAILS_ARM64_BINARY}"
+ ${EndIf}
+ !endif
+!macroend
+
+!macro wails.writeUninstaller
+ WriteUninstaller "$INSTDIR\uninstall.exe"
+
+ SetRegView 64
+ WriteRegStr HKLM "${UNINST_KEY}" "Publisher" "${INFO_COMPANYNAME}"
+ WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "${INFO_PRODUCTNAME}"
+ WriteRegStr HKLM "${UNINST_KEY}" "DisplayVersion" "${INFO_PRODUCTVERSION}"
+ WriteRegStr HKLM "${UNINST_KEY}" "DisplayIcon" "$INSTDIR\${PRODUCT_EXECUTABLE}"
+ WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
+ WriteRegStr HKLM "${UNINST_KEY}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
+
+ ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
+ IntFmt $0 "0x%08X" $0
+ WriteRegDWORD HKLM "${UNINST_KEY}" "EstimatedSize" "$0"
+!macroend
+
+!macro wails.deleteUninstaller
+ Delete "$INSTDIR\uninstall.exe"
+
+ SetRegView 64
+ DeleteRegKey HKLM "${UNINST_KEY}"
+!macroend
+
+!macro wails.setShellContext
+ ${If} ${REQUEST_EXECUTION_LEVEL} == "admin"
+ SetShellVarContext all
+ ${else}
+ SetShellVarContext current
+ ${EndIf}
+!macroend
+
+# Install webview2 by launching the bootstrapper
+# See https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#online-only-deployment
+!macro wails.webview2runtime
+ !ifndef WAILS_INSTALL_WEBVIEW_DETAILPRINT
+ !define WAILS_INSTALL_WEBVIEW_DETAILPRINT "Installing: WebView2 Runtime"
+ !endif
+
+ SetRegView 64
+ # If the admin key exists and is not empty then webview2 is already installed
+ ReadRegStr $0 HKLM "SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
+ ${If} $0 != ""
+ Goto ok
+ ${EndIf}
+
+ ${If} ${REQUEST_EXECUTION_LEVEL} == "user"
+ # If the installer is run in user level, check the user specific key exists and is not empty then webview2 is already installed
+ ReadRegStr $0 HKCU "Software\Microsoft\EdgeUpdate\Clients{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
+ ${If} $0 != ""
+ Goto ok
+ ${EndIf}
+ ${EndIf}
+
+ SetDetailsPrint both
+ DetailPrint "${WAILS_INSTALL_WEBVIEW_DETAILPRINT}"
+ SetDetailsPrint listonly
+
+ InitPluginsDir
+ CreateDirectory "$pluginsdir\webview2bootstrapper"
+ SetOutPath "$pluginsdir\webview2bootstrapper"
+ File "MicrosoftEdgeWebview2Setup.exe"
+ ExecWait '"$pluginsdir\webview2bootstrapper\MicrosoftEdgeWebview2Setup.exe" /silent /install'
+
+ SetDetailsPrint both
+ ok:
+!macroend
\ No newline at end of file
diff --git a/v3/internal/commands/init.go b/v3/internal/commands/init.go
index 1d5ba7a20..cfab7e3e3 100644
--- a/v3/internal/commands/init.go
+++ b/v3/internal/commands/init.go
@@ -12,6 +12,7 @@ import (
)
func Init(options *flags.Init) error {
+
if options.List {
return printTemplates()
}
@@ -37,9 +38,16 @@ func Init(options *flags.Init) error {
// Generate build assets
buildAssetsOptions := &BuildAssetsOptions{
- Name: options.ProjectName,
- Dir: filepath.Join(options.ProjectDir, "build"),
- Silent: true,
+ Name: options.ProjectName,
+ Dir: filepath.Join(options.ProjectDir, "build"),
+ Silent: true,
+ ProductComments: options.ProductComments,
+ ProductCompany: options.ProductCompany,
+ ProductDescription: options.ProductDescription,
+ ProductName: options.ProductName,
+ ProductVersion: options.ProductVersion,
+ ProductIdentifier: options.ProductIdentifier,
+ ProductCopyright: options.ProductCopyright,
}
return GenerateBuildAssets(buildAssetsOptions)
}
diff --git a/v3/internal/flags/init.go b/v3/internal/flags/init.go
index 182d98184..978d57ddc 100644
--- a/v3/internal/flags/init.go
+++ b/v3/internal/flags/init.go
@@ -3,10 +3,17 @@ package flags
type Init struct {
Common
- PackageName string `name:"p" description:"Package name" default:"main"`
- TemplateName string `name:"t" description:"Name of built-in template to use, path to template or template url" default:"vanilla"`
- ProjectName string `name:"n" description:"Name of project" default:""`
- ProjectDir string `name:"d" description:"Project directory" default:"."`
- Quiet bool `name:"q" description:"Suppress output to console"`
- List bool `name:"l" description:"List templates"`
+ PackageName string `name:"p" description:"Package name" default:"main"`
+ TemplateName string `name:"t" description:"Name of built-in template to use, path to template or template url" default:"vanilla"`
+ ProjectName string `name:"n" description:"Name of project" default:""`
+ ProjectDir string `name:"d" description:"Project directory" default:"."`
+ Quiet bool `name:"q" description:"Suppress output to console"`
+ List bool `name:"l" description:"List templates"`
+ ProductName string `description:"The name of the product" default:"My Product"`
+ ProductDescription string `description:"The description of the product" default:"My Product Description"`
+ ProductVersion string `description:"The version of the product" default:"0.1.0"`
+ ProductCompany string `description:"The company of the product" default:"My Company"`
+ ProductCopyright string `description:"The copyright notice" default:"(c) 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"`
}
diff --git a/v3/internal/templates/_common/Taskfile.tmpl.yml b/v3/internal/templates/_common/Taskfile.tmpl.yml
index 1c515456d..8897260dd 100644
--- a/v3/internal/templates/_common/Taskfile.tmpl.yml
+++ b/v3/internal/templates/_common/Taskfile.tmpl.yml
@@ -5,7 +5,7 @@ vars:
tasks:
-## -------------------------- Build -------------------------- ##
+ ## -------------------------- Build -------------------------- ##
build:
summary: Builds the application
@@ -15,7 +15,7 @@ tasks:
- task: build:windows
-## --- Windows ---
+ ## --- Windows ---
build:windows:
summary: Builds the application for Windows
@@ -25,7 +25,7 @@ tasks:
- task: build:frontend
- go build -gcflags=all="-N -l" -o bin/{{.ProjectName}}.exe
-## --- Darwin ---
+ ## --- Darwin ---
build:darwin:
summary: Builds the application
@@ -50,7 +50,7 @@ tasks:
- task: build:frontend
- go build -gcflags=all="-N -l" -o bin/{{.ProjectName}}
-## -------------------------- Package -------------------------- ##
+ ## -------------------------- Package -------------------------- ##
package:
summary: Packages a production build of the application into a bundle
@@ -67,45 +67,78 @@ tasks:
## --- Windows AMD64 ---
- package:windows:amd64:
+ build:app:prod:windows:amd64:
summary: Packages a production build of the application into a `.exe` bundle
- platform: windows/amd64
+ platforms: [ windows/amd64 ]
deps:
+ - build:frontend
- generate:icons
+ - generate:syso:amd64
+# --- Uncomment this to speed up builds, but you need to make sure `sources` includes all the files you need to build your binary
+# sources:
+# - "*"
+# generates:
+# - "bin/{{ "{{.APP_NAME}}" }}.exe"
cmds:
- task: generate:syso:amd64
- GOOS=windows GOARCH=amd64 go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
- - powershell Remove-item wails.syso
## --- Windows ARM64 ---
- package:windows:arm64:
+ build:app:prod:windows:arm64:
summary: Packages a production build of the application into a `.exe` bundle
- platform: windows/arm64
+ platforms: [ windows/arm64 ]
deps:
+ - build:frontend
- generate:icons
+ - generate:syso:arm64
+ # --- Uncomment this to speed up builds, but you need to make sure `sources` includes all the files you need to build your binary
+ # sources:
+ # - "*"
+ # generates:
+ # - "bin/{{ "{{.APP_NAME}}" }}.exe"
cmds:
- task: generate:syso:arm64
- GOOS=windows GOARCH=arm64 go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
- - powershell Remove-item wails.syso
## --- Windows Default ---
- package:windows:
+ build:app:prod:windows:
summary: Packages a production build of the application into a `.exe` bundle
- platform: windows
+ platforms: [ windows ]
deps:
- generate:icons
+ - generate:syso
+# --- Uncomment this to speed up builds, but you need to make sure `sources` includes all the files you need to build your binary
+# sources:
+# - "*"
+# generates:
+# - "bin/{{ "{{.APP_NAME}}" }}.exe"
cmds:
- - task: generate:syso
- go build -tags production -ldflags="-w -s -H windowsgui" -o bin/{{ "{{.APP_NAME}}" }}.exe
- - powershell Remove-item wails.syso
+
+## ------ Package Windows ------
+
+ package:windows:arm64:
+ summary: Packages a production build of the application into a `.exe` bundle
+ cmds:
+ - task: create:nsis:installer:arm64
+
+ package:windows:amd64:
+ summary: Packages a production build of the application into a `.exe` bundle
+ cmds:
+ - task: create:nsis:installer:amd64
+
+ package:windows:
+ summary: Packages a production build of the application into a `.exe` bundle
+ cmds:
+ - task: create:nsis:installer:{{ "{{ARCH}}" }}
## --- Darwin ARM64 ---
package:darwin:arm64:
summary: Packages a production build of the application into a `.app` bundle
- platform: darwin/arm64
+ platforms: [ darwin/arm64 ]
deps:
- task: build:app:prod:darwin
vars:
@@ -118,7 +151,7 @@ tasks:
package:darwin:amd64:
summary: Packages a production build of the application into a `.app` bundle
- platform: darwin/amd64
+ platforms: [ darwin/amd64 ]
deps:
- task: build:app:prod:darwin
vars:
@@ -131,6 +164,7 @@ tasks:
package:darwin:
summary: Packages a production build of the application into a `.app` bundle
+ platforms: [ darwin ]
deps:
- task: build:app:prod:darwin
- generate:icons
@@ -138,7 +172,7 @@ tasks:
- task: create:app:bundle
-## -------------------------- Misc -------------------------- ##
+ ## -------------------------- Misc -------------------------- ##
create:app:bundle:
summary: Creates an `.app` bundle
@@ -183,6 +217,12 @@ tasks:
generate:icons:
summary: Generates Windows `.ico` and Mac `.icns` files from an image
dir: build
+ sources:
+ - "appicon.png"
+ generates:
+ - "icons.icns"
+ - "icons.ico"
+ method: timestamp
cmds:
# Generates both .ico and .icns files
- wails3 generate icons -input appicon.png
@@ -190,21 +230,39 @@ tasks:
generate:syso:arm64:
summary: Generates Windows `.syso` file
dir: build
- platform: windows/arm64
+ sources:
+ - "icon.ico"
+ - "wails.exe.manifest"
+ - "info.json"
+ generates:
+ - "wails.syso"
+ method: timestamp
cmds:
- wails3 generate syso -arch arm64 -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
generate:syso:amd64:
summary: Generates Windows `.syso` file
dir: build
- platform: windows/amd64
+ sources:
+ - "icon.ico"
+ - "wails.exe.manifest"
+ - "info.json"
+ generates:
+ - "wails.syso"
+ method: timestamp
cmds:
- wails3 generate syso -arch amd64 -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
generate:syso:
summary: Generates Windows `.syso` file
dir: build
- platform: windows
+ sources:
+ - "icon.ico"
+ - "wails.exe.manifest"
+ - "info.json"
+ generates:
+ - "wails.syso"
+ method: timestamp
cmds:
- wails3 generate syso -icon icon.ico -manifest wails.exe.manifest -info info.json -out ../wails.syso
@@ -226,9 +284,35 @@ tasks:
build:frontend:
summary: Build the frontend project
dir: frontend
+ sources:
+ - "*"
+ generates:
+ - dist/*
deps:
- install:frontend:deps
cmds:
- npm run build
+ create:nsis:installer:amd64:
+ summary: Creates an NSIS installer
+ dir: build/nsis
+ sources:
+ - "{{ "{{.ROOT_DIR}}"}}\\bin\\{{ "{{.APP_NAME}}"}}.exe"
+ generates:
+ - "{{ "{{.ROOT_DIR}}"}}\\bin\\{{ "{{.APP_NAME}}"}}-amd64-installer.exe"
+ deps:
+ - task: build:app:prod:windows:amd64
+ cmds:
+ - makensis -DARG_WAILS_AMD64_BINARY="{{ "{{.ROOT_DIR}}"}}\bin\{{ "{{.APP_NAME}}"}}.exe" project.nsi
+ create:nsis:installer:arm64:
+ summary: Creates an NSIS installer
+ dir: build/nsis
+ sources:
+ - "{{ "{{.ROOT_DIR}}"}}\\bin\\{{ "{{.APP_NAME}}"}}.exe"
+ generates:
+ - "{{ "{{.ROOT_DIR}}"}}\\bin\\{{ "{{.APP_NAME}}"}}-arm64-installer.exe.exe"
+ deps:
+ - task: build:app:prod:windows:arm64
+ cmds:
+ - makensis -DARG_WAILS_ARM64_BINARY="{{ "{{.ROOT_DIR}}"}}\bin\{{ "{{.APP_NAME}}"}}.exe" project.nsi
diff --git a/v3/internal/templates/_common/build/Info.dev.plist.tmpl b/v3/internal/templates/_common/build/Info.dev.plist.tmpl
deleted file mode 100644
index 7efa134f4..000000000
--- a/v3/internal/templates/_common/build/Info.dev.plist.tmpl
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
- NSAppTransportSecurity
-
- NSAllowsLocalNetworking
-
-
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/_common/build/Info.plist.tmpl b/v3/internal/templates/_common/build/Info.plist.tmpl
deleted file mode 100644
index 6bfa8c316..000000000
--- a/v3/internal/templates/_common/build/Info.plist.tmpl
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- CFBundlePackageType
- APPL
- CFBundleName
- My Product Name
- CFBundleExecutable
- {{.ProjectName}}
- CFBundleIdentifier
- com.wails.{{.ProjectName}}
- CFBundleVersion
- v1.0.0
- CFBundleGetInfoString
- This is a comment
- CFBundleShortVersionString
- v1.0.0
- CFBundleIconFile
- icons
- LSMinimumSystemVersion
- 10.13.0
- NSHighResolutionCapable
- true
- NSHumanReadableCopyright
- (c) 2023 My Company Name
-
-
\ No newline at end of file
diff --git a/v3/internal/templates/_common/build/appicon.png b/v3/internal/templates/_common/build/appicon.png
deleted file mode 100644
index 63617fe4f..000000000
Binary files a/v3/internal/templates/_common/build/appicon.png and /dev/null differ
diff --git a/v3/internal/templates/_common/build/icons.icns b/v3/internal/templates/_common/build/icons.icns
deleted file mode 100644
index 1b5bd4c86..000000000
Binary files a/v3/internal/templates/_common/build/icons.icns and /dev/null differ