|
7 | 7 | * Install the following dependencies (Choose visual studio command prompt based on architecture): |
8 | 8 | * Download and install zlib: |
9 | 9 | * Use Visual Studio native tool command prompt in admin mode. |
10 | | - * git clone -b v1.2.8 https://github.com/madler/zlib.git |
11 | | - * cd zlib |
12 | | - * mkdir build & cd build |
13 | | - * cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ../ |
14 | | - * nmake & nmake install (installs zlib inside C:\Program Files (x86)\ ) |
| 10 | + * `git clone -b v1.2.8 https://github.com/madler/zlib.git` |
| 11 | + * `cd zlib` |
| 12 | + * `mkdir build` |
| 13 | + * `cd build` |
| 14 | + * `cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ../` |
| 15 | + * `nmake` |
| 16 | + * `nmake install` (installs zlib inside C:\Program Files (x86)\ ) |
15 | 17 | * Update PATH environment variable to add the dll for zlib which is inside C:\Program Files (x86)\zlib\bin |
16 | 18 | * Download and install openssl |
17 | 19 | * Use Visual Studio native tool command prompt in admin mode. |
18 | | - * git clone https://github.com/openssl/openssl.git |
19 | | - * cd openssl |
20 | | - * git checkout OpenSSL_1_1_1-stable |
21 | | - * perl Configure { VC-WIN32 | VC-WIN64A | VC-WIN64I | VC-CE } (Choose one of the options based on your architecture ) |
22 | | - * nmake & nmake install (installs OpenSSL inside C:\Program Files\) |
| 20 | + * `git clone https://github.com/openssl/openssl.git` |
| 21 | + * `cd openssl` |
| 22 | + * `git checkout OpenSSL_1_1_1-stable` |
| 23 | + * `perl Configure { VC-WIN32 | VC-WIN64A | VC-WIN64I | VC-CE }` (Choose one of the options based on your architecture ) |
| 24 | + * `nmake` |
| 25 | + * `nmake install` (installs OpenSSL inside C:\Program Files\) |
23 | 26 | * Update PATH environment variable to add the dll for openssl which is inside C:\Program Files\OpenSSL\bin |
24 | 27 | * Download and install catch2 |
25 | 28 | * Use Visual Studio native tool command prompt in admin mode. |
26 | | - * git clone https://github.com/catchorg/Catch2.git |
27 | | - * cd Catch2 |
28 | | - * mkdir build & cd build |
29 | | - * cmake -DBUILD_TESTING=OFF -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ../ ( Install python if you want to execute test ) |
30 | | - * nmake & nmake ( install catch2 inside C:\Program Files (x86)\ ) |
| 29 | + * `git clone https://github.com/catchorg/Catch2.git` |
| 30 | + * `cd Catch2` |
| 31 | + * `mkdir build` |
| 32 | + * `cd build` |
| 33 | + * `cmake -DBUILD_TESTING=OFF -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ../` ( Install python if you want to execute test ) |
| 34 | + * `nmake` |
| 35 | + * `nmake install` ( install catch2 inside C:\Program Files (x86)\ ) |
31 | 36 | * Download and install protobuf |
32 | 37 | * Download from https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protobuf-all-3.6.1.tar.gz |
33 | 38 | * Extract protobuf-all-3.6.1.tar.gz |
34 | 39 | * Use Visual Studio native tool command prompt |
35 | | - * cd path/to/protobuf-3.6.1 |
36 | | - * cd cmake |
37 | | - * mkdir build & cd build |
38 | | - * cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -Dprotobuf_MSVC_STATIC_RUNTIME=OFF ../ |
39 | | - * nmake & nmake install ( install protobuf inside C:\Program Files (x86)\ ) |
| 40 | + * `cd path/to/protobuf-3.6.1` |
| 41 | + * `cd cmake` |
| 42 | + * `mkdir build` |
| 43 | + * `cd build` |
| 44 | + * `cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -Dprotobuf_MSVC_STATIC_RUNTIME=OFF ../` |
| 45 | + * `nmake` |
| 46 | + * `nmake install` ( install protobuf inside C:\Program Files (x86)\ ) |
40 | 47 | * Download and install boost |
41 | 48 | * Download from https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.gz |
42 | 49 | * Extract boost_1_69_0.tar.gz |
43 | 50 | * Use Visual Studio native tool command prompt |
44 | | - * cd path/to/boost_1_69_0 |
45 | | - * bootstrap.bat |
46 | | - * .\b2 install ( installs boost inside C:\) |
| 51 | + * `cd path/to/boost_1_69_0` |
| 52 | + * `bootstrap.bat` |
| 53 | + * `.\b2 toolset=msvc address-model={32 | 64} install define=BOOST_WINAPI_VERSION_WIN10` ( installs boost inside C:\) |
| 54 | + * Replace `BOOST_WINAPI_VERSION_WIN10` with the appropriate macro from [here](https://www.boost.org/doc/libs/develop/libs/winapi/doc/html/winapi/config.html) |
47 | 55 | * Download and build aws-iot-securetunneling-localproxy |
48 | 56 | * Use Visual Studio native tool comand prompt in admin mode |
49 | | - * git clone https://github.com/aws-samples/aws-iot-securetunneling-localproxy.git |
50 | | - * cd aws-iot-securetunneling-localproxy |
51 | | - * Edit CmakeList.txt file to make the following changes: |
52 | | - * Replace set_property(GLOBAL PROPERTY Boost_USE_STATIC_LIBS ON) by set(Boost_USE_STATIC_LIBS ON) |
53 | | - * Comment out line target_link_libraries(\${AWS_TUNNEL_LOCAL_PROXY_TARGET_NAME} atomic) and target_link_libraries(\${AWS_TUNNEL_LOCAL_PROXY_TEST_NAME} atomic) by inserting # infront of those lines. |
54 | | - * Replace the following code block ( Replace WINAPI_VERSION using link https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=vs-2019 ). |
55 | | - ``` |
56 | | - elseif (WIN32) |
57 | | - set(CUSTOM_COMPILER_FLAGS "/W4 /DYNAMICBASE /NXCOMPAT /analyze") |
58 | | - set(TEST_COMPILER_FLAGS "${CUSTOM_COMPILER_FLAGS} /D_AWSIOT_TUNNELING_NO_SSL") |
59 | | - endif () |
60 | | - ``` |
61 | | - With the following code block: |
62 | | - ``` |
63 | | - elseif (WIN32) |
64 | | - set(CUSTOM_COMPILER_FLAGS "/W4 /DYNAMICBASE /NXCOMPAT /analyze") |
65 | | - set(TEST_COMPILER_FLAGS "${CUSTOM_COMPILER_FLAGS} /D_AWSIOT_TUNNELING_NO_SSL") |
66 | | - add_definitions(-D_WIN32_WINNT=<WINAPI_VERSION>) |
67 | | - add_definitions(-D_BOOST_USE_WINAPI_VERSION=<WINAPI_VERSION>) |
68 | | - endif () |
| 57 | + * `git clone https://github.com/aws-samples/aws-iot-securetunneling-localproxy.git` |
| 58 | + * `cd aws-iot-securetunneling-localproxy` |
| 59 | + * `mkdir build` |
| 60 | + * `cd build` |
| 61 | + * Build the cmake project. Replace <_WIN32_WINNT> with the appropriate value based on [your OS from here](https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=vs-2019) |
| 62 | + * For visual studio 2019 |
69 | 63 | ``` |
70 | | - * mkdir build & cd build |
71 | | - * cmake -DCMAKE_PREFIX_PATH="C:\Boost;C:\Program Files (x86)\Catch2;C:\Program Files (x86)\protobuf;C:\Program Files\OpenSSL" -G "Visual Studio 15 2017 <Win64/Win32>" ..\ |
72 | | - * msbuild localproxy.vcxproj -p:Configuration=Release ( builds localproxy.exe inside bin\Release folder ) |
| 64 | + cmake -DWIN32_WINNT=<_WIN32_WINNT> -DBoost_USE_STATIC_LIBS=ON -DCMAKE_PREFIX_PATH="C:\Boost;C:\Program Files (x86)\Catch2;C:\Program Files (x86)\protobuf;C:\Program Files\OpenSSL" -G "Visual Studio 16 2019" -A x64 ..\ |
| 65 | + ``` |
| 66 | + * for visual studio 2017 |
| 67 | + ``` |
| 68 | + cmake -DWIN32_WINNT=<_WIN32_WINNT> -DBoost_USE_STATIC_LIBS=ON -DCMAKE_PREFIX_PATH="C:\Boost;C:\Program Files (x86)\Catch2;C:\Program Files (x86)\protobuf;C:\Program Files\OpenSSL" -G "Visual Studio 15 2017 <Win64/Win32>" ..\ |
| 69 | + ``` |
| 70 | + * `msbuild localproxy.vcxproj -p:Configuration=Release` ( builds localproxy.exe inside bin\Release folder ) |
73 | 71 | * Follow [instructions](https://github.com/aws-samples/aws-iot-securetunneling-localproxy) under heading `Security Considerations` to run local proxy on a window OS. |
0 commit comments