Skip to content

Commit 1cf3f25

Browse files
committed
Dont run packman unless a change occurs to any of the input files
1 parent 74608c3 commit 1cf3f25

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@
3636
/external
3737
**/_batch_output/**
3838
/public/bin/
39-
tests/rtx/dxvk_rt_testing/apics
39+
tests/rtx/dxvk_rt_testing/apics
40+
*.log

meson.build

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,16 @@ current_build_dir_norm = meson.current_build_dir().replace('\\', '/')
4343
# early outs if everything's already fetched, so the waste is negligible + forgiveable.
4444
get_dependencies_script_path = join_paths(global_src_root_norm, 'scripts-common/update-deps.cmd')
4545
message('Downloading dependencies...')
46-
packman_out = run_command(get_dependencies_script_path, check: true)
46+
packman_out = run_command(get_dependencies_script_path, 'packman-external.xml', 'update-deps.log', check: true)
4747
message(packman_out.stdout().strip())
4848
if packman_out.returncode() != 0
4949
message(packman_out.stderr().strip())
5050
error('Failed to get dependencies.')
5151
endif
5252
fetch_packman_target = custom_target('fetch_packman',
53-
output : ['fetch_packman'],
54-
build_by_default : true,
55-
depends : [],
56-
command : [get_dependencies_script_path] )
53+
input : ['packman-external.xml', get_dependencies_script_path],
54+
output : 'update-deps.log',
55+
command : [get_dependencies_script_path, '@INPUT0@', '@OUTPUT0@' ] )
5756

5857
fs = import('fs')
5958

@@ -746,11 +745,13 @@ if dxvk_is_ninja
746745

747746
if src_exe != ''
748747
# intentionally using two install jobs here so we can have unique tags
748+
# the exe only allows test applications to be compiled and installed, without installing the runtime. Such copy-less runtime testing scenarios exist in CI.
749749
meson.add_install_script(
750750
join_paths(global_src_root_norm, 'scripts-common/install_file_in_dir.bat'),
751751
src_exe, output_path,
752752
install_tag: target_suffix + '_exeonly'
753-
)
753+
)
754+
# the regular path allows the exe to be built and deployed along with a runtime. Such scenarios exist during local development, when launching from VS for example.
754755
meson.add_install_script(
755756
join_paths(global_src_root_norm, 'scripts-common/install_file_in_dir.bat'),
756757
src_exe, output_path,

scripts-common/update-deps.cmd

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
@echo off
2-
setlocal
2+
setlocal EnableDelayedExpansion
3+
4+
REM %1 Input file for packman (xml file)
5+
REM %2 Output file, in this case a log file
6+
7+
REM resolve %1/%2 to full paths
8+
set "inputFile=%~f1"
9+
set "outputFile=%~f2"
10+
311
pushd %~dp0
412

5-
call ..\scripts-common\packman\packman pull ..\packman-external.xml
13+
call packman\packman pull "!inputFile:\=/!"
614
if errorlevel 1 (
715
echo packman error, aborting!
816
exit /B 1
917
)
18+
echo Successfully updated deps > "!outputFile!"

0 commit comments

Comments
 (0)