|
1 | 1 | platform "windows-2019-x64" do |plat|
|
2 | 2 | plat.vmpooler_template "win-2019-x86_64"
|
| 3 | + |
| 4 | + # Not currently used |
3 | 5 | plat.docker_image "windows:ltsc2019"
|
4 | 6 | plat.docker_registry "mcr.microsoft.com"
|
5 | 7 | plat.docker_arch "linux/amd64"
|
6 | 8 |
|
7 | 9 | plat.servicetype "windows"
|
8 |
| - visual_studio_version = '2017' |
9 |
| - visual_studio_sdk_version = 'win8.1' |
10 |
| - |
11 |
| - # We need to ensure we install chocolatey prior to adding any nuget repos. Otherwise, everything will fall over |
12 |
| - plat.add_build_repository "https://artifactory.delivery.puppetlabs.net/artifactory/generic/buildsources/windows/chocolatey/install-chocolatey-1.4.0.ps1" |
13 |
| - plat.add_build_repository "https://artifactory.delivery.puppetlabs.net/artifactory/api/nuget/nuget" |
14 |
| - |
15 |
| - # C:\tools is likely added by mingw, however because we also want to use that |
16 |
| - # dir for vsdevcmd.bat we create it for safety |
17 |
| - plat.provision_with "mkdir C:/tools" |
18 |
| - # We don't want to install any packages from the chocolatey repo by accident |
19 |
| - plat.provision_with "C:/ProgramData/chocolatey/bin/choco.exe sources remove -name chocolatey" |
20 | 10 |
|
| 11 | + # Install ruby, ruby-devel, gcc-core, make, git, and libyaml-devel in Cygwin on the Windows image. |
| 12 | + # Run setup.bat found in the root of this repo. These are needed in order to successfully |
| 13 | + # do a bundle install. They are included here just in case they get removed somehow. |
| 14 | + # Make sure "setup-x86_64.exe" (Cygwin's installer) is at the root of C:/ |
21 | 15 | packages = [
|
22 |
| - "cmake", |
23 |
| - "pl-gdbm-#{self._platform.architecture}", |
24 |
| - "pl-iconv-#{self._platform.architecture}", |
25 |
| - "pl-libffi-#{self._platform.architecture}", |
26 |
| - "pl-pdcurses-#{self._platform.architecture}", |
27 |
| - "pl-toolchain-#{self._platform.architecture}", |
28 |
| - "pl-zlib-#{self._platform.architecture}", |
29 |
| - "mingw-w64 -version 5.2.0 -debug", |
30 |
| - "Wix310 -version 3.10.2 -debug -x86" |
| 16 | + 'autoconf', |
| 17 | + 'cmake', |
| 18 | + 'gcc-core', |
| 19 | + 'gcc-g++', |
| 20 | + 'git', |
| 21 | + 'libyaml-devel', |
| 22 | + 'make', |
| 23 | + 'mingw64-x86_64-gcc-core', |
| 24 | + 'mingw64-x86_64-gcc-g++', |
| 25 | + 'mingw64-x86_64-gdbm', |
| 26 | + 'mingw64-x86_64-libffi', |
| 27 | + 'mingw64-x86_64-readline', |
| 28 | + 'mingw64-x86_64-zlib', |
| 29 | + 'ruby', |
| 30 | + 'ruby-devel', |
| 31 | + 'patch', |
31 | 32 | ]
|
32 | 33 |
|
33 |
| - packages.each do |name| |
34 |
| - plat.provision_with("C:/ProgramData/chocolatey/bin/choco.exe install -y --no-progress #{name}") |
35 |
| - end |
36 |
| - # We use cache-location in the following install because msvc has several long paths |
37 |
| - # if we do not update the cache location choco will fail because paths get too long |
38 |
| - plat.provision_with "C:/ProgramData/chocolatey/bin/choco.exe install msvc.#{visual_studio_version}-#{visual_studio_sdk_version}.sdk.en-us -y --cache-location=\"C:\\msvc\" --no-progress" |
39 |
| - # The following creates a batch file that will execute the vsdevcmd batch file located within visual studio. |
40 |
| - # We create the following batch file under C:\tools\vsdevcmd.bat so we can avoid using both the %ProgramFiles(x86)% |
41 |
| - # evironment var, as well as any spaces in the path when executing things with cygwin. This makes command execution |
42 |
| - # through cygwin much easier. |
43 |
| - # |
44 |
| - # Note that the unruly \'s in the following string escape the following sequence to literal chars: "\" and then \"" |
45 |
| - plat.provision_with "touch C:/tools/vsdevcmd.bat && echo \"\\\"%ProgramFiles(x86)%\\Microsoft Visual Studio\\#{visual_studio_version}\\BuildTools\\Common7\\Tools\\vsdevcmd\\\"\" >> C:/tools/vsdevcmd.bat" |
46 |
| - |
47 |
| - plat.install_build_dependencies_with "C:/ProgramData/chocolatey/bin/choco.exe install -y --no-progress" |
| 34 | + plat.provision_with("C:/setup-x86_64.exe -q -P #{packages.join(',')}") |
| 35 | + plat.install_build_dependencies_with "C:/setup-x86_64.exe -q -P" |
48 | 36 |
|
49 | 37 | plat.make "/usr/bin/make"
|
50 | 38 | plat.patch "TMP=/var/tmp /usr/bin/patch.exe --binary"
|
51 | 39 |
|
52 | 40 | plat.platform_triple "x86_64-w64-mingw32"
|
53 | 41 |
|
| 42 | + # Putting these here as a reminder where we use them elsewhere. DO NOT |
| 43 | + # use the full path, just the name of the executable without the extension. |
| 44 | + # Otherwise, autoconf gets confused. |
| 45 | + plat.environment 'CC', "x86_64-w64-mingw32-gcc" |
| 46 | + plat.environment 'CXX', "x86_64-w64-mingw32-g++" |
| 47 | + |
54 | 48 | plat.package_type "archive"
|
55 | 49 | plat.output_dir "windows"
|
56 | 50 | end
|
0 commit comments