-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Windows][Documentation] Fixing config paths, updating the build Thun…
…der on Windows documentation (#1730) * Make sure the paths are aligned with what we have in the Windows build documentation * Updating the build Thunder on Windows documentation * Slight formatting changes * Mentioning that Visual Studio free version can be used only in specific scenarios
- Loading branch information
1 parent
84b3663
commit 81f915f
Showing
2 changed files
with
73 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,99 @@ | ||
To build Thunder and its components on Windows, you will need Visual Studio installed - the free community edition is just fine. | ||
To build the Thunder framework and its components on Windows, you need to have Visual Studio installed. The free Community Edition is sufficient if you are entitled to use it in your situation, and to make sure of that please check the license. | ||
|
||
The main solution file with all projects and their dependencies can be found in the [ThunderOnWindows](https://github.com/WebPlatformForEmbedded/ThunderOnWindows) repo. This repository also holds some binaries and the header files required to build the Thunder framework on Windows. | ||
The main solution file, containing all projects and their dependencies, is located in the [ThunderOnWindows](https://github.com/WebPlatformForEmbedded/ThunderOnWindows) repository. This repository also includes some binaries and the header files required to build the Thunder framework on Windows. | ||
|
||
!!! note | ||
The `ThunderOnWindows` repo contains some submodules for other Thunder repos. These aren't necessarily kept up to date, so it is recommended to just manually clone the other repos to ensure you get the versions you require | ||
The `ThunderOnWindows` repository includes submodules for other Thunder repositories. These submodules may not always be up to date, so it is recommended to manually clone the necessary repositories to ensure you have the correct versions. | ||
|
||
## 1. Install Dependencies | ||
Thunder uses Python 3 for code and documentation generation scripts. Ensure you have at least **Python 3.5** installed. On Windows 10 and above, this can be done from the Microsoft Store, see [here](https://learn.microsoft.com/en-us/windows/python/beginners) for instructions. | ||
Thunder uses Python 3 for code and documentation generation scripts. Ensure that you have at least **Python 3.5** installed. On Windows 10 and above, Python can be installed via the Microsoft Store. Refer to [this guide](https://learn.microsoft.com/en-us/windows/python/beginners) for instructions. | ||
|
||
Install the [**jsonref**](https://pypi.org/project/jsonref/) library with pip: | ||
Next, install the required Python packages: | ||
|
||
``` | ||
pip install jsonref | ||
``` | ||
- Install the [**jsonref**](https://pypi.org/project/jsonref/) package: | ||
``` | ||
pip install jsonref | ||
``` | ||
|
||
- Install the [**six**](https://pypi.org/project/six/) package: | ||
``` | ||
pip install six | ||
``` | ||
|
||
## 2. Clone All Repositories | ||
|
||
Make a dedicated folder called `ThunderWin` directly on the drive `C:\`, clone ThunderOnWindows into it and change the directory. | ||
- Make a dedicated folder called `ThunderWin` directly on the drive `C:\`, clone ThunderOnWindows into it and change the directory. | ||
``` | ||
mkdir C:\ThunderWin | ||
cd C:\ThunderWin | ||
git clone https://github.com/WebPlatformForEmbedded/ThunderOnWindows.git | ||
cd ThunderOnWindows | ||
``` | ||
|
||
``` | ||
mkdir C:\ThunderWin | ||
cd C:\ThunderWin | ||
git clone https://github.com/WebPlatformForEmbedded/ThunderOnWindows.git | ||
cd ThunderOnWindows | ||
``` | ||
- Then, clone the remaining repos. | ||
``` | ||
git clone https://github.com/rdkcentral/Thunder.git | ||
git clone https://github.com/rdkcentral/ThunderTools.git | ||
git clone https://github.com/rdkcentral/ThunderInterfaces.git | ||
git clone https://github.com/rdkcentral/ThunderClientLibraries.git | ||
git clone https://github.com/rdkcentral/ThunderNanoServices.git | ||
git clone https://github.com/WebPlatformForEmbedded/ThunderNanoServicesRDK.git | ||
git clone https://github.com/rdkcentral/ThunderUI.git | ||
``` | ||
|
||
Then, clone the remaining repos. | ||
## 3. Build the Thunder Framework | ||
|
||
``` | ||
git clone https://github.com/rdkcentral/ThunderTools.git | ||
git clone https://github.com/rdkcentral/Thunder.git | ||
git clone https://github.com/rdkcentral/ThunderInterfaces.git | ||
git clone https://github.com/rdkcentral/ThunderClientLibraries.git | ||
git clone https://github.com/rdkcentral/ThunderNanoServices.git | ||
git clone https://github.com/WebPlatformForEmbedded/ThunderNanoServicesRDK.git | ||
git clone https://github.com/rdkcentral/ThunderUI.git | ||
``` | ||
1. **Open the Solution File**: Open the main solution file located in the `ThunderOnWindows` repository using Visual Studio. | ||
|
||
## 3. Build | ||
2. **Restore NuGet Packages**: Before building, make sure all required NuGet packages are restored. You can do this by right-clicking on the solution in the Solution Explorer and selecting `Restore NuGet Packages`. | ||
|
||
The next step is to open the solution file `ThunderOnWindows\Thunder.sln` in Visual Studio, right click on `Solution Thunder` and build it. This will build all project files in a similar order to the Linux cmake build. | ||
3. **Build the Solution**: To build the entire solution, click on `Build > Build Solution` in the Visual Studio menu. This will build all the projects in the solution and generate the necessary binaries. | ||
|
||
4. **Check for Errors**: Ensure that the build completes without errors. If there are errors, they will be listed in the `Error List` window at the bottom of the Visual Studio interface. | ||
|
||
!!! hint | ||
Some of the project names in the Visual Studio solution reflect old project names - e.g. Thunder is known as `Bridge`, reflecting its original WebBridge codename | ||
Some of the project names in the Visual Studio solution reflect old project names - e.g. Thunder is known as `Bridge`, reflecting its original WebBridge codename. | ||
|
||
If you are interested in building only a specific part of Thunder, for example just ThunderInterfaces, you can build only the `Interfaces` project file and it will automatically build its dependencies, so in this case `bridge`. | ||
If you are interested in building only a specific part of Thunder, for example just ThunderInterfaces, you can build only the `Interfaces` project file and it will automatically build its dependencies, so in this case `bridge`. | ||
|
||
## 4. Configure Artifacts | ||
|
||
After the building process is finished, you still need to make a few adjustments before running Thunder. One of them is to create a volatile and a persistent directory in a specific location, this can be done with the following commands: | ||
After the building process is finished, you still need to make a few adjustments before running Thunder. | ||
|
||
``` | ||
mkdir ..\artifacts\temp | ||
mkdir ..\artifacts\Persistent | ||
mkdir ..\artifacts\temp\MessageDispatcher | ||
``` | ||
- First, create a volatile and a persistent directory in a specific location, as well as a directory for the necessary dlls, which can be done with the following commands: | ||
``` | ||
mkdir ..\artifacts\Debug | ||
mkdir ..\artifacts\Persistent | ||
mkdir ..\artifacts\temp\MessageDispatcher | ||
``` | ||
|
||
- Next, move two dlls into the artifacts folder: | ||
``` | ||
move lib\static_x64\libcrypto-1_1-x64.dll ..\artifacts\Debug\libcrypto-1_1-x64.dll | ||
move lib\static_x64\libssl-1_1-x64.dll ..\artifacts\Debug\libssl-1_1-x64.dll | ||
``` | ||
|
||
Move two dlls with libs into the artifacts folder: | ||
- To use ThunderUI on Windows, copy it into the artifacts folder: | ||
``` | ||
robocopy ThunderUI\dist ..\artifacts\Debug\Plugins\Controller\UI /S | ||
``` | ||
|
||
``` | ||
move lib\static_x64\libcrypto-1_1-x64.dll ..\artifacts\Debug\libcrypto-1_1-x64.dll | ||
move lib\static_x64\libssl-1_1-x64.dll ..\artifacts\Debug\libssl-1_1-x64.dll | ||
``` | ||
## 5. Run the Thunder Framework | ||
|
||
To use ThunderUI on Windows, copy it into the artifacts folder: | ||
Once the build process is complete, you can run the Thunder framework: | ||
|
||
``` | ||
robocopy ThunderUI\dist ..\artifacts\Debug\Plugins\Controller\UI /S | ||
``` | ||
1. **Set the Startup Project**: In Visual Studio, right-click on the project you want to run (usually the `bridge` project) and select `Set as StartUp Project`. | ||
|
||
## 5. Run | ||
2. **Set Command Arguments**: Right click on the `bridge` project file and select `Properties`. Go into the `Debugging` tab, and make sure to put the following line into `Command Arguments`: | ||
``` | ||
-f -c "$(ProjectDir)ExampleConfigWindows.json" | ||
``` | ||
|
||
Right click on `bridge` project file and select `Properties`. Go into `Debugging` tab, and put the following line into `Command Arguments`: | ||
!!! note | ||
Remove the ```-f``` flag if you want to see the messages in ThunderUI under the ```Messaging``` tab, otherwise they will be displayed in the console. | ||
|
||
``` | ||
-f -c "$(ProjectDir)ExampleConfigWindows.json" | ||
``` | ||
3. **Run the Project**: Press `F5` to run the project in Debug mode or `Ctrl + F5` to run it without debugging. Visual Studio will start the project, and you should see the Thunder framework running in the foreground. | ||
|
||
![https://camo.githubusercontent.com/66a3000de0d428e7c860e502434b7ca9153adc3b2cabd3c9123e50a007f4a998/68747470733a2f2f692e696d6775722e636f6d2f706267415853562e706e67](https://camo.githubusercontent.com/66a3000de0d428e7c860e502434b7ca9153adc3b2cabd3c9123e50a007f4a998/68747470733a2f2f692e696d6775722e636f6d2f706267415853562e706e67) | ||
4. **Verify Functionality**: Check the output window in Visual Studio for any logs or error messages. This will help ensure that the framework is running as expected. | ||
|
||
Apply the changes, and press `F5` to run Thunder | ||
5. **ThunderUI**: If you want to display the ThunderUI, you can do that by going into this address in your browser: [127.0.0.1:25555](http://127.0.0.1:25555/Service/Controller/UI). |