Skip to content

Commit 8c7b09b

Browse files
committed
Adds configure-only build script
Adds configure_dxvk.ps1 to create and configure the meson build directories without building. This is meant for developers who just need to build from within VS and saves time when recreating build directories.
1 parent 6634f95 commit 8c7b09b

File tree

2 files changed

+50
-16
lines changed

2 files changed

+50
-16
lines changed

build_common.ps1

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ function PerformBuild {
8585

8686
[string]$BuildTarget,
8787

88-
[string[]]$InstallTags
88+
[string[]]$InstallTags,
89+
90+
[bool]$ConfigureOnly = $false
8991
)
9092

9193
$CurrentDir = Get-Location
@@ -102,21 +104,23 @@ function PerformBuild {
102104
exit $LASTEXITCODE
103105
}
104106

105-
Push-Location $BuildDir
106-
& meson compile -v
107-
108-
if ($InstallTags -and $InstallTags.Count -gt 0) {
109-
# join array into comma-separated list
110-
$tagList = $InstallTags -join ','
111-
& meson install --tags $tagList
107+
if (!$ConfigureOnly) {
108+
Push-Location $BuildDir
109+
& meson compile -v
110+
111+
if ($InstallTags -and $InstallTags.Count -gt 0) {
112+
# join array into comma-separated list
113+
$tagList = $InstallTags -join ','
114+
& meson install --tags $tagList
115+
}
116+
else {
117+
& meson install
118+
}
119+
Pop-Location
120+
121+
if ( $LASTEXITCODE -ne 0 ) {
122+
Write-Output "Failed to run build step"
123+
exit $LASTEXITCODE
112124
}
113-
else {
114-
& meson install
115-
}
116-
Pop-Location
117-
118-
if ( $LASTEXITCODE -ne 0 ) {
119-
Write-Output "Failed to run build step"
120-
exit $LASTEXITCODE
121125
}
122126
}

configure_dxvk.ps1

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<#
2+
Copyright (c) 2021-2023, NVIDIA CORPORATION. All rights reserved.
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a
5+
copy of this software and associated documentation files (the "Software"),
6+
to deal in the Software without restriction, including without limitation
7+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
and/or sell copies of the Software, and to permit persons to whom the
9+
Software is furnished to do so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in
12+
all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20+
DEALINGS IN THE SOFTWARE.
21+
#>
22+
23+
. ".\build_common.ps1"
24+
25+
$BuildFlavours = @("debug","debugoptimized","release")
26+
$BuildSubDirs = @("_Comp64Debug","_Comp64DebugOptimized","_Comp64Release")
27+
28+
For ($i=0; $i -lt $BuildFlavours.Length; $i++) {
29+
PerformBuild -BuildFlavour $BuildFlavours[$i] -BuildSubDir $BuildSubDirs[$i] -Backend ninja -EnableTracy false -ConfigureOnly $True
30+
}

0 commit comments

Comments
 (0)