Skip to content

Commit 115a367

Browse files
committed
Support building with vs2022
1 parent ef126dd commit 115a367

2 files changed

Lines changed: 33 additions & 12 deletions

File tree

.github/workflows/windbot.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
draft: true
2323
prerelease: false
2424
Desktop:
25-
runs-on: windows-2019
25+
runs-on: windows-2022
2626
needs: create_release
2727
env:
2828
TRAVIS_OS_NAME: windows
@@ -31,12 +31,16 @@ jobs:
3131
shell: bash
3232
run: |
3333
echo "ARTIFACT=WindBotIgnite-Release-$(date +%Y%m%d)-${{ github.sha }}.zip" >> $GITHUB_ENV
34-
- name: Add msbuild to PATH
35-
uses: microsoft/setup-msbuild@v2
3634
- uses: actions/checkout@v1
3735
with:
3836
fetch-depth: 1
3937
submodules: true
38+
- name: Install .NET 4.0
39+
shell: bash
40+
run: |
41+
./ci/install-net-4.0.sh
42+
- name: Add msbuild to PATH
43+
uses: microsoft/setup-msbuild@v2
4044
- name: Build
4145
shell: bash
4246
run: |
@@ -65,7 +69,7 @@ jobs:
6569
assets_path: assets
6670

6771
Android:
68-
runs-on: windows-2019
72+
runs-on: windows-2022
6973
needs: create_release
7074
env:
7175
TRAVIS_OS_NAME: android
@@ -74,23 +78,25 @@ jobs:
7478
shell: bash
7579
run: |
7680
echo "ARTIFACT=WindBotIgnite-Release-$(date +%Y%m%d)-${{ github.sha }}.zip" >> $GITHUB_ENV
77-
- name: Add msbuild to PATH
78-
uses: microsoft/setup-msbuild@v1.0.2
7981
- uses: actions/checkout@v1
8082
with:
8183
fetch-depth: 1
8284
submodules: true
83-
# Unspecified dependency for Embeddinator; 64-bit does not work
84-
- name: Install mono
85+
- run: |
86+
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion"
87+
- name: Install .NET 4.0
8588
shell: bash
8689
run: |
87-
choco install mono --x86 --ignore-checksums
88-
- name: Install SDK 24, SDK 25 and NDK 15
90+
./ci/install-net-4.0.sh
91+
- name: Add msbuild to PATH
92+
uses: microsoft/setup-msbuild@v2
93+
# Unspecified dependency for Embeddinator; 64-bit does not work
94+
- name: Install mono and SDK 24, SDK 25 and NDK 15
8995
shell: bash
9096
env:
91-
VS_PREFIX: "16.0_"
97+
VS_PREFIX: "17.0_"
9298
run: |
93-
./ci/install-sdk-ndk.sh
99+
choco install mono --x86 --ignore-checksums & ./ci/install-sdk-ndk.sh & wait
94100
- name: Build
95101
shell: bash
96102
run: |

ci/install-net-4.0.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
3+
set -euxo pipefail
4+
5+
cd /tmp
6+
7+
curl -L https://www.nuget.org/api/v2/package/Microsoft.NETFramework.ReferenceAssemblies.net40/1.0.3 -o net4.zip
8+
9+
unzip net4.zip -d net
10+
11+
rm -r "C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\Framework\\.NETFramework\\v4.0"
12+
13+
cp -r net/build/.NETFramework/v4.0 "C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\Framework\\.NETFramework\\v4.0"
14+
15+
rm -r net4.zip net

0 commit comments

Comments
 (0)