-
Notifications
You must be signed in to change notification settings - Fork 7
93 lines (74 loc) · 3.06 KB
/
msbuild.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Build
on:
push:
tags:
- 'v*'
env:
SOLUTION_FILE_PATH: MetaHookSv/Plugins/ABCEnchance
BUILD_CONFIGURATION: Release
BUILD_CONFIGURATION_AVX: Release_AVX2
permissions:
contents: write
jobs:
build-win32:
runs-on: windows-latest
steps:
- name: Git Clone Metahook
uses: sudosubin/git-clone-action@v1.0.1
with:
repository: hzqst/MetaHookSv
path: MetaHookSv
- name: Git Clone This
uses: sudosubin/git-clone-action@v1.0.1
with:
repository: DrAbcOfficial/ABCEnchance
path: MetaHookSv/Plugins/ABCEnchance
- name: Setup build env
working-directory: MetaHookSv
run: |
git submodule update --init --recursive
Copy-Item -Force -Path "./tools/global_template.props" -Destination "./tools/global.props"
- name: Setup glew
working-directory: MetaHookSv
run: ./scripts/build-glew-x86-Release.bat
- name: Setup glew AVX
working-directory: MetaHookSv
run: ./scripts/build-glew-x86-Release_AVX2.bat
- name: Build FreeImage
working-directory: MetaHookSv
run: ./scripts/build-FreeImage-x86-Release.bat
- name: Build Capstone
working-directory: MetaHookSv
run: ./scripts/build-capstone-x86-Release.bat
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Add Missing File
working-directory: MetaHookSv/Plugins/ABCEnchance/src
run: New-item ./Source/Utility/NeteaseApi.cpp;New-item ./Header/Utility/NeteaseApi.h
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
- name: Build AVX
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION_AVX}} ${{env.SOLUTION_FILE_PATH}}
- name: Build Installer
working-directory: MetaHookSv/Plugins/ABCEnchance/ABCEnchanceInstaller
run: dotnet publish -p:PublishProfile=FolderProfile
- name: Move to build
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
Move-Item -Force -Path "MetaHookSv/Plugins/ABCEnchance/Build/ABCEnchance.dll" -Destination "MetaHookSv/Plugins/ABCEnchance/Build/svencoop/metahook/plugins/ABCEnchance.dll"
Move-Item -Force -Path "MetaHookSv/Plugins/ABCEnchance/Build/ABCEnchance_AVX2.dll" -Destination "MetaHookSv/Plugins/ABCEnchance/Build/svencoop/metahook/plugins/ABCEnchance_AVX2.dll"
Move-Item -Force -Path "MetaHookSv/Plugins/ABCEnchance/ABCEnchanceInstaller/bin/publish/ABCEnchanceInstaller.exe" -Destination "MetaHookSv/Plugins/ABCEnchance/Build/Installer.exe"
- name: Zipping All
uses: vimtor/action-zip@v1
with:
files: MetaHookSv/Plugins/ABCEnchance/build/
dest: ABCEnchance-windows-x86.zip
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: ABCEnchance-${{ github.ref }}
files: |
ABCEnchance-windows-x86.zip