Skip to content

Commit 40a2ee9

Browse files
kleo-53iakov
authored andcommitted
Add instructions for assembling the TRIK studio for 32-bit Windows from console
1 parent 4e580f6 commit 40a2ee9

File tree

2 files changed

+65
-1
lines changed

2 files changed

+65
-1
lines changed

BUILD.win32.en.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
To build **TRIK Studio for Windows x32 from the command line**, you'll need the following tools and steps:
2+
3+
## Prerequisites
4+
*Ensure that you select options for installing required versions of compilers and tools (in this case, **32-bit**).*
5+
1. [**Python**](https://www.python.org/downloads/windows/): version 3.8 or above;
6+
2. [**MSYS2**](https://www.msys2.org/): latest version;
7+
3. [**Qt for Windows**](https://www.qt.io/download-open-source): version 5.12. Qt Creator and development tools will also be installed during this process.
8+
9+
## Install dependencies
10+
Open msys2, install packages `pkg-config`, `libusb`, `zlib`:
11+
```
12+
pacman -Su mingw-w64-i686-pkg-config mingw-w64-i686-libusb mingw-w64-i686-zlib
13+
```
14+
15+
## Build steps
16+
1. **Configure Environment Variables**.
17+
* Make sure that your PATH contains the **C:\Windows\System32** path.
18+
* Add the Qt path to the PATH variable, such as **C:\Qt\5.x.x\mingwXX_32\bin** and **C:\Qt\Tools\mingwXX0_32**, where 5.x.x is the Qt version and mingwXX_32 is your MinGW version.
19+
* Add correct Python path to the PATH variable, for example, **C:\Python\Python3XX-32**, where 3XX is your Python version.
20+
* Add the MinGW paths to the PATH variable, for example, **C:\msys64\mingw32\bin** and **C:\msys64\usr\bin**.
21+
22+
*Here is an example of building for a 32-bit version of Windows with Python 3.10, Qt 5.12.0 and MinGW 7.3.0 32bit:*
23+
```
24+
set PATH=C:\Windows\System32;C:\Qt\Tools\mingw730_32\bin;C:\Qt\5.12.0\mingw73_32\bin;C:\Python\Python310-32;C:\msys64\mingw32\bin;C:\msys64\usr\bin:%PATH%
25+
```
26+
27+
2. **Clone repo**.
28+
Open Command Prompt, go to folder, where you want to locate TRIK Studio. Clone TRIK Studio Repository and all dependent modules:
29+
```
30+
git clone https://github.com/trikset/trik-studio.git
31+
cd trik-studio
32+
git submodule update --init --recursive
33+
```
34+
35+
3. **Prepare folder**.
36+
Create and go to the folder where you want to build the project:
37+
```
38+
mkdir build
39+
cd build
40+
```
41+
42+
4. **Configuring the environment**.
43+
Use the `qmake` command to configure the environment, set various configuration flags and generate build files. You need to add to command parameters the main configuration file - **studio.pro**. This file usually locates in root directory of TRIK Studio project. Also you need to add **PYTHON_PATH** with the path to Python version (that you added to PATH in step 1) to the command parameters.
44+
45+
Here is an example of configuration, where TRIK Studio is located in folder **C:\trik-studio**:
46+
```
47+
qmake C:\trik-studio\studio.pro -spec win32-g++ "CONFIG+=qtquickcompiler" CONFIG+=no-sanitizers CONFIG+=force_debug_info PYTHON_PATH=C:\Python\Python310-32 CONFIG+=tests && mingw32-make qmake_all
48+
```
49+
50+
5. **Building the TRIK Studio**.
51+
Call `mingw32-make` to actually build the project using generated build files:
52+
```
53+
mingw32-make -j 4
54+
```
55+
56+
6. **Launching the application**.
57+
After a successful build without errors, go to directory with the compiled application and launch TRIK Studio:
58+
```
59+
cd bin\release
60+
trik-studio.exe
61+
```
62+
63+
*Now you have successfully built TRIK Studio under 32-bit Windows, ready to use. Good luck with your work!*

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ An opensource cross-platform educational programming environment for future robo
1010
[Here](https://github.com/trikset/trik-studio/issues)
1111

1212
## Build
13-
...
13+
### How to build locally
14+
* [Windows x32 from console](https://github.com/kleo-53/trik-studio/blob/master/BUILD.win32.en.md)
1415

1516

1617

0 commit comments

Comments
 (0)