Skip to content

Commit 4fa4a54

Browse files
authored
Update main.yml
1 parent 1b22b3e commit 4fa4a54

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,26 @@ on:
1313
jobs:
1414
# 任务的ID,可以自定义
1515
build-x64-dll:
16-
# 指定任务运行的虚拟机环境,我们选择最新的Windows环境
16+
# 指定任务运行的虚拟机环境
1717
runs-on: windows-latest
1818

1919
# 定义任务包含的步骤
2020
steps:
2121
# 第一步:检出代码
22-
# 这个操作会将你的仓库代码下载到虚拟机中
2322
- name: Checkout repository code
2423
uses: actions/checkout@v4
2524

2625
# 第二步:编译64位DLL
27-
# 我们使用MSVC编译器 (cl.exe)
2826
- name: Compile 64-bit DLL using MSVC
29-
# 在Windows的开发者命令行环境中执行编译命令
27+
# 关键修正:在这里指定使用 cmd 作为 shell
28+
shell: cmd
3029
run: |
3130
echo "Starting 64-bit DLL compilation..."
3231
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
3332
cl.exe /D_USRDLL /D_WINDLL TimerResolutionModifier.cpp /link /DLL /OUT:TimerResolutionModifier_x64.dll Winmm.lib /MACHINE:X64
3433
echo "Compilation finished."
3534
3635
# 第三步:上传编译产物
37-
# 将编译好的DLL文件打包,以便我们下载
3836
- name: Upload compiled DLL as an artifact
3937
uses: actions/upload-artifact@v4
4038
with:

0 commit comments

Comments
 (0)