From 39e0a5261c8f2136fe4465aaa22be6932a77fee6 Mon Sep 17 00:00:00 2001 From: ANS-UXI Date: Fri, 17 Feb 2023 06:39:43 -0800 Subject: [PATCH 1/8] Enhancing Windows 10 open source build documentation in INSTALL.md --- docs/INSTALL.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index a53d9bb0c6..cf285da411 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -51,6 +51,16 @@ and follow instructions: bash ./configure.sh # execute the script by using Ubuntu WSL VM ``` +Incase your *configuration fails* on *Windows 10*: +Make sure **cl.exe** compiler is in the path of Developer Command Prompt for VS, check by typing `cl` in the command prompt, if it fails to return a copyright message and compiler version then cl.exe is not in the path. Check this [Microsoft C++ toolset from the CLI](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170) or try to re-install Visual Code and make sure to choose the "Desktop development with C++" as your workload. After adding cl.exe to the path, if the issue still persists, try using this command in Developer Command Prompt and follow the steps from there: + +```bash +"C:\Program Files\Git\bin\bash.exe" configure.sh +``` +It's possible that you have WSL installed but did not install g++ there. This may result in an undetected toolchain (bash is run from WSL instead of Git mingw distribution). [Install g++ in WSL](https://askubuntu.com/questions/859256/how-to-install-gcc-7-or-clang-4-0) and try running the above command in Developer Command Prompt for VS. + +If you face errors like `File Not Found` or `Failed to build Boost.Build engine` then try [installing Windows 10 SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/) and re-running the above command. + ### Special cases options If all you want is just a one-off build or your Internet bandwidth or disk space are limited then add following options to the `git clone` command: -- 2.45.3 From c6dd3c86c654bef1d466843b7d0acac3083a8ec2 Mon Sep 17 00:00:00 2001 From: ANS-UXI Date: Fri, 17 Feb 2023 16:20:48 -0800 Subject: [PATCH 2/8] Making changes to INSTALL.md where applicable --- docs/INSTALL.md | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index cf285da411..875518dd38 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -10,7 +10,7 @@ To build and run Organic Maps you'll need a machine with at least 4Gb of RAM and 20-30Gb of disk space depending on your target platform. Expect to download 5-10Gb of files. -For _Windows_ you need to have [Git for Windows](https://git-scm.com/download/win) installed and Git bash available in the PATH. +For _Windows_ you need to have [Git for Windows](https://git-scm.com/download/win) installed and Git bash available in the PATH, make sure you have also installed [Windows 10/11 SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/). ## Getting sources @@ -43,24 +43,14 @@ Configure the repository for an opensource build: bash ./configure.sh ``` -For _Windows 10_: Use WSL to run `./configure.sh`, or, alternatively, run the following command from the -[Visual Studio Developer Command Prompt](https://docs.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022) -and follow instructions: +For _Windows 10_: Use WSL(make sure [g++ is installed](https://askubuntu.com/a/915751)) to run `./configure.sh`, or, alternatively, install the [Visual Studio Developer Command Prompt](https://docs.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022) (make sure to choose the "Desktop development with C++" as your workload while installing Visual Studio), check whether [cl.exe]((https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170)) is in the path by typing `cl` in Developer Command Prompt for VS. Run the following command and follow instructions: ```bash -bash ./configure.sh # execute the script by using Ubuntu WSL VM + +"C:\Program Files\Git\bin\bash.exe" configure.sh # execute the script by using Developer Command Prompt or Git bash + ``` -Incase your *configuration fails* on *Windows 10*: -Make sure **cl.exe** compiler is in the path of Developer Command Prompt for VS, check by typing `cl` in the command prompt, if it fails to return a copyright message and compiler version then cl.exe is not in the path. Check this [Microsoft C++ toolset from the CLI](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170) or try to re-install Visual Code and make sure to choose the "Desktop development with C++" as your workload. After adding cl.exe to the path, if the issue still persists, try using this command in Developer Command Prompt and follow the steps from there: - -```bash -"C:\Program Files\Git\bin\bash.exe" configure.sh -``` -It's possible that you have WSL installed but did not install g++ there. This may result in an undetected toolchain (bash is run from WSL instead of Git mingw distribution). [Install g++ in WSL](https://askubuntu.com/questions/859256/how-to-install-gcc-7-or-clang-4-0) and try running the above command in Developer Command Prompt for VS. - -If you face errors like `File Not Found` or `Failed to build Boost.Build engine` then try [installing Windows 10 SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/) and re-running the above command. - ### Special cases options If all you want is just a one-off build or your Internet bandwidth or disk space are limited then add following options to the `git clone` command: -- 2.45.3 From 9c898a40bd1a49f5a1f8a5ff48664307a29f0f41 Mon Sep 17 00:00:00 2001 From: ANS-UXI Date: Fri, 17 Feb 2023 16:33:45 -0800 Subject: [PATCH 3/8] Fixed a typo error in hyperlink --- docs/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 875518dd38..757775a823 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -43,7 +43,7 @@ Configure the repository for an opensource build: bash ./configure.sh ``` -For _Windows 10_: Use WSL(make sure [g++ is installed](https://askubuntu.com/a/915751)) to run `./configure.sh`, or, alternatively, install the [Visual Studio Developer Command Prompt](https://docs.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022) (make sure to choose the "Desktop development with C++" as your workload while installing Visual Studio), check whether [cl.exe]((https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170)) is in the path by typing `cl` in Developer Command Prompt for VS. Run the following command and follow instructions: +For _Windows 10_: Use WSL(make sure [g++ is installed](https://askubuntu.com/a/915751)) to run `./configure.sh`, or, alternatively, install the [Visual Studio Developer Command Prompt](https://docs.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022) (make sure to choose the "Desktop development with C++" as your workload while installing Visual Studio), check whether [cl.exe](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170) is in the path by typing `cl` in Developer Command Prompt for VS. Run the following command and follow instructions: ```bash -- 2.45.3 From d1c9aa0a02f79547ffcd8be7709aa5a2bd67862e Mon Sep 17 00:00:00 2001 From: ANS-UXI Date: Sat, 18 Feb 2023 00:36:11 -0800 Subject: [PATCH 4/8] Added command for Ubuntu WSL VM --- docs/INSTALL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 757775a823..e2bec182bf 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -46,9 +46,9 @@ bash ./configure.sh For _Windows 10_: Use WSL(make sure [g++ is installed](https://askubuntu.com/a/915751)) to run `./configure.sh`, or, alternatively, install the [Visual Studio Developer Command Prompt](https://docs.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022) (make sure to choose the "Desktop development with C++" as your workload while installing Visual Studio), check whether [cl.exe](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170) is in the path by typing `cl` in Developer Command Prompt for VS. Run the following command and follow instructions: ```bash +bash ./configure.sh # execute this script by using Ubuntu WSL VM -"C:\Program Files\Git\bin\bash.exe" configure.sh # execute the script by using Developer Command Prompt or Git bash - +"C:\Program Files\Git\bin\bash.exe" configure.sh # execute this script by using Developer Command Prompt or Git bash ``` ### Special cases options -- 2.45.3 From a7e8635b5ecbf0e9fdca12a2eb69f4f9ce9a670e Mon Sep 17 00:00:00 2001 From: ANS-UXI Date: Sat, 18 Feb 2023 18:02:13 +0530 Subject: [PATCH 5/8] Defined two methods to build the repo --- docs/INSTALL.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index e2bec182bf..6cecf81564 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -10,7 +10,7 @@ To build and run Organic Maps you'll need a machine with at least 4Gb of RAM and 20-30Gb of disk space depending on your target platform. Expect to download 5-10Gb of files. -For _Windows_ you need to have [Git for Windows](https://git-scm.com/download/win) installed and Git bash available in the PATH, make sure you have also installed [Windows 10/11 SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/). +For _Windows_ you need to have [Git for Windows](https://git-scm.com/download/win) installed and Git bash available in the PATH. ## Getting sources @@ -43,12 +43,21 @@ Configure the repository for an opensource build: bash ./configure.sh ``` -For _Windows 10_: Use WSL(make sure [g++ is installed](https://askubuntu.com/a/915751)) to run `./configure.sh`, or, alternatively, install the [Visual Studio Developer Command Prompt](https://docs.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022) (make sure to choose the "Desktop development with C++" as your workload while installing Visual Studio), check whether [cl.exe](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170) is in the path by typing `cl` in Developer Command Prompt for VS. Run the following command and follow instructions: +For _Windows 10_: You should be able to build the project by following either of these setups: + +**Setup 1: Using WSL** +1. Install [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) on your machine. +2. Install g++ by running the following command in WSL: `sudo apt install g++` +3. Execute `bash ./configure` in WSL. +4. After bootstrapping, don't forget to generate header files by `cd 3party/boost` and executing `./b2 headers`. + +**Setup 2: Using Visual Studio Developer Command Prompt** +1. Install the [Visual Studio Developer Command Prompt](https://docs.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022) (make sure to choose the "Desktop development with C++" as your workload while installing Visual Studio). +2. Install [Windows 10/11 SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/) if you haven't already. +3. Execute the following command and follow instructions: ```bash -bash ./configure.sh # execute this script by using Ubuntu WSL VM - -"C:\Program Files\Git\bin\bash.exe" configure.sh # execute this script by using Developer Command Prompt or Git bash +"C:\Program Files\Git\bin\bash.exe" configure.sh # execute the script by using Developer Command Prompt ``` ### Special cases options -- 2.45.3 From 4b8f169346d30b2b0c2525fb860e42fb93a5f40f Mon Sep 17 00:00:00 2001 From: Ansuman Sahoo <79016311+ANS-UXI@users.noreply.github.com> Date: Sun, 19 Feb 2023 04:17:06 +0530 Subject: [PATCH 6/8] Update docs/INSTALL.md Co-authored-by: Alexander Borsuk <170263+biodranik@users.noreply.github.com> --- docs/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 6cecf81564..c765f3600c 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -48,7 +48,7 @@ For _Windows 10_: You should be able to build the project by following either o **Setup 1: Using WSL** 1. Install [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) on your machine. 2. Install g++ by running the following command in WSL: `sudo apt install g++` -3. Execute `bash ./configure` in WSL. +3. Run `./configure.sh` in WSL. 4. After bootstrapping, don't forget to generate header files by `cd 3party/boost` and executing `./b2 headers`. **Setup 2: Using Visual Studio Developer Command Prompt** -- 2.45.3 From afabc891719f3735f0dd4ee1f5fc56e77170385d Mon Sep 17 00:00:00 2001 From: ANS-UXI Date: Sun, 19 Feb 2023 06:36:20 +0530 Subject: [PATCH 7/8] Made the build procedure more concise --- docs/INSTALL.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index c765f3600c..5440b3214c 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -49,12 +49,10 @@ For _Windows 10_: You should be able to build the project by following either o 1. Install [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) on your machine. 2. Install g++ by running the following command in WSL: `sudo apt install g++` 3. Run `./configure.sh` in WSL. -4. After bootstrapping, don't forget to generate header files by `cd 3party/boost` and executing `./b2 headers`. **Setup 2: Using Visual Studio Developer Command Prompt** -1. Install the [Visual Studio Developer Command Prompt](https://docs.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022) (make sure to choose the "Desktop development with C++" as your workload while installing Visual Studio). -2. Install [Windows 10/11 SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/) if you haven't already. -3. Execute the following command and follow instructions: +1. Install the [Visual Studio Developer Command Prompt](https://docs.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022) (make sure to choose the latest MSVC x64/x86 build tool and Windows 10/11 SDK as individual components while installing Visual Studio). +2. Execute the following command and follow instructions: ```bash "C:\Program Files\Git\bin\bash.exe" configure.sh # execute the script by using Developer Command Prompt -- 2.45.3 From 074b7d939b84bed346db3abcf477ad32646e7b7c Mon Sep 17 00:00:00 2001 From: ANS-UXI Date: Sun, 19 Feb 2023 06:46:06 +0530 Subject: [PATCH 8/8] Changed execute to run --- docs/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 5440b3214c..b395156317 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -52,7 +52,7 @@ For _Windows 10_: You should be able to build the project by following either o **Setup 2: Using Visual Studio Developer Command Prompt** 1. Install the [Visual Studio Developer Command Prompt](https://docs.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022) (make sure to choose the latest MSVC x64/x86 build tool and Windows 10/11 SDK as individual components while installing Visual Studio). -2. Execute the following command and follow instructions: +2. Run the following command and follow instructions: ```bash "C:\Program Files\Git\bin\bash.exe" configure.sh # execute the script by using Developer Command Prompt -- 2.45.3