Skip to content

Support scripts to build gnucash for Windows using mingw32.

Notifications You must be signed in to change notification settings

Gnucash/gnucash-on-windows

Repository files navigation

Building GnuCash on Windows

This repository provides a simple, repeatable means to build GnuCash on Microsoft Windows using MinGW-W64, Gnome's jhbuild, and JRSoftware's Inno Setup. It is what drives building the official All-in-One installers and what the GnuCash core development team uses to create development environments.

Requirements

  • Windows Vista or later. You must have an account with Administrator privileges.
  • Powershell 3.0 or later. Note that Vista and Win7 provided only Powershell 2.0. Get an upgrade from Microsoft.

Installation

Download setup-mingw.ps1.

Start a Powershell session:

  • Click the Start icon and start typing "powershell" until Windows recognizes it and presents a menu item. Click that.

If you need Administrative Privileges:

  • Win10, right-click on the Start icon and select Windows Powershell (Admin)
  • Win7, click the Start icon and start typing "powershell" until Windows PowerShell appears in the search dialog. Right-click on it and select Run as Administrator.

If you don't routinely run PowerShell scripts on your computer you will need to first set the Execution Policy to RemoteSigned. You will need Powershell session with Administrative Privileges for this step:

  1. Start Powershell with Admin Privileges
  2. Run set-executionpolicy -executionpolicy RemoteSigned -scope LocalMachine
  3. Quit Powershell if you plan to run setup-mingw64.ps1 without Administrative Privileges.

In a PowerShell session run path/to/setup-mingw64.ps1; the path will depend on your browser settings but if you have a default setup then it's ~/Downloads/setup-mingw64.ps1.

setup-mingw64 Options

setup-mingw64.ps1 takes four optional arguments:

  • -target_dir: The full path to where the MinGW-W64 environment will be created. Default: C:\gcdev64. The default requires Administrative privileges to create. If you use a directory in your home directory instead then you will not require Admin privileges.

  • -download_dir: The name of the subdirectory in target_dir where source tarballs will be downloaded to. Default: target_dir\downloads.

  • -msyw2_root: The base directory of the MSYS2/MinGW-W64 environment. You can reuse an existing environment, but we don't recommend changing this. Default:target_dir\msys2.

  • -x86_64: Setting this will build a 64-bit GnuCash. Default: Unset, for 32-bit builds able to run on older systems.