# Build Windows package on Linux

*This README as tested on Guix with Wine 10.*

## Setup

### Wine

Fist, you need to install Wine:

```shell
# Debian
apt install winehq-stable wine64 winetricks

# Guix
guix install wine64 winetricks
```

Init a new custom wine prefix:

```shell
export WINE_PREFIX=$PWD/wine
wine winecfg

# or use env-wine.sh
./env-wine.sh wine winecfg
```

In `winecfg`, set the windows version to Windows 10 and click ok.

### Install windows software

We need to install 7zip and Python into the wine prefix. You can
install 7zip with the command:

```shell
./env-wine.sh winetricks apps 7zip
```

To install Python, you need to download Python installer for windows
on version 3.10.2. Next use this command to run the installer:

```shell
./env-wine.sh wine <path-to-python-installer-exe>
```

And follow the installation procedure without forget to activate setup
Python PATH. Now this command will work and return 'Python 3.10.2'.

```shell
$ ./env-wine.sh wine python --version
Python 3.10.2
```

## Build package

Now, you can run the scripts to build the windows package:

```shell
$ ./env-wine.sh wine windows.bat

```
