Skip to content

Commit 817218d

Browse files
Add Windows build instructions to Readme.
1 parent 4755bd9 commit 817218d

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ The [analyst guide](docs/analyst_guide.md) describes the SQL features and limita
1111

1212
## Installation
1313

14-
PostgreSQL version 13 or higher is required. You also need `make`, `jq`, and a recent C compiler.
14+
PostgreSQL version 13 or higher is required.
15+
16+
### Linux
17+
18+
You need `make`, `jq`, and a recent C compiler.
1519
You should already have the `postgresql-server-dev-x` package installed if you have PostgreSQL version `x`.
1620
If not, you must install it in order to compile the source.
1721

@@ -21,6 +25,17 @@ The compiled extension is installed with: `make install` (which requires superus
2125
The extension is also available on [PGXN](https://pgxn.org/dist/pg_diffix/), and can be installed using
2226
[PGXN Client](https://pgxn.github.io/pgxnclient/).
2327

28+
### Windows
29+
30+
You need Visual Studio 2022 installed with the "Desktop development with C++" option selected.
31+
You also need to set the environment variable `PGROOT` to point to the location of the PostgreSQL installation.
32+
33+
You can compile the source from inside VS 2022, by opening the provided solution file, or from the command line,
34+
by opening a "Developer Command Prompt for VS 2022" terminal in the project's folder and executing `msbuild` (to do a
35+
release build, execute `msbuild -p:Configuration=Release`, to clean the build files, run `msbuild -t:Clean`).
36+
37+
The compiled extension is installed by running `install` (for debug version) or `install Release` (for release version).
38+
2439
## Activating the extension
2540

2641
You can set up the extension for the current database by using the command `CREATE EXTENSION pg_diffix;`.

0 commit comments

Comments
 (0)