File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change 1- # 工作流的名称,会显示在Actions标签页中
21name : Build 64-bit DLL
32
4- # 触发工作流的事件
53on :
6- # 当有代码推送到 main 分支时自动触发
74 push :
85 branches : [ "main" ]
9- # 允许你手动在Actions页面点击按钮触发
106 workflow_dispatch :
117
12- # 定义工作流要执行的任务
138jobs :
14- # 任务的ID,可以自定义
159 build-x64-dll :
16- # 指定任务运行的虚拟机环境
1710 runs-on : windows-latest
1811
19- # 定义任务包含的步骤
2012 steps :
21- # 第一步:检出代码
2213 - name : Checkout repository code
2314 uses : actions/checkout@v4
2415
25- # 第二步:编译64位DLL
2616 - name : Compile 64-bit DLL using MSVC
27- # 关键修正:在这里指定使用 cmd 作为 shell
2817 shell : cmd
2918 run : |
3019 echo "Starting 64-bit DLL compilation..."
3120 call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
32- cl.exe /D_USRDLL /D_WINDLL TimerResolutionModifier.cpp /link /DLL /OUT:TimerResolutionModifier_x64.dll Winmm .lib /MACHINE:X64
21+ cl.exe /D_USRDLL /D_WINDLL /utf-8 TimerResolutionModifier.cpp /link /DLL /OUT:TimerResolutionModifier_x64.dll User32 .lib /MACHINE:X64
3322 echo "Compilation finished."
3423
35- # 第三步:上传编译产物
3624 - name : Upload compiled DLL as an artifact
3725 uses : actions/upload-artifact@v4
3826 with :
39- # 上传的产物包名称
4027 name : Compiled-DLL-x64
41- # 要上传的文件的路径
4228 path : TimerResolutionModifier_x64.dll
You can’t perform that action at this time.
0 commit comments