-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathhow_to_build.html
112 lines (84 loc) · 2.74 KB
/
how_to_build.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<html>
<head>
<meta charset="UTF-8">
<title>How to build Ods2 (on windows)</title>
<style>
.note {
text-decoration: underline;
}
body {
margin-bottom: 600px;
width: 900px;
}
</style>
</head>
<body>
<div style="text-align:center">
<b>How to build Ods2</b><p/>
</div>
<p/>
How to build with <b>Visual Studio 17 2022</b> on Windows:
<p/>
<ul>
<li/> Update the "setup_windows_env.bat" file with proper values for your build environment.
<li/> Use "cmd.exe" to execute "setup_windows_env.bat", then
<li/> mkdir build
<li/> cd build
<li/> cmake -DCMAKE_BUILD_TYPE=Release ..
<li/> It will create many files, among which Ods2.sln (if built for Visual Studio).
<li/> Open Ods2.sln using Visual Studio
<li/> Build all in Release Mode.
<li/> The library output is in $Ods2/build/lib, possibly in a "Release" or "Debug" subfolder.
<li/> The needed files are ods.dll, z.dll (zlib) and zip.dll
<li/> "examples" will create an .exe file in $Ods2/build/examples
</ul> On the screenshot one can see what the "examples" (built as "app.exe")
together with all needed .dll files looks like.<br/>
The "platforms" folder contains "qwindows(d).dll"
<p/>
<img src="windows_tree_structure.png"/>
<p/>
The build instructions were inspired from
<a href="https://doc.qt.io/qt-6/windows-deployment.html">https://doc.qt.io/qt-6/windows-deployment.html</a>
<br/><br/>
<hr/>
<b>How to build with LLVM MinGW on Windows 10/11</b>:
<p/>
<ul>
<li/> Update the "setup_windows_env.bat" file with proper values for your build environment.
<li/> Use "cmd.exe" to execute "setup_windows_env.bat", then
<li/> mkdir build
<li/> cd build
<li/> cmake -G "MinGW Makefiles" ..
<li/> cmake -DCMAKE_BUILD_TYPE=Release ..
<li> Install "make" on windows (if you didn't already):
On windows 10 or 11, you can run the command <pre>"winget install ezwinports.make"</pre> in the
command line or powershell to quickly install it, then restart the command line or powershell.
Now you can run "make"!
<li/> make -j4
</ul>
<br/><br/>
<hr/>
<b>How to build on Linux</b>
<p/>
It is built from the terminal, .pro files for QtCreator not available.
<p/>
<ul>
<li/>If not already installed - install the Qt6 dev package, which is qt6-base-dev on Ubuntu and qt6-qtbase-devel
on Fedora, also install cmake and git.
<li/>cd ${Ods2}
<li/>mkdir build
<li/>cd build
<li/>cmake ..
<li/>make -j4
</ul>
The resulting libraries will be in build/lib, you need 3 of them:
<ol>
<li/>"libods.so" - the Ods2 library, which depends on
<li/>"libzip.so" for zip support, which depends on
<li/>"libz.so" for zlib compression, Windows doesn't ship it so it is bundled.
</ol>
<br/>
The example code is compiled to an executable as build/examples/app and thus can be run
from the terminal from the ${Ods2}/build directory as "examples/app".
</body>
</html>