Skip to content

Commit 0fa40ca

Browse files
authored
Merge pull request #670 from monkeyman192/gh-669
Update dotnet version from 7 to 8
2 parents 0d338f7 + 3bbc575 commit 0fa40ca

File tree

11 files changed

+32
-37
lines changed

11 files changed

+32
-37
lines changed

.github/workflows/pipeline.yml

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ on:
77
- '*.md'
88
branches-ignore:
99
- 'gh-pages'
10-
pull_request:
11-
paths-ignore:
12-
- '*.md'
13-
branches-ignore:
14-
- 'gh-pages'
1510
create:
1611

1712
jobs:
@@ -22,19 +17,19 @@ jobs:
2217
fail-fast: false
2318
matrix:
2419
os: [{name: 'Ubuntu', runtime: 'linux-x64'}, {name: 'Windows', runtime: 'win-x64'}]
25-
dotnet: [{framework: 'net6.0', version: '6.0.0'}, {framework: 'net7.0', version: '7.0.0'}]
20+
dotnet: [{framework: 'net6.0', version: '6.0.0'}, {framework: 'net8.0', version: '8.0.0'}]
2621
steps:
2722
- uses: actions/checkout@v4
2823
- uses: actions/setup-dotnet@v5
2924
with:
3025
# Install both sdk versions.
3126
dotnet-version: |
3227
6.0.100
33-
7.0.100
28+
8.0.100
3429
- name: Build ${{ matrix.os.name }}-dotnet ${{ matrix.dotnet }} binaries
3530
run: |
36-
sed -i '\|<TargetFrameworks>net6.0;net7.0</TargetFrameworks>|a\ <RuntimeFrameworkVersion>${{ matrix.dotnet.version }}</RuntimeFrameworkVersion>' ./MBINCompiler/MBINCompiler.csproj
37-
sed -i '\|<TargetFrameworks>net6.0;net7.0</TargetFrameworks>|a\ <RuntimeFrameworkVersion>${{ matrix.dotnet.version }}</RuntimeFrameworkVersion>' ./libMBIN-DLL/libMBIN-DLL.csproj
31+
sed -i '\|<TargetFrameworks>net6.0;net8.0</TargetFrameworks>|a\ <RuntimeFrameworkVersion>${{ matrix.dotnet.version }}</RuntimeFrameworkVersion>' ./MBINCompiler/MBINCompiler.csproj
32+
sed -i '\|<TargetFrameworks>net6.0;net8.0</TargetFrameworks>|a\ <RuntimeFrameworkVersion>${{ matrix.dotnet.version }}</RuntimeFrameworkVersion>' ./libMBIN-DLL/libMBIN-DLL.csproj
3833
dotnet publish libMBIN-DLL --no-self-contained -c Release -f ${{ matrix.dotnet.framework }} -r ${{ matrix.os.runtime }} /nowarn:cs0618 /nowarn:cs0169 /nowarn:cs0414
3934
dotnet publish MBINCompiler --no-self-contained -c Release -f ${{ matrix.dotnet.framework }} -r ${{ matrix.os.runtime }} /nowarn:cs0618 /nowarn:cs0169 /nowarn:cs0414
4035
- name: Move the exe so the tests can find it easier
@@ -86,9 +81,9 @@ jobs:
8681
steps:
8782
- uses: actions/checkout@v4
8883
- name: Build SaveFileMapping binary
89-
run: dotnet publish SaveFileMapping -c Release -f net6.0 -r win-x64 -o Build/Release/net6/ /nowarn:cs0618 /nowarn:cs0169 /nowarn:cs0414
84+
run: dotnet publish SaveFileMapping -c Release -f net8.0 -r win-x64 -o Build/Release/net8/ /nowarn:cs0618 /nowarn:cs0169 /nowarn:cs0414
9085
- name: Generate save data mapping
91-
run : Build/Release/net6/SaveFileMapping.exe
86+
run : Build/Release/net8/SaveFileMapping.exe
9287
shell: bash
9388
- name: Upload report
9489
uses: actions/upload-artifact@v4
@@ -106,14 +101,14 @@ jobs:
106101
uses: actions/download-artifact@v4
107102
- name: Rename files for release
108103
run: |
109-
mv MBINCompiler-Windows-net6.0/MBINCompiler.exe MBINCompiler.exe
110-
mv MBINCompiler-Windows-net6.0/libMBIN.dll libMBIN.dll
111-
mv MBINCompiler-Windows-net7.0/MBINCompiler.exe MBINCompiler-dotnet7.exe
112-
mv MBINCompiler-Windows-net7.0/libMBIN.dll libMBIN-dotnet7.dll
113-
mv MBINCompiler-Ubuntu-net6.0/MBINCompiler.exe MBINCompiler-linux
114-
mv MBINCompiler-Ubuntu-net6.0/libMBIN.dll libMBIN-linux.dll
115-
mv MBINCompiler-Ubuntu-net7.0/MBINCompiler.exe MBINCompiler-linux-dotnet7
116-
mv MBINCompiler-Ubuntu-net7.0/libMBIN.dll libMBIN-linux-dotnet7.dll
104+
mv MBINCompiler-Windows-net6.0/MBINCompiler.exe MBINCompiler-dotnet6.exe
105+
mv MBINCompiler-Windows-net6.0/libMBIN.dll libMBIN-dotnet6.dll
106+
mv MBINCompiler-Windows-net8.0/MBINCompiler.exe MBINCompiler.exe
107+
mv MBINCompiler-Windows-net8.0/libMBIN.dll libMBIN.dll
108+
mv MBINCompiler-Ubuntu-net6.0/MBINCompiler.exe MBINCompiler-linux-dotnet6
109+
mv MBINCompiler-Ubuntu-net6.0/libMBIN.dll libMBIN-linux-dotnet6.so
110+
mv MBINCompiler-Ubuntu-net8.0/MBINCompiler.exe MBINCompiler-linux
111+
mv MBINCompiler-Ubuntu-net8.0/libMBIN.dll libMBIN-linux.so
117112
mv savedata-mapping/mapping.json mapping.json
118113
mv MBINCompiler-report/report.json report.json
119114
- name: Get MBINCompiler tag version
@@ -131,12 +126,12 @@ jobs:
131126
files: |
132127
MBINCompiler.exe
133128
libMBIN.dll
134-
MBINCompiler-dotnet7.exe
135-
libMBIN-dotnet7.dll
129+
MBINCompiler-dotnet6.exe
130+
libMBIN-dotnet6.dll
136131
MBINCompiler-linux
137-
libMBIN-linux.dll
138-
MBINCompiler-linux-dotnet7
139-
libMBIN-linux-dotnet7.dll
132+
libMBIN-linux.so
133+
MBINCompiler-linux-dotnet6
134+
libMBIN-linux-dotnet6.so
140135
report.json
141136
mapping.json
142137
env:

MBINCompiler/MBINCompiler.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</ItemGroup>
99
<PropertyGroup>
1010
<OutputType>Exe</OutputType>
11-
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
11+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
1212
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
1313
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
1414
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

MBINCompilerDocs/MBINCompilerDocs.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
55
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
66
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
77
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ _**For Developers:** You can download a precompiled DLL or get the libMBIN sourc
88

99
[DOWNLOAD LATEST RELEASE](../../releases)
1010

11-
**PLEASE NOTE:** MBINCompiler requires .NET 6 to run. If you do not have this you can download is [here](https://dotnet.microsoft.com/download/dotnet/6.0/runtime)
11+
**PLEASE NOTE:** MBINCompiler requires .NET 8 to run. If you do not have this you can download is [here](https://dotnet.microsoft.com/download/dotnet/8.0/runtime)
1212
Select an appropriate download under the the "Run desktop apps" set of downloads
1313

1414
**ALSO NOTE:** As of the Worlds part 2 update, MBINCompiler will no longer generate or handle EXML files, and will instead handle MXML files. This is to (finally) get MBINCompiler producing files in the same format as NMS expects. For modding puposes the MXML are not the actual files you need to place in a mod directory. To do this, you can rename the MXML file to EXML.
@@ -107,10 +107,10 @@ While this library targets multiple frameworks, building MBINCompiler and libMBI
107107
The full command to build all the libraries under the .NET framework looks like:
108108

109109
```sh
110-
dotnet publish -c Release -f net6.0-windows -r win-x64 -o Build/Release/net6/ /nowarn:cs0618 /nowarn:cs0169 /nowarn:cs0414
110+
dotnet publish -c Release -f net8.0 -r win-x64 /nowarn:cs0618 /nowarn:cs0169 /nowarn:cs0414
111111
```
112112

113-
For convenience we have included two batch scripts which build either the entire project for the .NET 6 framework (`build-net6.bat`) or the .NET 7 framework (`build-net7.bat`)
113+
For convenience we have included two batch scripts which build either the entire project for the .NET 6 framework (`build-net6.bat`) or the .NET 8 framework (`build-net8.bat`)
114114

115115
## Installing python dependencies
116116

@@ -125,12 +125,12 @@ For anyone helping to develop MBINCompiler, if you are contributing new structs
125125
### Requirements
126126

127127
Before running the tests, you need to have built a `Release` version of MBINCompiler locally.
128-
You can do this by running `dotnet publish --no-self-contained -c Release -f net6.0 -r win-x64 /nowarn:cs0618 /nowarn:cs0169 /nowarn:cs0414` (change dotnet and framework version as required).
128+
You can do this by running `dotnet publish --no-self-contained -c Release -f net8.0 -r win-x64 /nowarn:cs0618 /nowarn:cs0169 /nowarn:cs0414` (change dotnet and framework version as required).
129129
See section above about building for more details.
130130

131131
### Running the tests
132132

133-
Open a command line window in the root MBINCompiler directory and enter `uv run python -m pytest`.
133+
Open a command line window in the root MBINCompiler directory and enter `uv run pytest`.
134134
This will pull the latest test data into the directory `./tests/data`.
135135

136136
#### Command line arguments:

SaveFileMapping/SaveFileMapping.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
5+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
66
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
77
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
88
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

build-net7.bat

Lines changed: 0 additions & 2 deletions
This file was deleted.

build-net7.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

build-net8.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dotnet publish --no-self-contained -c Release -f net8.0 -r win-x64 /nowarn:cs0618 /nowarn:cs0169 /nowarn:cs0414
2+
pause

build-net8.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dotnet publish --no-self-contained -c Release -f net8.0 -r linux-x64 /nowarn:cs0618 /nowarn:cs0169 /nowarn:cs0414

conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
TEST_ROOT_PATH = op.join(op.dirname(__file__), 'tests')
1212
DATA_PATH = op.join(TEST_ROOT_PATH, 'data')
13-
BASE_PATH = op.join("Build", "Release", "net6.0", "win-x64", "publish")
13+
BASE_PATH = op.join("Build", "Release", "net8.0", "win-x64", "publish")
1414
FAILED_FNAME = '_failed.txt'
1515
REPORT_FNAME = op.join(op.dirname(__file__), 'results.txt')
1616
JSON_REPORT_FNAME = op.join(op.dirname(__file__), 'report.json')

0 commit comments

Comments
 (0)