Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ambrop72/badvpn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmbroz Bizjak <ambrop7@gmail.com>2018-01-02 21:30:57 +0300
committerGitHub <noreply@github.com>2018-01-02 21:30:57 +0300
commit9e02de1606818db775fefd6d4c5b6ad47d8f3b33 (patch)
treea59ebe0d02a94d59daf43028a2d8c02078abdf2c
parent43ba4edc35641b5df7cde00e25037a676cb28714 (diff)
Replace windows build instructions with VS/CMake
-rw-r--r--BUILD-WINDOWS.md23
-rw-r--r--BUILD-WINDOWS.txt17
2 files changed, 23 insertions, 17 deletions
diff --git a/BUILD-WINDOWS.md b/BUILD-WINDOWS.md
new file mode 100644
index 0000000..830267c
--- /dev/null
+++ b/BUILD-WINDOWS.md
@@ -0,0 +1,23 @@
+To build on Windows, you need Visual Studio 2015 or 2017 and CMake.
+
+If you only want to build tun2socks, then no additional dependencies are needed, but pass `-DBUILD_NOTHING_BY_DEFAULT=1 -DBUILD_TUN2SOCKS=1` options to the CMake command line (see below). If the VPN system components are needed, then you will need to build OpenSSL and NSS yourself and we provide no instructions for that.
+
+Create a build directory (either in or outside the source directory).
+
+Open a command line and navigate to the build directory.
+
+Run CMake:
+
+```
+cmake "<path-to-source>" -G "<generator>" -DCMAKE_INSTALL_PREFIX="<install-dir>" [options...]
+```
+
+See [here](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html) for the list of generators, for example you may want "Visual Studio 15 2017 Win64" for a 64-build with VS2017.
+
+Once cmake is successful, build with the following command:
+
+```
+cmake --build . --target install
+```
+
+If successful you will have the binaries in `<install-dir>/bin`.
diff --git a/BUILD-WINDOWS.txt b/BUILD-WINDOWS.txt
deleted file mode 100644
index cba1a6f..0000000
--- a/BUILD-WINDOWS.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-This describes the supported build method for building for Windows.
-
-Build can only be done on Linux and the Nix package manager must be installed first.
-Install Nix from: http://nixos.org/nix/
-
-Then you need to checkout a slignely patched version of the Nix packages collections.
-This is needed because it has fixes enabling cross-compilation of NSPR and NSS to Windows.
-
-git clone -b cross-mingw-nss --single-branch https://github.com/ambrop72/nixpkgs
-
-It may be faster to download a zip from Github: https://github.com/ambrop72/nixpkgs/archive/cross-mingw-nss.zip
-
-Then you can build with the following command from the badvpn source directory:
-
-NIX_PATH=nixpkgs=<path-to-nixpkgs> nix-build build-win32.nix -A badvpnPkgs.badvpn -o <output-link-path>
-
-Upon success the chosen <output-link-path> will be a symlink to a directory with the build outputs.