Preparing a Windows machine for Bilder » History » Version 73
Tech-X Corporation, 01/04/2018 06:18 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 | 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 | # Ensure that Windows knows its domainname |
||
16 | |||
17 | * From a command prompt, type the command: |
||
18 | |||
19 | ~~~~~~ |
||
20 | ipconfig /all |
||
21 | ~~~~~~ |
||
22 | |||
23 | Look for value of the "Primary Dns Suffix" field, which should be your domain name (i.e. txcorp.com). |
||
24 | |||
25 | * If cygwin is already installed, |
||
26 | |||
27 | ~~~~~~ |
||
28 | ipconfig /all | grep -i "Primary Dns Suffix" | sed -e 's/^.*: //' |
||
29 | ~~~~~~ |
||
30 | |||
31 | should return the domainname. This only applies if it is part of a Windows Domain. |
||
32 | |||
33 | * For Windows 7/Windows 2008 machines that are not a member of the Windows Domain, Active Directory, do the following: |
||
34 | 1. Right click on My Computer, select properties |
||
35 | 2. Click on Advanced system settings |
||
36 | 3. Select the computer name tab |
||
37 | 4. Click the change button |
||
38 | 5. Click the more button |
||
39 | 6. Enter the Primary DNS suffix. i.e. txcorp.com |
||
40 | |||
41 | # Create initial directories |
||
42 | |||
43 | * Create the folder C:\\bin (if not already present). |
||
44 | * Add or move C:\\bin to the front of your system path. |
||
45 | |||
46 | # Tools needed by Bilder |
||
47 | |||
48 | 37 | John Cary | __If all you need is python and sphinx__ (e.g., for builds of documentation), then you need only |
49 | 36 | John Cary | |
50 | * Cygwin (for bash shell) |
||
51 | 1 | Redmine Admin | * CMake from an installer |
52 | 38 | John Cary | * Python from an installer |
53 | * Latex (MikTek below) |
||
54 | 1 | Redmine Admin | * Visual Studio Express (for nmake) |
55 | 36 | John Cary | |
56 | 38 | John Cary | and then you can add the arguments, -W python,cmake, and your installed Python and CMake will be used if your path is correct. |
57 | 36 | John Cary | |
58 | 1 | Redmine Admin | ## Blat |
59 | |||
60 | Blat is a sendmail client for Windows. |
||
61 | |||
62 | * 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. |
||
63 | * Extract the blat311 folder into C:\\bin. |
||
64 | * Copy the C:\bin\blat311\full\blat.{exe,dll} to C:\bin\blat.{exe,dll} |
||
65 | * Execute the following command in a cygwin terminal |
||
66 | |||
67 | ~~~~~~ |
||
68 | blat -install mail.txcorp.com <username>@txcorp.com |
||
69 | ~~~~~~ |
||
70 | |||
71 | ## CMake |
||
72 | |||
73 | CMake is a cross-platform build system. |
||
74 | |||
75 | * Install [CMake (a 32-bit application)](http://www.cmake.org/files/). |
||
76 | 10 | Redmine Admin | * Version 2.8.6 is required. Later versions work also. |
77 | 26 | John Cary | * Add the CMake path to the front of the system path! (Needed to build newer 64 bit versions through Bilder) |
78 | 10 | Redmine Admin | * When this step is complete, make sure the newest CMake is the only one in your system path. |
79 | 1 | Redmine Admin | |
80 | ## CYGWIN |
||
81 | |||
82 | ### Gotchas (in advance) |
||
83 | |||
84 | * Do not install Cygwin's MinGW. Those are installed in a separate area to reduce conflicts. |
||
85 | * 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'. |
||
86 | * Do not install Cygwin's mt. If 'which mt' returns /bin/mt or /usr/bin/mt, then move this aside too. |
||
87 | 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.) |
88 | 1 | Redmine Admin | * Make sure that 'which find' returns the cygwin version (/usr/bin/find), not the Windows version. |
89 | * Make sure 'which cmd' returns the Windows version. If not, check that your bash_profile has not made an error in setting your path. |
||
90 | * 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. |
||
91 | |||
92 | ### Updating Cygwin |
||
93 | |||
94 | * 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. |
||
95 | * 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. |
||
96 | * Recreate the /etc/passwd and /etc/group file again using the mkpasswd and mkgroup commands described in the Configuring Cygwin section. |
||
97 | * 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). |
||
98 | * Upon running setup-*.exe, select the packages: |
||
99 | 3 | Redmine Admin | * Base -> util-linux |
100 | * Devel -> bison |
||
101 | * Devel -> flex |
||
102 | 4 | Redmine Admin | * Devel -> gcc-g++ and gcc-fortran (4.9.3 does not compile sqlite, so choose 4.9.2) |
103 | 3 | Redmine Admin | * Devel -> git |
104 | * Devel -> make |
||
105 | * Devel -> mercurial |
||
106 | 1 | Redmine Admin | * Devel -> patch |
107 | 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.) |
108 | 3 | Redmine Admin | * Editors -> vim and emacs (and alternate editors of choice) |
109 | * Math -> bc |
||
110 | * Net -> openssh |
||
111 | 25 | Matt Copper | * Net -> curl |
112 | 3 | Redmine Admin | * Python -> python (see note below) |
113 | * Shells -> mintty |
||
114 | * Utils -> diffutils |
||
115 | * Utils -> dos2unix |
||
116 | * Web -> wget |
||
117 | 1 | Redmine Admin | |
118 | * 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). |
||
119 | |||
120 | * 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. |
||
121 | * 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. |
||
122 | |||
123 | ### Setting Cygwin Disk Mounts |
||
124 | |||
125 | * 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: |
||
126 | |||
127 | ~~~~~~ |
||
128 | mkdir /cygdrive/c/winsame |
||
129 | mkdir /winsame |
||
130 | mount C:/winsame /winsame |
||
131 | ~~~~~~ |
||
132 | |||
133 | To make this permanent, put |
||
134 | |||
135 | ~~~~~~ |
||
136 | C:/winsame /winsame ntfs binary 0 0 |
||
137 | ~~~~~~ |
||
138 | |||
139 | as one line in /etc/fstab. |
||
140 | |||
141 | On Windows-64, additionally put |
||
142 | |||
143 | ~~~~~~ |
||
144 | C:/Program\040Files\040(x86) /ProgramFilesX86 ntfs binary 0 0 |
||
145 | ~~~~~~ |
||
146 | |||
147 | as one line in /etc/fstab. This allows one to construct a valid path with no parentheses as needed for ATLAS. |
||
148 | |||
149 | ### Configuring Cygwin |
||
150 | |||
151 | 6 | Redmine Admin | * Use a "Cygwin64 Terminal" from basic cygwin installation above to perform all subsequent bash tasks |
152 | 1 | Redmine Admin | |
153 | * If bilderizing a domain machine, create an /etc/passwd file with the following command |
||
154 | |||
155 | ~~~~~~ |
||
156 | mkpasswd -l -d -p /winsame > /etc/passwd |
||
157 | ~~~~~~ |
||
158 | |||
159 | 71 | Tech-X Corporation | * Add a single domain user to an already created /etc/password: |
160 | |||
161 | ~~~~~~ |
||
162 | mkpasswd -l -d -u {username} -p /winsame >> /etc/passwd |
||
163 | ~~~~~~ |
||
164 | |||
165 | 1 | Redmine Admin | * If bilderizing a non-domain machine, create an /etc/passwd file with the following command |
166 | |||
167 | ~~~~~~ |
||
168 | mkpasswd -l -p /winsame > /etc/passwd |
||
169 | ~~~~~~ |
||
170 | |||
171 | * If bilderizing a domain machine, create an /etc/group file with the following command |
||
172 | |||
173 | ~~~~~~ |
||
174 | mkgroup -l -d > /etc/group |
||
175 | ~~~~~~ |
||
176 | |||
177 | * If bilderizing a non-domain machine, create an /etc/group file with the following command |
||
178 | |||
179 | ~~~~~~ |
||
180 | mkgroup -l > /etc/group |
||
181 | ~~~~~~ |
||
182 | |||
183 | * 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: |
||
184 | |||
185 | ~~~~~~ |
||
186 | cp /home/<username>/.* /winsame/<username>/ |
||
187 | rm -rf /home/<username> |
||
188 | 72 | Ted Sume | ~~~~~~ |
189 | 1 | Redmine Admin | |
190 | 52 | John Cary | ## Dependency Walker |
191 | 1 | Redmine Admin | |
192 | 52 | John Cary | Dependency Walker shows the DLL's that an executable depends on. This is used to find and copy-in DLLs to a final distribution. |
193 | 1 | Redmine Admin | |
194 | 52 | John Cary | __Make sure you download and install the correct version of dependencywalker for your machine (x86 for x86 machines, x64 for 64bit machines, etc).__ |
195 | 5 | Redmine Admin | |
196 | 52 | John Cary | Install [Dependency Walker](http://www.dependencywalker.com/) into C:\\bin. |
197 | 1 | Redmine Admin | |
198 | ## JOM |
||
199 | |||
200 | JOM is an nmake substitute that allows the -j flag for faster compilation. |
||
201 | |||
202 | * Create the folder C:\bin (if not already present). |
||
203 | * Add C:\bin to your system path (if not already there). |
||
204 | * Download jom.zip from [the Qt Project](https://wiki.qt.io/Jom). |
||
205 | * Extract the contents of jom.zip |
||
206 | * Move/copy jom.exe to C:\bin (you then can delete the remainder of the contents or keep for historical reasons). |
||
207 | |||
208 | ## LaTeX |
||
209 | |||
210 | If you will be building documentation, then you will need to |
||
211 | |||
212 | * Install [Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html). |
||
213 | * Install Basic MikTeX from [MikTeX](http://miktex.org/). Use the MikTeX Package Manager to install breakurl capt-of cmap comment courier ec eepic environ epstopdf eqparbox fancybox fancyvrb framed footnote framed fricychap gensymb helvetic lineno mdwtools mmap mptopdf multirow newfloat overpic palatino parskip pdftex pifont revtex4 siunitx subfiles symbol tabulary threeparttable titlesec trimspaces txfonts units upquote url wrapfig xcite xcolor xypic zapfding |
||
214 | * In MikTex Settings application (start from StartMenu), under the General tab, choose "Yes" for "Install missing packages on-the-fly". This ensures that builds won't hang waiting for user to dismiss install package dialogs. |
||
215 | * Install [ghostscript](http://sourceforge.net/projects/ghostscript/files/GPL%20Ghostscript/9.04/). |
||
216 | 72 | Ted Sume | |
217 | 52 | John Cary | |
218 | ## MPI |
||
219 | |||
220 | Download the HPC Pack 2008 R2 (Service Pack 4 as of March 2016) from: |
||
221 | |||
222 | https://www.microsoft.com/en-us/download/details.aspx?id=29992 |
||
223 | |||
224 | The 64bit installer is named HPC2008R2-SP4-Update-x64.zip (the monitor pack & integration pack are separate and optional). |
||
225 | |||
226 | 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. |
||
227 | 1 | Redmine Admin | |
228 | ## NSIS |
||
229 | |||
230 | NSIS is a scriptable installer maker. |
||
231 | |||
232 | * Install NSIS from [NSIS Download Site](http://nsis.sourceforge.net/Download). |
||
233 | * 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. |
||
234 | * Version 2.46 is available as of Aug 21, 2011. |
||
235 | |||
236 | * Install NSIS Access Control Plugin from [Access Control Plugin Site](http://nsis.sourceforge.net/AccessControl_plug-in). |
||
237 | |||
238 | Copies directories and files into the NSIS installation as follows: |
||
239 | |||
240 | ~~~~~~ |
||
241 | AccessControl.zip\Contrib\AccessControl --> NSIS\Contrib\AccessControl |
||
242 | AccessControl.zip\Docs\AccessControl --> NSIS\Docs\AccessControl |
||
243 | AccessControl.zip\Plugins\AccessControl.dll --> NSIS\Plugins\x86-ansi\AccessControl.dll |
||
244 | AccessControl.zip\Unicode\Plugins\AccessControl.dll --> NSIS\Plugins\x86-unicode\AccessControl.dll |
||
245 | ~~~~~~ |
||
246 | |||
247 | ## Perl |
||
248 | |||
249 | Perl is needed for Qt |
||
250 | |||
251 | 14 | Redmine Admin | * Download and install [ActiveState Perl](http://www.activestate.com/activeperl/downloads). |
252 | 1 | Redmine Admin | |
253 | ## Python |
||
254 | |||
255 | * 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. |
||
256 | |||
257 | ## Subversion |
||
258 | |||
259 | * Install the CollabNet Subversion Command-Line Client from [The CollabNet Download Site](http://www.open.collab.net/downloads/subversion/). |
||
260 | |||
261 | 34 | Tech-X Corporation | Tech-X users may use the Tech-X login available at the [Tech-X internal accounts page](https://internal.txcorp.com/it/wiki/techxAccounts). |
262 | 33 | Tech-X Corporation | |
263 | 1 | Redmine Admin | * 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. You can verify this with: |
264 | |||
265 | ~~~~~~ |
||
266 | $ where svn |
||
267 | C:\cygwin64\bin\svn.exe |
||
268 | C:\Program Files\CollabNet\Subversion Client\svn.exe |
||
269 | $ /bin/svn --version | head -n 1 |
||
270 | svn, version 1.7.14 (r1542130) |
||
271 | $ /cygdrive/c/Program\ Files/CollabNet/Subversion\ Client/svn --version | head -n 1 |
||
272 | svn, version 1.7.18 (r1615261) |
||
273 | ~~~~~~ |
||
274 | |||
275 | ## Visual Studio |
||
276 | |||
277 | * 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. |
||
278 | |||
279 | 15 | Redmine Admin | * VS12: Visual Studio 2013 Community Edition from Microsoft [VS12 Download Site](https://www.visualstudio.com/en-US/products/visual-studio-community-vs) |
280 | 1 | Redmine Admin | |
281 | 15 | Redmine Admin | * 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). |
282 | 1 | Redmine Admin | |
283 | * Ensure that Visual Studio is not in the system path. (Bilder adds this as needed.) |
||
284 | |||
285 | 7 | Redmine Admin | ### Compatibility with Python |
286 | |||
287 | 26 | John Cary | * Python is built by Bilder. |
288 | 7 | Redmine Admin | |
289 | 1 | Redmine Admin | # Useful Tools |
290 | |||
291 | ## Notepad++ |
||
292 | |||
293 | * (Optional) Notepad++ is a free source code editor that is a great tool for Windows. |
||
294 | * Download from http://notepad-plus-plus.org/ |
||
295 | * Install and pin to your taskbar. |
||
296 | |||
297 | # Libraries |
||
298 | |||
299 | ## OpenSSL |
||
300 | |||
301 | OpenSSL is needed by libssh. |
||
302 | |||
303 | * Download from http://slproweb.com/products/Win32OpenSSL.html |
||
304 | 30 | John Cary | * Choose the Win64 OpenSSL v1.0.2j (not Light) on 64bit or the Win32 OpenSSL v1.0.2j on 32bit windows. |
305 | * You may have to install Visual C++ Redistributables if the installer complains. |
||
306 | 1 | Redmine Admin | * During the installation, select "Copy OpenSSL DLLs to: The OpenSSL binaries (/bin) directory" |
307 | 73 | Tech-X Corporation | * 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. |
308 | 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: |
309 | 1 | Redmine Admin | |
310 | ~~~~~~ |
||
311 | which libeay32.dll |
||
312 | /cygdrive/c/OpenSSL-Win64/bin/libeay32.dll |
||
313 | ~~~~~~ |
||
314 | 30 | John Cary | |
315 | * If built software has unexplained crashes, recheck the above command results. |
||
316 | 1 | Redmine Admin | |
317 | 49 | John Cary | ## [Building and Installing Qt4](#qt4) |
318 | 26 | John Cary | |
319 | 41 | John Cary | * Make sure no other Qt is in your system path. |
320 | 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.) |
321 | 41 | John Cary | ** Version 5.6.1: from http://download.qt.io/official_releases/qt/5.6/5.6.1/qt-opensource-windows-x86-msvc2013_64-5.6.1.exe |
322 | * Run this program, selecting C:\winsame\builds-vsXX\winqt\<version> as your installation directory, where XX is the version of your Visual Studio. |
||
323 | * If 4.8.7, patch Qt by opening a Cygwin window: |
||
324 | 1 | Redmine Admin | |
325 | ~~~~~~ |
||
326 | cd /winsame/builds-vs12/winqt/4.8.7 |
||
327 | 26 | John Cary | patch -p1 --binary < /path/to/bilder/patches/qt-4.8.7.patch |
328 | 1 | Redmine Admin | ~~~~~~ |
329 | |||
330 | 42 | John Cary | ### Compiling Qt4 |
331 | 1 | Redmine Admin | |
332 | * The copy/paste-able commands below assume VS12. |
||
333 | |||
334 | In a Visual Studio x64 DOS window: |
||
335 | |||
336 | ~~~~~~ |
||
337 | set VER=12 |
||
338 | set SFX=vs%VER% |
||
339 | 42 | John Cary | set QTVER=4.8.7 |
340 | 64 | John Cary | set CONTRIB_DIR=C:\winsame\contrib-%SFX% |
341 | ~~~~~~ |
||
342 | |||
343 | Modify the last line as needed, e.g., different drive or subdir. Then |
||
344 | |||
345 | ~~~~~~ |
||
346 | 1 | Redmine Admin | cd C:\winsame\builds-%SFX%\winqt\%QTVER% |
347 | 64 | John Cary | 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 |
348 | 1 | Redmine Admin | ~~~~~~ |
349 | |||
350 | (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) |
||
351 | |||
352 | 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) |
353 | 1 | Redmine Admin | |
354 | ~~~~~~ |
||
355 | export VER=12 |
||
356 | export SFX=vs${VER} |
||
357 | 26 | John Cary | cd /winsame/builds-${SFX}/winqt/4.8.7 |
358 | mkdir -p /winsame/contrib-${SFX}/qt-4.8.7-sersh |
||
359 | cp -R mkspecs /winsame/contrib-${SFX}/qt-4.8.7-sersh |
||
360 | 1 | Redmine Admin | cd /winsame/contrib-${SFX} |
361 | 26 | John Cary | ln -s qt-4.8.7-sersh qt-sersh |
362 | mkshortcut.exe -n qt-sersh.lnk qt-4.8.7-sersh |
||
363 | 1 | Redmine Admin | ~~~~~~ |
364 | |||
365 | In the Visual Studio x64 DOS window |
||
366 | |||
367 | ~~~~~~ |
||
368 | set VER=12 |
||
369 | set SFX=vs%VER% |
||
370 | 26 | John Cary | cd C:\winsame\builds-%SFX%\winqt\4.8.7 |
371 | set PATH=%PATH%;C:\winsame\builds-%SFX%\winqt\4.8.7\bin |
||
372 | 1 | Redmine Admin | nmake # Took 3.5 hours on a 2.3 GHz Core2 Duo with Solid State Drive |
373 | nmake install # Took 10 minutes on a 2.3 GHZ Core2 Duo with Solid State Drive |
||
374 | ~~~~~~ |
||
375 | |||
376 | * 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. |
||
377 | |||
378 | In the bash window, then execute |
||
379 | |||
380 | ~~~~~~ |
||
381 | /path/to//bilder/setinstald.sh -i /winsame/contrib-$SFX qt,sersh |
||
382 | 43 | John Cary | ~~~~~~ |
383 | 42 | John Cary | |
384 | 49 | John Cary | ## [Building and Installing Qt5](#qt5) |
385 | 42 | John Cary | |
386 | 44 | John Cary | * Ruby, http://rubyinstaller.org/, must be installed first. |
387 | 42 | John Cary | * Make sure no other Qt is in your system path. |
388 | 70 | John Cary | * Get the Qt Libraries from http://download.qt.io/official_releases/qt/5.9/5.9.3/qt-opensource-windows-x86-5.9.3.exe |
389 | * Run this program, selecting `C:\winsame\builds-vsXX\winqt\5.9.3` as your installation directory, where XX is the version of your Visual Studio. |
||
390 | 66 | John Cary | * Be sure to install Sources and WebEngine. |
391 | 42 | John Cary | |
392 | ### Compiling Qt5 |
||
393 | |||
394 | 68 | John Cary | * The copy/paste-able commands below assume VS2017. |
395 | 42 | John Cary | |
396 | In a Visual Studio x64 DOS window: |
||
397 | |||
398 | 1 | Redmine Admin | ~~~~~~ |
399 | 68 | John Cary | set VER=2017 |
400 | 42 | John Cary | set SFX=vs%VER% |
401 | 1 | Redmine Admin | set QTVER=5.9.3 |
402 | 68 | John Cary | set CONTRIB_DIR=C:\winsame\contrib-%SFX% |
403 | 70 | John Cary | set CONTRIB_DIR |
404 | 55 | John Cary | ~~~~~~ |
405 | 56 | John Cary | |
406 | 70 | John Cary | Examine the output of the last command to make sure you have the supra-installation directory correct. |
407 | 56 | John Cary | |
408 | 55 | John Cary | ~~~~~~ |
409 | 68 | John Cary | cd C:\winsame\builds-%SFX%\winqt\%QTVER%\%QTVER%\Src |
410 | 69 | John Cary | 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 |
411 | 1 | Redmine Admin | jom # Took 45 minutes on a 4-core i7 |
412 | 47 | John Cary | jom install # Took 8 minutes on a 4-core i7 |
413 | 1 | Redmine Admin | ~~~~~~ |
414 | |||
415 | 70 | John Cary | Check that your installation contains Qt5WebEngine. |
416 | 1 | Redmine Admin | |
417 | 70 | John Cary | We had to further make the following changes. |
418 | |||
419 | 60 | John Cary | ~~~~~~ |
420 | $ diff QtGui QtGui.orig |
||
421 | 55c55 |
||
422 | < // #include "qopenglextrafunctions.h" |
||
423 | --- |
||
424 | > #include "qopenglextrafunctions.h" |
||
425 | $ diff qopengl.h qopengl.h.orig |
||
426 | 108c108 |
||
427 | < // # include <QtGui/qopengles2ext.h> |
||
428 | --- |
||
429 | > # include <QtGui/qopengles2ext.h> |
||
430 | 58 | David Howdle | ~~~~~~ |
431 | 62 | John Cary | |
432 | 61 | John Cary | The VisIt team also uses the following. |
433 | |||
434 | ~~~~~~ |
||
435 | -mp -ltcg |
||
436 | 58 | David Howdle | ~~~~~~ |
437 | 1 | Redmine Admin | |
438 | ### Completing installation |
||
439 | |||
440 | In a bash window: |
||
441 | |||
442 | ~~~~~~ |
||
443 | 70 | John Cary | export VER=2017 |
444 | 1 | Redmine Admin | export SFX=vs${VER} |
445 | 70 | John Cary | export QTVER=5.9.3 |
446 | export CONTRIB_DIR=/winsame/contrib-%SFX% |
||
447 | echo $CONTRIB_DIR |
||
448 | ~~~~~~ |
||
449 | |||
450 | Check that `CONTRIB_DIR` has the same value as before in the cmd shell, up to OS differences. Then |
||
451 | |||
452 | ~~~~~~ |
||
453 | /path/to//bilder/setinstald.sh -i $CONTRIB_DIR qt,sersh |
||
454 | cd $CONTRIB_DIR |
||
455 | ln -s qt-$QTVER-sersh qt-sersh |
||
456 | mkshortcut -n qt-sersh.lnk qt-$QTVER-sersh |
||
457 | 46 | John Cary | ~~~~~~ |
458 | |||
459 | 1 | Redmine Admin | |
460 | # Experimental Tools and Libraries |
||
461 | |||
462 | These tools have not been fully vetted or built, so you need not do these. |
||
463 | |||
464 | ## MinGW |
||
465 | |||
466 | See [[Installing MinGW]]. |
||
467 | |||
468 | ## ATLAS |
||
469 | |||
470 | See [[Installing ATLAS on Windows]]. |
||
471 | |||
472 | # Cygwin and Paths |
||
473 | 8 | Redmine Admin | |
474 | 1 | Redmine Admin | (This section assumes the user is familiar with the relations between Cygwin and Windows paths.) |
475 | 8 | Redmine Admin | |
476 | 1 | Redmine Admin | The path is critical for when there are conflicting executables. This is the case for Subversion and OpenSSL. |
477 | |||
478 | 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. |
||
479 | |||
480 | 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. |
||
481 | |||
482 | 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. |
||
483 | |||
484 | ## Usage under Jenkins |
||
485 | |||
486 | 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. |
||
487 | |||
488 | |||
489 | ## Summary |
||
490 | |||
491 | * Bilder moves `/usr/bin` to just after the Python path and therefore to before |
||
492 | `/cygdrive/c/Windows/system32`. |
||
493 | * Put the Windows Subversion path behind the Python path (and so behind `/usr/bin`). |
||
494 | - `/usr/bin` must be removed from the path when configuring some packages in order to get the correct subversion when building under Jenkins. |
||
495 | |||
496 | # Bilder machine files for cygwin |
||
497 | |||
498 | 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. |
||
499 | |||
500 | 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. |
||
501 | |||
502 | # Setup for making Installers |
||
503 | |||
504 | ## Visual Studios Redistributables |
||
505 | |||
506 | Download vcredist_x64.exe (Visual C++ Redistributable Packages for Visual Studio 2013) |
||
507 | |||
508 | http://www.microsoft.com/en-gb/download/details.aspx?id=40784 |
||
509 | 18 | Redmine Admin | |
510 | 1 | Redmine Admin | Choose only vcredist_x64.exe executable from list. Put executable in C:\bin. |
511 | |||
512 | ## Sign Tools |
||
513 | |||
514 | * 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. |
||
515 | * 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: |
||
516 | |||
517 | ~~~~~~ |
||
518 | cd C:\Windows\System32 |
||
519 | REGSVR32 capicom.dll |
||
520 | ~~~~~~ |
||
521 | |||
522 | # Notes For Development |
||
523 | |||
524 | [[Notes on debugging Windows executables]] |
||
525 | [[Notes on deleting directories and files owned by other users]] |