From 7fff6cd138311aa15e5321a8cbcffc427863380b Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Thu, 25 Jan 2024 02:11:21 -0800 Subject: [PATCH] Moved Windows instructions [skip ci] --- README.md | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index d2b14d2..c6d02e7 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ Plus [ACID](https://en.wikipedia.org/wiki/ACID) compliance, point-in-time recove ## Installation +### Linux and Mac + Compile and install the extension (supports Postgres 11+) ```sh @@ -28,6 +30,28 @@ See the [installation notes](#installation-notes) if you run into issues You can also install it with [Docker](#docker), [Homebrew](#homebrew), [PGXN](#pgxn), [APT](#apt), [Yum](#yum), or [conda-forge](#conda-forge), and it comes preinstalled with [Postgres.app](#postgresapp) and many [hosted providers](#hosted-postgres). There are also instructions for [GitHub Actions](https://github.com/pgvector/setup-pgvector). +### Windows + +Ensure [C++ support in Visual Studio](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#download-and-install-the-tools) is installed, and run: + +```cmd +call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" +``` + +Note: The exact path will vary depending on your Visual Studio version and edition + +Then use `nmake` to build: + +```cmd +set "PGROOT=C:\Program Files\PostgreSQL\16" +git clone --branch v0.5.1 https://github.com/pgvector/pgvector.git +cd pgvector +nmake /F Makefile.win +nmake /F Makefile.win install +``` + +You can also install it with [Docker](#docker) or [conda-forge](#conda-forge). + ## Getting Started Enable the extension (do this once in each database where you want to use it) @@ -615,26 +639,6 @@ Note: Replace `16` with your Postgres server version If compilation fails and the output includes `warning: no such sysroot directory` on Mac, reinstall Xcode Command Line Tools. -### Windows - -Support for Windows is currently experimental. Ensure [C++ support in Visual Studio](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#download-and-install-the-tools) is installed, and run: - -```cmd -call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" -``` - -Note: The exact path will vary depending on your Visual Studio version and edition - -Then use `nmake` to build: - -```cmd -set "PGROOT=C:\Program Files\PostgreSQL\16" -git clone --branch v0.5.1 https://github.com/pgvector/pgvector.git -cd pgvector -nmake /F Makefile.win -nmake /F Makefile.win install -``` - ## Additional Installation Methods ### Docker