Project

General

Profile

Preparing a Windows machine for Bilder » History » Version 92

John Cary, 03/03/2018 08:28 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 22 Matt Copper
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! At least for ATLAS, the UAC Settings must be adjusted to "never notify" (this action is generally recommended while taking all the steps below). 
6 1 Redmine Admin
7
# Basic Windows Configuration
8
9
_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.
10
11
# Editing your system path on Windows
12
13
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.
14
15 89 David Alexander
# If your machine is on a Windows Domain (as compared to a WORKGROUP), then ensure that Windows knows its domainname
16 1 Redmine Admin
17 89 David Alexander
If your machine is on a Windows Domain, then Bilder can set common variable that make 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.
18
19 1 Redmine Admin
* From a command prompt, type the command: 
20
21
~~~~~~
22
ipconfig /all
23
~~~~~~
24
25
Look for value of the "Primary Dns Suffix" field, which should be your domain name (i.e. txcorp.com).
26
27
* If cygwin is already installed,
28
29
~~~~~~
30
ipconfig /all | grep -i "Primary Dns Suffix" | sed -e 's/^.*: //'
31
~~~~~~
32
33 89 David Alexander
should return the domainname. 
34 1 Redmine Admin
35
* For Windows 7/Windows 2008 machines that are not a member of the Windows Domain, Active Directory, do the following:
36
    1. Right click on My Computer, select properties
37
    2. Click on Advanced system settings
38
    3. Select the computer name tab
39
    4. Click the change button
40
    5. Click the more button
41
    6. Enter the Primary DNS suffix. i.e. txcorp.com 
42
43
# Create initial directories
44
45
* Create the folder C:\\bin (if not already present).
46
* Add or move C:\\bin to the front of your system path.
47
48 74 David Alexander
# What is "Required" for Bilder
49 1 Redmine Admin
50 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
51 37 John Cary
52 74 David Alexander
* Blat (for emailing yourself)
53 36 John Cary
* Cygwin (for bash shell)
54 1 Redmine Admin
* CMake from an installer
55 38 John Cary
* Python from an installer
56
* Latex (MikTek below)
57 1 Redmine Admin
* Visual Studio Express (for nmake)
58 36 John Cary
59 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.
60
61 82 John Cary
If you are building through Qt5,
62
63
* 2017-15.4.5 (the particular revision for building QtWebEngine).  If not building Qt5, but using it, then at least need VS2015 or VS2017.
64
* Windows 10 or Windows 10 SDK
65
66 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.
67
68
69 74 David Alexander
Below is a list of the Tools and Libraries that are most often needed.
70
71
# Tools (Required for most common builds within Bilder)
72
73 1 Redmine Admin
## Blat
74
75 74 David Alexander
*Blat is a sendmail client for Windows needed to send emails.*
76 1 Redmine Admin
77
* 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.
78
* Extract the blat311 folder into C:\\bin.
79
* Copy the C:\bin\blat311\full\blat.{exe,dll} to C:\bin\blat.{exe,dll}
80
* Execute the following command in a cygwin terminal
81
82
~~~~~~
83
    blat -install mail.txcorp.com <username>@txcorp.com
84
~~~~~~
85
86
## CMake
87
88 74 David Alexander
*CMake is a cross-platform build system needed to configure many of necessary packages.*
89 1 Redmine Admin
90
* Install [CMake (a 32-bit application)](http://www.cmake.org/files/).
91 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.
92 26 John Cary
  * Add the CMake path to the front of the system path! (Needed to build newer 64 bit versions through Bilder)
93 1 Redmine Admin
  * When this step is complete, make sure the newest CMake is the only one in your system path.
94
95 10 Redmine Admin
## CYGWIN
96 1 Redmine Admin
97 74 David Alexander
*Cygwin is a Unix shell program for Windows and is needed to run the bash code of Bilder.*
98
99 1 Redmine Admin
### Gotchas (in advance)
100
101
* Do not install Cygwin's MinGW. Those are installed in a separate area to reduce conflicts.
102
* 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'.
103
* Do not install Cygwin's mt.  If 'which mt' returns /bin/mt or /usr/bin/mt, then move this aside too.
104 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.)
105 1 Redmine Admin
* Make sure that 'which find' returns the cygwin version (/usr/bin/find), not the Windows version.
106
* Make sure 'which cmd' returns the Windows version. If not, check that your bash_profile has not made an error in setting your path.
107
* 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.
108
109
### Updating Cygwin
110
111
* 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.
112
* 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.
113
* Recreate the /etc/passwd and /etc/group file again using the mkpasswd and mkgroup commands described in the Configuring Cygwin section.
114
* 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).
115
* Upon running setup-*.exe, select the packages:
116 3 Redmine Admin
  * Base -> util-linux
117
  * Devel -> bison
118
  * Devel -> flex
119 4 Redmine Admin
  * Devel -> gcc-g++ and gcc-fortran (4.9.3 does not compile sqlite, so choose 4.9.2)
120 3 Redmine Admin
  * Devel -> git
121
  * Devel -> make
122
  * Devel -> mercurial
123 1 Redmine Admin
  * Devel -> patch
124 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.)
125 3 Redmine Admin
  * Editors -> vim and emacs (and alternate editors of choice)
126
  * Math -> bc
127
  * Net -> openssh
128 25 Matt Copper
  * Net -> curl
129 3 Redmine Admin
  * Python -> python (see note below)
130
  * Shells -> mintty
131
  * Utils -> diffutils
132
  * Utils -> dos2unix
133
  * Web -> wget
134 1 Redmine Admin
135
* 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).
136
137
* 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.
138
* 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.
139
140
### Setting Cygwin Disk Mounts
141
142
* 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:
143
144
~~~~~~
145
mkdir /cygdrive/c/winsame
146
mkdir /winsame
147
mount C:/winsame /winsame
148
~~~~~~
149
150
To make this permanent, put
151
152
~~~~~~
153
C:/winsame /winsame ntfs binary 0 0
154
~~~~~~
155
156
as one line in /etc/fstab.
157
158
On Windows-64, additionally put
159
160
~~~~~~
161
C:/Program\040Files\040(x86) /ProgramFilesX86 ntfs binary 0 0
162
~~~~~~
163
164
as one line in /etc/fstab.  This allows one to construct a valid path with no parentheses as needed for ATLAS.
165
166
### Configuring Cygwin
167
168 6 Redmine Admin
* Use a "Cygwin64 Terminal" from basic cygwin installation above to perform all subsequent bash tasks
169 1 Redmine Admin
170
* If bilderizing a domain machine, create an /etc/passwd file with the following command
171
172
~~~~~~
173
mkpasswd -l -d -p /winsame > /etc/passwd
174
~~~~~~
175
176 71 Tech-X Corporation
* Add a single domain user to an already created /etc/password:
177
178
~~~~~~
179
mkpasswd -l -d -u {username} -p /winsame >> /etc/passwd
180
~~~~~~
181
182 1 Redmine Admin
* If bilderizing a non-domain machine, create an /etc/passwd file with the following command
183
184
~~~~~~
185
mkpasswd -l -p /winsame > /etc/passwd
186
~~~~~~
187
188
* If bilderizing a domain machine, create an /etc/group file with the following command
189
190
~~~~~~
191
mkgroup -l -d > /etc/group
192
~~~~~~
193
194
* If bilderizing a non-domain machine, create an /etc/group file with the following command
195
196
~~~~~~
197
mkgroup -l > /etc/group
198
~~~~~~
199
200
* 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:
201
202
~~~~~~
203
cp /home/<username>/.* /winsame/<username>/
204
rm -rf /home/<username>
205
~~~~~~
206 52 John Cary
207 1 Redmine Admin
## Dependency Walker
208 52 John Cary
209 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.*
210 52 John Cary
211 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).__
212 5 Redmine Admin
213 52 John Cary
Install [Dependency Walker](http://www.dependencywalker.com/) into C:\\bin.
214 1 Redmine Admin
215
## JOM
216
217 74 David Alexander
*JOM is an nmake wrapper needed to give  the -j flag capability of Unix make for faster compilation.*
218 1 Redmine Admin
219
* Create the folder C:\bin (if not already present).
220
* Add C:\bin to your system path (if not already there).
221
* Download jom.zip from [the Qt Project](https://wiki.qt.io/Jom).
222
* Extract the contents of jom.zip
223
* Move/copy jom.exe to C:\bin (you then can delete the remainder of the contents or keep for historical reasons).
224
225
## LaTeX
226
227 74 David Alexander
*LaTeX is a typesetting tool needed for building PDF files for user documentation.*
228 1 Redmine Admin
229 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".
230 92 John Cary
* Install Basic MikTeX from [MikTeX](http://miktex.org/). Use the MikTeX Package Manager to install the packages noted at
231
[[LaTeX packages needed by Bilder]]
232 1 Redmine Admin
* Install [ghostscript](http://sourceforge.net/projects/ghostscript/files/GPL%20Ghostscript/9.04/).
233
234
235
## MPI
236
237 74 David Alexander
*MPI is a message passing interface for parallel code that is needed for some computation engines.*
238
239 1 Redmine Admin
Download the HPC Pack 2008 R2 (Service Pack 4 as of March 2016) from:
240
241
https://www.microsoft.com/en-us/download/details.aspx?id=29992
242
243
The 64bit installer is named HPC2008R2-SP4-Update-x64.zip (the monitor pack & integration pack are separate and optional).
244
245
The installers will put mpiexec in your path, but you will need to restart any cygwin shells and the Jenkins slave to make this active.
246
247
248 85 John Cary
## Perl (required to build OpenSSL, therefore CMake)
249 1 Redmine Admin
250 74 David Alexander
*Perl is a programming language needed by some packages such as Qt*
251 1 Redmine Admin
252
* Download and install [ActiveState Perl](http://www.activestate.com/activeperl/downloads).
253
254
## Python
255
256 74 David Alexander
*Python is a programming language needed by many packages. Namely, any Python module needs Python to be installed.*
257
258 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.
259 1 Redmine Admin
260 85 John Cary
## Ruby (required to build Qt5)
261
262
* Ruby, http://rubyinstaller.org/, must be installed first.
263
264 1 Redmine Admin
## Subversion
265
266 74 David Alexander
* Subversion is a revision control tool needed by bilder, for example, to know when packages are out of date.*
267 1 Redmine Admin
268 84 John Cary
* Install TortoiseSVN with its command line tools.
269 1 Redmine Admin
270 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).
271 33 Tech-X Corporation
272 1 Redmine Admin
~~~~~~
273
$ where svn
274 84 John Cary
C:\cygwin64\bin\svn.exe
275
C:\PROGRAM FILES\TORTOISESVN\bin\svn.exe
276
$ /usr/bin/svn --version | head -1
277
svn, version 1.9.7 (r1800392)
278
$ /cygdrive/c/Program\ Files/TortoiseSVN/bin/svn --version | head -n 1
279
svn, version 1.9.7 (r1800392)
280 15 Redmine Admin
~~~~~~
281 1 Redmine Admin
282
## Visual Studio
283 15 Redmine Admin
284 74 David Alexander
*Visual Studio contains the Microsoft command-line compiler (cl) used by packages with C/C++ code.* 
285
286 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.
287
288
    * VS12: Visual Studio 2013 Community Edition from Microsoft [VS12 Download Site](https://www.visualstudio.com/en-US/products/visual-studio-community-vs)
289
290
* 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).
291
292
* Ensure that Visual Studio is not in the system path. (Bilder adds this as needed.)
293 7 Redmine Admin
294 26 John Cary
### Compatibility with Python
295 7 Redmine Admin
296 1 Redmine Admin
* Python is built by Bilder.
297
298 78 Ted Sume
### Compatibility with CUDA 9.1 
299
* 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.
300 74 David Alexander
301 1 Redmine Admin
# Libraries (Required for most builds with Bilder)
302
303
## OpenSSL
304
305 85 John Cary
*OpenSSL is a security library needed by Python to build the SSL module, by cmake, libssh, and by Qt.*
306
*We no longer install OpenSSL on Windows, as Bilder builds it to be consistent with the compiler in use."
307 1 Redmine Admin
308 85 John Cary
### Legacy instructions.
309
310 1 Redmine Admin
* Download from http://slproweb.com/products/Win32OpenSSL.html
311 75 John Cary
* Choose the Win64 OpenSSL v1.0.2n  (not Light) on 64bit or the Win32 OpenSSL v1.0.2n on 32bit windows.
312 76 John Cary
* **The 1.1 series DOES NOT WORK with either libssh or Qt.**
313 1 Redmine Admin
* You may have to install Visual C++ Redistributables if the installer complains.
314
* During the installation, select "Copy OpenSSL DLLs to: The OpenSSL binaries (/bin) directory"
315
* 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.
316
* 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:
317
318 30 John Cary
~~~~~~
319
which libeay32.dll
320 1 Redmine Admin
/cygdrive/c/OpenSSL-Win64/bin/libeay32.dll
321 73 Tech-X Corporation
~~~~~~
322 30 John Cary
323 1 Redmine Admin
* If built software has unexplained crashes, recheck the above command results.
324
325 74 David Alexander
## Qt
326 1 Redmine Admin
327 74 David Alexander
*Qt is a cross-platform GUI library needed to build packages that have Qt-based user interfaces.*
328
329
Either Qt4 or Qt5 (or both) can be added. Typically only one will be needed.
330
331
###  [Building and Installing Qt4](#qt4)
332
333 41 John Cary
* Make sure no other Qt is in your system path.
334 42 John Cary
* Get the Qt Libraries from http://download.qt.io/official_releases/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.)
335 41 John Cary
* Run this program, selecting C:\winsame\builds-vsXX\winqt\<version> as your installation directory, where XX is the version of your Visual Studio.
336
* If 4.8.7, patch Qt by opening a Cygwin window:
337 1 Redmine Admin
338
~~~~~~
339
cd /winsame/builds-vs12/winqt/4.8.7
340 26 John Cary
patch -p1 --binary < /path/to/bilder/patches/qt-4.8.7.patch
341 1 Redmine Admin
~~~~~~
342
343 74 David Alexander
#### Compiling Qt4
344 1 Redmine Admin
345
* The copy/paste-able commands below assume VS12.
346
347
In a Visual Studio x64 DOS window:
348
349
~~~~~~
350
set VER=12
351
set SFX=vs%VER%
352 42 John Cary
set QTVER=4.8.7
353 64 John Cary
set CONTRIB_DIR=C:\winsame\contrib-%SFX%
354
~~~~~~
355
356
Modify the last line as needed, e.g., different drive or subdir.  Then
357
358
~~~~~~
359 1 Redmine Admin
cd C:\winsame\builds-%SFX%\winqt\%QTVER%
360
configure.exe -prefix %CONTRIB_DIR%\qt-%QTVER%-sersh -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
361 64 John Cary
~~~~~~
362 1 Redmine Admin
363
(NOTE: If you are building with Visual Studio 2008, then you'll need to add the following arguments to the above command: -platform win32-msvc2008)
364
365 2 Redmine Admin
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)
366 1 Redmine Admin
367
~~~~~~
368
export VER=12
369
export SFX=vs${VER}
370
cd /winsame/builds-${SFX}/winqt/4.8.7
371 26 John Cary
mkdir -p /winsame/contrib-${SFX}/qt-4.8.7-sersh
372
cp -R mkspecs /winsame/contrib-${SFX}/qt-4.8.7-sersh
373 1 Redmine Admin
cd /winsame/contrib-${SFX}
374 26 John Cary
ln -s qt-4.8.7-sersh qt-sersh
375
mkshortcut.exe -n qt-sersh.lnk qt-4.8.7-sersh
376 1 Redmine Admin
~~~~~~
377
378
In the Visual Studio x64 DOS window
379
380
~~~~~~
381
set VER=12
382
set SFX=vs%VER%
383 26 John Cary
cd C:\winsame\builds-%SFX%\winqt\4.8.7 
384
set PATH=%PATH%;C:\winsame\builds-%SFX%\winqt\4.8.7\bin
385 1 Redmine Admin
nmake         # Took 3.5 hours on a 2.3 GHz Core2 Duo with Solid State Drive
386
nmake install # Took 10 minutes on a 2.3 GHZ Core2 Duo with Solid State Drive
387
~~~~~~
388
389
* If you want to use this qt outside of Bilder, add C:\winsame\contrib-%SFX%\qt-4.8.7-sersh\bin to the system path variable.  This may not work if you have more than one Bilder run.
390
391
In the bash window, then execute
392 42 John Cary
393 81 David Alexander
~~~~~~
394
/path/to//bilder/setinstald.sh -i /winsame/contrib-$SFX qt,sersh
395
~~~~~~
396 1 Redmine Admin
397
398
### Installing Qt5
399
400 85 John Cary
These instructions are how to install the pre-built version of Qt 5 (version 5.10.1 ).  You can skip creating the Qt account.
401 81 David Alexander
402 85 John Cary
* Get Qt-5.10.1 from http://download.qt.io/official_releases/qt/5.10/5.10.1/qt-opensource-windows-x86-5.10.1.exe
403
* Run this program, selecting `C:\winsame\builds-vs2017\winqt\5.10.1` as your installation directory.
404 81 David Alexander
* Select the following components:
405 85 John Cary
** "MSVC 2017 64-bit,"
406
** "Qt WebEngine"
407
** "Sources"
408 42 John Cary
** (optionally) under Tools select "Qt Creator 4.5.0 CDB Debugger Support" and "Qt 3D Studio 1.0.0"
409 44 John Cary
410 1 Redmine Admin
411 85 John Cary
### [Building Qt5](#qt5)
412 79 John Cary
413 85 John Cary
*We are not building Qt5 at this time, but some legacy instructions are below.*
414 42 John Cary
415 85 John Cary
416 42 John Cary
#### Compiling Qt5
417 68 John Cary
418 85 John Cary
* Make sure no other Qt is in your system path.
419 42 John Cary
* The copy/paste-able commands below assume VS2017.
420 1 Redmine Admin
421
In a Visual Studio x64 DOS window:
422 68 John Cary
423 42 John Cary
~~~~~~
424 79 John Cary
set VER=2017
425 68 John Cary
set SFX=vs%VER%
426 70 John Cary
set QTVER=5.10.0
427 55 John Cary
set CONTRIB_DIR=C:\winsame\contrib-%SFX%
428 56 John Cary
set CONTRIB_DIR
429 70 John Cary
~~~~~~
430 56 John Cary
431 55 John Cary
Examine the output of the last command to make sure you have the supra-installation directory correct.
432 68 John Cary
433 69 John Cary
~~~~~~
434 1 Redmine Admin
cd C:\winsame\builds-%SFX%\winqt\%QTVER%\%QTVER%\Src
435
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
436
jom         # Took 45 minutes on a 4-core i7
437
jom install # Took 8 minutes on a 4-core i7
438 70 John Cary
~~~~~~
439 1 Redmine Admin
440 79 John Cary
Check that your installation contains Qt5WebEngine.
441 70 John Cary
442 1 Redmine Admin
Check whether the following changes are needed.
443 60 John Cary
444 1 Redmine Admin
~~~~~~
445
$ diff QtGui QtGui.orig
446
55c55
447
< // #include "qopenglextrafunctions.h"
448
---
449
> #include "qopenglextrafunctions.h"
450 60 John Cary
$ diff qopengl.h qopengl.h.orig
451
108c108
452
< // #  include <QtGui/qopengles2ext.h>
453
---
454
> #  include <QtGui/qopengles2ext.h>
455
~~~~~~
456
457
The VisIt team also uses the following.
458
459
~~~~~~
460 58 David Howdle
-mp -ltcg
461 62 John Cary
~~~~~~
462 1 Redmine Admin
463 85 John Cary
#### Completing installation
464 61 John Cary
465
In a bash window:
466 58 David Howdle
467 1 Redmine Admin
~~~~~~
468 79 John Cary
export VER=2017
469 1 Redmine Admin
export SFX=vs${VER}
470
export QTVER=5.10.0
471
export CONTRIB_DIR=/winsame/contrib-%SFX%
472
echo $CONTRIB_DIR
473 70 John Cary
~~~~~~
474 1 Redmine Admin
475 70 John Cary
Check that `CONTRIB_DIR` has the same value as before in the cmd shell, up to OS differences.  Then
476 79 John Cary
477 70 John Cary
~~~~~~
478
env QT_BLDRVERSION=5.10.1 /path/to/bilder/setinstald.sh -i $CONTRIB_DIR qt,sersh
479
cd $CONTRIB_DIR
480
ln -s qt-$QTVER-sersh qt-sersh
481
mkshortcut -n qt-sersh.lnk qt-$QTVER-sersh
482 74 David Alexander
~~~~~~
483 70 John Cary
484 74 David Alexander
# Addition Useful Tools
485
486
## Notepad++
487
488
* (Optional) Notepad++ is a free source code editor that is a great tool for Windows.
489
* Download from http://notepad-plus-plus.org/
490 1 Redmine Admin
* Install and pin to your taskbar.
491
492
# Experimental Tools and Libraries
493
494
These tools have not been fully vetted or built, so you need not do these.
495
496
## MinGW
497
498
See [[Installing MinGW]].
499
500
## ATLAS
501
502
See [[Installing ATLAS on Windows]].
503 8 Redmine Admin
504 1 Redmine Admin
# Cygwin and Paths
505 8 Redmine Admin
506 1 Redmine Admin
(This section assumes the user is familiar with the relations between Cygwin and Windows paths.)
507
508
The path is critical for when there are conflicting executables.  This is the case for Subversion and OpenSSL.
509
510
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.
511
512
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.
513
514
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.
515
516
## Usage under Jenkins
517
518
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.
519
520
521
## Summary
522
523
* Bilder moves `/usr/bin` to just after the Python path and therefore to before
524
  `/cygdrive/c/Windows/system32`.
525
* Put the Windows Subversion path behind the Python path (and so behind `/usr/bin`).
526
    - `/usr/bin` must be removed from the path when configuring some packages in order to get the correct subversion when building under Jenkins.
527
528
# Bilder machine files for cygwin
529
530
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.
531
532
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.
533
534
# Setup for making Installers
535
536
## Visual Studios Redistributables
537
538
Download vcredist_x64.exe (Visual C++ Redistributable Packages for Visual Studio 2013)
539
540
http://www.microsoft.com/en-gb/download/details.aspx?id=40784
541
542
Choose only vcredist_x64.exe executable from list. Put executable in C:\bin.
543
544
## Sign Tools
545
546
* 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.
547
* 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: 
548
549
~~~~~~
550 74 David Alexander
cd C:\Windows\System32
551
REGSVR32 capicom.dll
552
~~~~~~
553
554
## NSIS
555
556
NSIS is a scriptable installer maker.
557
558
* Install NSIS from [NSIS Download Site](http://nsis.sourceforge.net/Download).
559
    * 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.
560 88 John Cary
    * Version 2.46 is available as of Aug 21, 2011.
561
* Add `C:\Program Files (x86)\NSIS\Bin` to your system path.
562 74 David Alexander
563
* Install NSIS Access Control Plugin from [Access Control Plugin Site](http://nsis.sourceforge.net/AccessControl_plug-in).
564
565
Copies directories and files into the NSIS installation as follows:
566
567
~~~~~~
568
AccessControl.zip\Contrib\AccessControl --> NSIS\Contrib\AccessControl
569
AccessControl.zip\Docs\AccessControl --> NSIS\Docs\AccessControl
570 1 Redmine Admin
AccessControl.zip\Plugins\AccessControl.dll --> NSIS\Plugins\x86-ansi\AccessControl.dll
571
AccessControl.zip\Unicode\Plugins\AccessControl.dll --> NSIS\Plugins\x86-unicode\AccessControl.dll
572
~~~~~~
573
574
# Notes For Development
575
576
[[Notes on debugging Windows executables]]
577
[[Notes on deleting directories and files owned by other users]]