### Wails and SvelteKit Setup Commands Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/sveltekit.mdx Commands for initializing the project, installing dependencies, and configuring the SvelteKit adapter. ```bash wails init -n myapp -t svelte ``` ```bash npx sv create frontend ``` ```bash npm i ``` ```bash npm uninstall @sveltejs/adapter-auto ``` ```bash npm i -D @sveltejs/adapter-static ``` ```bash wails dev ``` -------------------------------- ### Wails NSIS Installer Configuration Example Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/windows-installer.mdx Example of the `info.json` file used to configure NSIS installer details. This data is read from the project's `wails.json` Info section. ```json // ... "Info": { "companyName": "My Company Name", "productName": "Wails Vite", "productVersion": "1.0.0", "copyright": "Copyright.........", "comments": "Built using Wails (https://wails.io)" }, ``` -------------------------------- ### Install npm Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-pages/community-guide.mdx Install npm to set up a local documentation development environment. This is a prerequisite for running the documentation site locally. ```bash Install npm ``` -------------------------------- ### Install Wails CLI from source Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/local-development.mdx Commands to clone the repository and install the latest CLI version. ```bash git clone https://github.com/wailsapp/wails cd wails/v2/cmd/wails go install ``` -------------------------------- ### Install Frontend Dependencies Manually Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/manual-builds.mdx Use this command to manually install frontend dependencies, typically done via `npm install` in the frontend directory. ```bash npm install ``` -------------------------------- ### Verify Go and NPM Installation Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx Commands to verify that Go and NPM are correctly installed and accessible in the system PATH. ```shell go version ``` ```shell echo $PATH | grep go/bin ``` ```shell npm --version ``` -------------------------------- ### Install gstreamer1-plugins-good on Fedora Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/linux.mdx Install the essential GStreamer plugins for Fedora systems to address issues with audio/video elements. ```bash dnf install gstreamer1-plugins-good ``` -------------------------------- ### Start documentation development server Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-pages/community-guide.mdx Start the Docusaurus development server to view and edit the documentation locally. Changes will be reflected in the browser in real-time. ```bash npm run start ``` -------------------------------- ### Wails v3 API: Multiple Windows Example Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-blog/2023-01-17-v3-roadmap.mdx This example showcases the proposed Wails v3 API's capability to manage multiple windows programmatically. It initializes two windows, sets their titles, and defines close event handlers. ```go func main() { app := wails.NewApplication(options.App{}) myWindow := app.NewWindow(options.Window{}) myWindow.SetTitle("My Window") myWindow.On(events.Window.Close, func() { app.Quit() }) myWindow2 := app.NewWindow(options.Window{}) myWindow2.SetTitle("My Window 2") myWindow2.On(events.Window.Close, func() { app.Quit() }) app.Run() } ``` -------------------------------- ### Install NSIS with Scoop Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/windows-installer.mdx Use Scoop to install NSIS and add it to your system's PATH. This is a convenient method for Windows users. ```bash scoop bucket add extras scoop install nsis ``` -------------------------------- ### Navigate to website directory Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-pages/community-guide.mdx Change the current directory to the 'website' folder to begin documentation development setup. ```bash cd website ``` -------------------------------- ### Install gstreamer1.0-plugins-good on Debian/Ubuntu Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/linux.mdx Install the required GStreamer plugins for Debian/Ubuntu systems to fix audio/video element problems. ```bash apt-get install gstreamer1.0-plugins-good ``` -------------------------------- ### Install gon for macOS Code Signing Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/signing.mdx Add this step to your GitHub Actions workflow to install the 'gon' tool on macOS for code signing and notarization. ```bash brew install Bearer/tap/gon ``` -------------------------------- ### Install MCP Server Source: https://github.com/wailsapp/wails/blob/master/AGENTS.md Install the beads MCP server using pip. This is recommended for Claude or MCP-compatible clients. ```bash pip install beads-mcp ``` -------------------------------- ### Simulator Deployment Commands Source: https://github.com/wailsapp/wails/blob/master/IOS_ARCHITECTURE.md Use `simctl` commands to install and launch an application on an iOS simulator. ```bash xcrun simctl install "$DEVICE_ID" "WailsIOSDemo.app" xcrun simctl launch "$DEVICE_ID" "com.wails.iosdemo" ``` -------------------------------- ### Install gst-plugins-good on Arch Linux Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/linux.mdx Install the necessary GStreamer plugins for Arch-based systems to resolve audio/video element issues. ```bash pacman -S gst-plugins-good ``` -------------------------------- ### Test a specific branch Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/local-development.mdx Steps to clone, switch to a specific branch, and install the CLI. ```bash git clone https://github.com/wailsapp/wails cd wails git checkout -b branch-to-test --track origin/branch-to-test cd v2/cmd/wails go install ``` -------------------------------- ### Configure MessageDialog buttons on Mac Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx Examples demonstrating how to set custom buttons, default buttons, and cancel buttons for Mac dialogs. ```go selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ Title: "It's your turn!", Message: "Select a number", Buttons: []string{"one", "two", "three", "four"}, }) ``` ```go selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ Title: "It's your turn!", Message: "Select a number", Buttons: []string{"one", "two", "three", "four"}, DefaultButton: "two", }) ``` ```go selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{ Title: "It's your turn!", Message: "Select a number", Buttons: []string{"one", "two", "three", "four"}, DefaultButton: "two", CancelButton: "three", }) ``` -------------------------------- ### ICoreWebView2ControllerOptions2 Interface (Win32/C++) Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/test.md Documentation for the ICoreWebView2ControllerOptions2 interface, including methods for getting and setting the script locale. ```APIDOC ## ICoreWebView2ControllerOptions2::get_ScriptLocale Method ### Description Gets the script locale for the WebView. ### Method `HRESULT get_ScriptLocale([out, retval] LPWSTR *value)` ### Parameters * **value** (LPWSTR *) - Output parameter to receive the script locale string. ``` ```APIDOC ## ICoreWebView2ControllerOptions2::put_ScriptLocale Method ### Description Sets the script locale for the WebView. ### Method `HRESULT put_ScriptLocale([in] LPCWSTR value)` ### Parameters * **value** (LPCWSTR) - The script locale string to set. ``` -------------------------------- ### Invoke a QuestionDialog on Windows Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx Example of triggering a question dialog with a custom default button on Windows. ```go result, err := runtime.MessageDialog(a.ctx, runtime.MessageDialogOptions{ Type: runtime.QuestionDialog, Title: "Question", Message: "Do you want to continue?", DefaultButton: "No", }) ``` -------------------------------- ### Initialize Application Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/migrating.mdx Comparison of application initialization between v1 and v2. ```go app := wails.CreateApp(&wails.AppConfig{ Title: "MyApp", Width: 1024, Height: 768, JS: js, CSS: css, Colour: "#131313", }) app.Bind(basic) app.Run() ``` ```go err := wails.Run(&options.App{ Title: "MyApp", Width: 800, Height: 600, AssetServer: &assetserver.Options{ Assets: assets, }, Bind: []interface{}{ basic, }, }) ``` -------------------------------- ### Define PackageManager Interface Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/linux-distro-support.mdx This Go code defines the PackageManager interface, which must be implemented when adding support for a new package manager in Wails. It includes methods for getting the manager's name, listing packages, checking installation status, availability, and generating install commands. ```go type PackageManager interface { Name() string Packages() packagemap PackageInstalled(*Package) (bool, error) PackageAvailable(*Package) (bool, error) InstallCommand(*Package) string } ``` -------------------------------- ### Display Wails Init Help Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx Run this command to view all available options and help information for the `wails init` command. This is useful for discovering advanced configurations and templates. ```bash wails init -help ``` -------------------------------- ### Install NSIS with Chocolatey Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/windows-installer.mdx Install NSIS using the Chocolatey package manager. This command installs the NSIS package. ```powershell choco install nsis ``` -------------------------------- ### Install NSIS with Winget Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/windows-installer.mdx Install NSIS using the Winget package manager on Windows 10 and later. This command installs the NSIS package silently. ```bash winget install NSIS.NSIS --silent ``` -------------------------------- ### Configure and Run Wails Application Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/application-development.mdx Initializes the application instance and configures Wails using `wails.Run()`. This includes setting application properties like title and dimensions, and registering lifecycle callbacks. Errors during startup are logged fatally. ```go func main() { app := NewApp() err := wails.Run(&options.App{ Title: "My App", Width: 800, Height: 600, OnStartup: app.startup, OnShutdown: app.shutdown, }) if err != nil { log.Fatal(err) } } ``` -------------------------------- ### Build Wails Application with NSIS Installer Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/windows-installer.mdx Command to build a Wails application and generate a Windows installer using NSIS. The installer will be placed in the `build/bin` directory. ```bash wails build -nsis ``` -------------------------------- ### Menu Configuration Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/reference/menus.mdx How to define and apply an application menu during Wails application startup. ```APIDOC ## Application Menu Setup ### Description Define an application menu by creating a `menu.Menu` instance, adding submenus and items, and passing it to the `wails.Run` options. ### Request Example ```go AppMenu := menu.NewMenu() FileMenu := AppMenu.AddSubmenu("File") FileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) { rt.Quit(app.ctx) }) err := wails.Run(&options.App{ Menu: AppMenu, }) ``` ``` -------------------------------- ### Install Wails CLI Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx Command to install the latest version of the Wails CLI tool. ```shell go install github.com/wailsapp/wails/v2/cmd/wails@latest ``` -------------------------------- ### Define Linux Desktop Entry for Protocol Handling Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/custom-protocol-schemes.mdx Create a .desktop file with the MimeType field set to the custom scheme handler and ensure the Exec command includes %u. ```ini [Desktop Entry] Categories=Office Exec=/usr/bin/wails-open-file %u Icon=wails-open-file.png Name=wails-open-file Terminal=false Type=Application MimeType=x-scheme-handler/myapp; ``` -------------------------------- ### OpenDirectoryDialog Go Method Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx Prompts the user to select a directory. ```go OpenDirectoryDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error) ``` -------------------------------- ### Define App Struct and Lifecycle Hooks in Go Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/application-development.mdx Defines the application struct and its startup/shutdown methods. The startup method is ideal for resource initialization and event listener setup, while shutdown handles deallocation. Both receive a context.Context for runtime operations. Errors returned from startup will terminate the application. ```go type App struct { ctx context.Context } func NewApp() *App { return &App{} } func (a *App) startup(ctx context.Context) { a.ctx = ctx } func (a *App) shutdown(ctx context.Context) { } ``` -------------------------------- ### Wails v3 API: Dialog and Logging Example Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-blog/2023-01-17-v3-roadmap.mdx Demonstrates using the proposed Wails v3 API for showing a new info dialog and logging messages. These functionalities are moved to the application object. ```go app := wails.NewApplication(options.App{}) app.NewInfoDialog(options.InfoDialog{}) app.Log.Info("Hello World") ``` -------------------------------- ### Troubleshoot Wails Installation Errors Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx Commands to diagnose environment issues if the Wails CLI installation fails or reports missing dependencies. ```shell go version ``` -------------------------------- ### Initialize Wails Project Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/tutorials/dogsapi.mdx Use this command to create a new Wails project with a Svelte frontend. Optionally, add IDE flags like -ide vscode. ```bash wails init -n dogs-api -t svelte ``` -------------------------------- ### ICoreWebView2ExperimentalLaunchingExternalUriSchemeEventArgs::get_Uri Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/test.md Gets the URI that the WebView is attempting to launch. ```APIDOC ## get_Uri ### Description Gets the URI that the WebView is attempting to launch. ### Method [Method signature or type, e.g., HRESULT get_Uri] ### Parameters * **uri** (LPWSTR*) - Required - Pointer to a string that receives the URI. ``` -------------------------------- ### Runtime - Show Application Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx Shows the application. On macOS, this brings the application back into the foreground. On Windows and Linux, it's equivalent to showing the window. ```APIDOC ## Show Application ### Description Shows the application. ### Method Go: `Show(ctx context.Context)` JS: `Show()` ### Notes - On Mac, this will bring the application back into the foreground. - For Windows and Linux, this is currently the same as `WindowShow`. ``` -------------------------------- ### ICoreWebView2PrintSettings2::PrinterName Property Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/test.md Gets or sets the name of the printer to use. ```APIDOC ## ICoreWebView2PrintSettings2::PrinterName Property ### Description Gets or sets the name of the printer to use. ### Method `HRESULT get_PrinterName([out, retval] LPWSTR* value); ` `HRESULT put_PrinterName([in] LPCWSTR value);` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (0) Indicates the operation was successful. #### Response Example None ``` -------------------------------- ### Initialize a Wails application Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/howdoesitwork.mdx The main entry point for a Wails application, configuring window dimensions, assets, and lifecycle callbacks. ```go package main import ( "embed" "log" "github.com/wailsapp/wails/v2" "github.com/wailsapp/wails/v2/pkg/options" "github.com/wailsapp/wails/v2/pkg/options/assetserver" ) //go:embed all:frontend/dist var assets embed.FS func main() { app := &App{} err := wails.Run(&options.App{ Title: "Basic Demo", Width: 1024, Height: 768, AssetServer: &assetserver.Options{ Assets: assets, }, OnStartup: app.startup, OnShutdown: app.shutdown, Bind: []interface{}{ app, }, }) if err != nil { log.Fatal(err) } } type App struct { ctx context.Context } func (b *App) startup(ctx context.Context) { b.ctx = ctx } func (b *App) shutdown(ctx context.Context) {} func (b *App) Greet(name string) string { return fmt.Sprintf("Hello %s!", name) } ``` -------------------------------- ### ICoreWebView2PrintSettings2::PageRanges Property Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/test.md Gets or sets the page ranges to print. ```APIDOC ## ICoreWebView2PrintSettings2::PageRanges Property ### Description Gets or sets the page ranges to print. ### Method `HRESULT get_PageRanges([out, retval] ICoreWebView2PrintPageRanges* value); ` `HRESULT put_PageRanges([in] ICoreWebView2PrintPageRanges* value);` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (0) Indicates the operation was successful. #### Response Example None ``` -------------------------------- ### Create .desktop File for App Associations Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/file-association.mdx Defines application entry and specifies file associations. Ensure the Exec path matches your application's binary. ```ini [Desktop Entry] Categories=Office Exec=/usr/bin/wails-open-file %u Icon=wails-open-file.png Name=wails-open-file Terminal=false Type=Application MimeType=application/x-wails;application/x-test ``` -------------------------------- ### ICoreWebView2PrintSettings2::MediaSize Property Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/test.md Gets or sets the media size for printing. ```APIDOC ## ICoreWebView2PrintSettings2::MediaSize Property ### Description Gets or sets the media size for printing. ### Method `HRESULT get_MediaSize([out, retval] ICoreWebView2PrintMediaSize* value); ` `HRESULT put_MediaSize([in] ICoreWebView2PrintMediaSize value);` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (0) Indicates the operation was successful. #### Response Example None ``` -------------------------------- ### Configure project to use local Wails library Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/local-development.mdx Add a replace directive to go.mod to point to the local cloned directory. ```text replace github.com/wailsapp/wails/v2 => ``` ```text replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2 ``` ```text replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2 ``` -------------------------------- ### ICoreWebView2PrintSettings2::Duplex Property Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/test.md Gets or sets the duplex printing mode. ```APIDOC ## ICoreWebView2PrintSettings2::Duplex Property ### Description Gets or sets the duplex printing mode. ### Method `HRESULT get_Duplex([out, retval] ICoreWebView2PrintDuplexMode* value); ` `HRESULT put_Duplex([in] ICoreWebView2PrintDuplexMode value);` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (0) Indicates the operation was successful. #### Response Example None ``` -------------------------------- ### ICoreWebView2PrintSettings2::Copies Property Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/test.md Gets or sets the number of copies to print. ```APIDOC ## ICoreWebView2PrintSettings2::Copies Property ### Description Gets or sets the number of copies to print. ### Method `HRESULT get_Copies([out, retval] int* value); ` `HRESULT put_Copies([in] int value);` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (0) Indicates the operation was successful. #### Response Example None ``` -------------------------------- ### Test New Wails Template Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/templates.mdx After creating or customizing a template, use 'wails init' to create a new project from it. Then, navigate into the project directory and build it. ```shell wails init -n my-vue3-project -t .\wails-vue3-template\ ``` ```shell cd my-vue3-project ``` ```shell wails build ``` ```shell .\build\bin\my-vue3-project.exe ``` -------------------------------- ### OpenFileDialog Go Method Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx Prompts the user to select a single file. ```go OpenFileDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error) ``` -------------------------------- ### ICoreWebView2PrintSettings2::ColorMode Property Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/test.md Gets or sets the color mode for printing. ```APIDOC ## ICoreWebView2PrintSettings2::ColorMode Property ### Description Gets or sets the color mode for printing. ### Method `HRESULT get_ColorMode([out, retval] ICoreWebView2PrintColorMode* value); ` `HRESULT put_ColorMode([in] ICoreWebView2PrintColorMode value);` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (0) Indicates the operation was successful. #### Response Example None ``` -------------------------------- ### Define Windows Theme Settings Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/reference/options.mdx Use this struct to define the application's theme. The 'SystemDefault' option adapts to the user's system theme. Ensure the minimum Windows version is met. ```go type ThemeSettings struct { DarkModeTitleBar int32 DarkModeTitleBarInactive int32 DarkModeTitleText int32 DarkModeTitleTextInactive int32 DarkModeBorder int32 DarkModeBorderInactive int32 LightModeTitleBar int32 LightModeTitleBarInactive int32 LightModeTitleText int32 LightModeTitleTextInactive int32 LightModeBorder int32 LightModeBorderInactive int32 } ``` -------------------------------- ### CoreWebView2ControllerOptions.ScriptLocale Property (.NET/C#) Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/test.md Gets or sets the script locale for the WebView. ```APIDOC ## CoreWebView2ControllerOptions.ScriptLocale Property ### Description Gets or sets the script locale for the WebView. This property determines the language and regional settings used for script execution within the WebView. ### Property Read-write ### Endpoint N/A (Property Access) ``` -------------------------------- ### OpenMultipleFilesDialog Go Method Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx Prompts the user to select multiple files. ```go OpenMultipleFilesDialog(ctx context.Context, dialogOptions OpenDialogOptions) ([]string, error) ``` -------------------------------- ### ICoreWebView2LaunchingExternalUriSchemeEventArgs::get_Uri Property Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/test.md Gets the URI that the WebView is attempting to launch. ```APIDOC ## ICoreWebView2LaunchingExternalUriSchemeEventArgs::get_Uri Property ### Description Gets the URI that the WebView is attempting to launch. ### Method HRESULT get_Uri(LPWSTR* uri); ``` -------------------------------- ### ICoreWebView2ScreenCaptureStartingEventArgs::get_Handled Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/latest_release_notes.txt Gets a value that indicates whether the event has been handled. ```APIDOC ## get_Handled ### Description Gets a value that indicates whether the event has been handled. ### Method (Not specified in source, assumed to be a getter method) ### Endpoint (Not applicable for SDK methods) ### Parameters (Not specified in source) ### Request Example (Not applicable for SDK methods) ### Response - **Handled** (Boolean) - Indicates if the event has been handled. ``` -------------------------------- ### CoreWebView2.ScreenCaptureStarting Event Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/latest_release_notes.txt Represents an event that is raised when screen capture is starting on the CoreWebView2. ```APIDOC ## CoreWebView2.ScreenCaptureStarting Event ### Description This event is raised when screen capture is starting on the CoreWebView2. ### Event `ScreenCaptureStarting` ``` -------------------------------- ### Build .deb package with nfpm Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/custom-protocol-schemes.mdx Use this command to package the application as a .deb file. ```sh nfpm pkg --packager deb --target . ``` -------------------------------- ### ICoreWebView2ExperimentalControllerOptions::LocaleRegion Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/test.md Allows getting and setting the locale region for the WebView2 controller. ```APIDOC ## ICoreWebView2ExperimentalControllerOptions::LocaleRegion ### Description Gets or sets the locale region for the WebView2 controller. ### Method - `get_LocaleRegion` (Read) - `put_LocaleRegion` (Write) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - `LocaleRegion` (string) - The current locale region. #### Response Example None ``` -------------------------------- ### Proposed Wails v3 Application API Source: https://github.com/wailsapp/wails/blob/master/website/blog/2023-01-17-v3-roadmap.mdx Demonstrates the proposed programmatic approach for initializing an application and managing windows in Wails v3. This replaces the declarative Run() method with an object-oriented structure. ```go func main() { app := wails.NewApplication(options.App{}) myWindow := app.NewWindow(options.Window{}) myWindow.SetTitle("My Window") myWindow.On(events.Window.Close, func() { app.Quit() }) app.Run() } ``` -------------------------------- ### ICoreWebView2ExperimentalLaunchingExternalUriSchemeEventArgs::get_InitiatingOrigin Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/test.md Gets the origin of the navigation that initiated the external URI launch. ```APIDOC ## get_InitiatingOrigin ### Description Gets the origin of the navigation that initiated the external URI launch. ### Method [Method signature or type, e.g., HRESULT get_InitiatingOrigin] ### Parameters * **initiatingOrigin** (LPWSTR*) - Required - Pointer to a string that receives the initiating origin. ``` -------------------------------- ### Get Wails CLI Version Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/reference/cli.mdx Outputs the current version of the Wails CLI. ```bash wails version ``` -------------------------------- ### Complete GitHub Actions workflow for Wails Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/signing.mdx A full example of a GitHub Actions workflow that builds a Wails application and signs the resulting Windows binary. ```yaml name: "example" on: workflow_dispatch: # This Action only starts when you go to Actions and manually run the workflow. jobs: package: strategy: matrix: platform: [windows-latest, macos-latest] go-version: [1.18] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v3 - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: setup node uses: actions/setup-node@v2 with: node-version: 14 # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json. - name: Get Wails run: go install github.com/wailsapp/wails/v2/cmd/wails@latest - name: Build Wails app run: | wails build - name: Sign Windows binaries if: matrix.platform == 'windows-latest' run: | echo "Creating certificate file" New-Item -ItemType directory -Path certificate Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}' certutil -decode certificate\certificate.txt certificate\certificate.pfx echo "Signing our binaries" & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' .\build\bin\app.exe - name: upload artifacts macOS if: matrix.platform == 'macos-latest' uses: actions/upload-artifact@v2 with: name: wails-binaries-macos path: build/bin/* - name: upload artifacts windows if: matrix.platform == 'windows-latest' uses: actions/upload-artifact@v2 with: name: wails-binaries-windows path: build/bin/* ``` -------------------------------- ### CoreWebView2EnvironmentOptions Class (.NET/C#) Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/test.md APIs for environment options related to custom scheme registration in .NET/C#. ```APIDOC ## CoreWebView2EnvironmentOptions Class ### Description Manages environment options, including custom scheme registrations. ### Properties - **CoreWebView2EnvironmentOptions.CustomSchemeRegistrations**: Gets or sets the custom scheme registrations for the environment. ``` -------------------------------- ### Test a pull request Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/local-development.mdx Steps to fetch and install a specific pull request by its ID. ```bash git clone https://github.com/wailsapp/wails cd wails git fetch -u origin pull/[IDofThePR]/head:test/pr-[IDofThePR] git checkout test/pr-[IDofThePR] git reset --hard HEAD cd v2/cmd/wails go install ``` -------------------------------- ### Build Frontend Project Manually Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/guides/manual-builds.mdx Execute this command to manually build the frontend project, usually `npm run build` or a similar script defined in your frontend framework. ```bash npm run build ``` -------------------------------- ### CoreWebView2Frame.ScreenCaptureStarting Event Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/latest_release_notes.txt Represents an event that is raised when screen capture is starting on a specific CoreWebView2Frame. ```APIDOC ## CoreWebView2Frame.ScreenCaptureStarting Event ### Description This event is raised when screen capture is starting on a specific CoreWebView2Frame. ### Event `ScreenCaptureStarting` ``` -------------------------------- ### Create and Set Application Menu in Go Source: https://github.com/wailsapp/wails/blob/master/website/i18n/uk/docusaurus-plugin-content-docs/current/reference/menus.mdx Defines a new application menu, adds standard macOS menus if applicable, and includes file operations like Open and Quit. This menu is then set in the Wails application options. ```go app := NewApp() AppMenu := menu.NewMenu() if runtime.GOOS == "darwin" { AppMenu.Append(menu.AppMenu()) // On macOS platform, this must be done right after `NewMenu()` } FileMenu := AppMenu.AddSubmenu("File") FileMenu.AddText("&Open", keys.CmdOrCtrl("o"), func(_ *menu.CallbackData) { // do something }) FileMenu.AddSeparator() FileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) { // `rt` is an alias of "github.com/wailsapp/wails/v2/pkg/runtime" to prevent collision with standard package rt.Quit(app.ctx) }) if runtime.GOOS == "darwin" { AppMenu.Append(menu.EditMenu()) // On macOS platform, EditMenu should be appended to enable Cmd+C, Cmd+V, Cmd+Z... shortcuts } err := wails.Run(&options.App{ Title: "Menus Demo", Width: 800, Height: 600, Menu: AppMenu, // reference the menu above Bind: []interface{}{ app, }, }) // ... ``` -------------------------------- ### ICoreWebView2ExperimentalProfile5::PreferredTrackingPreventionLevel Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/test.md Allows getting and setting the PreferredTrackingPreventionLevel property for experimental profile options. ```APIDOC ## ICoreWebView2ExperimentalProfile5::PreferredTrackingPreventionLevel ### Description Gets or sets the preferred tracking prevention level for the WebView2 profile. ### Method - `get_PreferredTrackingPreventionLevel` (Read) - `put_PreferredTrackingPreventionLevel` (Write) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - `PreferredTrackingPreventionLevel` (enum) - The preferred tracking prevention level. #### Response Example None ``` -------------------------------- ### ICoreWebView2ExperimentalEnvironmentOptions2::EnableTrackingPrevention Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/test.md Allows getting and setting the EnableTrackingPrevention property for experimental environment options. ```APIDOC ## ICoreWebView2ExperimentalEnvironmentOptions2::EnableTrackingPrevention ### Description Gets or sets a value indicating whether tracking prevention is enabled for the WebView2 environment. ### Method - `get_EnableTrackingPrevention` (Read) - `put_EnableTrackingPrevention` (Write) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - `EnableTrackingPrevention` (boolean) - True to enable tracking prevention, false otherwise. #### Response Example None ``` -------------------------------- ### CoreWebView2Environment.FailureReportFolderPath Property (.NET/C#) Source: https://github.com/wailsapp/wails/blob/master/webview2/scripts/test.md Gets the folder path where WebView2 failure reports are stored. ```APIDOC ## CoreWebView2Environment.FailureReportFolderPath Property ### Description Gets the folder path where WebView2 failure reports are stored. ### Property Type `string` ### Example ```csharp string reportPath = CoreWebView2Environment.FailureReportFolderPath; ``` ```