From f55f965b3d92242ddc59fe3a5f58516fad5ff3cb Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Thu, 31 Mar 2022 10:11:44 +1100 Subject: [PATCH] Update NSIS guide --- website/docs/guides/signing.mdx | 2 +- website/docs/guides/windows-installer.mdx | 35 +++++++++++++++++------ 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/website/docs/guides/signing.mdx b/website/docs/guides/signing.mdx index e39b7f571..93101936f 100644 --- a/website/docs/guides/signing.mdx +++ b/website/docs/guides/signing.mdx @@ -163,7 +163,7 @@ but note it requires a SHA1 hash for the certificate and a certificate name. Vie ## MacOS -First off you need your code signing certificate from Apple. If you do not have one, a simple Google search will hlep you acquire one. +First off you need your code signing certificate from Apple. If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command: ```bash diff --git a/website/docs/guides/windows-installer.mdx b/website/docs/guides/windows-installer.mdx index 0e6ef86f1..eaeae01e5 100644 --- a/website/docs/guides/windows-installer.mdx +++ b/website/docs/guides/windows-installer.mdx @@ -1,16 +1,33 @@ # Building NSIS installer -Windows is currently the only OS supported when it comes to generating installers. -Wails automatically generates a .nsi installer script in `build/windows/installer` on project creation. -To create an installer alongside your Wails binary, you can use the `-nsis` flag with `wails build`: +Wails supports generating Windows installers using the [NSIS installer](https://nsis.sourceforge.io/). + +## Installing NSIS + +### Windows + +If you use the chocolatey package manager, run the following script: +``` +choco install nsis +``` +If you install NSIS manually, you need to add the *Bin* folder, which contains `makensis.exe`, in your NSIS installation to your path. +[Here](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) is a good tutorial on how to add to path on Windows. + +### Linux + +The `nsis` package should be available through your distribution's package manager. + +### MacOS + +NSIS is available to install through homebrew: `brew install nsis`. + +## Generating the installer + +When a new project is created, Wails generates a `.nsi` installer script in `build/windows/installer`. + +To generate an installer for your application, use the `-nsis` flag with `wails build`: ``` wails build -nsis ``` -You will need NSIS installed on your machine. If you use the chocolatey package manager, run the following script: -``` -choco install nsis -``` -If you install NSIS manually, you need to add the *Bin* folder, which contains `makensis.exe`, in your NSIS installation to your path. -[Here](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) is a good tutorial on how to add to path on Windows. \ No newline at end of file