2323 ' 1.5.1' ,
2424 ' 1.6.1' ,
2525 ' 1.7.3' ,
26+ ' 2.0.0-alpha.1' ,
2627 ]
2728 exclude :
2829 # Exclude 1.5.1, which is quite old, for everyone but m417z.
@@ -43,14 +44,25 @@ jobs:
4344 - name : Extract Windhawk
4445 if : steps.cache-windhawk.outputs.cache-hit != 'true'
4546 run : |
46- installer_url="https://github.com/ramensoftware/windhawk/releases/download/v${{ matrix.version }}/windhawk_setup.exe"
47+ if [[ "${{ matrix.version }}" == 1.* ]]; then
48+ release_tag="v${{ matrix.version }}"
49+ installer_args=''
50+ else
51+ # Starting with 2.0.0-alpha.1, the release tag has no "v" prefix, and
52+ # the compiler is a separate component that /DEVTOOLS pulls into the
53+ # install.
54+ release_tag="${{ matrix.version }}"
55+ installer_args='/DEVTOOLS'
56+ fi
57+
58+ installer_url="https://github.com/ramensoftware/windhawk/releases/download/$release_tag/windhawk_setup.exe"
4759 installer_path="${{ runner.temp }}/windhawk_setup.exe"
4860 echo "Downloading $installer_url to $installer_path"
4961 curl -L "$installer_url" -o "$installer_path"
5062
5163 extract_path="${{ runner.temp }}\windhawk"
5264 echo "Extracting $installer_path to $extract_path"
53- MSYS_NO_PATHCONV=1 "$installer_path" /S /PORTABLE "/D=$extract_path"
65+ MSYS_NO_PATHCONV=1 "$installer_path" /S /PORTABLE $installer_args "/D=$extract_path"
5466 - name : Get changed files
5567 if : github.event_name == 'pull_request'
5668 id : changed-files
6981 if [[ ( ($a -eq 0 && $b -eq 1) || ($a -eq 1 && $b -eq 0) ) && $c -eq 1 ]]; then
7082 echo "Compiling $ALL_CHANGED_AND_MODIFIED_FILES"
7183 windhawk_path="${{ runner.temp }}\windhawk"
72- python -u scripts/compile_mod.py -w "$windhawk_path" \
73- -f "$ALL_CHANGED_AND_MODIFIED_FILES" \
74- -o32 "${{ runner.temp }}\mod_32.dll" \
75- -o64 "${{ runner.temp }}\mod_64.dll" \
76- -oarm64 "${{ runner.temp }}\mod_arm64.dll"
84+ if [[ "${{ matrix.version }}" == 1.* ]]; then
85+ python -u scripts/compile_mod.py -w "$windhawk_path" \
86+ -f "$ALL_CHANGED_AND_MODIFIED_FILES" \
87+ -o32 "${{ runner.temp }}\mod_32.dll" \
88+ -o64 "${{ runner.temp }}\mod_64.dll" \
89+ -oarm64 "${{ runner.temp }}\mod_arm64.dll"
90+ else
91+ # Compile via the CLI (--disabled builds the mod without activating
92+ # it). Two passes: with WINDHAWK_ARM64_ENABLED=1 the CLI drops the
93+ # x86-64 build for a mod whose targets are all common system
94+ # processes, so the first pass (arm64 off) covers x86/x86-64 and the
95+ # second (arm64 on) covers arm64.
96+ cli="$windhawk_path\windhawk-cli.exe"
97+ MSYS_NO_PATHCONV=1 "$cli" --app-root "$windhawk_path" \
98+ mod install --disabled --file "$ALL_CHANGED_AND_MODIFIED_FILES"
99+ MSYS_NO_PATHCONV=1 WINDHAWK_ARM64_ENABLED=1 "$cli" --app-root "$windhawk_path" \
100+ mod install --disabled --file "$ALL_CHANGED_AND_MODIFIED_FILES"
101+ fi
77102 fi
0 commit comments