Preparing a Windows machine for Bilder » History » Version 170
Ted Sume, 02/21/2024 12:58 PM
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 | 168 | Ted Sume | User Account Control Settings can be fine-tuned (see Control-Panel -> System and Security -> Change User Account Control settings). 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 | 152 | John Cary | ## File Name too long |
14 | |||
15 | This can be a problem when cloning Trilinos. To fix, see https://www.techinpost.com/the-file-name-too-long/. In essence, use regedit to go to |
||
16 | ``` |
||
17 | HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem |
||
18 | ``` |
||
19 | where you can set LongPathsEnabled to 1, then reboot. |
||
20 | |||
21 | 112 | David Alexander | ## Editing your system path on Windows |
22 | 1 | Redmine Admin | |
23 | 168 | Ted Sume | Open Run (Windows Key + R), then type *SystemPropertiesAdvanced* and press Enter. |
24 | On the bottom third of the resulting dialog, click the Environment Variables button. |
||
25 | In System Variables, highlight Path and click Edit. This is where you make changes to your system path. |
||
26 | 1 | Redmine Admin | |
27 | 112 | David Alexander | ## If your machine is on a Windows Domain (as compared to a WORKGROUP), then ensure that Windows knows its domainname |
28 | 1 | Redmine Admin | |
29 | 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. |
30 | 89 | David Alexander | |
31 | 1 | Redmine Admin | * From a command prompt, type the command: |
32 | |||
33 | ~~~~~~ |
||
34 | ipconfig /all |
||
35 | ~~~~~~ |
||
36 | |||
37 | 96 | David Alexander | Look for the value of the "Primary Dns Suffix" field, which should be your domain name (i.e. txcorp.com). |
38 | 1 | Redmine Admin | |
39 | * If cygwin is already installed, |
||
40 | |||
41 | ~~~~~~ |
||
42 | ipconfig /all | grep -i "Primary Dns Suffix" | sed -e 's/^.*: //' |
||
43 | ~~~~~~ |
||
44 | |||
45 | 89 | David Alexander | should return the domainname. |
46 | 1 | Redmine Admin | |
47 | 168 | Ted Sume | * For Windows 10 machines that are not a member of the Windows Domain, Active Directory, do the following: |
48 | 1 | Redmine Admin | 1. Right click on My Computer, select properties |
49 | 2. Click on Advanced system settings |
||
50 | 3. Select the computer name tab |
||
51 | 4. Click the change button |
||
52 | 5. Click the more button |
||
53 | 6. Enter the Primary DNS suffix. i.e. txcorp.com |
||
54 | |||
55 | 112 | David Alexander | ## Create initial directories |
56 | 1 | Redmine Admin | |
57 | * Create the folder C:\\bin (if not already present). |
||
58 | * Add or move C:\\bin to the front of your system path. |
||
59 | |||
60 | 113 | David Alexander | # Software "Required" for Bilder |
61 | 1 | Redmine Admin | |
62 | 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 |
63 | 37 | John Cary | |
64 | 74 | David Alexander | * Blat (for emailing yourself) |
65 | 36 | John Cary | * Cygwin (for bash shell) |
66 | 1 | Redmine Admin | * CMake from an installer |
67 | 157 | John Cary | * NASM from an installer |
68 | 38 | John Cary | * Python from an installer |
69 | 1 | Redmine Admin | * Latex (MikTek below) |
70 | * Visual Studio Express (for nmake) |
||
71 | |||
72 | 162 | Tech-X Corporation | If you have installed a package, you will need to open a new Cygwin window to update PATH in order for your Cygwin bash shell to find the package. To check whether a package is in PATH, from a Cygwin shell, enter |
73 | |||
74 | 168 | Ted Sume | ~~~~~~~~~~~ |
75 | 162 | Tech-X Corporation | echo $PATH |
76 | 168 | Ted Sume | ~~~~~~~~~~~ |
77 | 162 | Tech-X Corporation | |
78 | After installing the requirements, you can add the arguments, -W python,cmake, and your installed Python and CMake will be used if your path is correct. |
||
79 | 1 | Redmine Admin | |
80 | 144 | David Alexander | Since bilder uses the C++17 conformance flags, we require: |
81 | 82 | John Cary | |
82 | 144 | David Alexander | * Visual Studio 2017 version 15.7 or higher (As of Oct 2019 the latest upgrade version is 15.9.17, which is fine) |
83 | 83 | John Cary | * Windows 10 or Windows 10 SDK |
84 | |||
85 | 74 | David Alexander | Below is a list of the Tools and Libraries that are most often needed. |
86 | |||
87 | # Tools (Required for most common builds within Bilder) |
||
88 | |||
89 | 1 | Redmine Admin | ## Blat |
90 | |||
91 | 167 | John Cary | * Blat is a sendmail client for Windows needed to send emails.* |
92 | 149 | David Alexander | |
93 | 1 | Redmine Admin | * Download Blat from [The Blat SourceForge](http://sourceforge.net/projects/blat) Site and extract all files. The latest version should be fine. |
94 | 150 | David Alexander | * Extract the zip file (e.g. blat3222_32.full.zip) into C:\\bin. |
95 | * Copy the contents of the "full" directory up two diretories into "C:\bin" (i.e. C:\bin\blat3222\full\blat.{exe,dll} to C:\bin\blat.{exe,dll}). |
||
96 | * Execute the following command in a cygwin terminal to check that it works |
||
97 | 1 | Redmine Admin | |
98 | ~~~~~~ |
||
99 | 168 | Ted Sume | blat -install <mail server hostname> <username>@txcorp.com |
100 | 1 | Redmine Admin | ~~~~~~ |
101 | |||
102 | ## CMake |
||
103 | |||
104 | 167 | John Cary | * CMake is a cross-platform build system needed to configure many of necessary packages.* |
105 | 1 | Redmine Admin | |
106 | 168 | Ted Sume | * Install [CMake](http://www.cmake.org/files/). |
107 | * Version 3.27 is what we use as of Feb 2024. However, picking a later version is better because it will allow bilder to build future versions of cmake. |
||
108 | 26 | John Cary | * Add the CMake path to the front of the system path! (Needed to build newer 64 bit versions through Bilder) |
109 | 1 | Redmine Admin | * When this step is complete, make sure the newest CMake is the only one in your system path. |
110 | |||
111 | 10 | Redmine Admin | ## CYGWIN |
112 | 1 | Redmine Admin | |
113 | 74 | David Alexander | *Cygwin is a Unix shell program for Windows and is needed to run the bash code of Bilder.* |
114 | |||
115 | 169 | Ted Sume | ### Installing Cygwin |
116 | 1 | Redmine Admin | |
117 | 169 | Ted Sume | * Download the cygwin installer from [here](http://cygwin.com/install.html) |
118 | * From a Windows Elevated Command Prompt, change into the directory that has the recently downloaded setup-x86_64.exe from cygwin, then execute the script below to install cygwin |
||
119 | 1 | Redmine Admin | |
120 | 169 | Ted Sume | ~~~~~~~ |
121 | setup-x86_64.exe ^ |
||
122 | --only-site ^ |
||
123 | --site https://mirrors.kernel.org/sourceware/cygwin ^ |
||
124 | --local-package-dir C:\cygwin64pkgs ^ |
||
125 | --root C:\cygwin64 ^ |
||
126 | --verbose ^ |
||
127 | --prune-install ^ |
||
128 | --quiet-mode ^ |
||
129 | --packages ^ |
||
130 | _autorebase,base-cygwin,base-files,bc,bison,curl,diffutils,dos2unix,emacs,emacs-w32,emacs-X11,flex,gcc-fortran,gcc-g++,gdb,^ |
||
131 | git,hostname,make,mercurial,mintty,ncurses,openssh,patch,perl,procps-ng,python2,python2-magick,rebase,subversion,^ |
||
132 | tar,time,util-linux,vim,vim-common,vim-doc,vim-minimal,wget,xinit |
||
133 | ~~~~~~~~ |
||
134 | 1 | Redmine Admin | |
135 | 169 | Ted Sume | ## Cygwin Post Installation (To be done from a cygwin terminal) |
136 | 1 | Redmine Admin | * 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: |
137 | |||
138 | ~~~~~~ |
||
139 | mkdir /cygdrive/c/winsame |
||
140 | mkdir /winsame |
||
141 | mount C:/winsame /winsame |
||
142 | ~~~~~~ |
||
143 | |||
144 | 169 | Ted Sume | To make this permanent, put the following in /etc/fstab. This second entry allows one to construct a valid path with no parentheses as needed for ATLAS. |
145 | 1 | Redmine Admin | |
146 | ~~~~~~ |
||
147 | C:/winsame /winsame ntfs binary 0 0 |
||
148 | C:/Program\040Files\040(x86) /ProgramFilesX86 ntfs binary 0 0 |
||
149 | ~~~~~~ |
||
150 | |||
151 | 169 | Ted Sume | * Edit /etc/nsswitch.conf by adding the following entry to tell cygwin where to put home directories. e.g |
152 | 1 | Redmine Admin | |
153 | ~~~~~~ |
||
154 | 169 | Ted Sume | db_home: /winsame/%U |
155 | 1 | Redmine Admin | ~~~~~~ |
156 | |||
157 | 169 | Ted Sume | * 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.) |
158 | * Make sure that 'which find' returns the cygwin version (/usr/bin/find), not the Windows version. |
||
159 | * Close the cygwin terminal and open a new one |
||
160 | 146 | David Alexander | |
161 | 52 | John Cary | ## Dependencies Tool |
162 | 146 | David Alexander | |
163 | 5 | Redmine Admin | *Dependencies* is a tool that shows the DLL's that an executable depends on and is needed to find and copy-in DLLs to a final distribution. |
164 | 151 | John Cary | |
165 | Download [Dependencies](https://lucasg.github.io/Dependencies/) and copy Dependencies*, ClrPhlib.{dll,pdb} into C:\\bin. |
||
166 | 1 | Redmine Admin | (NDesk.Option.dll not needed.) |
167 | |||
168 | ## JOM |
||
169 | 167 | John Cary | |
170 | 1 | Redmine Admin | * JOM is an nmake wrapper needed to give the -j flag capability of Unix make for faster compilation.* |
171 | |||
172 | * Create the folder C:\bin (if not already present). |
||
173 | * Add C:\bin to your system path (if not already there). |
||
174 | * Download jom.zip from [the Qt Project](https://wiki.qt.io/Jom). |
||
175 | * Extract the contents of jom.zip |
||
176 | * Move/copy jom.exe to C:\bin (you then can delete the remainder of the contents or keep for historical reasons). |
||
177 | |||
178 | ## LaTeX |
||
179 | 74 | David Alexander | |
180 | 1 | Redmine Admin | *LaTeX is a typesetting tool needed for building PDF files for user documentation.* |
181 | 123 | Benjamin Cowan | |
182 | 92 | John Cary | * Install [Doxygen](http://www.doxygen.nl/). Choose "Letter" for paper size and "Yes" for "Install missing packages on-the-fly". |
183 | * Install Basic MikTeX from [MikTeX](http://miktex.org/). Use the MikTeX Package Manager to install the packages noted at |
||
184 | 124 | Benjamin Cowan | [[LaTeX packages needed by Bilder]] |
185 | 1 | Redmine Admin | * Install [ghostscript](https://www.ghostscript.com/download/gsdnld.html). |
186 | 166 | John Cary | |
187 | 1 | Redmine Admin | ## LLVM (Clang) |
188 | 166 | John Cary | |
189 | ### Installing LLVM-Clang from a binary installer (easiest way) |
||
190 | |||
191 | Download the Windows (64-bit) installer from http://releases.llvm.org/download.html, and proceed with the installation. |
||
192 | |||
193 | 170 | Ted Sume | When installing, namespace the installation directory with the major version. Eg, change LLVM to LLVM17 when asked. |
194 | 1 | Redmine Admin | |
195 | ## MPI |
||
196 | 74 | David Alexander | |
197 | *MPI is a message passing interface for parallel code that is needed for some computation engines.* |
||
198 | 98 | Ted Sume | |
199 | 1 | Redmine Admin | Download Microsoft MPI v8.1.1 from: |
200 | 98 | Ted Sume | |
201 | 1 | Redmine Admin | https://www.microsoft.com/en-us/download/details.aspx?id=55991 |
202 | 93 | John Cary | |
203 | 1 | Redmine Admin | The binaries (e.g., mpiexec) are obtained by installing msmpisetup.exe. |
204 | 94 | John Cary | |
205 | 1 | Redmine Admin | The libraries (msmpi.lib) are obtained by installing msmpisdk.msi. |
206 | 93 | John Cary | |
207 | The installers will put mpiexec in your path and define the environment variables, |
||
208 | |||
209 | MSMPI_INC |
||
210 | MSMPI_BIN |
||
211 | MSMPI_LIB32 |
||
212 | MSMPI_LIB64 |
||
213 | |||
214 | 157 | John Cary | which are used by CMake, e.g., to find the needed components of MSMPI. |
215 | |||
216 | ## NASM (required to build OpenSSL, therefore CMake) |
||
217 | |||
218 | 158 | John Cary | * Download and install from https://nasm.us/ |
219 | 1 | Redmine Admin | * Make sure this appropriate modifications to your path are made |
220 | 85 | John Cary | |
221 | 74 | David Alexander | ## Perl (required to build OpenSSL, therefore CMake) |
222 | 1 | Redmine Admin | |
223 | *Perl is a programming language needed by some packages such as Qt* |
||
224 | |||
225 | 74 | David Alexander | * Download and install [ActiveState Perl](http://www.activestate.com/activeperl/downloads). |
226 | |||
227 | 1 | Redmine Admin | ## Python |
228 | 166 | John Cary | |
229 | 1 | Redmine Admin | * Python is built or installed by Bilder. |
230 | 107 | John Cary | |
231 | ## RCEDIT |
||
232 | |||
233 | * 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. |
||
234 | 85 | John Cary | |
235 | ## Ruby (required to build Qt5) |
||
236 | |||
237 | * Ruby, http://rubyinstaller.org/, must be installed first. |
||
238 | 1 | Redmine Admin | |
239 | ## Subversion |
||
240 | 74 | David Alexander | |
241 | 1 | Redmine Admin | * Subversion is a revision control tool needed by bilder, for example, to know when packages are out of date.* |
242 | 108 | Benjamin Cowan | |
243 | 1 | Redmine Admin | * Install [TortoiseSVN](https://tortoisesvn.net/downloads.html) with its command line tools. |
244 | 89 | David Alexander | |
245 | 33 | Tech-X Corporation | * 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). |
246 | 1 | Redmine Admin | |
247 | ~~~~~~ |
||
248 | 84 | John Cary | $ where svn |
249 | C:\cygwin64\bin\svn.exe |
||
250 | C:\PROGRAM FILES\TORTOISESVN\bin\svn.exe |
||
251 | $ /usr/bin/svn --version | head -1 |
||
252 | 1 | Redmine Admin | svn, version 1.9.7 (r1800392) |
253 | 15 | Redmine Admin | $ /cygdrive/c/Program\ Files/TortoiseSVN/bin/svn --version | head -n 1 |
254 | 1 | Redmine Admin | svn, version 1.9.7 (r1800392) |
255 | ~~~~~~ |
||
256 | |||
257 | ## Visual Studio |
||
258 | 166 | John Cary | |
259 | 1 | Redmine Admin | * Visual Studio contains the Microsoft command-line compiler (cl) used by packages with C/C++ code.* |
260 | 166 | John Cary | |
261 | 1 | Redmine Admin | * Bilder uses VS2019 (MACHINE_FILE=${MACHINE_FILE:-"cygwin.llvm_vs2017"}) by default. We are moving to llvm17_vs2022. |
262 | 166 | John Cary | |
263 | 78 | Ted Sume | * Visual Studio should not be in the system path. (Bilder adds this as needed.) |
264 | 165 | John Cary | |
265 | 166 | John Cary | |
266 | 145 | John Cary | ### CUDA |
267 | 166 | John Cary | |
268 | 165 | John Cary | * Bilder currently uses CUDA-11.8 by default, if is can find it. |
269 | 1 | Redmine Admin | |
270 | ~~~~~~ |
||
271 | 166 | John Cary | BILDER_CUDA_FIND_VERSIONS=${BILDER_CUDA_FIND_VERSIONS:-"11.8 11.7 11.6 11.5 11.2 11.1 11.0 10.2 10.1"} |
272 | 167 | John Cary | ~~~~~~ |
273 | |||
274 | 153 | Ted Sume | * We are moving to CUDA-12.3 |
275 | |||
276 | # WSL on Windows 10 1909 or newer |
||
277 | |||
278 | * From within an Administrator enable Powershell window, run the following |
||
279 | |||
280 | ``` |
||
281 | dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart |
||
282 | dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart |
||
283 | ``` |
||
284 | * Reboot the computer after running the above two commands from within Powershell |
||
285 | * Update Kernel for WSL2 by downloading and installing https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi |
||
286 | * Run the following command from within an Administrator enabled Powershell window to set the default WSL version to 2. |
||
287 | |||
288 | ``` |
||
289 | wsl --set-default-version 2 |
||
290 | ``` |
||
291 | * Go to Microsoft store, search for preferred Linux distro, download and install per on screen instructions. |
||
292 | 1 | Redmine Admin | |
293 | |||
294 | # Libraries (Required for most builds with Bilder) |
||
295 | |||
296 | 85 | John Cary | ## OpenSSL |
297 | |||
298 | 1 | Redmine Admin | *OpenSSL is a security library needed by Python to build the SSL module, by cmake, libssh, and by Qt.* |
299 | 85 | John Cary | *We no longer install OpenSSL on Windows, as Bilder builds it to be consistent with the compiler in use." |
300 | |||
301 | 1 | Redmine Admin | ### Legacy instructions. |
302 | 75 | John Cary | |
303 | 76 | John Cary | * Download from http://slproweb.com/products/Win32OpenSSL.html |
304 | 1 | Redmine Admin | * Choose the Win64 OpenSSL v1.0.2n (not Light) on 64bit or the Win32 OpenSSL v1.0.2n on 32bit windows. |
305 | * **The 1.1 series DOES NOT WORK with either libssh or Qt.** |
||
306 | * You may have to install Visual C++ Redistributables if the installer complains. |
||
307 | * During the installation, select "Copy OpenSSL DLLs to: The OpenSSL binaries (/bin) directory" |
||
308 | * 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. |
||
309 | 30 | John Cary | * 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: |
310 | |||
311 | 1 | Redmine Admin | ~~~~~~ |
312 | 73 | Tech-X Corporation | which libeay32.dll |
313 | 30 | John Cary | /cygdrive/c/OpenSSL-Win64/bin/libeay32.dll |
314 | 1 | Redmine Admin | ~~~~~~ |
315 | |||
316 | 109 | Tech-X Corporation | * If built software has unexplained crashes, recheck the above command results. |
317 | |||
318 | |||
319 | 125 | Nathan Neri | # Composer-related Libraries (only needed for building ComposerToolkit, can be skipped for documentation builds) |
320 | |||
321 | ## Git LFS |
||
322 | |||
323 | *Git LFS is a git extension for repos with large files - needed to use git for VisIt repos* |
||
324 | |||
325 | 130 | Nathan Neri | Download and run the installer: https://git-lfs.github.com/ |
326 | 125 | Nathan Neri | |
327 | 127 | Nathan Neri | You can adjust the configuration by running (from Cygwin) `git lfs install --force --skip-smudge` with new configuration options. |
328 | |||
329 | To ensure that git will find git lfs, add a symbolic link from git's exec path to the location of the git-lfs executable. |
||
330 | |||
331 | ~~~~~~ |
||
332 | LINK_TO_PATH=`which git-lfs.exe` |
||
333 | LINK_FROM_PATH=`git --exec-path` |
||
334 | cd $LINK_FROM_PATH |
||
335 | ln -s "$LINK_TO_PATH" git-lfs.exe |
||
336 | 74 | David Alexander | ~~~~~~ |
337 | 1 | Redmine Admin | |
338 | 74 | David Alexander | ## Qt |
339 | |||
340 | 142 | David Alexander | *Qt is a cross-platform GUI library needed to build packages that have Qt-based user interfaces.* |
341 | 1 | Redmine Admin | |
342 | 142 | David Alexander | Qt5 is the recommended version (the previous version, Qt4, instructions are also here too until Qt5 is solid). |
343 | |||
344 | 159 | David Alexander | ### Installing Qt5 |
345 | 142 | David Alexander | |
346 | 159 | David Alexander | These instructions are how to install the pre-built version of Qt 5 (version 5.14.2). You can skip creating the Qt account. |
347 | |||
348 | 160 | David Alexander | * Get Qt-5.14.2 from https://download.qt.io/archive/qt/5.14/5.14.2/qt-opensource-windows-x86-5.14.2.exe |
349 | 1 | Redmine Admin | * Run this program, selecting `<DRIVE>\winsame\winqt\5.14.2` as your installation directory, where DRIVE is the drive you have winsame on (e.g. D: or C:). (Bilder will find Qt5 if it is here) |
350 | 160 | David Alexander | * Expand the Qt 5.14.2 section and select the following components: |
351 | 1 | Redmine Admin | * MSVC 2017 64-bit |
352 | 142 | David Alexander | * UWP x64 (MSVC 2017) |
353 | 160 | David Alexander | * Sources |
354 | * Qt WebEngine |
||
355 | * Optionally, under Developer and Designer Tools, select: |
||
356 | 142 | David Alexander | * Qt Creator 4.11.1 CDB Debugger Support |
357 | * Qt Creator 4.11.1 is selected by default |
||
358 | 143 | David Alexander | * Accept all remaining defaults unless otherwise preferred |
359 | 74 | David Alexander | |
360 | 41 | John Cary | ### Building and Installing Qt4 |
361 | 114 | Nathan Neri | |
362 | 118 | Nathan Neri | * Make sure no other Qt is in your system path. |
363 | 41 | John Cary | * 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.) |
364 | 1 | Redmine Admin | * 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). |
365 | * If 4.8.7, patch Qt by opening a Cygwin window: |
||
366 | |||
367 | 100 | John Cary | ~~~~~~ |
368 | cd /winsame/builds-vs12/winqt/4.8.7 |
||
369 | 106 | John Cary | ~~~~~~ |
370 | 100 | John Cary | |
371 | 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 |
||
372 | 119 | Nathan Neri | |
373 | 1 | Redmine Admin | ~~~~~~ |
374 | /path/to/bilder/installed/python -m patch /path/to/bilder/patches/02-fix_build_with_msvc2015-45e8f4ee.diff |
||
375 | 74 | David Alexander | ~~~~~~ |
376 | 1 | Redmine Admin | |
377 | #### Compiling Qt4 |
||
378 | |||
379 | * The copy/paste-able commands below assume VS12. |
||
380 | |||
381 | In a Visual Studio x64 DOS window: |
||
382 | 116 | Nathan Neri | |
383 | ~~~~~~ |
||
384 | 120 | Nathan Neri | set VER=2017 |
385 | REM could be 12 |
||
386 | 1 | Redmine Admin | set DRIVE=C: |
387 | REM or D:, if you're building there |
||
388 | set SFX=vs%VER% |
||
389 | 120 | Nathan Neri | REM or whatever machine suffix you will be building for, if using a combined compiler build |
390 | 1 | Redmine Admin | set QTVER=4.8.7 |
391 | set INSTALL_DIR=%DRIVE%\winsame\builds-%SFX%\winqt\%QTVER%\%QTVER%\msvc%VER%_64 |
||
392 | 103 | John Cary | ~~~~~~ |
393 | 1 | Redmine Admin | |
394 | 106 | John Cary | Modify the last line as needed, e.g., different drive or subdir. |
395 | 1 | Redmine Admin | |
396 | 106 | John Cary | Set the platform args according to your compiler. |
397 | |||
398 | 101 | John Cary | For VS2013 (VS12). |
399 | 106 | John Cary | |
400 | 101 | John Cary | ~~~~~~ |
401 | set PLATFORM_ARGS=-platform win32-msvc2013 |
||
402 | 106 | John Cary | ~~~~~~ |
403 | 101 | John Cary | |
404 | For VS2015 or VS2017: |
||
405 | 106 | John Cary | |
406 | 101 | John Cary | ~~~~~~ |
407 | 1 | Redmine Admin | set PLATFORM_ARGS=-platform win32-msvc2015 |
408 | ~~~~~~ |
||
409 | |||
410 | Then |
||
411 | 120 | Nathan Neri | |
412 | ~~~~~~ |
||
413 | 116 | Nathan Neri | %DRIVE% |
414 | 1 | Redmine Admin | cd %DRIVE%\winsame\builds-%SFX%\winqt\%QTVER% |
415 | 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% |
||
416 | ~~~~~~ |
||
417 | |||
418 | 106 | John Cary | 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) |
419 | 99 | John Cary | |
420 | ~~~~~~ |
||
421 | 44 | John Cary | export VER=12 # or 2017 |
422 | 115 | John Cary | export SFX=vs${VER} |
423 | cd /winsame/builds-${SFX}/winqt/4.8.7 |
||
424 | 139 | David Alexander | export INSTALL_DIR=/winsame/builds-${SFX}/winqt/4.8.7/4.8.7/msvc${VER}_64 |
425 | 128 | Nathan Neri | mkdir -p ${INSTALL_DIR} |
426 | cp -R mkspecs ${INSTALL_DIR} |
||
427 | 137 | David Alexander | ~~~~~~ |
428 | 128 | Nathan Neri | |
429 | Back in the Visual Studio x64 DOS window |
||
430 | |||
431 | ~~~~~~ |
||
432 | 1 | Redmine Admin | %DRIVE% |
433 | cd %DRIVE%\winsame\builds-%SFX%\winqt\4.8.7 |
||
434 | 128 | Nathan Neri | set PATH=%PATH%;%DRIVE%\winsame\builds-%SFX%\winqt\4.8.7\bin |
435 | nmake |
||
436 | REM Took 3.5 hours on a 2.3 GHz Core2 Duo with Solid State Drive |
||
437 | nmake install |
||
438 | REM Took 10 minutes on a 2.3 GHZ Core2 Duo with Solid State Drive |
||
439 | 1 | Redmine Admin | ~~~~~~ |
440 | |||
441 | 142 | David Alexander | * For CMake to find Qt, add INSTALL_DIR to your supra search path when configuring. |
442 | |||
443 | 140 | David Alexander | * 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. |
444 | |||
445 | |||
446 | # Additional Useful Tools |
||
447 | |||
448 | ## Notepad++ |
||
449 | |||
450 | * (Optional) Notepad++ is a free source code editor that is a great tool for Windows. |
||
451 | 1 | Redmine Admin | * Download from http://notepad-plus-plus.org/ |
452 | 110 | David Alexander | * Install and pin to your taskbar. |
453 | |||
454 | ## Java |
||
455 | |||
456 | Java is needed for setting up the machine to be a Jenkins Slave. |
||
457 | |||
458 | 111 | David Alexander | * Download from https://www.java.com/en/download/ (Version 8 Update 181 has a Release date of July 17, 2018) |
459 | * May get a message about the Java Plugin and Chrome. This does not affect the Jenkins slave service. |
||
460 | 110 | David Alexander | * Download the JNLP page from the Jenkins server site (link button with label "Launch agent from browser"). |
461 | * Start a command prompt running as Administrator, then change to the Download directory and type "javaws slave-agent.jnlp" |
||
462 | 1 | Redmine Admin | * Choose File -> "Install as a service" and follow the dialog messages. |
463 | |||
464 | # Experimental Tools and Libraries |
||
465 | |||
466 | These tools have not been fully vetted or built, so you need not do these. |
||
467 | |||
468 | ## MinGW |
||
469 | |||
470 | See [[Installing MinGW]]. |
||
471 | |||
472 | ## ATLAS |
||
473 | 8 | Redmine Admin | |
474 | 131 | John Cary | See [[Installing ATLAS on Windows]]. |
475 | |||
476 | ## OpenBLAS |
||
477 | |||
478 | 1 | Redmine Admin | See [[Installing OpenBlas on Windows]] |
479 | 8 | Redmine Admin | |
480 | 1 | Redmine Admin | # Cygwin and Paths |
481 | |||
482 | (This section assumes the user is familiar with the relations between Cygwin and Windows paths.) |
||
483 | |||
484 | The path is critical for when there are conflicting executables. This is the case for Subversion and OpenSSL. |
||
485 | |||
486 | 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. |
||
487 | |||
488 | 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. |
||
489 | |||
490 | 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. |
||
491 | |||
492 | ## Usage under Jenkins |
||
493 | |||
494 | 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. |
||
495 | |||
496 | |||
497 | ## Summary |
||
498 | |||
499 | * Bilder moves `/usr/bin` to just after the Python path and therefore to before |
||
500 | `/cygdrive/c/Windows/system32`. |
||
501 | * Put the Windows Subversion path behind the Python path (and so behind `/usr/bin`). |
||
502 | - `/usr/bin` must be removed from the path when configuring some packages in order to get the correct subversion when building under Jenkins. |
||
503 | |||
504 | # Bilder machine files for cygwin |
||
505 | |||
506 | 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. |
||
507 | |||
508 | 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. |
||
509 | |||
510 | # Setup for making Installers |
||
511 | |||
512 | ## Visual Studios Redistributables |
||
513 | |||
514 | Download vcredist_x64.exe (Visual C++ Redistributable Packages for Visual Studio 2013) |
||
515 | |||
516 | 161 | David Alexander | http://www.microsoft.com/en-gb/download/details.aspx?id=40784 |
517 | 1 | Redmine Admin | |
518 | Choose only vcredist_x64.exe executable from list. This should put vcomp120.dll in C:\Windows\System32\ |
||
519 | |||
520 | ## Sign Tools |
||
521 | |||
522 | * 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. |
||
523 | * 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: |
||
524 | 74 | David Alexander | |
525 | ~~~~~~ |
||
526 | cd C:\Windows\System32 |
||
527 | REGSVR32 capicom.dll |
||
528 | ~~~~~~ |
||
529 | |||
530 | ## NSIS |
||
531 | 1 | Redmine Admin | |
532 | NSIS is a scriptable installer maker. |
||
533 | 131 | John Cary | |
534 | * Install NSIS from [NSIS Download Site](http://nsis.sourceforge.net/Download). |
||
535 | 88 | John Cary | * 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. |
536 | 74 | David Alexander | * Version 2.46 is available as of Aug 21, 2011. |
537 | * Add `C:\Program Files (x86)\NSIS\Bin` to your system path. |
||
538 | |||
539 | * Install NSIS Access Control Plugin from [Access Control Plugin Site](http://nsis.sourceforge.net/AccessControl_plug-in). |
||
540 | |||
541 | Copies directories and files into the NSIS installation as follows: |
||
542 | |||
543 | ~~~~~~ |
||
544 | 1 | Redmine Admin | AccessControl.zip\Contrib\AccessControl --> NSIS\Contrib\AccessControl |
545 | AccessControl.zip\Docs\AccessControl --> NSIS\Docs\AccessControl |
||
546 | AccessControl.zip\Plugins\AccessControl.dll --> NSIS\Plugins\x86-ansi\AccessControl.dll |
||
547 | AccessControl.zip\Unicode\Plugins\AccessControl.dll --> NSIS\Plugins\x86-unicode\AccessControl.dll |
||
548 | 155 | David Alexander | ~~~~~~ |
549 | |||
550 | |||
551 | # Path |
||
552 | |||
553 | 156 | David Alexander | The resulting Windows PATH should look like this... |
554 | 155 | David Alexander | |
555 | 1 | Redmine Admin | ![](windowsPath.png) |
556 | |||
557 | # Notes For Development |
||
558 | |||
559 | 154 | Ted Sume | [[Notes on debugging Windows executables]] |
560 | 1 | Redmine Admin | [[Notes on deleting directories and files owned by other users]] |
561 | [[Notes on enabling and disabling the Windows Firewall from the command line]] |