Switch to archive.apache.org for the URL as dlcdn does not retain old releases. Change-Id: I295a1c8371ac543b73773749ba14e66671f8ced3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210561 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
144 lines
7.0 KiB
Plaintext
144 lines
7.0 KiB
Plaintext
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
|
|
|
|
# download additional dependencies used for the build to C:/Users/Public/Downloads (unfortunately
|
|
# xRemoteFile doesn't accept $env:PUBLIC or similar, so using hardcoded paths for now),
|
|
# install the 32bit and 64bit JDKs & make sure wsl is installed
|
|
# (this configuration needs to be applied with administrator privileges, as otherwise even
|
|
# downloading files e.g. would fail with:
|
|
# Access to the path 'C:\ProgramData\Microsoft\Windows\PowerShell\Configuration\BuiltinProvCache\DSC_xRemoteFile' is denied.
|
|
# unfortunately the "securityContext: elevated" directive is not respected by all DSC modules, so
|
|
# for now it is still necessary to run the whole configuration with admin privileges.
|
|
|
|
properties:
|
|
resources:
|
|
- resource: xPSDesiredStateConfiguration/xRemoteFile
|
|
id: jom
|
|
directives:
|
|
description: download jom (parallel nmake)
|
|
securityContext: elevated
|
|
settings:
|
|
DestinationPath: C:/Users/Public/Downloads
|
|
Uri: http://download.qt.io/official_releases/jom/jom_1_1_4.zip
|
|
ChecksumType: SHA256
|
|
Checksum: d533c1ef49214229681e90196ed2094691e8c4a0a0bef0b2c901debcb562682b
|
|
- resource: xPSDesiredStateConfiguration/xRemoteFile
|
|
id: make
|
|
directives:
|
|
description: download make
|
|
securityContext: elevated
|
|
settings:
|
|
DestinationPath: C:/Users/Public/Downloads
|
|
Uri: https://dev-www.libreoffice.org/bin/cygwin/make-4.2.1-msvc.exe
|
|
ChecksumType: SHA256
|
|
Checksum: 146d6f2b0ea57647b11b506a95048a7be73232e1feeeccbc1013651f992423d8
|
|
- resource: xPSDesiredStateConfiguration/xRemoteFile
|
|
id: clang-format
|
|
directives:
|
|
description: download clang-format
|
|
securityContext: elevated
|
|
settings:
|
|
DestinationPath: C:/Users/Public/Downloads
|
|
Uri: https://dev-www.libreoffice.org/bin/clang-format-5.0.0-win.exe
|
|
ChecksumType: SHA256
|
|
Checksum: a25d5c4b451ec4fba466807e9239d0bcbafcfeb7f35834f2db87448968a73ccb
|
|
- resource: xPSDesiredStateConfiguration/xRemoteFile
|
|
id: pkgconf
|
|
directives:
|
|
description: download pkgconf
|
|
securityContext: elevated
|
|
settings:
|
|
DestinationPath: C:/Users/Public/Downloads
|
|
Uri: https://dev-www.libreoffice.org/extern/pkgconf-2.4.3.exe
|
|
ChecksumType: SHA256
|
|
Checksum: 791cd6dbc56f7268fbf9c4652d6634b0f5c59687ab4e504565e58245952edd41
|
|
- resource: xPSDesiredStateConfiguration/xRemoteFile
|
|
id: spp
|
|
directives:
|
|
description: download strawberry perl portable
|
|
securityContext: elevated
|
|
settings:
|
|
DestinationPath: C:/Users/Public/Downloads
|
|
Uri: https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54001_64bit_UCRT/strawberry-perl-5.40.0.1-64bit-portable.zip
|
|
ChecksumType: SHA256
|
|
Checksum: 754f3e2a8e473dc68d1540c7802fb166a025f35ef18960c4564a31f8b5933907
|
|
- resource: xPSDesiredStateConfiguration/xRemoteFile
|
|
id: ant
|
|
directives:
|
|
description: download ant
|
|
securityContext: elevated
|
|
settings:
|
|
DestinationPath: C:/Users/Public/Downloads
|
|
Uri: https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.18-bin.zip
|
|
ChecksumType: SHA256
|
|
Checksum: d3d2009bc815e8fe4808e3af2f2aa7019cd666a26d112a3d9ea5a45345edf236
|
|
- resource: xPSDesiredStateConfiguration/xRemoteFile
|
|
id: junit
|
|
directives:
|
|
description: download junit
|
|
securityContext: elevated
|
|
settings:
|
|
DestinationPath: C:/Users/Public/Downloads
|
|
Uri: https://repo1.maven.org/maven2/junit/junit/4.10/junit-4.10.jar
|
|
ChecksumType: SHA256
|
|
Checksum: 36a747ca1e0b86f6ea88055b8723bb87030d627766da6288bf077afdeeb0f75a
|
|
- resource: xPSDesiredStateConfiguration/xMsiPackage
|
|
id: JDK_x64
|
|
directives:
|
|
description: install the 64bit JDK
|
|
securityContext: elevated
|
|
settings:
|
|
Path: https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_x64_windows_hotspot_17.0.12_7.msi
|
|
ProductId: '{20108BEF-FA49-47AE-9551-495BED430689}'
|
|
Arguments: ADDLOCAL=FeatureMain,FeatureOracleJavaSoft
|
|
FileHash: 1e6df6b445d9e995e86fd8225c658df1411d3abab86b540ce4d2063c8a889835
|
|
- resource: xPSDesiredStateConfiguration/xMsiPackage
|
|
id: JDK_x86
|
|
directives:
|
|
description: install the 32bit JDK
|
|
securityContext: elevated
|
|
settings:
|
|
Path: https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_x86-32_windows_hotspot_17.0.12_7.msi
|
|
ProductId: '{E0CAD1B6-6CF5-4E33-9F85-18AAE8CDD8EE}'
|
|
Arguments: ADDLOCAL=FeatureMain,FeatureOracleJavaSoft
|
|
FileHash: 84e94caa3fac04a173d8cebb80ae77727eaedd766d5bf4f66900aa64aa0b4f11
|
|
- resource: xPSDesiredStateConfiguration/xScript
|
|
id: wsl
|
|
directives:
|
|
description: make sure that wsl utility is available/working - i.e. that wsl is installed
|
|
securityContext: elevated
|
|
settings:
|
|
# no idea why the whole test fails when not redirecting stderr
|
|
TestScript: wsl.exe --status 2>$null; return ![bool]$LASTEXITCODE
|
|
GetScript: wsl.exe --status 2>$null; return ![bool]$LASTEXITCODE
|
|
SetScript: wsl.exe --install --no-distribution
|
|
- resource: xPSDesiredStateConfiguration/xScript
|
|
id: media-feature-pack
|
|
directives:
|
|
description: install Media Feature Pack when necessary (for Windows N)
|
|
securityContext: elevated
|
|
settings:
|
|
# the Get-WindowsCapability/Add-WindowsCapability cmdlets aren't available when running in
|
|
# the winget configure context, so use dism.exe directly here.
|
|
# Installing the media-pack takes ages/is very slow, but there doesn't seem to be a way to
|
|
# add custom messages to the output/the only way seems to be to use msg.exe to launch a
|
|
# crude message-box, but since this should be a rare case, it is better to keep it simple.
|
|
TestScript: |
|
|
$caps = & dism.exe /English /Online /Get-Capabilities
|
|
# On non-N editions it is an OptionalFeature, not a Capability, so nothing would match.
|
|
# In that case, consider the system already in desired state.
|
|
if (-not [bool]($caps -match 'Media\.MediaFeaturePack')) {
|
|
return $true
|
|
}
|
|
$info = & dism.exe /English /Online /Get-CapabilityInfo /CapabilityName:Media.MediaFeaturePack
|
|
return [bool]($info -match 'State : Installed')
|
|
GetScript: |
|
|
$caps = & dism.exe /English /Online /Get-Capabilities
|
|
if (-not [bool]($caps -match 'Media\.MediaFeaturePack')) {
|
|
return @{Result = "NotApplicable"}
|
|
}
|
|
$info = & dism.exe /English /Online /Get-CapabilityInfo /CapabilityName:Media.MediaFeaturePack
|
|
return @{Result = ($info -match 'State : ')}
|
|
SetScript: |
|
|
dism.exe /English /Online /Add-Capability /CapabilityName:Media.MediaFeaturePack /Quiet /NoRestart
|
|
configurationVersion: 0.2.0
|