Skip to content

Commit 4fb8689

Browse files
committed
added:windows arm64 build
1 parent 479258a commit 4fb8689

File tree

22 files changed

+1129
-41
lines changed

22 files changed

+1129
-41
lines changed

.github/workflows/msbuild.yml

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
configuration: [Debug ,Release]
20-
platform: [x86 ,x64]
20+
platform: [x86 ,x64 ,ARM64]
2121

2222
runs-on: windows-latest # 最新的 Windows 环境
23-
env:
24-
ACTIONS_STEP_DEBUG: true
2523
steps:
2624
# 检出您的主仓库代码
2725
- name: Checkout main repository code
@@ -64,6 +62,14 @@ jobs:
6462
./vcpkg.exe install lua:x64-windows opencv[contrib]:x64-windows libqrencode:x64-windows
6563
./vcpkg.exe integrate install
6664
shell: pwsh
65+
- name: vcpkg install (ARM64)
66+
if: matrix.platform == 'ARM64'
67+
run: |
68+
cd vcpkg
69+
./bootstrap-vcpkg.bat
70+
./vcpkg.exe install lua:Arm64-windows opencv[contrib]:Arm64-windows libqrencode:Arm64-windows
71+
./vcpkg.exe integrate install
72+
shell: pwsh
6773

6874
- name: Set up Dependency x86_64 Environment
6975
if: matrix.platform == 'x64'
@@ -85,7 +91,21 @@ jobs:
8591
echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
8692
echo "XENGINE_LIB32=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
8793
shell: pwsh
88-
94+
- name: Set up Dependency ARM64 Environment
95+
if: matrix.platform == 'ARM64'
96+
run: |
97+
$response = Invoke-RestMethod -Uri "https://api.github.com/repos/libxengine/libxengine/releases/latest" -Headers @{"Accept"="application/vnd.github.v3+json"}
98+
$latest_tag = $response.tag_name
99+
Write-Host "Latest Tag: $latest_tag"
100+
101+
$url = "https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Windows_Arm64.zip"
102+
Invoke-WebRequest -Uri $url -OutFile "XEngine_Windows_Arm64.zip"
103+
Expand-Archive -Path ./XEngine_Windows_Arm64.zip -DestinationPath ./XEngine_Windows -Force
104+
105+
echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
106+
echo "XENGINE_LIBARM64=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append
107+
shell: pwsh
108+
89109
# 配置 MSBuild 的路径,准备构建 VC++ 项目
90110
- name: Setup MSBuild
91111
uses: microsoft/setup-msbuild@v2
@@ -113,6 +133,15 @@ jobs:
113133
cd XEngine_Release
114134
./VSCopy_x64.bat
115135
shell: pwsh
136+
- name: Conditional Step for ARM64 Release
137+
if: matrix.configuration == 'Release' && matrix.platform == 'ARM64'
138+
run: |
139+
cp -r XEngine_Source/ARM64/Release/*.dll XEngine_Release/
140+
cp -r XEngine_Source/ARM64/Release/*.exe XEngine_Release/
141+
cp -r XEngine_Source/VSCopy_Arm64.bat XEngine_Release/
142+
cd XEngine_Release
143+
./VSCopy_Arm64.bat
144+
shell: pwsh
116145

117146
- name: Upload folder as artifact with x86
118147
if: matrix.configuration == 'Release' && matrix.platform == 'x64'
@@ -129,3 +158,10 @@ jobs:
129158
name: XEngine_APIServiceApp-x86_64-Windows
130159
path: XEngine_Release/
131160
retention-days: 1
161+
- name: Upload folder as artifact with ARM64
162+
if: matrix.configuration == 'Release' && matrix.platform == 'ARM64'
163+
uses: actions/upload-artifact@v4
164+
with:
165+
name: XEngine_APIServiceApp-ARM64-Windows
166+
path: XEngine_Release/
167+
retention-days: 1

XEngine_Source/VSCopy_Arm64.bat

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
copy /y "%XEngine_LibArm64%\XEngine_BaseLib\XEngine_BaseLib.dll" "./"
2+
copy /y "%XEngine_LibArm64%\XEngine_BaseLib\XEngine_BaseSafe.dll" "./"
3+
copy /y "%XEngine_LibArm64%\XEngine_BaseLib\XEngine_Algorithm.dll" "./"
4+
copy /y "%XEngine_LibArm64%\XEngine_Core\XEngine_Core.dll" "./"
5+
copy /y "%XEngine_LibArm64%\XEngine_Core\XEngine_ManagePool.dll" "./"
6+
copy /y "%XEngine_LibArm64%\XEngine_Core\XEngine_Cryption.dll" "./"
7+
8+
copy /y "%XEngine_LibArm64%\XEngine_Client\XClient_APIHelp.dll" "./"
9+
copy /y "%XEngine_LibArm64%\XEngine_Client\XClient_Stream.dll" "./"
10+
copy /y "%XEngine_LibArm64%\XEngine_Client\XClient_Socket.dll" "./"
11+
12+
copy /y "%XEngine_LibArm64%\XEngine_NetHelp\NetHelp_XSocket.dll" "./"
13+
copy /y "%XEngine_LibArm64%\XEngine_NetHelp\NetHelp_APIAddr.dll" "./"
14+
copy /y "%XEngine_LibArm64%\XEngine_NetHelp\NetHelp_APIHelp.dll" "./"
15+
copy /y "%XEngine_LibArm64%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./"
16+
copy /y "%XEngine_LibArm64%\XEngine_SystemSdk\XEngine_SystemConfig.dll" "./
17+
18+
copy /y "%XEngine_LibArm64%\XEngine_HelpComponents\HelpComponents_DataBase.dll" "./"
19+
copy /y "%XEngine_LibArm64%\XEngine_HelpComponents\HelpComponents_XLog.dll" "./"
20+
copy /y "%XEngine_LibArm64%\XEngine_RfcComponents\RfcComponents_HttpProtocol.dll" "./"
21+
copy /y "%XEngine_LibArm64%\XEngine_RfcComponents\RfcComponents_NatProtocol.dll" "./"
22+
copy /y "%XEngine_LibArm64%\XEngine_RfcComponents\RfcComponents_NTPProtocol.dll" "./"
23+
24+
copy /y "%XEngine_LibArm64%\XEngine_AVCodec\XEngine_AVHelp.dll" "./"
25+
copy /y "%XEngine_LibArm64%\XEngine_AVCodec\XEngine_VideoCodec.dll" "./"
26+
copy /y "%XEngine_LibArm64%\XEngine_AVCodec\XEngine_AudioCodec.dll" "./"
27+
copy /y "%XEngine_LibArm64%\XEngine_AVCodec\XEngine_AVCollect.dll" "./"
28+
29+
copy /y "%XEngine_LibArm64%\XEngine_AVCodec\avcodec-61.dll" "./"
30+
copy /y "%XEngine_LibArm64%\XEngine_AVCodec\avdevice-61.dll" "./"
31+
copy /y "%XEngine_LibArm64%\XEngine_AVCodec\avfilter-10.dll" "./"
32+
copy /y "%XEngine_LibArm64%\XEngine_AVCodec\avformat-61.dll" "./"
33+
copy /y "%XEngine_LibArm64%\XEngine_AVCodec\avutil-59.dll" "./"
34+
copy /y "%XEngine_LibArm64%\XEngine_AVCodec\swresample-5.dll" "./"
35+
copy /y "%XEngine_LibArm64%\XEngine_AVCodec\swscale-8.dll" "./"
36+
copy /y "%XEngine_LibArm64%\XEngine_AVCodec\postproc-58.dll" "./"

0 commit comments

Comments
 (0)