File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 13
13
jobs :
14
14
# 任务的ID,可以自定义
15
15
build-x64-dll :
16
- # 指定任务运行的虚拟机环境,我们选择最新的Windows环境
16
+ # 指定任务运行的虚拟机环境
17
17
runs-on : windows-latest
18
18
19
19
# 定义任务包含的步骤
20
20
steps :
21
21
# 第一步:检出代码
22
- # 这个操作会将你的仓库代码下载到虚拟机中
23
22
- name : Checkout repository code
24
23
uses : actions/checkout@v4
25
24
26
25
# 第二步:编译64位DLL
27
- # 我们使用MSVC编译器 (cl.exe)
28
26
- name : Compile 64-bit DLL using MSVC
29
- # 在Windows的开发者命令行环境中执行编译命令
27
+ # 关键修正:在这里指定使用 cmd 作为 shell
28
+ shell : cmd
30
29
run : |
31
30
echo "Starting 64-bit DLL compilation..."
32
31
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
33
32
cl.exe /D_USRDLL /D_WINDLL TimerResolutionModifier.cpp /link /DLL /OUT:TimerResolutionModifier_x64.dll Winmm.lib /MACHINE:X64
34
33
echo "Compilation finished."
35
34
36
35
# 第三步:上传编译产物
37
- # 将编译好的DLL文件打包,以便我们下载
38
36
- name : Upload compiled DLL as an artifact
39
37
uses : actions/upload-artifact@v4
40
38
with :
You can’t perform that action at this time.
0 commit comments