# Deployment / Build for Windows

From terminal from root of app, run the deployment script

```
npm install
```

Then

```bash
npm run build:win
```

It creates a `cache` and a `build` folder. `cache` is a folder used by deploy to keep the latest version needed to build and package the app, to avoid having to re-download it every time. While the packaged app ready for use can be found in the `build` folder.

It packages the app as a `.exe` file.

## Note

If you are deploying/building from a Mac OSX computer for a windows machine as your target you might run into a compatibility issue.

You'll need to follow [this tutorial](https://www.davidbaumgold.com/tutorials/wine-mac/) to get your mac setup with `wine` in order to be able to package the app for windows while on Mac.

Key steps are.

Install \`brew if you don't have it already, skip if you do.

```
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```

Note: If Homebrew tells you that you need to agree to the Xcode license, you can do that by running:

```
sudo xcodebuild -license
```

Install `xquartz`

```
brew cask install xquartz
```

install `wine`

```
brew install wine
```

You should then be able to run to package the app.

```bash
npm run build:win
```

### uninstalling `wine`

if you ever need to uninstal wine

```
brew uninstall wine
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://autoedit.gitbook.io/documentation/overview/deploymentbuild/deployment-build-for-windows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
