Building for Windows Application

Types of Build

In Monaca, Electron appliation has two types of build: debug version and release version. The differences between these types of build are as follows:

Types of Build Description
Debug Build DevTools are shown by default when the application is launched. It can be closed or opened manually.
Release Build There are no DevTools.
The built package is unsigned. You might need to manually sign the package after downloading.

Step 1: Configure App

  1. From the Monaca Cloud IDE menu, go to Configure → App Settings for Windows .
  2. Fill in the necessary information of your app:

    • Application information:

      Application Name The application name.
      App ID A unique name which will be used when uploading to the Store. It is recommended to use reverse-domain style (for example, io.monaca.app_name) for App ID. Only alphanumeric characters, periods (at least one period must be used) and underscore are allowed. Each segment should be separated by a period and started with an alphabetic character.
      Version Number The version number of your app. A version number consist of only number seperated by dots (for example, 1.0.0)
      Application Description The description of your application.
    • Application Icon

      You can set the application icon. PNG format is supported. Icon should be at least 512x512 pixels to work across all operating systems.

  3. After finishing the configurations, click Save.

Step 2: Start Building

  1. From the Monaca Cloud IDE menu, go to BuildBuild App for Windows.

  2. Select appropriate type of build you want and click Start Build button.

    The windows release build supports the following build packages:

    Package Description
    nsis It will generate an NSIS (EXE) installer.
    zip It will pack everything into a zip file.

Release Build
There is no build package option for windows debug build. The default package is zip.
Debug Build
  1. It may take several minutes for the build to complete. Please wait. Once the build is completed, your built application is ready to be downloaded.

Step 3: Installation

ZIP Package

Run the Executable File

  1. Extract the downloaded zip file.

  2. Double click on the executable file. There might be a dialog asking for confirmation before running the appliation. As in the following screen, click More info.

    And then click Run anyway.

Sign the Executable File

Before proceeding, please make sure you meet the following prerequisites.

  1. Windows Software Develoment Kit (Windows SDK). Please download it from the Microsoft official page. If you are on Windows 10, you can download from this link.

  2. Signing Certificate.

We will be using SignTool command to sign the executable file (exe). SignTool is included when you install Windows SDK. To sign a file, you just need to open the Command Prompt and run signtool sign /f MyCert.pfx /p "MyPassword" "MyApp.exe". For more information of how to use the SignTool command, please refer to the official documentation here.

To verify whether the file is signed, you can run signtool verify /pa /v "MyApp.exe".

NSIS (EXE) Installer

Install the Application

  1. Download the NSIS (EXE) file.

  2. Double click on the executable file. There might be a dialog asking for confirmation before running the appliation. As in the following screen, click More info and then click Run anyway.

    It then should install the application into your default installation path.

Create an MSIX Package

Before proceeding, please make sure you meet the following prerequisites.

  1. MSIX Packaging Tool. Please download it from the Microsoft official page. If you are on Windows 10, you can download from this link.

  2. Signing Certificate.

You can use the MSIX Packaging Tool to create an MSIX application package from an existing EXE installer. You can refer to the official guideline from Microsoft link. . The tool is very simple to use. You just need to follow the instruction.

  1. Open the MSIX Packaging Tool and choose Application Package.

  2. Browse and choose the downloaded NSIS (EXE) file and check the box under Sign package, browse to and select your .pfx certificate file. If the certificate is password-protected, type the password in the password box.

  3. Choose the first option Create package on this computer.

  4. Fill in the required information. The Publisher name will be automatically filled from the uploaded certificate.

  5. Next, the Prepare computer page provides options to prepare the computer for packaging. The MSIX Packaging Tool Driver is required and the tool will automatically try to enable it if it is not enabled.

  6. In the Installation page, the tool will test the installer by trying to installing the application into your computer.

  7. In this First launch tasks, the entry point should be automatically populated to the list. If it is not, please click the Browse button and select the entry point executable file.

  8. Specify the location you would like to save the MSIX package.

  9. It might take up to several minutes to create the package. After it is done, it should display something as below.

Tested Environment

  • Windows 10 Pro, Version 1803, OS build 17134.885
  • Windows Software Development Kit - Windows 10.0.18362.1
  • MSIX Packaging Tool - Version 1.2019.701.0