Preparing a Windows machine for Bilder » History » Version 119
Nathan Neri, 02/06/2019 10:25 AM
1 | 1 | Redmine Admin | # Preparing a Windows machine for Bilder (64-bit only) |
---|---|---|---|
2 | |||
3 | 39 | Ted Sume | For building on Windows 10 in Ubuntu, follow the Linux Bilder setup instructions. |
4 | |||
5 | 112 | David Alexander | _Warning:_ In following the directions below, pre-defined env variables like CL, PETSC_DIR, PETSC_ARCH, and others will cause problems. For example, one user had CL=/nologo which prevented the version and other info from being printed and caused bilder to fail. |
6 | 1 | Redmine Admin | |
7 | # Basic Windows Configuration |
||
8 | |||
9 | 112 | David Alexander | ## UAC |
10 | 1 | Redmine Admin | |
11 | 112 | David Alexander | Windows 7/2008: For 64-bit systems, 64-bit applications are stored in C:\Program Files and 32-bit applications are stored in C:\Program Files (x86). UserAccountControlSettings can be fine-tuned (see Control-Panel, System and Security, Action Center). Set Control Setting to the lowest setting (never notify) to avoid unwanted dialog boxes. This requires a reboot to take effect! The UAC Settings must be adjusted to "never notify" (this action is needed to make symbolic links during bilder runs and building Atlas). \ |
12 | 1 | Redmine Admin | |
13 | 112 | David Alexander | ## Editing your system path on Windows |
14 | |||
15 | 1 | Redmine Admin | From the Start menu, right click on My Computer and choose Properties. Choose the Advanced Tab, and click the Environment Variables button towards the bottom of the dialog. In System Variables, highlight Path and click Edit. This is where you make changes to your system path. |
16 | |||
17 | 112 | David Alexander | ## If your machine is on a Windows Domain (as compared to a WORKGROUP), then ensure that Windows knows its domainname |
18 | 1 | Redmine Admin | |
19 | 96 | David Alexander | If your machine is on a Windows Domain, then Bilder can set a common variable that makes sense in that Domain. If you are not on a Windows Domain, then Bilder will still work fine (except for maybe emailing). To ensure Windows knows its domainname to the following. |
20 | 89 | David Alexander | |
21 | 1 | Redmine Admin | * From a command prompt, type the command: |
22 | |||
23 | ~~~~~~ |
||
24 | ipconfig /all |
||
25 | ~~~~~~ |
||
26 | |||
27 | 96 | David Alexander | Look for the value of the "Primary Dns Suffix" field, which should be your domain name (i.e. txcorp.com). |
28 | 1 | Redmine Admin | |
29 | * If cygwin is already installed, |
||
30 | |||
31 | ~~~~~~ |
||
32 | ipconfig /all | grep -i "Primary Dns Suffix" | sed -e 's/^.*: //' |
||
33 | ~~~~~~ |
||
34 | |||
35 | 89 | David Alexander | should return the domainname. |
36 | 1 | Redmine Admin | |
37 | * For Windows 7/Windows 2008 machines that are not a member of the Windows Domain, Active Directory, do the following: |
||
38 | 1. Right click on My Computer, select properties |
||
39 | 2. Click on Advanced system settings |
||
40 | 3. Select the computer name tab |
||
41 | 4. Click the change button |
||
42 | 5. Click the more button |
||
43 | 6. Enter the Primary DNS suffix. i.e. txcorp.com |
||
44 | |||
45 | 112 | David Alexander | ## Create initial directories |
46 | 1 | Redmine Admin | |
47 | * Create the folder C:\\bin (if not already present). |
||
48 | * Add or move C:\\bin to the front of your system path. |
||
49 | |||
50 | 113 | David Alexander | # Software "Required" for Bilder |
51 | 1 | Redmine Admin | |
52 | 74 | David Alexander | What is absolutely required for Bilder depends on what you are trying to build. For example, if you are **only building user documentation**, then you only need |
53 | 37 | John Cary | |
54 | 74 | David Alexander | * Blat (for emailing yourself) |
55 | 36 | John Cary | * Cygwin (for bash shell) |
56 | 1 | Redmine Admin | * CMake from an installer |
57 | 38 | John Cary | * Python from an installer |
58 | * Latex (MikTek below) |
||
59 | 1 | Redmine Admin | * Visual Studio Express (for nmake) |
60 | 36 | John Cary | |
61 | 1 | Redmine Admin | and then you can add the arguments, -W python,cmake, and your installed Python and CMake will be used if your path is correct. |
62 | |||
63 | 82 | John Cary | If you are building through Qt5, |
64 | |||
65 | * 2017-15.4.5 (the particular revision for building QtWebEngine). If not building Qt5, but using it, then at least need VS2015 or VS2017. |
||
66 | * Windows 10 or Windows 10 SDK |
||
67 | |||
68 | 83 | John Cary | Unfortunately, VS2015 and later have a different way have handling certain functions, as discussed at https://stackoverflow.com/questions/30412951/unresolved-external-symbol-imp-fprintf-and-imp-iob-func-sdl2, and so one has to build many packages, such as OpenSSL. |
69 | |||
70 | |||
71 | 74 | David Alexander | Below is a list of the Tools and Libraries that are most often needed. |
72 | |||
73 | # Tools (Required for most common builds within Bilder) |
||
74 | |||
75 | 1 | Redmine Admin | ## Blat |
76 | |||
77 | 74 | David Alexander | *Blat is a sendmail client for Windows needed to send emails.* |
78 | 1 | Redmine Admin | |
79 | * Download Blat from [The Blat SourceForge](http://sourceforge.net/projects/blat) Site and extract all files. As of 07/18/2013, this is version 311. |
||
80 | * Extract the blat311 folder into C:\\bin. |
||
81 | * Copy the C:\bin\blat311\full\blat.{exe,dll} to C:\bin\blat.{exe,dll} |
||
82 | * Execute the following command in a cygwin terminal |
||
83 | |||
84 | ~~~~~~ |
||
85 | blat -install mail.txcorp.com <username>@txcorp.com |
||
86 | ~~~~~~ |
||
87 | |||
88 | ## CMake |
||
89 | |||
90 | 74 | David Alexander | *CMake is a cross-platform build system needed to configure many of necessary packages.* |
91 | 1 | Redmine Admin | |
92 | * Install [CMake (a 32-bit application)](http://www.cmake.org/files/). |
||
93 | 80 | David Alexander | * Version 3.1 or higher is required. Picking a later version is better because it will allow bilder to build future versions of cmake. |
94 | 26 | John Cary | * Add the CMake path to the front of the system path! (Needed to build newer 64 bit versions through Bilder) |
95 | 1 | Redmine Admin | * When this step is complete, make sure the newest CMake is the only one in your system path. |
96 | |||
97 | 10 | Redmine Admin | ## CYGWIN |
98 | 1 | Redmine Admin | |
99 | 74 | David Alexander | *Cygwin is a Unix shell program for Windows and is needed to run the bash code of Bilder.* |
100 | |||
101 | 1 | Redmine Admin | ### Gotchas (in advance) |
102 | |||
103 | * Do not install Cygwin's MinGW. Those are installed in a separate area to reduce conflicts. |
||
104 | * Do not install Cygwin's rc, or you may get a weird error (/focmTryCompileExec.exe.embed.manifest.res: No such file or directory) about cl being invalid. This can be seen by the output of 'which rc'. |
||
105 | * Do not install Cygwin's mt. If 'which mt' returns /bin/mt or /usr/bin/mt, then move this aside too. |
||
106 | 11 | Redmine Admin | * If 'which link' returns /usr/bin/link, then move this aside (mv /usr/bin/link.exe /usr/bin/linkoff.exe) so that it is not picked up to replace the Visual Studio link. (This is where we could define BILDER_LINK.) |
107 | 1 | Redmine Admin | * Make sure that 'which find' returns the cygwin version (/usr/bin/find), not the Windows version. |
108 | * Make sure 'which cmd' returns the Windows version. If not, check that your bash_profile has not made an error in setting your path. |
||
109 | * If you get an error like "ValueError: Symbol table not found" when building numpy, you are somehow using a 32-bit version of objdump. Disable the 32-bit version. |
||
110 | |||
111 | ### Updating Cygwin |
||
112 | |||
113 | * Be sure to select the version of subversion that is compatible with any other sister machines being run through jenkins. They must all use the same version of svn, which must be the same version chosen in Jenkins. |
||
114 | * If you have moved aside any of the interfering commands (e.g. link, mt, rc) in the past and have recently updated cygwin or Windows, then do the 'which' checks again. |
||
115 | * Recreate the /etc/passwd and /etc/group file again using the mkpasswd and mkgroup commands described in the Configuring Cygwin section. |
||
116 | * Install Cygwin from [here](http://cygwin.com/install.html). There are now separate installers for 64 bit (setup-x86_64.exe ) and 32 bit (setup-x86.exe). |
||
117 | * Upon running setup-*.exe, select the packages: |
||
118 | 3 | Redmine Admin | * Base -> util-linux |
119 | * Devel -> bison |
||
120 | * Devel -> flex |
||
121 | 4 | Redmine Admin | * Devel -> gcc-g++ and gcc-fortran (4.9.3 does not compile sqlite, so choose 4.9.2) |
122 | 3 | Redmine Admin | * Devel -> git |
123 | * Devel -> make |
||
124 | * Devel -> mercurial |
||
125 | 1 | Redmine Admin | * Devel -> patch |
126 | 27 | John Cary | * Devel -> subversion (If this machine will be a Jenkins slave, the version of subversion that is consistent with the Jenkins master's svnkit should be chosen. The latest version supported by svnkit is 1.8.14 at the time, Dec. 31, 2016, of this writing.) |
127 | 3 | Redmine Admin | * Editors -> vim and emacs (and alternate editors of choice) |
128 | * Math -> bc |
||
129 | * Net -> openssh |
||
130 | 25 | Matt Copper | * Net -> curl |
131 | 3 | Redmine Admin | * Python -> python (see note below) |
132 | * Shells -> mintty |
||
133 | * Utils -> diffutils |
||
134 | * Utils -> dos2unix |
||
135 | * Web -> wget |
||
136 | 1 | Redmine Admin | |
137 | * Do NOT install any of the mingw packages. If used, they must be installed separately to overcome path issues. (NumPy will not accept the different, distinguishing name for mingw's gcc). |
||
138 | |||
139 | * Note: PATH should be set such that the Windows python is found before the cygwin python. We need the cygwin python to build PETSc. Once PETSc is cmaked, this requirement will go away. |
||
140 | * Note: mkshortcut.exe in cygutils 1.4.10-2 is broken, but as of (July 18, 2013 with cygutils version 1.4.12 this is fixed). If the version of mkshortcut.exe that is installed when you run setup.exe doesn't work (i.e. mkshortcut -h segfaults), then go bach to cygwin setup and update your cygutils. |
||
141 | |||
142 | ### Setting Cygwin Disk Mounts |
||
143 | |||
144 | * Create the directory winsame at the top level of both the Cygwin and Windows file systems. You must always work in this directory. This is critical for getting the ATLAS linear algebra libraries to build. Do this via: |
||
145 | |||
146 | ~~~~~~ |
||
147 | mkdir /cygdrive/c/winsame |
||
148 | mkdir /winsame |
||
149 | mount C:/winsame /winsame |
||
150 | ~~~~~~ |
||
151 | |||
152 | To make this permanent, put |
||
153 | |||
154 | ~~~~~~ |
||
155 | C:/winsame /winsame ntfs binary 0 0 |
||
156 | ~~~~~~ |
||
157 | |||
158 | as one line in /etc/fstab. |
||
159 | |||
160 | On Windows-64, additionally put |
||
161 | |||
162 | ~~~~~~ |
||
163 | C:/Program\040Files\040(x86) /ProgramFilesX86 ntfs binary 0 0 |
||
164 | ~~~~~~ |
||
165 | |||
166 | as one line in /etc/fstab. This allows one to construct a valid path with no parentheses as needed for ATLAS. |
||
167 | |||
168 | ### Configuring Cygwin |
||
169 | |||
170 | 6 | Redmine Admin | * Use a "Cygwin64 Terminal" from basic cygwin installation above to perform all subsequent bash tasks |
171 | 1 | Redmine Admin | |
172 | * If bilderizing a domain machine, create an /etc/passwd file with the following command |
||
173 | |||
174 | ~~~~~~ |
||
175 | mkpasswd -l -d -p /winsame > /etc/passwd |
||
176 | ~~~~~~ |
||
177 | |||
178 | 71 | Tech-X Corporation | * Add a single domain user to an already created /etc/password: |
179 | |||
180 | ~~~~~~ |
||
181 | mkpasswd -l -d -u {username} -p /winsame >> /etc/passwd |
||
182 | ~~~~~~ |
||
183 | |||
184 | 1 | Redmine Admin | * If bilderizing a non-domain machine, create an /etc/passwd file with the following command |
185 | |||
186 | ~~~~~~ |
||
187 | mkpasswd -l -p /winsame > /etc/passwd |
||
188 | ~~~~~~ |
||
189 | |||
190 | * If bilderizing a domain machine, create an /etc/group file with the following command |
||
191 | |||
192 | ~~~~~~ |
||
193 | mkgroup -l -d > /etc/group |
||
194 | ~~~~~~ |
||
195 | |||
196 | * If bilderizing a non-domain machine, create an /etc/group file with the following command |
||
197 | |||
198 | ~~~~~~ |
||
199 | mkgroup -l > /etc/group |
||
200 | ~~~~~~ |
||
201 | |||
202 | * Close the terminal and open a new one. You should see that the 'pwd' command shows that you are in a new home area directory: /winsame/<username>. Copy bash profile files from /home to /winsame and delete the previous home area for each user with the commands: |
||
203 | |||
204 | ~~~~~~ |
||
205 | cp /home/<username>/.* /winsame/<username>/ |
||
206 | rm -rf /home/<username> |
||
207 | ~~~~~~ |
||
208 | 52 | John Cary | |
209 | 1 | Redmine Admin | ## Dependency Walker |
210 | 52 | John Cary | |
211 | 74 | David Alexander | *Dependency Walker shows the DLL's that an executable depends on and is needed to find and copy-in DLLs to a final distribution.* |
212 | 52 | John Cary | |
213 | 1 | Redmine Admin | __Make sure you download and install the correct version of dependencywalker for your machine (x86 for x86 machines, x64 for 64bit machines, etc).__ |
214 | 5 | Redmine Admin | |
215 | 52 | John Cary | Install [Dependency Walker](http://www.dependencywalker.com/) into C:\\bin. |
216 | 1 | Redmine Admin | |
217 | ## JOM |
||
218 | |||
219 | 74 | David Alexander | *JOM is an nmake wrapper needed to give the -j flag capability of Unix make for faster compilation.* |
220 | 1 | Redmine Admin | |
221 | * Create the folder C:\bin (if not already present). |
||
222 | * Add C:\bin to your system path (if not already there). |
||
223 | * Download jom.zip from [the Qt Project](https://wiki.qt.io/Jom). |
||
224 | * Extract the contents of jom.zip |
||
225 | * Move/copy jom.exe to C:\bin (you then can delete the remainder of the contents or keep for historical reasons). |
||
226 | |||
227 | ## LaTeX |
||
228 | |||
229 | 74 | David Alexander | *LaTeX is a typesetting tool needed for building PDF files for user documentation.* |
230 | 1 | Redmine Admin | |
231 | 91 | David Alexander | * Install [Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html). Choose "Letter" for paper size and "Yes" for "Install missing packages on-the-fly". |
232 | 92 | John Cary | * Install Basic MikTeX from [MikTeX](http://miktex.org/). Use the MikTeX Package Manager to install the packages noted at |
233 | [[LaTeX packages needed by Bilder]] |
||
234 | 1 | Redmine Admin | * Install [ghostscript](http://sourceforge.net/projects/ghostscript/files/GPL%20Ghostscript/9.04/). |
235 | |||
236 | |||
237 | ## MPI |
||
238 | |||
239 | 74 | David Alexander | *MPI is a message passing interface for parallel code that is needed for some computation engines.* |
240 | |||
241 | 98 | Ted Sume | Download Microsoft MPI v8.1.1 from: |
242 | 1 | Redmine Admin | |
243 | 98 | Ted Sume | https://www.microsoft.com/en-us/download/details.aspx?id=55991 |
244 | 1 | Redmine Admin | |
245 | 93 | John Cary | The binaries (e.g., mpiexec) are obtained by installing msmpisetup.exe. |
246 | 1 | Redmine Admin | |
247 | 94 | John Cary | The libraries (msmpi.lib) are obtained by installing msmpisdk.msi. |
248 | 1 | Redmine Admin | |
249 | 93 | John Cary | The installers will put mpiexec in your path and define the environment variables, |
250 | |||
251 | MSMPI_INC |
||
252 | MSMPI_BIN |
||
253 | MSMPI_LIB32 |
||
254 | MSMPI_LIB64 |
||
255 | |||
256 | which are used by CMake, e.g., to find the needed components of MSMPI. |
||
257 | 1 | Redmine Admin | |
258 | 85 | John Cary | ## Perl (required to build OpenSSL, therefore CMake) |
259 | 1 | Redmine Admin | |
260 | 74 | David Alexander | *Perl is a programming language needed by some packages such as Qt* |
261 | 1 | Redmine Admin | |
262 | * Download and install [ActiveState Perl](http://www.activestate.com/activeperl/downloads). |
||
263 | |||
264 | ## Python |
||
265 | |||
266 | 74 | David Alexander | *Python is a programming language needed by many packages. Namely, any Python module needs Python to be installed.* |
267 | |||
268 | 14 | Redmine Admin | * As of VS12, bilder builds Python from a checkout of a git repo and no longer needs to be installed by hand. No PATH changes are needed either. |
269 | 1 | Redmine Admin | |
270 | 107 | John Cary | ## RCEDIT |
271 | |||
272 | * RCEDIT is a program that allows one to change the icon of an executable after its creation. It can be obtained from https://github.com/electron/rcedit/releases, and it should be installed in C:\bin. |
||
273 | |||
274 | 85 | John Cary | ## Ruby (required to build Qt5) |
275 | |||
276 | * Ruby, http://rubyinstaller.org/, must be installed first. |
||
277 | |||
278 | 1 | Redmine Admin | ## Subversion |
279 | |||
280 | 74 | David Alexander | * Subversion is a revision control tool needed by bilder, for example, to know when packages are out of date.* |
281 | 1 | Redmine Admin | |
282 | 108 | Benjamin Cowan | * Install [TortoiseSVN](https://tortoisesvn.net/downloads.html) with its command line tools. |
283 | 1 | Redmine Admin | |
284 | 89 | David Alexander | * With this, you will have two versions of svn on your machine. One is in `/usr/bin` under cygwin, and it is used for direct invocation at the bash command-line. The other is in `\Program Files`, and it is needed for getting repo versions when Bilder is invoked through Jenkins. As of this writing, 1.9 is recommended (1.8 will also work, but lower versions will not). |
285 | 33 | Tech-X Corporation | |
286 | 1 | Redmine Admin | ~~~~~~ |
287 | $ where svn |
||
288 | 84 | John Cary | C:\cygwin64\bin\svn.exe |
289 | C:\PROGRAM FILES\TORTOISESVN\bin\svn.exe |
||
290 | $ /usr/bin/svn --version | head -1 |
||
291 | svn, version 1.9.7 (r1800392) |
||
292 | $ /cygdrive/c/Program\ Files/TortoiseSVN/bin/svn --version | head -n 1 |
||
293 | svn, version 1.9.7 (r1800392) |
||
294 | 15 | Redmine Admin | ~~~~~~ |
295 | 1 | Redmine Admin | |
296 | ## Visual Studio |
||
297 | 15 | Redmine Admin | |
298 | 74 | David Alexander | *Visual Studio contains the Microsoft command-line compiler (cl) used by packages with C/C++ code.* |
299 | |||
300 | 1 | Redmine Admin | * Bilder works with VS12 (Visual Studio 2013). Since code is moving to C++11 standards, VS12 is required. We recommend you remove older versions of VS such as VS10 and VS9. |
301 | |||
302 | * VS12: Visual Studio 2013 Community Edition from Microsoft [VS12 Download Site](https://www.visualstudio.com/en-US/products/visual-studio-community-vs) |
||
303 | |||
304 | * Install the latest update for Visual Studio. Open Visual Studio application. Going to Help -> About Microsoft Visual Studio, should show you the update version installed. As of July 2015 it is as Update 5. To update go to [Visual Studio Update Download](http://www.microsoft.com/en-us/download/details.aspx?id=48129). |
||
305 | |||
306 | * Ensure that Visual Studio is not in the system path. (Bilder adds this as needed.) |
||
307 | 7 | Redmine Admin | |
308 | 26 | John Cary | ### Compatibility with Python |
309 | 7 | Redmine Admin | |
310 | 1 | Redmine Admin | * Python is built by Bilder. |
311 | |||
312 | 78 | Ted Sume | ### Compatibility with CUDA 9.1 |
313 | * CUDA version 9.1 requires the use of Microsoft Visual Studio 2017 v15.4.5. See [VS2017 Prior Release Download Site](https://www.visualstudio.com/en-us/productinfo/installing-an-earlier-release-of-vs2017) for instructions on downloading a specific Release. |
||
314 | 74 | David Alexander | |
315 | 1 | Redmine Admin | # Libraries (Required for most builds with Bilder) |
316 | |||
317 | ## OpenSSL |
||
318 | |||
319 | 85 | John Cary | *OpenSSL is a security library needed by Python to build the SSL module, by cmake, libssh, and by Qt.* |
320 | *We no longer install OpenSSL on Windows, as Bilder builds it to be consistent with the compiler in use." |
||
321 | 1 | Redmine Admin | |
322 | 85 | John Cary | ### Legacy instructions. |
323 | |||
324 | 1 | Redmine Admin | * Download from http://slproweb.com/products/Win32OpenSSL.html |
325 | 75 | John Cary | * Choose the Win64 OpenSSL v1.0.2n (not Light) on 64bit or the Win32 OpenSSL v1.0.2n on 32bit windows. |
326 | 76 | John Cary | * **The 1.1 series DOES NOT WORK with either libssh or Qt.** |
327 | 1 | Redmine Admin | * You may have to install Visual C++ Redistributables if the installer complains. |
328 | * During the installation, select "Copy OpenSSL DLLs to: The OpenSSL binaries (/bin) directory" |
||
329 | * After the installation on 64bit windows, goto C:\Windows\System32 and prepend libssl32.dll, libeay32.dll, and ssleay32.dll with an "OFF", if these files exist. This and the next step are required so that dependency walker finds the SSL libs from the OpenSSL distro instead of the ones in C:\Windows\System32. |
||
330 | * Add C:\OpenSSL-Win64 (in some cases, we have seen that C:\OpenSSL-Win64\bin should be added instead) or the directory where you installed OpenSSL to the beginning of the system path. In particular, it needs to be in front of the CollabNet path and the Intel client path, because both contain libeay32.dll. A which for the libeay32.dll should give this installed version. For example: |
||
331 | |||
332 | 30 | John Cary | ~~~~~~ |
333 | which libeay32.dll |
||
334 | 1 | Redmine Admin | /cygdrive/c/OpenSSL-Win64/bin/libeay32.dll |
335 | 73 | Tech-X Corporation | ~~~~~~ |
336 | 30 | John Cary | |
337 | 1 | Redmine Admin | * If built software has unexplained crashes, recheck the above command results. |
338 | |||
339 | 109 | Tech-X Corporation | |
340 | # Composer-related Libraries (only needed for building ComposerToolkit, can be skipped for documentation builds) |
||
341 | |||
342 | 74 | David Alexander | ## Qt |
343 | 1 | Redmine Admin | |
344 | 74 | David Alexander | *Qt is a cross-platform GUI library needed to build packages that have Qt-based user interfaces.* |
345 | |||
346 | 99 | John Cary | Either Qt4 or Qt5 (or both) can be added. |
347 | 74 | David Alexander | |
348 | ### [Building and Installing Qt4](#qt4) |
||
349 | |||
350 | 41 | John Cary | * Make sure no other Qt is in your system path. |
351 | 114 | Nathan Neri | * Get the Qt Libraries from http://download.qt.io/archive/qt/4.8/4.8.7/. Download qt-opensource-windows-x86-vs2010-4.8.7.exe. (The vs2010 in the name is irrelevant as we will build Qt using the source code in this download.) |
352 | 118 | Nathan Neri | * Run this program, selecting C:\winsame\builds-XX\winqt\4.8.7 as your installation directory, where XX is the machines file suffix you use (e.g. vs2017). |
353 | 41 | John Cary | * If 4.8.7, patch Qt by opening a Cygwin window: |
354 | 1 | Redmine Admin | |
355 | ~~~~~~ |
||
356 | cd /winsame/builds-vs12/winqt/4.8.7 |
||
357 | 100 | John Cary | ~~~~~~ |
358 | |||
359 | 106 | John Cary | To build with VS2017, you may need to patch. For this you will need python with the patch module installed, which you can obtain by running composerall, e.g., with target, python. Then do |
360 | 100 | John Cary | |
361 | ~~~~~~ |
||
362 | 119 | Nathan Neri | /path/to/bilder/installed/python -m patch /path/to/bilder/patches/02-fix_build_with_msvc2015-45e8f4ee.diff |
363 | 1 | Redmine Admin | ~~~~~~ |
364 | |||
365 | 74 | David Alexander | #### Compiling Qt4 |
366 | 1 | Redmine Admin | |
367 | * The copy/paste-able commands below assume VS12. |
||
368 | |||
369 | In a Visual Studio x64 DOS window: |
||
370 | |||
371 | ~~~~~~ |
||
372 | 116 | Nathan Neri | set VER=2017 |
373 | REM could be 12 |
||
374 | 1 | Redmine Admin | set SFX=vs%VER% |
375 | 117 | Nathan Neri | REM or whatever machine suffix you will be building for, if using a combined compiler build |
376 | 1 | Redmine Admin | set QTVER=4.8.7 |
377 | 116 | Nathan Neri | set INSTALL_DIR=C:\winsame\builds-%SFX%\winqt\%QTVER%\%QTVER%\msvc%VER%_64 |
378 | 1 | Redmine Admin | ~~~~~~ |
379 | |||
380 | 103 | John Cary | Modify the last line as needed, e.g., different drive or subdir. |
381 | 1 | Redmine Admin | |
382 | 106 | John Cary | Set the platform args according to your compiler. |
383 | 1 | Redmine Admin | |
384 | 106 | John Cary | For VS2013 (VS12). |
385 | |||
386 | 101 | John Cary | ~~~~~~ |
387 | 106 | John Cary | set PLATFORM_ARGS=-platform win32-msvc2013 |
388 | 101 | John Cary | ~~~~~~ |
389 | |||
390 | 106 | John Cary | For VS2015 or VS2017: |
391 | 101 | John Cary | |
392 | ~~~~~~ |
||
393 | 106 | John Cary | set PLATFORM_ARGS=-platform win32-msvc2015 |
394 | 101 | John Cary | ~~~~~~ |
395 | 1 | Redmine Admin | |
396 | Then |
||
397 | |||
398 | ~~~~~~ |
||
399 | cd C:\winsame\builds-%SFX%\winqt\%QTVER% |
||
400 | 116 | Nathan Neri | configure.exe -prefix %INSTALL_DIR% -debug-and-release -opensource -confirm-license -fast -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds -no-libtiff -webkit -declarative %PLATFORM_ARGS% |
401 | 1 | Redmine Admin | ~~~~~~ |
402 | |||
403 | In a bash window launched from the previous DOS window (try `C:\cygwin64\bin\mintty -`, note that the dash is important!), execute the following (changing vsver to your version) |
||
404 | |||
405 | 106 | John Cary | ~~~~~~ |
406 | 99 | John Cary | export VER=12 # or 2017 |
407 | export SFX=vs${VER} |
||
408 | 1 | Redmine Admin | cd /winsame/builds-${SFX}/winqt/4.8.7 |
409 | 116 | Nathan Neri | export INSTALL_DIR=/winsame/builds-${SFX}/winqt/4.8.7/4.8.7/msvc${VER}_64 |
410 | mkdir -p ${INSTALL_DIR} |
||
411 | cp -R mkspecs ${INSTALL_DIR} |
||
412 | 1 | Redmine Admin | ~~~~~~ |
413 | |||
414 | Back in the Visual Studio x64 DOS window |
||
415 | |||
416 | ~~~~~~ |
||
417 | 99 | John Cary | cd C:\winsame\builds-%SFX%\winqt\4.8.7 |
418 | 1 | Redmine Admin | set PATH=%PATH%;C:\winsame\builds-%SFX%\winqt\4.8.7\bin |
419 | nmake |
||
420 | REM Took 3.5 hours on a 2.3 GHz Core2 Duo with Solid State Drive |
||
421 | nmake install |
||
422 | REM Took 10 minutes on a 2.3 GHZ Core2 Duo with Solid State Drive |
||
423 | 42 | John Cary | ~~~~~~ |
424 | 81 | David Alexander | |
425 | 116 | Nathan Neri | * For CMake to find Qt, add INSTALL_DIR to your supra search path when configuring. |
426 | 81 | David Alexander | |
427 | 116 | Nathan Neri | * If you want to use this qt outside of Bilder, add ${INSTALL_DIR}/bin to the system path variable. This may not work if you have more than one Bilder run. |
428 | 1 | Redmine Admin | |
429 | ### Installing Qt5 |
||
430 | |||
431 | 97 | David Alexander | These instructions are how to install the pre-built version of Qt 5 (version 5.10.0 ). You can skip creating the Qt account. |
432 | 81 | David Alexander | |
433 | 97 | David Alexander | * Get Qt-5.10.0 from http://download.qt.io/official_releases/qt/5.10/5.10.0/qt-opensource-windows-x86-5.10.0.exe |
434 | * Run this program, selecting `C:\winsame\builds-vs2017\winqt\5.10.0` as your installation directory. (Bilder will find Qt5 if it is here) |
||
435 | 81 | David Alexander | * Select the following components: |
436 | 85 | John Cary | ** "MSVC 2017 64-bit," |
437 | ** "Qt WebEngine" |
||
438 | ** "Sources" |
||
439 | 42 | John Cary | ** (optionally) under Tools select "Qt Creator 4.5.0 CDB Debugger Support" and "Qt 3D Studio 1.0.0" |
440 | 44 | John Cary | |
441 | 1 | Redmine Admin | |
442 | 85 | John Cary | ### [Building Qt5](#qt5) |
443 | 79 | John Cary | |
444 | 85 | John Cary | *We are not building Qt5 at this time, but some legacy instructions are below.* |
445 | 42 | John Cary | |
446 | 85 | John Cary | |
447 | 42 | John Cary | #### Compiling Qt5 |
448 | 68 | John Cary | |
449 | 85 | John Cary | * Make sure no other Qt is in your system path. |
450 | 42 | John Cary | * The copy/paste-able commands below assume VS2017. |
451 | 1 | Redmine Admin | |
452 | In a Visual Studio x64 DOS window: |
||
453 | 68 | John Cary | |
454 | 42 | John Cary | ~~~~~~ |
455 | 79 | John Cary | set VER=2017 |
456 | 68 | John Cary | set SFX=vs%VER% |
457 | 70 | John Cary | set QTVER=5.10.0 |
458 | 55 | John Cary | set CONTRIB_DIR=C:\winsame\contrib-%SFX% |
459 | 56 | John Cary | set CONTRIB_DIR |
460 | 70 | John Cary | ~~~~~~ |
461 | 56 | John Cary | |
462 | 55 | John Cary | Examine the output of the last command to make sure you have the supra-installation directory correct. |
463 | 68 | John Cary | |
464 | 69 | John Cary | ~~~~~~ |
465 | 1 | Redmine Admin | cd C:\winsame\builds-%SFX%\winqt\%QTVER%\%QTVER%\Src |
466 | configure.bat -prefix %CONTRIB_DIR%\qt-%QTVER%-sersh -opensource -confirm-license -release -shared -opengl desktop -no-separate-debug-info -developer-build -make-tool jom -make libs -make tools -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds -no-libjpeg -no-qml-debug -no-dbus -no-incredibuild-xge -no-directwrite -nomake examples -nomake tests -skip qtandroidextras -skip qtdoc -skip qtlocation -skip qtscript -skip qtserialbus -skip qtserialport -skip qtsensors -skip qtwayland -skip qtspeech |
||
467 | jom # Took 45 minutes on a 4-core i7 |
||
468 | jom install # Took 8 minutes on a 4-core i7 |
||
469 | 70 | John Cary | ~~~~~~ |
470 | 1 | Redmine Admin | |
471 | 79 | John Cary | Check that your installation contains Qt5WebEngine. |
472 | 70 | John Cary | |
473 | 1 | Redmine Admin | Check whether the following changes are needed. |
474 | 60 | John Cary | |
475 | 1 | Redmine Admin | ~~~~~~ |
476 | $ diff QtGui QtGui.orig |
||
477 | 55c55 |
||
478 | < // #include "qopenglextrafunctions.h" |
||
479 | --- |
||
480 | > #include "qopenglextrafunctions.h" |
||
481 | 60 | John Cary | $ diff qopengl.h qopengl.h.orig |
482 | 108c108 |
||
483 | < // # include <QtGui/qopengles2ext.h> |
||
484 | --- |
||
485 | > # include <QtGui/qopengles2ext.h> |
||
486 | ~~~~~~ |
||
487 | |||
488 | The VisIt team also uses the following. |
||
489 | |||
490 | ~~~~~~ |
||
491 | 58 | David Howdle | -mp -ltcg |
492 | 62 | John Cary | ~~~~~~ |
493 | 1 | Redmine Admin | |
494 | 85 | John Cary | #### Completing installation |
495 | 61 | John Cary | |
496 | In a bash window: |
||
497 | 58 | David Howdle | |
498 | 1 | Redmine Admin | ~~~~~~ |
499 | 79 | John Cary | export VER=2017 |
500 | 1 | Redmine Admin | export SFX=vs${VER} |
501 | export QTVER=5.10.0 |
||
502 | export CONTRIB_DIR=/winsame/contrib-%SFX% |
||
503 | echo $CONTRIB_DIR |
||
504 | 70 | John Cary | ~~~~~~ |
505 | 1 | Redmine Admin | |
506 | 70 | John Cary | Check that `CONTRIB_DIR` has the same value as before in the cmd shell, up to OS differences. Then |
507 | 79 | John Cary | |
508 | 70 | John Cary | ~~~~~~ |
509 | env QT_BLDRVERSION=5.10.1 /path/to/bilder/setinstald.sh -i $CONTRIB_DIR qt,sersh |
||
510 | cd $CONTRIB_DIR |
||
511 | ln -s qt-$QTVER-sersh qt-sersh |
||
512 | mkshortcut -n qt-sersh.lnk qt-$QTVER-sersh |
||
513 | 74 | David Alexander | ~~~~~~ |
514 | 70 | John Cary | |
515 | 115 | John Cary | # Additional Useful Tools |
516 | 74 | David Alexander | |
517 | ## Notepad++ |
||
518 | |||
519 | * (Optional) Notepad++ is a free source code editor that is a great tool for Windows. |
||
520 | * Download from http://notepad-plus-plus.org/ |
||
521 | 1 | Redmine Admin | * Install and pin to your taskbar. |
522 | 115 | John Cary | |
523 | ## LLVM-Clang |
||
524 | |||
525 | Clang provides an alternate build path. We are currently using 7.0.1, which is available through a installer at http://releases.llvm.org/7.0.1/LLVM-7.0.1-win64.exe. |
||
526 | 1 | Redmine Admin | |
527 | 110 | David Alexander | ## Java |
528 | |||
529 | Java is needed for setting up the machine to be a Jenkins Slave. |
||
530 | |||
531 | * Download from https://www.java.com/en/download/ (Version 8 Update 181 has a Release date of July 17, 2018) |
||
532 | * May get a message about the Java Plugin and Chrome. This does not affect the Jenkins slave service. |
||
533 | 111 | David Alexander | * Download the JNLP page from the Jenkins server site (link button with label "Launch agent from browser"). |
534 | * Start a command prompt running as Administrator, then change to the Download directory and type "javaws slave-agent.jnlp" |
||
535 | 110 | David Alexander | * Choose File -> "Install as a service" and follow the dialog messages. |
536 | |||
537 | 1 | Redmine Admin | # Experimental Tools and Libraries |
538 | |||
539 | These tools have not been fully vetted or built, so you need not do these. |
||
540 | |||
541 | ## MinGW |
||
542 | |||
543 | See [[Installing MinGW]]. |
||
544 | |||
545 | ## ATLAS |
||
546 | |||
547 | See [[Installing ATLAS on Windows]]. |
||
548 | 8 | Redmine Admin | |
549 | 1 | Redmine Admin | # Cygwin and Paths |
550 | 8 | Redmine Admin | |
551 | 1 | Redmine Admin | (This section assumes the user is familiar with the relations between Cygwin and Windows paths.) |
552 | |||
553 | The path is critical for when there are conflicting executables. This is the case for Subversion and OpenSSL. |
||
554 | |||
555 | The cygwin and Windows versions of svn are incompatible due to line endings, so care must be taken as to which is used at what time. |
||
556 | |||
557 | The path to cygwin's version of svn will be ahead of the Windows Subversion so as to allow users to checkout a project using /usr/bin/svn and never worry about the Windows version of svn. |
||
558 | |||
559 | The path to the installed OpenSSL needs to be in front of the path to Subversion because during the copying in of OpenSSL libraries depends needs to find the ones in the OpenSSL installation not the Subversion installation. |
||
560 | |||
561 | ## Usage under Jenkins |
||
562 | |||
563 | Jenkins uses `svnkit`, which is compatible with the Windows version of Subversion of the same version number. So for jenkins usage, one must have the same version of `svn` installed across all slaves, and when `Bilder` runs under Jenkins, it must be sure to use the Windows version of `svn`. There are two methods for doing this. First, `bilder/jenkins/jenkinsbild` defines the environment variables, `BILDER_SVN`, `BILDER_SVNDIR`, and `BLDR_SVNVERSION`, which hold the correct executables to be used by `Bilder`. However, in the configuration of some packages, notably VisIT in `visit.sh`, the path is used to find `svn`, and this gives the wrong executable. For these cases, the path is modified just before configuration. |
||
564 | |||
565 | |||
566 | ## Summary |
||
567 | |||
568 | * Bilder moves `/usr/bin` to just after the Python path and therefore to before |
||
569 | `/cygdrive/c/Windows/system32`. |
||
570 | * Put the Windows Subversion path behind the Python path (and so behind `/usr/bin`). |
||
571 | - `/usr/bin` must be removed from the path when configuring some packages in order to get the correct subversion when building under Jenkins. |
||
572 | |||
573 | # Bilder machine files for cygwin |
||
574 | |||
575 | The Bilder machine file for cygwin and Visual Studio 2013 (VS12) is bilder/machines/cygwin.vs12. It is sourced by bilder using the -m option. It augments PATH and sets the values of the INCLUDE, LIB, and LIBPATH variables. |
||
576 | |||
577 | In case of problems, one should check that the values of these were set correctly. This is done by starting up the **Visual Studio Command Prompt**, then starting rxvt as noted above. The values for or additions to these variables should agree with how they are being set or modified by the cygwin machine files. |
||
578 | |||
579 | # Setup for making Installers |
||
580 | |||
581 | ## Visual Studios Redistributables |
||
582 | |||
583 | Download vcredist_x64.exe (Visual C++ Redistributable Packages for Visual Studio 2013) |
||
584 | |||
585 | http://www.microsoft.com/en-gb/download/details.aspx?id=40784 |
||
586 | |||
587 | Choose only vcredist_x64.exe executable from list. Put executable in C:\bin. |
||
588 | |||
589 | ## Sign Tools |
||
590 | |||
591 | * The Microsoft Signtool comes with Visual Studio, however, one must install a code-signing certificate. This process is site-specific so please see your system administrator. |
||
592 | * Contrary to what signtool says, the capicom dll must be copied from C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin to C:\Windows\System32 and must be registered by typing the following at a Command Prompt run as Administrator: |
||
593 | |||
594 | ~~~~~~ |
||
595 | 74 | David Alexander | cd C:\Windows\System32 |
596 | REGSVR32 capicom.dll |
||
597 | ~~~~~~ |
||
598 | |||
599 | ## NSIS |
||
600 | |||
601 | NSIS is a scriptable installer maker. |
||
602 | |||
603 | * Install NSIS from [NSIS Download Site](http://nsis.sourceforge.net/Download). |
||
604 | * For building CMake 64bit and if you are building the composers, you will need a generator for installer executables, which is NSIS (Nullsoft Scriptable Install System) a professional open source system to create Windows installers. |
||
605 | 88 | John Cary | * Version 2.46 is available as of Aug 21, 2011. |
606 | * Add `C:\Program Files (x86)\NSIS\Bin` to your system path. |
||
607 | 74 | David Alexander | |
608 | * Install NSIS Access Control Plugin from [Access Control Plugin Site](http://nsis.sourceforge.net/AccessControl_plug-in). |
||
609 | |||
610 | Copies directories and files into the NSIS installation as follows: |
||
611 | |||
612 | ~~~~~~ |
||
613 | AccessControl.zip\Contrib\AccessControl --> NSIS\Contrib\AccessControl |
||
614 | AccessControl.zip\Docs\AccessControl --> NSIS\Docs\AccessControl |
||
615 | 1 | Redmine Admin | AccessControl.zip\Plugins\AccessControl.dll --> NSIS\Plugins\x86-ansi\AccessControl.dll |
616 | AccessControl.zip\Unicode\Plugins\AccessControl.dll --> NSIS\Plugins\x86-unicode\AccessControl.dll |
||
617 | ~~~~~~ |
||
618 | |||
619 | # Notes For Development |
||
620 | |||
621 | [[Notes on debugging Windows executables]] |
||
622 | [[Notes on deleting directories and files owned by other users]] |