├── .gitattributes ├── .gitignore ├── AUTHORS ├── INSTALL ├── LICENSE ├── NEWS ├── README ├── TODO ├── build ├── .gitignore ├── bootstrap.build └── root.build ├── buildfile ├── cl-11-32 ├── cl-12-32 ├── cl-14.0-32 ├── cl-14.2-32 ├── cl-14.2-64 ├── cl-14.3-32 ├── cl-14.3-64 ├── cl-15.0-32 ├── cl-15.0-64 ├── cl-15.3-32 ├── cl-15.3-64 ├── cl-15.5-32 ├── cl-15.5-64 ├── cl-15.6-32 ├── cl-15.6-64 ├── cl-15.7-32 ├── cl-15.7-64 ├── cl-16.0-32 ├── cl-16.0-64 ├── cl-16.1-32 ├── cl-16.1-64 ├── etc └── lowercase-headers ├── lib-11-32 ├── lib-12-32 ├── lib-14.0-32 ├── lib-14.2-32 ├── lib-14.2-64 ├── lib-14.3-32 ├── lib-14.3-64 ├── lib-15.0-32 ├── lib-15.0-64 ├── lib-15.3-32 ├── lib-15.3-64 ├── lib-15.5-32 ├── lib-15.5-64 ├── lib-15.6-32 ├── lib-15.6-64 ├── lib-15.7-32 ├── lib-15.7-64 ├── lib-16.0-32 ├── lib-16.0-64 ├── lib-16.1-32 ├── lib-16.1-64 ├── link-11-32 ├── link-12-32 ├── link-14.0-32 ├── link-14.2-32 ├── link-14.2-64 ├── link-14.3-32 ├── link-14.3-64 ├── link-15.0-32 ├── link-15.0-64 ├── link-15.3-32 ├── link-15.3-64 ├── link-15.5-32 ├── link-15.5-64 ├── link-15.6-32 ├── link-15.6-64 ├── link-15.7-32 ├── link-15.7-64 ├── link-16.0-32 ├── link-16.0-64 ├── link-16.1-32 ├── link-16.1-64 ├── manifest ├── msvc-11 └── msvc-11-32 ├── msvc-12 └── msvc-12-32 ├── msvc-14 ├── msvc-14.0-32 ├── msvc-14.2-32 ├── msvc-14.2-64 ├── msvc-14.3-32 └── msvc-14.3-64 ├── msvc-15 ├── msvc-15.0-32 ├── msvc-15.0-64 ├── msvc-15.3-32 ├── msvc-15.3-64 ├── msvc-15.5-32 ├── msvc-15.5-64 ├── msvc-15.6-32 ├── msvc-15.6-64 ├── msvc-15.7-32 └── msvc-15.7-64 ├── msvc-16 ├── msvc-16.0-32 ├── msvc-16.0-64 ├── msvc-16.1-32 └── msvc-16.1-64 ├── msvc-common ├── .gitignore ├── msvc-cl-common ├── msvc-common ├── msvc-filter.cxx ├── msvc-lib-common ├── msvc-link-common ├── msvc-mt-common ├── msvc-rc-common ├── msvc-sdk-common └── version.hxx.in ├── msvc-dispatch ├── mt-11-32 ├── mt-12-32 ├── mt-14.0-32 ├── mt-14.2-32 ├── mt-14.2-64 ├── mt-14.3-32 ├── mt-14.3-64 ├── mt-15.0-32 ├── mt-15.0-64 ├── mt-15.3-32 ├── mt-15.3-64 ├── mt-15.5-32 ├── mt-15.5-64 ├── mt-15.6-32 ├── mt-15.6-64 ├── mt-15.7-32 ├── mt-15.7-64 ├── mt-16.0-32 ├── mt-16.0-64 ├── mt-16.1-32 ├── mt-16.1-64 ├── rc-11-32 ├── rc-12-32 ├── rc-14.0-32 ├── rc-14.2-32 ├── rc-14.2-64 ├── rc-14.3-32 ├── rc-14.3-64 ├── rc-15.0-32 ├── rc-15.0-64 ├── rc-15.3-32 ├── rc-15.3-64 ├── rc-15.5-32 ├── rc-15.5-64 ├── rc-15.6-32 ├── rc-15.6-64 ├── rc-15.7-32 ├── rc-15.7-64 ├── rc-16.0-32 ├── rc-16.0-64 ├── rc-16.1-32 ├── rc-16.1-64 └── repositories.manifest /.gitattributes: -------------------------------------------------------------------------------- 1 | # This is a good default: files that are auto-detected by git to be text are 2 | # converted to the platform-native line ending (LF on Unix, CRLF on Windows) 3 | # in the working tree and to LF in the repository. 4 | # 5 | * text=auto 6 | 7 | # Use `eol=crlf` for files that should have the CRLF line ending both in the 8 | # working tree (even on Unix) and in the repository. 9 | # 10 | #*.bat text eol=crlf 11 | 12 | # Use `eol=lf` for files that should have the LF line ending both in the 13 | # working tree (even on Windows) and in the repository. 14 | # 15 | #*.sh text eol=lf 16 | 17 | # Use `binary` to make sure certain files are never auto-detected as text. 18 | # 19 | #*.png binary 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .bdep/ 2 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | This file contains information about the build2 authors for copyright 2 | purposes. 3 | 4 | The copyright for the code is held by the contributors of the code. The 5 | revision history in the version control system is the primary source of 6 | authorship information for copyright purposes. Contributors that have 7 | requested to also be noted explicitly in this file are listed below: 8 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | Setup 2 | ===== 3 | 4 | Setting Scripts 5 | --------------- 6 | 7 | @@ Replace this section with a proper package build/install instructions when 8 | the package name is finalized. 9 | 10 | @@ Interestingly INSTALL files for our packages provide instuctions how to 11 | build the package but not how to install it. 12 | 13 | The "driver" scripts that you will be invoking have names in the following 14 | form: 15 | 16 | -- 17 | 18 | Where: 19 | 20 | is one of 'cl' 'link' 'lib' 'mt' 'rc' 21 | is the Visual Studio version, for example, 11, 12, 14.3, 15.0 22 | is the compiler target, for example, 32 (x86), 64 (x86_64). 23 | 24 | There are also the "configuration" scripts, msvc-NN/msvc--, 25 | which provide the Visual Studio/SDK location and configuration (in a way 26 | similar to vcvars32.bat). There is also a bunch of other helper scripts that 27 | you will not need to modify or invoke directly. It is also required to build 28 | msvc-filter native utility using build2. 29 | 30 | All of these scripts and utilities should reside in the same directory. In 31 | particular, you cannot copy, say, cl-<...> to /usr/local/bin/ while leaving 32 | the rest in some other directory -- this will not work. What you can do, 33 | however, is create symlinks to the driver scripts in /usr/local/bin/ -- this 34 | will work. 35 | 36 | If you only need to make the scripts usable by a single user, then the easiest 37 | approach is to add the script's directory to your PATH in, say, .bashrc, for 38 | example: 39 | 40 | export PATH=$HOME/msvc-linux:$PATH 41 | 42 | Alternatively, if you have something like ~/bin/ that is already in PATH, then 43 | you can simply add symlinks to the scripts there. This way you can also choose 44 | shorter tool names, for example: 45 | 46 | for t in cl link lib mt rc; do \ 47 | ln -s .../msvc-linux/$t-14.2-64 ~/bin/$t-14; done 48 | 49 | While you can modify the configuration scripts, retaining such modifications 50 | over updates will be tedious. As a result, there are several environment 51 | variables that you can set (e.g., in your .bashrc) to adjust some of the 52 | common configuration values. 53 | 54 | Currently you can override WINEPREFIX, INSTALLDIR, and SDKVERSION via the 55 | following environment variable hierarchy (from highest to lowest precedence): 56 | 57 | MSVC___* # MSVC_14_2_INSTALLDIR 58 | MSVC__* # MSVC_14_INSTALLDIR 59 | MSVC_* # MSVC_INSTALLDIR 60 | 61 | The WINEPREFIX value corresponds to the WINEPREFIX Wine environment variable 62 | that allows one to use an alternative (to ~/.wine) root directory. You can 63 | use it, for example, to maintain multiple Visual Studio updates (e.g., 14.1, 64 | 14.2, 14.3) which otherwise cannot coexist in a single installation. 65 | 66 | The INSTALLDIR directory can be used to alter the Visual Studio installation 67 | directory name (not path; the default is "Microsoft Visual Studio NN.0"). 68 | This can be used, for example, to implement an alternative multiple updates 69 | strategy by installing them in the same Wine root but in different 70 | directories. For details on how this value is used refer to the configuration 71 | scripts. 72 | 73 | The SDKVERSION value can be used to specify the Windows 10 SDK version to use. 74 | It should be in the 10.0.NNNNN form. If it is not specified, then the latest 75 | installed is used. Note that this value does not apply to Windows 8.1 and 76 | earlier SDKs; those versions are hardcoded in the confguration scripts. 77 | 78 | Note also that the below instructions include a call to a script that adds 79 | lower-case symlinks for upper-case named headers. This normally fixes the 80 | bulk of the issues associated #include directives that spell header names 81 | differently compared to the actual file names. There are, however, rare 82 | cases where a header is included using a mixed case (e.g., WlanTypes.h) 83 | while the file name is spelled in the lower case (e.g, wlantypes.h). There 84 | is no automated way to fix this and you will either have to adjust the 85 | #include directive or manually create the required symlink. 86 | 87 | Install Wine 88 | ------------ 89 | 90 | You need 1.7.55 or later. Previous versions are known not to work with Visual 91 | Studio 14. 92 | 93 | For Ubuntu, to install stable: 94 | 95 | # add-apt-repository ppa:ubuntu-wine/ppa 96 | # apt-get update 97 | # apt-get install --no-install-recommends winbind 98 | # apt-get install wine1.7 99 | # apt-get install p11-kit-modules:i386 libp11-kit-gnome-keyring:i386 100 | 101 | For Ubuntu, to install staging (into /opt/): 102 | 103 | # add-apt-repository ppa:wine/wine-builds 104 | # apt-get update 105 | # apt-get install --install-recommends wine-staging 106 | 107 | To install compatibility symlinks: 108 | 109 | # apt-get install winehq-staging 110 | 111 | 112 | Configure Wine 113 | -------------- 114 | 115 | $ winecfg 116 | 117 | If it suggests installing some stuff (Gecko, Mono), refuse. Change the 118 | platform to Windows 7 (later version will probably also work). 119 | 120 | 64-bit link.exe from Visual Studio 14 is known not to work with Mono that 121 | may have (still) been installed by winecfg. To remove it, run: 122 | 123 | $ wine64 uninstaller --remove '{E45D8920-A758-4088-B6C6-31DBB276992E}' 124 | 125 | 126 | Prepare to Copy Visual Studio 127 | ----------------------------- 128 | 129 | Note that below we assume that you have installed Visual Studio in the default 130 | location. 131 | 132 | The following instructions are for mounting the VM parition on Linux host. 133 | However, simply archiving the required directories on the running VM and 134 | copying them to the Linux host should work as well. 135 | 136 | Mount the VM disk (make sure it is not running) where you installed Visual 137 | Studio. First get the second partition offset () and sector size (normally 138 | 512, as below). 139 | 140 | # fdisk -lu .../windows-7.img 141 | 142 | Then mount via the loopback device: 143 | 144 | # losetup -o $((512*)) /dev/loop0 ./windows-7.img 145 | # mount -o ro /dev/loop0 /mnt 146 | 147 | When finished copying Visual Studio, unmount and delete the loopback: 148 | 149 | # umount /mnt 150 | # losetup -d /dev/loop0 151 | 152 | 153 | Copy and Setup Visual Studio 11 154 | ------------------------------- 155 | 156 | $ mkdir -p ".wine/drive_c/Program Files (x86)/Microsoft Visual Studio 11.0" 157 | $ cp -r "/mnt/Program Files (x86)/Microsoft Visual Studio 11.0/VC" \ 158 | ".wine/drive_c/Program Files (x86)/Microsoft Visual Studio 11.0/" 159 | $ cp "/mnt/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/mspdb110.dll" \ 160 | ".wine/drive_c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/" 161 | 162 | $ mkdir -p ".wine/drive_c/Program Files (x86)/Windows Kits" 163 | $ cp -r "/mnt/Program Files (x86)/Windows Kits/8.0" \ 164 | ".wine/drive_c/Program Files (x86)/Windows Kits/" 165 | 166 | Add lower-case symlinks for upper-case named headers: 167 | 168 | $ etc/lowercase-headers \ 169 | ".wine/drive_c/Program Files (x86)/Windows Kits/8.0/Include" 170 | 171 | Run the VC11 redistributable DLLs installer for both x64 and x86 from 172 | .../VC/redist/1033/. 173 | 174 | Add overrides for msvcr110.dll and msvcp110.dll: run winecfg, select the 175 | "Libraries" tab, then enter the DLL name and "Add". 176 | 177 | 178 | Copy and Setup Visual Studio 12 179 | ------------------------------- 180 | 181 | $ mkdir -p ".wine/drive_c/Program Files (x86)/Microsoft Visual Studio 12.0" 182 | $ cp -r "/mnt/Program Files (x86)/Microsoft Visual Studio 12.0/VC" \ 183 | ".wine/drive_c/Program Files (x86)/Microsoft Visual Studio 12.0/" 184 | 185 | $ mkdir -p ".wine/drive_c/Program Files (x86)/Windows Kits" 186 | $ cp -r "/mnt/Program Files (x86)/Windows Kits/8.1" \ 187 | ".wine/drive_c/Program Files (x86)/Windows Kits/" 188 | 189 | Add lower-case symlinks for upper-case named headers: 190 | 191 | $ etc/lowercase-headers \ 192 | ".wine/drive_c/Program Files (x86)/Windows Kits/8.1/Include" 193 | 194 | Run the VC12 redistributable DLLs installer for both x64 and x86 from 195 | .../VC/redist/1033/. 196 | 197 | Add overrides for msvcr120.dll and msvcp120.dll: run winecfg, select the 198 | "Libraries" tab, then enter the DLL name and "Add". 199 | 200 | 201 | Copy and Setup Visual Studio 14 202 | ------------------------------- 203 | 204 | Note: 14 Update 2 (and presumably 3) requires Wine 1.9 or later (bug #34851). 205 | 206 | Note: 14 Update 2 (and presumably 3) is known to work with Wine 1.9.7, 1.9.8 207 | but not 1.9.15. 208 | 209 | Note: SDK 8.1 is only used by 14 Update 0. 210 | 211 | $ mkdir -p ".wine/drive_c/Program Files (x86)/Microsoft Visual Studio 14.0" 212 | $ cp -r "/mnt/Program Files (x86)/Microsoft Visual Studio 14.0/VC" \ 213 | ".wine/drive_c/Program Files (x86)/Microsoft Visual Studio 14.0/" 214 | $ cp "/mnt/Program Files (x86)/Microsoft Visual Studio 14.0/VC/redist/x86/Microsoft.VC140.CRT/msvcp140.dll" \ 215 | ".wine/drive_c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/" 216 | 217 | Remove Microsoft's "experience improvement data uploader" which crashes: 218 | 219 | $ find ".wine/drive_c/Program Files (x86)/Microsoft Visual Studio 14.0/" \ 220 | -name vctip.exe -exec rm -f '{}' ';' 221 | 222 | $ mkdir -p ".wine/drive_c/Program Files (x86)/Windows Kits" 223 | $ cp -r "/mnt/Program Files (x86)/Windows Kits/8.1" \ 224 | ".wine/drive_c/Program Files (x86)/Windows Kits/" 225 | $ cp -r "/mnt/Program Files (x86)/Windows Kits/10" \ 226 | ".wine/drive_c/Program Files (x86)/Windows Kits/" 227 | 228 | Add lower-case symlinks for upper-case named headers: 229 | 230 | $ etc/lowercase-headers \ 231 | ".wine/drive_c/Program Files (x86)/Windows Kits/8.1/Include" \ 232 | ".wine/drive_c/Program Files (x86)/Windows Kits/10/Include" 233 | 234 | Installing via the redistributable DLLs still does not work as of Wine 1.9.8. 235 | Instead, we have to manually copy a bunch of DLLs from: 236 | 237 | .wine/.../VC/redist/{x86 x64}/Microsoft.VC140.CRT/ 238 | 239 | And: 240 | 241 | .wine/.../Windows Kits/10/Redist/ucrt/DLLs/{x86 x64}/ 242 | 243 | To: 244 | 245 | .wine/drive_c/windows/{syswow64 system32}/ 246 | 247 | And add Wine overrides (run winecfg, select the "Libraries" tab, then enter 248 | the DLL name and press "Add"). 249 | 250 | To discover the list of DLLs, run cl-14 to compile and link an executable and 251 | then run the executable itself (see Test below): any DLL that causes an error 252 | needs an override. 253 | 254 | For Wine 1.7.55-1.9.8 the list is: 255 | 256 | api-ms-win-crt-runtime-l1-1-0.dll 257 | api-ms-win-crt-locale-l1-1-0.dll 258 | api-ms-win-crt-heap-l1-1-0.dll 259 | api-ms-win-crt-stdio-l1-1-0.dll 260 | api-ms-win-crt-conio-l1-1-0.dll 261 | ucrtbase.dll 262 | vcruntime140.dll 263 | msvcp140.dll 264 | 265 | The following overrides are necessary because of some unimplemented functions: 266 | 267 | api-ms-win-crt-string-l1-1-0.dll 268 | api-ms-win-crt-time-l1-1-0.dll 269 | 270 | 271 | Copy and Setup Visual Studio 15 272 | ------------------------------- 273 | 274 | Note: 15 uses the same CRT runtime DLL version (140) as 14. If using together, 275 | then it makes sense to use versions from 15 which are claimed to be 276 | backwards compatible. The same probably applies to the SDK tools. 277 | 278 | Copy VC files from Windows host. Note that the source path can look 279 | differently, for example: 280 | 281 | .../Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC. 282 | 283 | $ mkdir -p ".wine/drive_c/Program Files (x86)/Microsoft Visual Studio 15.0" 284 | $ cp -r "/mnt/Program Files (x86)/Microsoft Visual Studio 15.0/VC" \ 285 | ".wine/drive_c/Program Files (x86)/Microsoft Visual Studio 15.0/" 286 | 287 | Remove Microsoft's "experience improvement data uploader" which crashes: 288 | 289 | $ find ".wine/drive_c/Program Files (x86)/Microsoft Visual Studio 15.0/" \ 290 | -name vctip.exe -exec rm -f '{}' ';' 291 | 292 | $ mkdir -p ".wine/drive_c/Program Files (x86)/Windows Kits" 293 | $ cp -r "/mnt/Program Files (x86)/Windows Kits/10" \ 294 | ".wine/drive_c/Program Files (x86)/Windows Kits/" 295 | 296 | Add lower-case symlinks for upper-case named headers: 297 | 298 | $ etc/lowercase-headers \ 299 | ".wine/drive_c/Program Files (x86)/Windows Kits/10/Include" 300 | 301 | Installing via the redistributable DLLs still does not work as of Wine 1.9.8. 302 | Instead, we have to manually copy a bunch of DLLs from: 303 | 304 | .wine/.../VC/Redist/MSVC/14.10.NNNNN/{x86 x64}/Microsoft.VC141.CRT/ 305 | 306 | And: 307 | 308 | .wine/.../Windows Kits/10/Redist/ucrt/DLLs/{x86 x64}/ 309 | 310 | To: 311 | 312 | .wine/drive_c/windows/{syswow64 system32}/ 313 | 314 | And add Wine overrides (run winecfg, select the "Libraries" tab, then enter 315 | the DLL name and press "Add"). 316 | 317 | To discover the list of DLLs, run cl-15 to compile and link an executable and 318 | then run the executable itself (see Test below): any DLL that causes an error 319 | needs an override. 320 | 321 | For Wine 1.7.55-1.9.8 the list is: 322 | 323 | api-ms-win-crt-runtime-l1-1-0.dll 324 | api-ms-win-crt-locale-l1-1-0.dll 325 | api-ms-win-crt-heap-l1-1-0.dll 326 | api-ms-win-crt-stdio-l1-1-0.dll 327 | api-ms-win-crt-conio-l1-1-0.dll 328 | ucrtbase.dll 329 | vcruntime140.dll 330 | msvcp140.dll 331 | 332 | The following overrides are necessary because of some unimplemented functions: 333 | 334 | api-ms-win-crt-string-l1-1-0.dll 335 | api-ms-win-crt-time-l1-1-0.dll 336 | api-ms-win-crt-convert-l1-1-0.dll 337 | api-ms-win-core-rtlsupport-l1-1-0.dll 338 | 339 | Note also that if you plan to run tests built against the debug runtime, then 340 | also copy ucrtbased.dll, vcruntime140d.dll, and msvcp140d.dll from Windows 341 | Kits/10/bin/.../ucrt/ and VC/Redist/.../debug_noredist/. 342 | 343 | 344 | Copy and Setup Visual Studio 16 345 | ------------------------------- 346 | 347 | The setup for 16 is similar to that of 15. Follow instructions in "Copy and 348 | Setup Visual Studio 15", replacing year 2017 and version 15 with 2019 and 16, 349 | respectively. 350 | 351 | Regarding the redistributable DLLs, note that for Wine 4.0 (Staging) only the 352 | following overrides appear to be necessary: 353 | 354 | vcruntime140.dll 355 | msvcp140.dll 356 | 357 | Also note that linking for 32-bit builds may fail (see msvc-16/msvc-16.0-32 358 | for details). 359 | 360 | 361 | Test 362 | ---- 363 | 364 | cl-<...> /EHsc /MD /TP hello-world.cxx 365 | ./hello-world.exe 366 | 367 | 368 | Usage 369 | ===== 370 | 371 | To suppress Wine debug messages (especially advisable if running executables 372 | built with more recent Visual Studio versions) you may want to add the 373 | following line to your .bashrc or similar: 374 | 375 | export WINEDEBUG=fixme-all 376 | 377 | 378 | Hacking 379 | ======= 380 | 381 | To add support for a new Visual Studio version follow this overall plan: 382 | 383 | 384 | Install Visual Studio 385 | --------------------- 386 | 387 | Install the new version on a Windows machine keeping the setup as close to 388 | default as possible. Specifically, don't alter the default installation 389 | directory, SDK to use, etc. Normally, you would make sure all the compilers 390 | that you will need are installed (32, 64-bit x86, ARM, etc) and that's it. 391 | Note also that we use the 64-to-32-bit cross-compiler for 32-bit builds. 392 | 393 | 394 | Come up with Configuration(s) 395 | ----------------------------- 396 | 397 | By examining the INCLUDE, IFCPATH and LIB environment variables in the 398 | corresponding Visual Studio Command Prompts, determine which SDK/CRT versions 399 | are used, executable paths for the tools (use the where command), etc. 400 | 401 | Based on this information create the corresponding configuration file(s) in 402 | msvc-NN/ subdirectory. Use the existing configuration from the closest version 403 | as a guide. 404 | 405 | 406 | Create Driver Scripts 407 | --------------------- 408 | 409 | Create the driver scripts corresponding to each new configuration. For example 410 | (replace and ): 411 | 412 | for t in cl link lib mt rc; do \ 413 | cp $t-16.0-32 $t--; done 414 | 415 | 416 | Copy and Setup Visual Studio on Linux 417 | ------------------------------------- 418 | 419 | Copy the Visual Studio setup over to a Linux machine as discussed above using 420 | instructions from the closest version as a guide. Use the new driver scripts 421 | for testing. 422 | 423 | Write down new instructions or update one of the existing. 424 | 425 | 426 | Update Common Scripts 427 | --------------------- 428 | 429 | In a new version of Visual Studio the tools may have new options that may need 430 | to be handled in the msvc-common/msvc--common scripts. To check if any 431 | were added, take a diff of usage outputs (/? option) from the new version and 432 | the most recent that is already supported. 433 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2014-2021 the build2 authors (see the AUTHORS file). 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | See https://git.build2.org/cgit/msvc-linux/log/ for the change log. -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Cross-compiling from UNIX to Windows with MSVC using Wine. 2 | 3 | NOTE: we no longer recommend using this approach unless you absolutely 4 | must. Firstly, the whole setup is very hacky and brittle (and potentially 5 | illegal: we were told it's against the license to run MSVC like that) and 6 | often doesn't work with the most recent versions of MSVC (because Wine hasn't 7 | caught up on the new APIs yet). Also, there are edge cases where build2 does 8 | not fully support this "mode" of running MSVC. It works for projects that 9 | don't do anything unusual, but, for example, you won't be able to build 10 | anything that requires MASM. We believe if you must test with MSVC, the only 11 | sane way to do it is with a Windows VM (which is what we do on our CI). If you 12 | just need to test that your code builds for Windows, another option is to use 13 | Clang and the LLVM linker (lld-link) as a cross-compiler. With this approach 14 | you will only need to copy the MSVC standard library and PlatformSDK (and 15 | won't need to mess with Wine). 16 | 17 | See INSTALL for setup instructions. Note that while this project is called 18 | msvc-linux, you may be able to use it on other UNIX-like systems supported 19 | by Wine. 20 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | @@ Requires bash 4, realpath, dirname, basename 2 | 3 | @@ Rename to msvc-posix, msvc-cross, msvc-wine, msvc-unix. Or just 4 | keep it? 5 | -------------------------------------------------------------------------------- /build/.gitignore: -------------------------------------------------------------------------------- 1 | config.build 2 | root/ 3 | bootstrap/ 4 | -------------------------------------------------------------------------------- /build/bootstrap.build: -------------------------------------------------------------------------------- 1 | # file : build/bootstrap.build 2 | # license : MIT; see accompanying LICENSE file 3 | 4 | project = msvc-linux 5 | 6 | using version 7 | using config 8 | using dist 9 | using install 10 | -------------------------------------------------------------------------------- /build/root.build: -------------------------------------------------------------------------------- 1 | # file : build/root.build 2 | # license : MIT; see accompanying LICENSE file 3 | 4 | cxx.std = latest 5 | 6 | using cxx 7 | 8 | hxx{*}: extension = hxx 9 | ixx{*}: extension = ixx 10 | txx{*}: extension = txx 11 | cxx{*}: extension = cxx 12 | 13 | if ($cxx.id == 'gcc') 14 | cxx.coptions += -Wno-maybe-uninitialized -Wno-free-nonheap-object # libbutl 15 | 16 | cxx.poptions =+ "-I$out_root" "-I$src_root" 17 | -------------------------------------------------------------------------------- /buildfile: -------------------------------------------------------------------------------- 1 | # file : buildfile 2 | # license : MIT; see accompanying LICENSE file 3 | 4 | define sh: file 5 | 6 | sh{*}: 7 | { 8 | extension = 9 | install = bin/ 10 | } 11 | 12 | ./: msvc-common/exe{msvc-filter} \ 13 | sh{cl-* lib-* link-* mt-* rc-*} \ 14 | sh{msvc-** -msvc-common/msvc-filter*} \ 15 | doc{INSTALL NEWS README} legal{LICENSE AUTHORS} \ 16 | manifest 17 | 18 | msvc-common/ 19 | { 20 | import libs = libbutl%lib{butl} 21 | 22 | exe{msvc-filter}: {hxx ixx txx cxx}{* -version} hxx{version} $libs 23 | 24 | hxx{version}: in{version} $src_root/manifest 25 | } 26 | 27 | # Don't install INSTALL file. 28 | # 29 | doc{INSTALL}@./: install = false 30 | 31 | install.bin.subdirs = true # Recreate subdirectories. 32 | -------------------------------------------------------------------------------- /cl-11-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-12-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-14.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-14.2-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-14.2-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-14.3-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-14.3-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-15.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-15.0-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-15.3-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-15.3-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-15.5-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-15.5-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-15.6-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-15.6-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-15.7-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-15.7-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-16.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-16.0-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-16.1-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /cl-16.1-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /etc/lowercase-headers: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : etc/lowercase-headers 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # Create all-lowercase symlinks for .h headers in (recursively) that 7 | # contain capital letters in their names. 8 | # 9 | usage="usage: $0 " 10 | 11 | trap "{ exit 1; }" ERR 12 | set -o errtrace # Trap in functions. 13 | 14 | function error () { echo "$*" 1>&2; exit 1; } 15 | 16 | if [ $# -eq 0 ]; then 17 | error "$usage" 18 | fi 19 | 20 | for d in "$@"; do 21 | find "$d" -type f -name '*[[:upper:]]*.h' | 22 | while read f; do 23 | b="$(basename "$f")" 24 | d="$(dirname "$f")" 25 | ln -s "$b" "$d/${b,,}" 26 | done 27 | done 28 | -------------------------------------------------------------------------------- /lib-11-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-12-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-14.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-14.2-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-14.2-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-14.3-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-14.3-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-15.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-15.0-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-15.3-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-15.3-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-15.5-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-15.5-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-15.6-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-15.6-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-15.7-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-15.7-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-16.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-16.0-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-16.1-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /lib-16.1-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-11-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-12-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-14.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-14.2-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-14.2-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-14.3-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-14.3-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-15.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-15.0-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-15.3-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-15.3-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-15.5-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-15.5-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-15.6-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-15.6-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-15.7-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-15.7-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-16.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-16.0-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-16.1-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /link-16.1-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /manifest: -------------------------------------------------------------------------------- 1 | : 1 2 | name: msvc-linux 3 | version: 0.18.0-a.0.z 4 | project: build2 5 | summary: MS Visual C++ as cross-compiler driver scripts 6 | license: MIT 7 | topics: build toolchain 8 | keywords: msvc vc wine 9 | description-file: README 10 | changes-file: NEWS 11 | url: https://build2.org 12 | doc-url: https://build2.org/doc.xhtml 13 | src-url: https://git.build2.org/cgit/etc/msvc-linux/tree/ 14 | email: users@build2.org 15 | build-warning-email: builds@build2.org 16 | requires: c++14 17 | depends: * build2 >= 0.16.0 18 | depends: * bpkg >= 0.16.0 19 | depends: libbutl [0.18.0-a.0.1 0.18.0-a.1) 20 | -------------------------------------------------------------------------------- /msvc-11/msvc-11-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-11/msvc-11-32 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 11 32-bit setup/configuration. 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 11.0" 12 | fi 13 | 14 | # SDK 15 | # 16 | SDK="C:\\Program Files (x86)\\Windows Kits\\8.0" 17 | SDKBIN="$SDK\\bin\\x86" 18 | 19 | INCLUDE="$SDK\\include\\shared;$SDK\\include\\um;$SDK\\include\\winrt" 20 | LIB="$SDK\\lib\\win8\\um\\x86" 21 | 22 | # VC 23 | # 24 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC" 25 | VCBIN="$VC\\bin" 26 | VCDLL="$VC\\bin" 27 | 28 | INCLUDE="$VC\\include;$INCLUDE" 29 | LIB="$VC\\lib;$LIB" 30 | -------------------------------------------------------------------------------- /msvc-12/msvc-12-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-12/msvc-12-32 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 12 32-bit setup/configuration (note: using 64-to-32 cross-compiler). 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 12.0" 12 | fi 13 | 14 | # SDK 15 | # 16 | SDK="C:\\Program Files (x86)\\Windows Kits\\8.1" 17 | SDKBIN="$SDK\\bin\\x86" 18 | 19 | INCLUDE="$SDK\\include\\shared;$SDK\\include\\um;$SDK\\include\\winrt" 20 | LIB="$SDK\\lib\\winv6.3\\um\\x86" 21 | 22 | # VC 23 | # 24 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC" 25 | VCBIN="$VC\\bin\\amd64_x86" 26 | VCDLL="$VC\\bin\\amd64" 27 | 28 | INCLUDE="$VC\\include;$INCLUDE" 29 | LIB="$VC\\lib;$LIB" 30 | -------------------------------------------------------------------------------- /msvc-14/msvc-14.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-14/msvc-14.0-32 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 14 32-bit setup/configuration (note: using 64-to-32 cross-compiler). 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 14.0" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\8.1" 22 | SDKBIN="$SDK\\bin\\x86" 23 | 24 | INCLUDE="$SDK\\include\\shared;$SDK\\include\\um;$SDK\\include\\winrt" 25 | LIB="$SDK\\lib\\winv6.3\\um\\x86" 26 | 27 | # CRT 28 | # 29 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 30 | CRTVER="$MSVC_SDKVERSION.0" # Originally "10.0.10150". 31 | 32 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 33 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x86;$LIB" 34 | 35 | # VC 36 | # 37 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC" 38 | VCBIN="$VC\\bin\\amd64_x86" 39 | VCDLL="$VC\\bin\\amd64" 40 | 41 | INCLUDE="$VC\\include;$INCLUDE" 42 | LIB="$VC\\lib;$LIB" 43 | -------------------------------------------------------------------------------- /msvc-14/msvc-14.2-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-14/msvc-14.2-32 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 14U2 32-bit setup/configuration (note: using 64-to-32 cross-compiler). 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 14.0" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKBIN="$SDK\\bin\\x86" 23 | SDKVER="$MSVC_SDKVERSION.0" # Originally "10.0.10586". 24 | 25 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt" 26 | LIB="$SDK\\lib\\$SDKVER\\um\\x86" 27 | 28 | # CRT 29 | # 30 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 31 | CRTVER="$MSVC_SDKVERSION.0" # Originally "10.0.10586". 32 | 33 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 34 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x86;$LIB" 35 | 36 | # VC 37 | # 38 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC" 39 | VCBIN="$VC\\bin\\amd64_x86" 40 | VCDLL="$VC\\bin\\amd64" 41 | 42 | INCLUDE="$VC\\include;$INCLUDE" 43 | LIB="$VC\\lib;$LIB" 44 | -------------------------------------------------------------------------------- /msvc-14/msvc-14.2-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-14/msvc-14.2-64 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 14U2 64-bit setup/configuration. 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 14.0" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKBIN="$SDK\\bin\\x64" 23 | SDKVER="$MSVC_SDKVERSION.0" # Originally "10.0.10586". 24 | 25 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt" 26 | LIB="$SDK\\lib\\$SDKVER\\um\\x64" 27 | 28 | # CRT 29 | # 30 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 31 | CRTVER="$MSVC_SDKVERSION.0" # Originally "10.0.10586". 32 | 33 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 34 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x64;$LIB" 35 | 36 | # VC 37 | # 38 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC" 39 | VCBIN="$VC\\bin\\amd64" 40 | VCDLL="$VC\\bin\\amd64" 41 | 42 | INCLUDE="$VC\\include;$INCLUDE" 43 | LIB="$VC\\lib\\amd64;$LIB" 44 | -------------------------------------------------------------------------------- /msvc-14/msvc-14.3-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-14/msvc-14.3-32 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 14U3 32-bit setup/configuration (note: using 64-to-32 cross-compiler). 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 14.0" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKBIN="$SDK\\bin\\x86" 23 | 24 | # Originally "10.0.14393" (if upgrade 14.2) or "10.0.10240" (if clean install). 25 | # 26 | SDKVER="$MSVC_SDKVERSION.0" 27 | 28 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt" 29 | LIB="$SDK\\lib\\$SDKVER\\um\\x86" 30 | 31 | # CRT 32 | # 33 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 34 | 35 | # Originally "10.0.14393" (if upgrade 14.2) or "10.0.10240" (if clean install). 36 | # 37 | CRTVER="$MSVC_SDKVERSION.0" 38 | 39 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 40 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x86;$LIB" 41 | 42 | # VC 43 | # 44 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC" 45 | VCBIN="$VC\\bin\\amd64_x86" 46 | VCDLL="$VC\\bin\\amd64" 47 | 48 | INCLUDE="$VC\\include;$INCLUDE" 49 | LIB="$VC\\lib;$LIB" 50 | -------------------------------------------------------------------------------- /msvc-14/msvc-14.3-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-14/msvc-14.3-64 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 14U3 64-bit setup/configuration. 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 14.0" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKBIN="$SDK\\bin\\x64" 23 | 24 | # Originally "10.0.14393" (if upgrade 14.2) or "10.0.10240" (if clean install). 25 | # 26 | SDKVER="$MSVC_SDKVERSION.0" 27 | 28 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt" 29 | LIB="$SDK\\lib\\$SDKVER\\um\\x64" 30 | 31 | # CRT 32 | # 33 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 34 | 35 | # Originally "10.0.14393" (if upgrade 14.2) or "10.0.10240" (if clean install). 36 | # 37 | CRTVER="$MSVC_SDKVERSION.0" 38 | 39 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 40 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x64;$LIB" 41 | 42 | # VC 43 | # 44 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC" 45 | VCBIN="$VC\\bin\\amd64" 46 | VCDLL="$VC\\bin\\amd64" 47 | 48 | INCLUDE="$VC\\include;$INCLUDE" 49 | LIB="$VC\\lib\\amd64;$LIB" 50 | -------------------------------------------------------------------------------- /msvc-15/msvc-15.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-15/msvc-15.0-32 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 15 32-bit setup/configuration (note: using 64-to-32 cross-compiler). 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 15.0" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKBIN="$SDK\\bin\\x86" 23 | SDKVER="$MSVC_SDKVERSION.0" 24 | 25 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt" 26 | LIB="$SDK\\lib\\$SDKVER\\um\\x86" 27 | 28 | # CRT 29 | # 30 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 31 | CRTVER="$MSVC_SDKVERSION.0" 32 | 33 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 34 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x86;$LIB" 35 | 36 | # VC 37 | # 38 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC\\Tools\\MSVC\\14.10.25017" 39 | VCBIN="$VC\\bin\\HostX64\\x86" 40 | VCDLL="$VC\\bin\\HostX64\\x64" 41 | 42 | INCLUDE="$VC\\include;$INCLUDE" 43 | IFCPATH="$VC\\ifc\\x86" 44 | LIB="$VC\\lib\\x86;$LIB" 45 | -------------------------------------------------------------------------------- /msvc-15/msvc-15.0-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-15/msvc-15.0-64 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 64-bit setup/configuration. 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 15.0" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKBIN="$SDK\\bin\\x64" 23 | SDKVER="$MSVC_SDKVERSION.0" 24 | 25 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt" 26 | LIB="$SDK\\lib\\$SDKVER\\um\\x64" 27 | 28 | # CRT 29 | # 30 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 31 | CRTVER="$MSVC_SDKVERSION.0" 32 | 33 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 34 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x64;$LIB" 35 | 36 | # VC 37 | # 38 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC\\Tools\\MSVC\\14.10.25017" 39 | VCBIN="$VC\\bin\\HostX64\\x64" 40 | VCDLL="$VC\\bin\\HostX64\\x64" 41 | 42 | INCLUDE="$VC\\include;$INCLUDE" 43 | IFCPATH="$VC\\ifc\\x64" 44 | LIB="$VC\\lib\\x64;$LIB" 45 | -------------------------------------------------------------------------------- /msvc-15/msvc-15.3-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-15/msvc-15.3-32 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 15 32-bit setup/configuration (note: using 64-to-32 cross-compiler). 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 15.0" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKBIN="$SDK\\bin\\x86" 23 | SDKVER="$MSVC_SDKVERSION.0" 24 | 25 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt" 26 | LIB="$SDK\\lib\\$SDKVER\\um\\x86" 27 | 28 | # CRT 29 | # 30 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 31 | CRTVER="$MSVC_SDKVERSION.0" 32 | 33 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 34 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x86;$LIB" 35 | 36 | # VC 37 | # 38 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC\\Tools\\MSVC\\14.11.25503" 39 | VCBIN="$VC\\bin\\HostX64\\x86" 40 | VCDLL="$VC\\bin\\HostX64\\x64" 41 | 42 | INCLUDE="$VC\\include;$INCLUDE" 43 | IFCPATH="$VC\\ifc\\x86" 44 | LIB="$VC\\lib\\x86;$LIB" 45 | -------------------------------------------------------------------------------- /msvc-15/msvc-15.3-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-15/msvc-15.3-64 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 64-bit setup/configuration. 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 15.0" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKBIN="$SDK\\bin\\x64" 23 | SDKVER="$MSVC_SDKVERSION.0" 24 | 25 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt" 26 | LIB="$SDK\\lib\\$SDKVER\\um\\x64" 27 | 28 | # CRT 29 | # 30 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 31 | CRTVER="$MSVC_SDKVERSION.0" 32 | 33 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 34 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x64;$LIB" 35 | 36 | # VC 37 | # 38 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC\\Tools\\MSVC\\14.11.25503" 39 | VCBIN="$VC\\bin\\HostX64\\x64" 40 | VCDLL="$VC\\bin\\HostX64\\x64" 41 | 42 | INCLUDE="$VC\\include;$INCLUDE" 43 | IFCPATH="$VC\\ifc\\x64" 44 | LIB="$VC\\lib\\x64;$LIB" 45 | -------------------------------------------------------------------------------- /msvc-15/msvc-15.5-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-15/msvc-15.5-32 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 15 32-bit setup/configuration (note: using 64-to-32 cross-compiler). 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 15.0" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKBIN="$SDK\\bin\\x86" 23 | SDKVER="$MSVC_SDKVERSION.0" 24 | 25 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt" 26 | LIB="$SDK\\lib\\$SDKVER\\um\\x86" 27 | 28 | # CRT 29 | # 30 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 31 | CRTVER="$MSVC_SDKVERSION.0" 32 | 33 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 34 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x86;$LIB" 35 | 36 | # VC 37 | # 38 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC\\Tools\\MSVC\\14.12.25827" 39 | VCBIN="$VC\\bin\\Hostx64\\x86" 40 | VCDLL="$VC\\bin\\Hostx64\\x64" 41 | 42 | INCLUDE="$VC\\include;$INCLUDE" 43 | IFCPATH="$VC\\ifc\\x86" 44 | LIB="$VC\\lib\\x86;$LIB" 45 | -------------------------------------------------------------------------------- /msvc-15/msvc-15.5-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-15/msvc-15.5-64 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 64-bit setup/configuration. 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 15.0" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKBIN="$SDK\\bin\\x64" 23 | SDKVER="$MSVC_SDKVERSION.0" 24 | 25 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt" 26 | LIB="$SDK\\lib\\$SDKVER\\um\\x64" 27 | 28 | # CRT 29 | # 30 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 31 | CRTVER="$MSVC_SDKVERSION.0" 32 | 33 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 34 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x64;$LIB" 35 | 36 | # VC 37 | # 38 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC\\Tools\\MSVC\\14.12.25827" 39 | VCBIN="$VC\\bin\\Hostx64\\x64" 40 | VCDLL="$VC\\bin\\Hostx64\\x64" 41 | 42 | INCLUDE="$VC\\include;$INCLUDE" 43 | IFCPATH="$VC\\ifc\\x64" 44 | LIB="$VC\\lib\\x64;$LIB" 45 | -------------------------------------------------------------------------------- /msvc-15/msvc-15.6-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-15/msvc-15.6-32 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 15 32-bit setup/configuration (note: using 64-to-32 cross-compiler). 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 15.0" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKBIN="$SDK\\bin\\x86" 23 | SDKVER="$MSVC_SDKVERSION.0" 24 | 25 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt" 26 | LIB="$SDK\\lib\\$SDKVER\\um\\x86" 27 | 28 | # CRT 29 | # 30 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 31 | CRTVER="$MSVC_SDKVERSION.0" 32 | 33 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 34 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x86;$LIB" 35 | 36 | # VC 37 | # 38 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC\\Tools\\MSVC\\14.13.26126" 39 | VCBIN="$VC\\bin\\Hostx64\\x86" 40 | VCDLL="$VC\\bin\\Hostx64\\x64" 41 | 42 | INCLUDE="$VC\\include;$INCLUDE" 43 | IFCPATH="$VC\\ifc\\x86" 44 | LIB="$VC\\lib\\x86;$LIB" 45 | -------------------------------------------------------------------------------- /msvc-15/msvc-15.6-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-15/msvc-15.6-64 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 64-bit setup/configuration. 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 15.0" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKBIN="$SDK\\bin\\x64" 23 | SDKVER="$MSVC_SDKVERSION.0" 24 | 25 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt" 26 | LIB="$SDK\\lib\\$SDKVER\\um\\x64" 27 | 28 | # CRT 29 | # 30 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 31 | CRTVER="$MSVC_SDKVERSION.0" 32 | 33 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 34 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x64;$LIB" 35 | 36 | # VC 37 | # 38 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC\\Tools\\MSVC\\14.13.26126" 39 | VCBIN="$VC\\bin\\Hostx64\\x64" 40 | VCDLL="$VC\\bin\\Hostx64\\x64" 41 | 42 | INCLUDE="$VC\\include;$INCLUDE" 43 | IFCPATH="$VC\\ifc\\x64" 44 | LIB="$VC\\lib\\x64;$LIB" 45 | -------------------------------------------------------------------------------- /msvc-15/msvc-15.7-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-15/msvc-15.7-32 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 15 32-bit setup/configuration (note: using 64-to-32 cross-compiler). 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 15.0" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKBIN="$SDK\\bin\\x86" 23 | SDKVER="$MSVC_SDKVERSION.0" 24 | 25 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt" 26 | LIB="$SDK\\lib\\$SDKVER\\um\\x86" 27 | 28 | # CRT 29 | # 30 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 31 | CRTVER="$MSVC_SDKVERSION.0" 32 | 33 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 34 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x86;$LIB" 35 | 36 | # VC 37 | # 38 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC\\Tools\\MSVC\\14.14.26428" 39 | VCBIN="$VC\\bin\\Hostx64\\x86" 40 | VCDLL="$VC\\bin\\Hostx64\\x64" 41 | 42 | INCLUDE="$VC\\include;$INCLUDE" 43 | IFCPATH="$VC\\ifc\\x86" 44 | LIB="$VC\\lib\\x86;$LIB" 45 | -------------------------------------------------------------------------------- /msvc-15/msvc-15.7-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-15/msvc-15.7-64 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 64-bit setup/configuration. 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 15.0" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKBIN="$SDK\\bin\\x64" 23 | SDKVER="$MSVC_SDKVERSION.0" 24 | 25 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt" 26 | LIB="$SDK\\lib\\$SDKVER\\um\\x64" 27 | 28 | # CRT 29 | # 30 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 31 | CRTVER="$MSVC_SDKVERSION.0" 32 | 33 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 34 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x64;$LIB" 35 | 36 | # VC 37 | # 38 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC\\Tools\\MSVC\\14.14.26428" 39 | VCBIN="$VC\\bin\\Hostx64\\x64" 40 | VCDLL="$VC\\bin\\Hostx64\\x64" 41 | 42 | INCLUDE="$VC\\include;$INCLUDE" 43 | IFCPATH="$VC\\ifc\\x64" 44 | LIB="$VC\\lib\\x64;$LIB" 45 | -------------------------------------------------------------------------------- /msvc-16/msvc-16.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-16/msvc-16.0-32 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 16 32-bit setup/configuration (note: using 64-to-32 cross-compiler). 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 16.0" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKVER="$MSVC_SDKVERSION.0" 23 | SDKBIN="$SDK\\bin\\$SDKVER\\x86" 24 | 25 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt;$SDK\\include\\$SDKVER\\cppwinrt" 26 | LIB="$SDK\\lib\\$SDKVER\\um\\x86" 27 | 28 | # CRT 29 | # 30 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 31 | CRTVER="$MSVC_SDKVERSION.0" 32 | 33 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 34 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x86;$LIB" 35 | 36 | # VC 37 | # 38 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC\\Tools\\MSVC\\14.20.27404" 39 | 40 | # Note that running cross-linker may end up with the following error: 41 | # 42 | # LINK : fatal error LNK1158: cannot run 'cvtres.exe' 43 | # 44 | # The native linker doesn't fail but may run out of memory in some cases. One 45 | # workaround for the above error is to symlinking HostX64/x64/cvtres.exe into 46 | # HostX64/x86/. However, let's postpone it until really necessary. 47 | # 48 | VCBIN="$VC\\bin\\HostX64\\x86" 49 | VCDLL="$VC\\bin\\HostX64\\x64" 50 | 51 | INCLUDE="$VC\\include;$INCLUDE" 52 | IFCPATH="$VC\\ifc\\x86" 53 | LIB="$VC\\lib\\x86;$LIB" 54 | -------------------------------------------------------------------------------- /msvc-16/msvc-16.0-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-16/msvc-16.0-64 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 64-bit setup/configuration. 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 16.0" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKVER="$MSVC_SDKVERSION.0" 23 | SDKBIN="$SDK\\bin\\$SDKVER\\x64" 24 | 25 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt;$SDK\\include\\$SDKVER\\cppwinrt" 26 | LIB="$SDK\\lib\\$SDKVER\\um\\x64" 27 | 28 | # CRT 29 | # 30 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 31 | CRTVER="$MSVC_SDKVERSION.0" 32 | 33 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 34 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x64;$LIB" 35 | 36 | # VC 37 | # 38 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC\\Tools\\MSVC\\14.20.27404" 39 | VCBIN="$VC\\bin\\HostX64\\x64" 40 | VCDLL="$VC\\bin\\HostX64\\x64" 41 | 42 | INCLUDE="$VC\\include;$INCLUDE" 43 | IFCPATH="$VC\\ifc\\x64" 44 | LIB="$VC\\lib\\x64;$LIB" 45 | -------------------------------------------------------------------------------- /msvc-16/msvc-16.1-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-16/msvc-16.1-32 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 16 32-bit setup/configuration (note: using 64-to-32 cross-compiler). 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 16.1" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKVER="$MSVC_SDKVERSION.0" 23 | SDKBIN="$SDK\\bin\\$SDKVER\\x86" 24 | 25 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt;$SDK\\include\\$SDKVER\\cppwinrt" 26 | LIB="$SDK\\lib\\$SDKVER\\um\\x86" 27 | 28 | # CRT 29 | # 30 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 31 | CRTVER="$MSVC_SDKVERSION.0" 32 | 33 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 34 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x86;$LIB" 35 | 36 | # VC 37 | # 38 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC\\Tools\\MSVC\\14.21.27702" 39 | 40 | VCBIN="$VC\\bin\\HostX64\\x86" 41 | VCDLL="$VC\\bin\\HostX64\\x64" 42 | 43 | INCLUDE="$VC\\include;$INCLUDE" 44 | IFCPATH="$VC\\ifc\\x86" 45 | LIB="$VC\\lib\\x86;$LIB" 46 | -------------------------------------------------------------------------------- /msvc-16/msvc-16.1-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-16/msvc-16.1-64 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # MSVC 64-bit setup/configuration. 7 | # 8 | # Should set the SDKBIN, VCBIN, VCDLL, INCLUDE, and LIB variables. 9 | # 10 | if [ -z "$MSVC_INSTALLDIR" ]; then 11 | MSVC_INSTALLDIR="Microsoft Visual Studio 16.1" 12 | fi 13 | 14 | if [ -z "$MSVC_SDKVERSION" ]; then 15 | source "$src_dir/msvc-common/msvc-sdk-common" 16 | MSVC_SDKVERSION="$(windows10_sdkversion)" 17 | fi 18 | 19 | # SDK 20 | # 21 | SDK="C:\\Program Files (x86)\\Windows Kits\\10" 22 | SDKVER="$MSVC_SDKVERSION.0" 23 | SDKBIN="$SDK\\bin\\$SDKVER\\x64" 24 | 25 | INCLUDE="$SDK\\include\\$SDKVER\\shared;$SDK\\include\\$SDKVER\\um;$SDK\\include\\$SDKVER\\winrt;$SDK\\include\\$SDKVER\\cppwinrt" 26 | LIB="$SDK\\lib\\$SDKVER\\um\\x64" 27 | 28 | # CRT 29 | # 30 | CRT="C:\\Program Files (x86)\\Windows Kits\\10" 31 | CRTVER="$MSVC_SDKVERSION.0" 32 | 33 | INCLUDE="$CRT\\include\\$CRTVER\\ucrt;$INCLUDE" 34 | LIB="$CRT\\lib\\$CRTVER\\ucrt\\x64;$LIB" 35 | 36 | # VC 37 | # 38 | VC="C:\\Program Files (x86)\\$MSVC_INSTALLDIR\\VC\\Tools\\MSVC\\14.21.27702" 39 | VCBIN="$VC\\bin\\HostX64\\x64" 40 | VCDLL="$VC\\bin\\HostX64\\x64" 41 | 42 | INCLUDE="$VC\\include;$INCLUDE" 43 | IFCPATH="$VC\\ifc\\x64" 44 | LIB="$VC\\lib\\x64;$LIB" 45 | -------------------------------------------------------------------------------- /msvc-common/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiler/linker output. 2 | # 3 | *.d 4 | *.t 5 | *.i 6 | *.ii 7 | *.o 8 | *.obj 9 | *.so 10 | *.dll 11 | *.a 12 | *.lib 13 | *.exp 14 | *.pdb 15 | *.ilk 16 | *.exe 17 | *.exe.dlls/ 18 | *.exe.manifest 19 | *.pc 20 | 21 | msvc-filter 22 | version.hxx 23 | -------------------------------------------------------------------------------- /msvc-common/msvc-cl-common: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-common/msvc-cl-common 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # Note: shouldn't be executed directly, src_dir must be set. 7 | 8 | # Common cl.exe driver that expects the VCBIN, INCLUDE, and, if running as a 9 | # linker, SDKBIN, LIB variables to be set for the specific MSVC 10 | # version/configuration. 11 | 12 | source "$src_dir/msvc-common/msvc-common" 13 | 14 | # File descriptor where the diagnostics will be sent. Unless STDOUT is used 15 | # for something else (e.g., /E, /EP), cl.exe sends the diagnostics there. 16 | # Otherwise it goes to STDERR. Plus /P behaves like /E for some reason. 17 | # 18 | diag=1 19 | 20 | # Translate absolute paths from POSIX to Windows. Use bash array to store 21 | # arguments in case they contain spaces. 22 | # 23 | # This needs to be done for both certain option values and arguments. 24 | # Arguments are tricky in that unless we recognize every option, and option 25 | # may look a lot like an absolute POSIX path (e.g., /nologo). The heuristics 26 | # that we are going to use here is that if the argument starts with / and 27 | # contains at least one more /, then we consider it an argument. Otherwise -- 28 | # an options. We will also explicitly recognize certain options, like /D, 29 | # which may not fit this scheme well. 30 | # 31 | # Note that the order of the cases is important. Specifically, we want, e.g., 32 | # /D before /D*. 33 | # 34 | # Note also that cl.exe options are case-sensitive. 35 | # 36 | args=() 37 | 38 | # Whether to export IFCPATH. We suppress it if /module:stdIfcDir is specified 39 | # since IFCPATH path (misguidedly) takes precedence. 40 | # 41 | ifc=true 42 | 43 | while [ $# -gt 0 ]; do 44 | case $1 in 45 | 46 | # /I , /AI 47 | # /module:output , /module:reference 48 | # /module:search , /module:stdIfcDir 49 | # 50 | [/-]I | \ 51 | [/-]AI | \ 52 | [/-]module:output | \ 53 | [/-]module:reference | \ 54 | [/-]module:search | \ 55 | [/-]module:stdIfcDir) 56 | if [ "$1" = "/module:stdIfcDir" ]; then 57 | ifc= 58 | fi 59 | 60 | args=("${args[@]}" "$1") 61 | shift 62 | args=("${args[@]}" "$(translate $1)") 63 | shift 64 | ;; 65 | 66 | # /I 67 | # 68 | [/-]I*) 69 | args=("${args[@]}" "$(split_translate 2 $1)") 70 | shift 71 | ;; 72 | 73 | # /AI 74 | # 75 | [/-]AI*) 76 | args=("${args[@]}" "$(split_translate 3 $1)") 77 | shift 78 | ;; 79 | 80 | # /F*: 81 | # 82 | [/-]F[adeimoprR]:) 83 | args=("${args[@]}" "$1") 84 | shift 85 | args=("${args[@]}" "$(translate $1)") 86 | shift 87 | ;; 88 | 89 | # /F*, /T{p,c}, /Yu. 90 | # 91 | [/-]F[adeimoprRUI]* | \ 92 | [/-]Tp* | \ 93 | [/-]Tc* | \ 94 | [/-]Yu*) 95 | args=("${args[@]}" "$(split_translate 3 $1)") 96 | shift 97 | ;; 98 | 99 | # /doc 100 | # 101 | [/-]doc*) 102 | args=("${args[@]}" "$(split_translate 4 $1)") 103 | shift 104 | ;; 105 | 106 | # @ 107 | # 108 | @*) 109 | args=("${args[@]}" "$(split_translate 1 $1)") 110 | shift 111 | ;; 112 | 113 | # Handle other options with separate values. This makes sure we don't try 114 | # to path-translate them. 115 | # 116 | [/-]D | \ 117 | [/-]U | \ 118 | [/-]link) 119 | args=("${args[@]}" "$1") 120 | shift 121 | args=("${args[@]}" "$1") 122 | shift 123 | ;; 124 | 125 | # Handle other options with combined values that could possibly be 126 | # interpreted as paths, for example /DFOO=foo/bar. 127 | # 128 | [/-]D* | \ 129 | [/-]V* | \ 130 | [/-]Yl*) 131 | args=("${args[@]}" "$1") 132 | shift 133 | ;; 134 | 135 | # Detect /E, /P, and /EP -- they change where the diagnostics is sent. 136 | # 137 | [/-]E | \ 138 | [/-]P | \ 139 | [/-]EP) 140 | diag=2 141 | args=("${args[@]}" "$1") 142 | shift 143 | ;; 144 | 145 | # Option or argument. 146 | # 147 | *) 148 | # If contains at least two slashes, treat it as a path. 149 | # 150 | if [[ "$1" == /*/* ]]; then 151 | args=("${args[@]}" "$(translate $1)") 152 | else 153 | args=("${args[@]}" "$1") 154 | fi 155 | shift 156 | ;; 157 | esac 158 | done 159 | 160 | export INCLUDE 161 | export LIB 162 | 163 | if [ "$ifc" = "true" ]; then 164 | export IFCPATH 165 | fi 166 | 167 | # The linker may need to run mt.exe which is in the SDK. 168 | # 169 | export WINEPATH="$VCBIN;$VCDLL;$SDKBIN;$WINEPATH" 170 | 171 | msvc_exec $diag "$VCBIN\\cl.exe" "${args[@]}" 172 | -------------------------------------------------------------------------------- /msvc-common/msvc-common: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-common/msvc-common 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # Note: shouldn't be executed directly, src_dir must be set. 7 | 8 | # Translate absolute POSIX path to a Windows path with winepath. 9 | # 10 | function translate () # 11 | { 12 | if [[ "$1" == /* ]]; then 13 | winepath -w "$1" 14 | else 15 | echo "$1" 16 | fi 17 | } 18 | 19 | # Split the combined option and path value, translate the path component 20 | # to a Windows path if absolute, then recombine the option and path. 21 | # 22 | function split_translate () # 23 | { 24 | local o="${2:0:$1}" # First characters from $1. 25 | local v="${2:$1}" # The rest. 26 | 27 | # If the path is absolute, map it with winepath. 28 | # 29 | if [[ "$v" == /* ]]; then 30 | v="$(winepath -w "$v")" 31 | fi 32 | 33 | echo "$o$v" 34 | } 35 | 36 | # The argument should be 1 or 2. It indicates whether the diagnostics 37 | # is sent to stdout (1) or stderr (2). 38 | # 39 | function msvc_exec () # ... 40 | { 41 | local diag="$1" 42 | shift 43 | 44 | # Suppress Wine noise. 45 | # 46 | export WINEDEBUG=fixme-all 47 | 48 | # Filter diagnostics output replacing absolute Windows paths with their 49 | # POSIX mapping. If is 1 then both stdout and stderr output are read 50 | # and filtered. 51 | # 52 | "$src_dir/msvc-common/msvc-filter" "$diag" wine "$@" 53 | } 54 | -------------------------------------------------------------------------------- /msvc-common/msvc-filter.cxx: -------------------------------------------------------------------------------- 1 | // file : msvc-common/msvc-filter.cxx -*- C++ -*- 2 | // license : MIT; see accompanying LICENSE file 3 | 4 | #include // timeval 5 | #include 6 | 7 | #include // ios_base::failure 8 | #include 9 | #include // strchr() 10 | #include 11 | #include // move() 12 | #include 13 | #include // max() 14 | #include 15 | #include 16 | 17 | #include // path::traits::realize() 18 | #include // alpha(), throw_*_error() 19 | #include 20 | #include 21 | #include 22 | 23 | #include 24 | 25 | using namespace std; 26 | using namespace butl; 27 | 28 | // Cached mapping of Windows paths to the corresponding POSIX paths. 29 | // 30 | static unordered_map path_cache; 31 | 32 | inline static bool 33 | path_separator (char c) 34 | { 35 | return c == '\\' || c == '/'; 36 | } 37 | 38 | // Replace absolute Windows paths encountered in the line with their POSIX 39 | // representation. Write the result followed by a newline to the stream. Throw 40 | // ostream::failure on IO failures, system_error on others. 41 | // 42 | static void 43 | filter (const char* s, size_t n, ostream& os) 44 | { 45 | // Strip the terminating 0xOD character if present. 46 | // 47 | if (n > 0 && s[n - 1] == '\r') 48 | --n; 49 | 50 | // Translate absolute Windows paths back to POSIX. The hard part here is to 51 | // determing the end of the path. For example, the error location has the 52 | // 'X:\...\foo(10):' form. However, we cannot assume that '(' ends the path; 53 | // remember 'Program Files (x86)'. 54 | // 55 | // To sidestep this whole mess we are going to use this trick: instead of 56 | // translating the whole path we will only translate its directory part, 57 | // that is, the longest part that still ends with the directory 58 | // separator. We will also still recognize ':' and '\'' as path terminators 59 | // as well as space if it is the first character in the component. 60 | // 61 | // We also pass the path through realpath in order to get the actual path 62 | // rather than Wine's dosdevices links. 63 | // 64 | const char* b (s); 65 | const char* e (s + n); 66 | 67 | for (;;) 68 | { 69 | const char* p (b); 70 | 71 | // Line tail should be at least 3 characters long to contain an absolute 72 | // Windows path. 73 | // 74 | bool no_path (e - b < 3); 75 | 76 | if (!no_path) 77 | { 78 | // An absolute path must begin with [A-Za-z]:[\/] (like C:\). 79 | // 80 | const char* pe (e - 3); 81 | 82 | for (; p != pe; ++p) 83 | { 84 | if (alpha (p[0]) && p[1] == ':' && path_separator (p[2])) 85 | break; 86 | } 87 | 88 | no_path = p == pe; 89 | } 90 | 91 | // Bail out if we reached the end of the line with no path found. 92 | // 93 | if (no_path) 94 | { 95 | os.write (b, e - b); 96 | os.put ('\n'); 97 | break; 98 | } 99 | 100 | os.write (b, p - b); // Print characters that preceed the path. 101 | 102 | b = p; // Beginnig of the path. 103 | const char* pe (p + 3); // End of the last path component. 104 | 105 | for (p = pe; p != e; ++p) 106 | { 107 | char c (*p); 108 | if (c == ':' || c == '\'' || (p == pe && c == ' ')) 109 | break; 110 | 111 | if (path_separator (c)) 112 | pe = p + 1; 113 | } 114 | 115 | // Convert the Windows directory path to POSIX. First check if the mapping 116 | // is already cached. 117 | // 118 | string d (b, pe - b); 119 | auto i (path_cache.find (d)); 120 | 121 | b = pe; 122 | 123 | if (i == path_cache.end ()) 124 | { 125 | const char* args[] = {"winepath", "-u", d.c_str (), nullptr}; 126 | 127 | // Redirect stderr to /dev/null not to mess the output (read more in 128 | // main()). 129 | // 130 | process pr (args, 0, -1, -2); 131 | ifdstream is (move (pr.in_ofd)); 132 | 133 | string pd; 134 | getline (is, pd); 135 | is.close (); 136 | 137 | // It's unknown what can cause winepath to fail. At least not a 138 | // non-existent path. Anyway will consider it fatal. 139 | // 140 | if (!pr.wait ()) 141 | throw_generic_error (ECHILD); 142 | 143 | try 144 | { 145 | path::traits_type::realize (pd); 146 | 147 | assert (!pd.empty ()); 148 | 149 | // Restore the trailing slash. 150 | // 151 | if (pd.back () != '/') 152 | pd += '/'; 153 | 154 | } 155 | catch (const invalid_path&) 156 | { 157 | // The path doesn't exist. Let's keep it as provided by winepath. 158 | } 159 | 160 | i = path_cache.emplace (move (d), move (pd)).first; 161 | } 162 | 163 | os.write (i->second.c_str (), i->second.size ()); 164 | } 165 | } 166 | 167 | int 168 | main (int argc, char* argv[]) 169 | try 170 | { 171 | auto print_usage = [argv]() 172 | { 173 | cerr << "usage: " << argv[0] 174 | << " [arguments]" << endl; 175 | }; 176 | 177 | if (argc < 2) 178 | { 179 | cerr << "error: diag stream file descriptor expected" << endl; 180 | print_usage (); 181 | return 1; 182 | } 183 | 184 | string d (argv[1]); 185 | if (d != "1" && d != "2") 186 | { 187 | cerr << "error: invalid diag stream file descriptor" << endl; 188 | print_usage (); 189 | return 1; 190 | } 191 | 192 | size_t diag (stoi (d)); 193 | 194 | if (argc < 3) 195 | { 196 | cerr << "error: wine path expected" << endl; 197 | print_usage (); 198 | return 1; 199 | } 200 | 201 | if (argc < 4) 202 | { 203 | cerr << "error: program path expected" << endl; 204 | print_usage (); 205 | return 1; 206 | } 207 | 208 | // After arguments are validated we will not be printing error messages on 209 | // failures not to mess the filtered output of the child Windows process. 210 | // Note that in the case of a failure the text from STDERR can be treated by 211 | // the calling process as a build tool diagnostics so our message most 212 | // likelly would be misinterpreted. 213 | // 214 | // The reason we still print error message on the arguments parsing failure 215 | // is that it is likely to be a program misuse rather than runtime error. 216 | // 217 | 218 | // If diag is 1 then both stdout and stderr of the child process are read and 219 | // filtered (achieved by redirecting stdout to stderr). Otherwise the data 220 | // read from child stdout is proxied to own stdout (sounds redundant but 221 | // prevents Windows process from writing to /dev/null directly which is known 222 | // to be super slow). The filtered data is written to the diag file 223 | // descriptor. 224 | // 225 | process pr (const_cast (&argv[2]), 0, diag == 1 ? 2 : -1, -1); 226 | 227 | // Stream to filter from. 228 | // 229 | ifdstream isf (move (pr.in_efd), fdstream_mode::non_blocking); 230 | 231 | // Stream to proxy from. 232 | // 233 | ifdstream isp ( 234 | diag == 1 ? nullfd : move (pr.in_ofd), fdstream_mode::non_blocking); 235 | 236 | ostream& osf (diag == 1 ? cout : cerr); // Stream to filter to. 237 | ostream* osp (diag == 1 ? nullptr : &cout); // Stream to proxy to. 238 | 239 | // The presense of proxy input and output streams must be correlated. 240 | // 241 | assert (isp.is_open () == (osp != nullptr)); 242 | 243 | // Will be using ostream::write() solely, so badbit is the only one which 244 | // needs to be set. 245 | // 246 | osf.exceptions (ostream::badbit); 247 | 248 | if (osp != nullptr) 249 | osp->exceptions (ostream::badbit); 250 | 251 | const size_t nbuf (8192); 252 | char buf[nbuf + 1]; // Reserve one extra for terminating '\0'. 253 | 254 | bool terminated (false); // Required for Wine bug workaround (see below). 255 | string line; // Incomplete line. 256 | 257 | while (isf.is_open () || isp.is_open ()) 258 | { 259 | // Use timeout to workaround the wineserver bug: sometimes the file 260 | // descriptor that corresponds to the redirected STDERR of a Windows 261 | // process is not closed when that process is terminated. So if STDERR is 262 | // redirected to a pipe (as in our case) the reading peer does not receive 263 | // EOF and hangs forever. We will consider the no-data 100 ms period for an 264 | // exited process to represent such a situation. 265 | // 266 | // Note that it is wineserver who owns the corresponding file descriptor 267 | // not a wine process which runs the Windows program. 268 | // 269 | // Note also that some implementations of select() can modify the timeout 270 | // value so it is essential to reinitialize it prior to every select() 271 | // call. 272 | // 273 | timeval timeout {0, 100000}; 274 | 275 | fd_set rd; 276 | FD_ZERO (&rd); 277 | 278 | if (isf.is_open ()) 279 | FD_SET (isf.fd (), &rd); 280 | 281 | if (isp.is_open ()) 282 | FD_SET (isp.fd (), &rd); 283 | 284 | int r (select (max (isf.fd (), isp.fd ()) + 1, 285 | &rd, 286 | nullptr, 287 | nullptr, 288 | &timeout)); 289 | 290 | if (r == -1) 291 | { 292 | if (errno == EINTR) 293 | continue; 294 | 295 | throw_system_error (errno); 296 | } 297 | 298 | // Timeout occured. Apply wineserver bug workaround if required. 299 | // 300 | butl::optional status; 301 | if (r == 0 && (status = pr.try_wait ())) 302 | { 303 | if (!*status) 304 | // Handle the child failure outside the loop. 305 | // 306 | break; 307 | 308 | // Presumably end of the data reached. 309 | // 310 | if (!terminated) 311 | { 312 | // We don't know when the process exited. It possibly wasn't writing 313 | // to the output for quite a long time before terminating a nanosecond 314 | // ago. But let's wait for another timeout to be sure that the process 315 | // has terminated a long (enough) time ago. 316 | // 317 | terminated = true; 318 | continue; 319 | } 320 | 321 | break; 322 | } 323 | 324 | // Proxy the data if requested. 325 | // 326 | if (isp.is_open () && FD_ISSET (isp.fd (), &rd)) 327 | { 328 | for (;;) 329 | { 330 | // The only leagal way to read from non-blocking ifdstream. 331 | // 332 | streamsize n (isp.readsome (buf, nbuf)); 333 | 334 | if (isp.eof ()) 335 | { 336 | // End of the data to be proxied reached. 337 | // 338 | isp.close (); 339 | break; 340 | } 341 | 342 | if (n == 0) 343 | break; // No data available, try later. 344 | 345 | assert (osp != nullptr); 346 | osp->write (buf, n); 347 | } 348 | } 349 | 350 | // Read & filter. 351 | // 352 | if (isf.is_open () && FD_ISSET (isf.fd (), &rd)) 353 | { 354 | for (;;) 355 | { 356 | // The only leagal way to read from non-blocking ifdstream. 357 | // 358 | streamsize n (isf.readsome (buf, nbuf)); 359 | 360 | if (isf.eof ()) 361 | { 362 | // End of the data to be filtered reached. 363 | // 364 | isf.close (); 365 | break; 366 | } 367 | 368 | if (n == 0) 369 | break; // No data available, try later. 370 | 371 | // Filter buffer content line by line. Concatenate the line with an 372 | // incomplete one if produced on the previous iteration. Save the last 373 | // line if incomplete (not terminated with '\n'). 374 | // 375 | buf[n] = '\0'; 376 | const char* b (buf); 377 | 378 | for (;;) 379 | { 380 | const char* le (strchr (b, '\n')); 381 | 382 | if (le == nullptr) 383 | { 384 | line += b; 385 | break; 386 | } 387 | 388 | if (!line.empty ()) 389 | { 390 | line.append (b, le - b); 391 | filter (line.c_str (), line.size (), osf); 392 | line.clear (); 393 | } 394 | else 395 | filter (b, le - b, osf); 396 | 397 | b = le + 1; // Skip the newline character. 398 | } 399 | } 400 | } 401 | } 402 | 403 | if (!line.empty ()) 404 | filter (line.c_str (), line.size (), osf); 405 | 406 | isf.close (); 407 | isp.close (); 408 | 409 | // Passing through the exact child process exit status on failure tends to be 410 | // a bit hairy as involves handling the situation when the process is 411 | // terminated with a signal and so exit code is unavailable. Lets implement 412 | // when really required. 413 | // 414 | return pr.wait () ? 0 : 1; 415 | } 416 | catch (const ios_base::failure&) 417 | { 418 | return 1; 419 | } 420 | // Also handles process_error exception (derived from system_error). 421 | // 422 | catch (const system_error&) 423 | { 424 | return 1; 425 | } 426 | -------------------------------------------------------------------------------- /msvc-common/msvc-lib-common: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-common/msvc-lib-common 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # Note: shouldn't be executed directly, src_dir must be set. 7 | 8 | # Common lib.exe driver that expects the VCBIN and LIB variables to be set for 9 | # the specific MSVC version/configuration. 10 | # 11 | # It's not clear/documented why we need LIB or what the /LIBPATH option is 12 | # for. Perhaps for link-time code generation (/LTCG). 13 | 14 | source "$src_dir/msvc-common/msvc-common" 15 | 16 | # Translate absolute paths from POSIX to Windows. Use bash array to store 17 | # arguments in case they contain spaces. 18 | # 19 | # This needs to be done for both certain option values and arguments. 20 | # Arguments are tricky in that unless we recognize every option, and option 21 | # may look a lot like an absolute POSIX path (e.g., /nologo). The heuristics 22 | # that we are going to use here is that if the argument starts with / and 23 | # contains at least one more /, then we consider it an argument. Otherwise -- 24 | # an options. We will also explicitly recognize certain options which may 25 | # not fit this scheme well. 26 | # 27 | args=() 28 | 29 | while [ $# -gt 0 ]; do 30 | case ${1^^} in # Uppercase for case-insensitive comparison. 31 | 32 | # /DEF[:filename] 33 | # /OUT:filename 34 | # 35 | [/-]DEF:* | \ 36 | [/-]OUT:*) 37 | args=("${args[@]}" "$(split_translate 5 $1)") 38 | shift 39 | ;; 40 | 41 | # /LIST[:filename] 42 | # /NAME:filename 43 | # 44 | [/-]LIST:* | \ 45 | [/-]NAME:*) 46 | args=("${args[@]}" "$(split_translate 6 $1)") 47 | shift 48 | ;; 49 | 50 | # /LIBPATH:dir 51 | # 52 | [/-]LIBPATH:*) 53 | args=("${args[@]}" "$(split_translate 9 $1)") 54 | shift 55 | ;; 56 | 57 | # Handle other options with separate values. This makes sure we don't try 58 | # to path-translate them. 59 | # 60 | 61 | # Aren't any. 62 | 63 | # Handle other options with combined values that could possibly be 64 | # interpreted as paths, for example /EXTRACT:foo/bar.obj. 65 | # 66 | [/-]EXPORT:* | \ 67 | [/-]EXTRACT:* | \ 68 | [/-]INCLUDE:* | \ 69 | [/-]REMOVE:*) 70 | args=("${args[@]}" "$1") 71 | shift 72 | ;; 73 | 74 | # Option or argument. 75 | # 76 | *) 77 | # If contains at least two slashes, treat it as a path. 78 | # 79 | if [[ "$1" == /*/* ]]; then 80 | args=("${args[@]}" "$(translate $1)") 81 | else 82 | args=("${args[@]}" "$1") 83 | fi 84 | shift 85 | ;; 86 | esac 87 | done 88 | 89 | export LIB 90 | 91 | # link.exe may need to run other tools (/LTCG). 92 | # 93 | export WINEPATH="$VCBIN;$VCDLL;$SDKBIN;$WINEPATH" 94 | 95 | # lib.exe always sends diagnostics to stdout. 96 | # 97 | msvc_exec 1 "$VCBIN\\lib.exe" "${args[@]}" 98 | -------------------------------------------------------------------------------- /msvc-common/msvc-link-common: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-common/msvc-link-common 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # Note: shouldn't be executed directly, src_exe and src_dir must be set. 7 | 8 | # Common link.exe driver that expects the VCBIN, SDKBIN, and LIB variables to 9 | # be set for the specific MSVC version/configuration. 10 | 11 | source "$src_dir/msvc-common/msvc-common" 12 | 13 | # Translate absolute paths from POSIX to Windows. Use bash array to store 14 | # arguments in case they contain spaces. 15 | # 16 | # This needs to be done for both certain option values and arguments. 17 | # Arguments are tricky in that unless we recognize every option, and option 18 | # may look a lot like an absolute POSIX path (e.g., /nologo). The heuristics 19 | # that we are going to use here is that if the argument starts with / and 20 | # contains at least one more /, then we consider it an argument. Otherwise -- 21 | # an options. We will also explicitly recognize certain options which may 22 | # not fit this scheme well. 23 | # 24 | # Note that link.exe /? is missing some options that are documented in MSDN. 25 | # 26 | args=() 27 | 28 | while [ $# -gt 0 ]; do 29 | case ${1^^} in # Uppercase for case-insensitive comparison. 30 | 31 | # @@ TODO: handle the rest/obscure options. 32 | # 33 | # @file 34 | # /ASSEMBLYLINKRESOURCE:filename 35 | # /ASSEMBLYMODULE:filename 36 | # /ASSEMBLYRESOURCE:filename[,[name][,PRIVATE]] 37 | # /BASE:{address[,size]|@filename,key} 38 | #+ /DEF:filename 39 | #+ /DEFAULTLIB:library 40 | #+ /DELAYLOAD:dll 41 | # /FASTGENPROFILE:PGD=filename|... 42 | # /GENPROFILE:PGD=filename|... 43 | #+ /IDLOUT:filename 44 | #+ /IMPLIB:filename 45 | #+ /KEYFILE:filename 46 | #+ /LIBPATH:dir 47 | #+ /MANIFESTFILE:filename 48 | #+ /MANIFESTINPUT:filename 49 | #+ /MAP:filename 50 | #+ /MIDL:@commandfile 51 | #+ /NODEFAULTLIB:library 52 | #+ /ORDER:@filename 53 | #+ /OUT:filename 54 | #+ /PDB:filename 55 | #+ /PDBALTPATH:filename 56 | #+ /PDBSTRIPPED:filename 57 | #+ /PGD:filename 58 | #+ /STUB:filename 59 | #+ /TLBOUT:filename 60 | # /USEPROFILE:PGD=filename 61 | #+ /WHOLEARCHIVE:library 62 | #+ /WINMDFILE:filename 63 | # /WINMDKEYCONTAINER:name 64 | #+ /WINMDKEYFILE:filename 65 | 66 | [/-]DEF:* | \ 67 | [/-]MAP:* | \ 68 | [/-]OUT:* | \ 69 | [/-]PDB:* | \ 70 | [/-]PGD:*) 71 | args=("${args[@]}" "$(split_translate 5 $1)") 72 | shift 73 | ;; 74 | 75 | [/-]STUB:*) 76 | args=("${args[@]}" "$(split_translate 6 $1)") 77 | shift 78 | ;; 79 | 80 | [/-]MIDL:@*) 81 | args=("${args[@]}" "$(split_translate 7 $1)") 82 | shift 83 | ;; 84 | 85 | [/-]IMPLIB:* | \ 86 | [/-]IDLOUT:* | \ 87 | [/-]TLBOUT:* | \ 88 | [/-]ORDER:@*) 89 | args=("${args[@]}" "$(split_translate 8 $1)") 90 | shift 91 | ;; 92 | 93 | [/-]KEYFILE:* | \ 94 | [/-]LIBPATH:*) 95 | args=("${args[@]}" "$(split_translate 9 $1)") 96 | shift 97 | ;; 98 | 99 | [/-]DELAYLOAD:* | \ 100 | [/-]WINMDFILE:*) 101 | args=("${args[@]}" "$(split_translate 11 $1)") 102 | shift 103 | ;; 104 | 105 | [/-]DEFAULTLIB:* | \ 106 | [/-]PDBALTPATH:* | \ 107 | [/-]SOURCELINK:*) 108 | args=("${args[@]}" "$(split_translate 12 $1)") 109 | shift 110 | ;; 111 | 112 | [/-]PDBSTRIPPED:*) 113 | args=("${args[@]}" "$(split_translate 13 $1)") 114 | shift 115 | ;; 116 | 117 | [/-]NODEFAULTLIB:* | \ 118 | [/-]MANIFESTFILE:* | \ 119 | [/-]WHOLEARCHIVE:* | \ 120 | [/-]WINMDKEYFILE:*) 121 | args=("${args[@]}" "$(split_translate 14 $1)") 122 | shift 123 | ;; 124 | 125 | [/-]MANIFESTINPUT:*) 126 | args=("${args[@]}" "$(split_translate 15 $1)") 127 | shift 128 | ;; 129 | 130 | # Handle other options with separate values. This makes sure we don't try 131 | # to path-translate them. 132 | # 133 | 134 | # Aren't any. 135 | 136 | # Handle other options with combined values that could possibly be 137 | # interpreted as paths. 138 | # 139 | # /ENTRY:symbol 140 | # /EXPORT:symbol 141 | # /INCLUDE:symbol 142 | # /KEYCONTAINER:name 143 | # /MANIFESTDEPENDENCY:manifest dependency 144 | # /MANIFESTUAC[:{NO|UAC fragment}] 145 | # /MAPINFO:{EXPORTS} 146 | # /MERGE:from=to 147 | # /SECTION:name,[[!]{DEKPRSW}][,ALIGN=#] 148 | # 149 | [/-]ENTRY:* | \ 150 | [/-]EXPORT:* | \ 151 | [/-]INCLUDE:* | \ 152 | [/-]KEYCONTAINER:* | \ 153 | [/-]MANIFESTDEPENDENCY:* | \ 154 | [/-]MANIFESTUAC:* | \ 155 | [/-]MAPINFO:* | \ 156 | [/-]MERGE:* | \ 157 | [/-]SECTION:* | \ 158 | [/-]REMOVE:*) 159 | args=("${args[@]}" "$1") 160 | shift 161 | ;; 162 | 163 | # Option or argument. 164 | # 165 | *) 166 | # If contains at least two slashes, treat it as a path. 167 | # 168 | if [[ "$1" == /*/* ]]; then 169 | args=("${args[@]}" "$(translate $1)") 170 | else 171 | args=("${args[@]}" "$1") 172 | fi 173 | shift 174 | ;; 175 | esac 176 | done 177 | 178 | export LIB 179 | 180 | # link.exe may need to run mt.exe which is in the SDK. 181 | # 182 | export WINEPATH="$VCBIN;$VCDLL;$SDKBIN;$WINEPATH" 183 | 184 | # link.exe always sends diagnostics to stdout. 185 | # 186 | msvc_exec 1 "$VCBIN\\link.exe" "${args[@]}" 187 | -------------------------------------------------------------------------------- /msvc-common/msvc-mt-common: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-common/msvc-mt-common 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # Note: shouldn't be executed directly, src_dir must be set. 7 | 8 | # Common mt.exe driver that expects the SDKBIN variable to be set for the 9 | # specific MSVC version/configuration. 10 | 11 | source "$src_dir/msvc-common/msvc-common" 12 | 13 | # Translate absolute paths from POSIX to Windows. Use bash array to store 14 | # arguments in case they contain spaces. This needs to be done for both 15 | # certain option values and arguments. 16 | # 17 | # Note that we assume mt.exe options start with '-' and are case-sensitive. 18 | # 19 | args=() 20 | 21 | while [ $# -gt 0 ]; do 22 | case $1 in 23 | 24 | # @@ TODO: handle for [;[#]] 25 | # 26 | # -rgs: 27 | # -tlb: 28 | # -dll: 29 | # -replacements: 30 | # -managedassemblyname: 31 | # -out: 32 | # -inputresource:[;[#]] 33 | # -outputresource:[;[#]] 34 | # -updateresource:[;[#]] 35 | # -hashupdate[:] 36 | # -validate_file_hashes: 37 | 38 | -rgs:* | \ 39 | -tlb:* | \ 40 | -dll:* | \ 41 | -out:*) 42 | args=("${args[@]}" "$(split_translate 5 $1)") 43 | shift 44 | ;; 45 | 46 | -hashupdate:*) 47 | args=("${args[@]}" "$(split_translate 12 $1)") 48 | shift 49 | ;; 50 | 51 | -replacements:*) 52 | args=("${args[@]}" "$(split_translate 14 $1)") 53 | shift 54 | ;; 55 | 56 | -inputresource:*) 57 | args=("${args[@]}" "$(split_translate 15 $1)") 58 | shift 59 | ;; 60 | 61 | -outputresource:* | \ 62 | -updateresource:*) 63 | args=("${args[@]}" "$(split_translate 16 $1)") 64 | shift 65 | ;; 66 | 67 | -managedassemblyname:*) 68 | args=("${args[@]}" "$(split_translate 21 $1)") 69 | shift 70 | ;; 71 | 72 | -validate_file_hashes:*) 73 | args=("${args[@]}" "$(split_translate 22 $1)") 74 | shift 75 | ;; 76 | 77 | # Handle other options with separate values. This makes sure we don't try 78 | # to path-translate them. 79 | # 80 | 81 | # None. 82 | 83 | # Handle other options with combined values that could possibly be 84 | # interpreted as paths. 85 | # 86 | -identity:*) 87 | args=("${args[@]}" "$1") 88 | shift 89 | ;; 90 | 91 | # Option or argument. 92 | # 93 | *) 94 | # If starts with a slash, treat it as a path (options start with dash). 95 | # 96 | if [[ "$1" == /* ]]; then 97 | args=("${args[@]}" "$(translate $1)") 98 | else 99 | args=("${args[@]}" "$1") 100 | fi 101 | shift 102 | ;; 103 | esac 104 | done 105 | 106 | # mt.exe always sends diagnostics to stdout. 107 | # 108 | msvc_exec 1 "$SDKBIN\\mt.exe" "${args[@]}" 109 | -------------------------------------------------------------------------------- /msvc-common/msvc-rc-common: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-common/msvc-rc-common 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # Note: shouldn't be executed directly, src_dir must be set. 7 | 8 | # Common rc.exe driver that expects the SDKBIN and INCLUDE variables to be set 9 | # for the specific MSVC version/configuration. 10 | 11 | source "$src_dir/msvc-common/msvc-common" 12 | 13 | # Translate absolute paths from POSIX to Windows. Use bash array to store 14 | # arguments in case they contain spaces. 15 | # 16 | # This needs to be done for both certain option values and arguments. 17 | # Arguments are tricky in that unless we recognize every option, and option 18 | # may look a lot like an absolute POSIX path (e.g., /nologo). The heuristics 19 | # that we are going to use here is that if the argument starts with / and 20 | # contains at least one more /, then we consider it an argument. Otherwise -- 21 | # an options. We will also explicitly recognize certain options which may not 22 | # fit this scheme well. 23 | # 24 | # Note that the order of the cases is important. Specifically, we want, e.g., 25 | # /D before /D*. 26 | # 27 | # Note that rc.exe /? is missing some options that are documented in MSDN. 28 | # 29 | args=() 30 | 31 | while [ $# -gt 0 ]; do 32 | case ${1^^} in # Uppercase for case-insensitive comparison. 33 | 34 | # /I 35 | # 36 | [/-]I) 37 | args=("${args[@]}" "$1") 38 | shift 39 | args=("${args[@]}" "$(translate $1)") 40 | shift 41 | ;; 42 | 43 | # /I 44 | # 45 | [/-]I*) 46 | args=("${args[@]}" "$(split_translate 2 $1)") 47 | shift 48 | ;; 49 | 50 | # /f[om] 51 | # 52 | [/-]F[OM]) 53 | args=("${args[@]}" "$1") 54 | shift 55 | args=("${args[@]}" "$(translate $1)") 56 | shift 57 | ;; 58 | 59 | # /f[om] 60 | # 61 | [/-]F[OM]*) 62 | args=("${args[@]}" "$(split_translate 3 $1)") 63 | shift 64 | ;; 65 | 66 | # /q 67 | # 68 | [/-]Q) 69 | args=("${args[@]}" "$1") 70 | shift 71 | args=("${args[@]}" "$(translate $1)") 72 | shift 73 | ;; 74 | 75 | # /q 76 | # 77 | [/-]Q*) 78 | args=("${args[@]}" "$(split_translate 2 $1)") 79 | shift 80 | ;; 81 | 82 | # Handle other options with separate values. This makes sure we don't try 83 | # to path-translate them. 84 | # 85 | [/-]D | \ 86 | [/-]U) 87 | args=("${args[@]}" "$1") 88 | shift 89 | args=("${args[@]}" "$1") 90 | shift 91 | ;; 92 | 93 | # Handle other options with combined values that could possibly be 94 | # interpreted as paths, for example /DFOO=foo/bar. 95 | # 96 | [/-]D*) 97 | args=("${args[@]}" "$1") 98 | shift 99 | ;; 100 | 101 | # Option or argument. 102 | # 103 | *) 104 | # If contains at least two slashes, treat it as a path. 105 | # 106 | if [[ "$1" == /*/* ]]; then 107 | args=("${args[@]}" "$(translate $1)") 108 | else 109 | args=("${args[@]}" "$1") 110 | fi 111 | shift 112 | ;; 113 | esac 114 | done 115 | 116 | export INCLUDE 117 | 118 | # rc.exe always sends diagnostics to stdout. 119 | # 120 | msvc_exec 1 "$SDKBIN\\rc.exe" "${args[@]}" 121 | -------------------------------------------------------------------------------- /msvc-common/msvc-sdk-common: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # file : msvc-common/msvc-sdk-common 4 | # license : MIT; see accompanying LICENSE file 5 | 6 | # Figure out the latest Windows 10 SDK version. Fail if none is found. 7 | # 8 | function windows10_sdkversion () 9 | { 10 | # This path will probably always be the same (VC never asks for the SDK 11 | # installation location). 12 | # 13 | local sdk_root="C:\\Program Files (x86)\\Windows Kits\\10" 14 | 15 | # Iterate through $sdk_root/Include subdirectories using the "10.0.NNNNN.0" 16 | # pattern and choose the (lexicographically) greatest one. Strip the 17 | # trailing .0 from the selected name and return it as the SDK version. 18 | # 19 | # Note that redirecting winepath's stderr to /dev/null is essential to 20 | # workaround a wineserver bug. If the script's strderr is redirected to 21 | # stdout, it gets inherited by the shell running winepath and the script 22 | # caller that reads from the child stdout can hang waiting for EOF until 23 | # wineserver terminates. For more details on this bug read the related 24 | # comments in msvc-filter.cxx. 25 | # 26 | local sdk_include 27 | sdk_include="$(winepath -u "$sdk_root/Include" 2>/dev/null)" 28 | 29 | local mxv= 30 | for d in "$sdk_include/10.0."[0-9][0-9][0-9][0-9][0-9]".0"; do 31 | # 32 | # Consider sub-directories only. Note that we can get a false positive if 33 | # there is no entry that matches the "10.0.NNNNN.0" pattern but the 34 | # "10.0.[0-9][0-9][0-9][0-9][0-9].0" sub-directory is present. We handle 35 | # this corner case later by checking the version length. 36 | # 37 | if [ -d "$d" ]; then 38 | local v 39 | v="$(basename "$d")" 40 | if [[ "$mxv" < "$v" ]]; then 41 | mxv="$v" 42 | fi 43 | fi 44 | done 45 | 46 | if [ ${#mxv} -ne 12 ]; then 47 | error "unable to find Windows 10 SDK in $sdk_root" 48 | fi 49 | 50 | echo "${mxv:0:10}" 51 | } 52 | -------------------------------------------------------------------------------- /msvc-common/version.hxx.in: -------------------------------------------------------------------------------- 1 | // file : msvc-common/version.hxx.in -*- C++ -*- 2 | // license : MIT; see accompanying LICENSE file 3 | 4 | #ifndef MSVC_FILTER_VERSION // Note: using the version macro itself. 5 | 6 | // The numeric version format is AAAAABBBBBCCCCCDDDE where: 7 | // 8 | // AAAAA - major version number 9 | // BBBBB - minor version number 10 | // CCCCC - bugfix version number 11 | // DDD - alpha / beta (DDD + 500) version number 12 | // E - final (0) / snapshot (1) 13 | // 14 | // When DDDE is not 0, 1 is subtracted from AAAAABBBBBCCCCC. For example: 15 | // 16 | // Version AAAAABBBBBCCCCCDDDE 17 | // 18 | // 0.1.0 0000000001000000000 19 | // 0.1.2 0000000001000020000 20 | // 1.2.3 0000100002000030000 21 | // 2.2.0-a.1 0000200001999990010 22 | // 3.0.0-b.2 0000299999999995020 23 | // 2.2.0-a.1.z 0000200001999990011 24 | // 25 | #define MSVC_FILTER_VERSION $msvc_linux.version.project_number$ULL 26 | #define MSVC_FILTER_VERSION_STR "$msvc_linux.version.project$" 27 | #define MSVC_FILTER_VERSION_ID "$msvc_linux.version.project_id$" 28 | 29 | #define MSVC_FILTER_VERSION_MAJOR $msvc_linux.version.major$ 30 | #define MSVC_FILTER_VERSION_MINOR $msvc_linux.version.minor$ 31 | #define MSVC_FILTER_VERSION_PATCH $msvc_linux.version.patch$ 32 | 33 | #define MSVC_FILTER_PRE_RELEASE $msvc_linux.version.pre_release$ 34 | 35 | #define MSVC_FILTER_SNAPSHOT $msvc_linux.version.snapshot_sn$ULL 36 | #define MSVC_FILTER_SNAPSHOT_ID "$msvc_linux.version.snapshot_id$" 37 | 38 | #include 39 | 40 | $libbutl.check(LIBBUTL_VERSION, LIBBUTL_SNAPSHOT)$ 41 | 42 | #endif // MSVC_FILTER_VERSION 43 | -------------------------------------------------------------------------------- /msvc-dispatch: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # Note: shouldn't be executed directly, src_exe and src_dir must be set. 4 | 5 | # The filename in src_exe should be in the -- form. 6 | # Based on that set some defaults, load the corresponding config file, and 7 | # then continue with one of the msvc--common scripts. 8 | 9 | trap "{ exit 1; }" ERR 10 | set -o errtrace # Trap in functions. 11 | 12 | function info () { echo "$*" 1>&2; } 13 | function error () { info "$*"; exit 1; } 14 | 15 | # Split the argument. The itself should be [minor] where 16 | # is digit-only and minor should start with the dot (e.g., .0). 17 | # 18 | arg=($(echo "$(basename "$src_exe")" | \ 19 | sed -n -e 's/^\([^-]*\)-\([0-9]*\)\(\.[^-]\{1,\}\)\{0,1\}-\([^-]*\)$/\1 \4 \2 \3/p')) 20 | tool="${arg[0]}" 21 | target="${arg[1]}" 22 | 23 | major="${arg[2]}" 24 | minor="${arg[3]}" 25 | 26 | MAJOR="${major^^}" 27 | MINOR="${minor^^}" 28 | 29 | if [ -z "$tool" -o -z "$major" -o -z "$target" ]; then 30 | error "invalid top-level script name" 31 | fi 32 | 33 | # For the minor version used in variable names replace dots with underscores. 34 | # 35 | MINOR="$(echo "$MINOR" | sed -e 's/\./_/g')" 36 | 37 | # Calculate MSVC_{WINEPREFIX,INSTALLDIR,SDKVERSION}. 38 | # 39 | # We have the following environment variable name hierarchy: 40 | # 41 | # MSVC__* 42 | # MSVC__* 43 | # MSVC_* 44 | # 45 | # And we always reduce these to just MSVC_* which are used further down. 46 | # 47 | function lookup_value() # 48 | { 49 | local n="MSVC_${MAJOR}${MINOR}_$1" 50 | local v="${!n}" 51 | 52 | if [ -z "$v" ]; then 53 | n="MSVC_${MAJOR}_$1" 54 | v="${!n}" 55 | 56 | if [ -z "$v" ]; then 57 | n="MSVC_$1" 58 | v="${!n}" 59 | fi 60 | fi 61 | 62 | echo "$v" 63 | } 64 | 65 | MSVC_WINEPREFIX="$(lookup_value "WINEPREFIX")" 66 | MSVC_INSTALLDIR="$(lookup_value "INSTALLDIR")" 67 | MSVC_SDKVERSION="$(lookup_value "SDKVERSION")" 68 | 69 | # Set an alternative .wine directory if requested. WINEPREFIX environment 70 | # variable is recognized by wine and winepath programs. 71 | # 72 | if [ -n "$MSVC_WINEPREFIX" ]; then 73 | export WINEPREFIX="$MSVC_WINEPREFIX" 74 | fi 75 | 76 | # Load the configuration. 77 | # 78 | source "$src_dir/msvc-$major/msvc-$major$minor-$target" 79 | 80 | # Dispatch to the tool. 81 | # 82 | source "$src_dir/msvc-common/msvc-$tool-common" 83 | -------------------------------------------------------------------------------- /mt-11-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-12-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-14.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-14.2-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-14.2-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-14.3-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-14.3-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-15.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-15.0-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-15.3-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-15.3-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-15.5-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-15.5-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-15.6-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-15.6-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-15.7-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-15.7-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-16.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-16.0-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-16.1-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /mt-16.1-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-11-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-12-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-14.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-14.2-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-14.2-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-14.3-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-14.3-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-15.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-15.0-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-15.3-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-15.3-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-15.5-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-15.5-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-15.6-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-15.6-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-15.7-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-15.7-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-16.0-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-16.0-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-16.1-32: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /rc-16.1-64: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # The contents of these files are all identical; the information is carries by 4 | # the file name which should be in the form --. See 5 | # msvc-dispatch for details. 6 | # 7 | src_exe="$(realpath ${BASH_SOURCE[0]})" 8 | src_dir="$(dirname "$src_exe")" 9 | 10 | source "$src_dir/msvc-dispatch" 11 | -------------------------------------------------------------------------------- /repositories.manifest: -------------------------------------------------------------------------------- 1 | : 1 2 | summary: MS Visual C++ as cross-compiler driver scripts repository 3 | 4 | : 5 | role: prerequisite 6 | location: ../libbutl.git#HEAD 7 | --------------------------------------------------------------------------------