Skip to content

Commit

Permalink
Merge branch 'CnCNet:develop' into feat/352-map-file-watcher
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlambson authored Nov 4, 2022
2 parents 1112f70 + f2bf553 commit 674a875
Show file tree
Hide file tree
Showing 24 changed files with 106 additions and 79 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/pr-build-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-22.04
steps:
- uses: actions/github-script@v6.2.0
- uses: actions/github-script@v6.3.1
with:
# This snippet is public-domain, taken from
# https://github.com/oprypin/nightly.link/blob/master/.github/workflows/pr-comment.yml
Expand All @@ -18,7 +18,7 @@ jobs:
const pull_head_sha = '${{github.event.workflow_run.head_sha}}';
const pull_user_id = ${{github.event.sender.id}};
const issue_number = await (async () => {
const pulls = await github.pulls.list({owner, repo});
const pulls = await github.rest.pulls.list({owner, repo});
for await (const {data} of github.paginate.iterator(pulls)) {
for (const pull of data) {
if (pull.head.sha === pull_head_sha && pull.user.id === pull_user_id) {
Expand All @@ -32,7 +32,7 @@ jobs:
} else {
return core.error(`No matching pull request found`);
}
const {data: {artifacts}} = await github.actions.listWorkflowRunArtifacts({owner, repo, run_id});
const {data: {artifacts}} = await github.rest.actions.listWorkflowRunArtifacts({owner, repo, run_id});
if (!artifacts.length) {
return core.error(`No artifacts found`);
}
Expand All @@ -41,12 +41,12 @@ jobs:
body += `\n* [${art.name}.zip](https://nightly.link/${owner}/${repo}/actions/artifacts/${art.id}.zip)`;
}
body += `\nThis comment is automatic and is meant to allow guests to get latest automatic builds without registering. It is updated on every successful build.`;
const {data: comments} = await github.issues.listComments({repo, owner, issue_number});
const {data: comments} = await github.rest.issues.listComments({repo, owner, issue_number});
const existing_comment = comments.find((c) => c.user.login === 'github-actions[bot]');
if (existing_comment) {
core.info(`Updating comment ${existing_comment.id}`);
await github.issues.updateComment({repo, owner, comment_id: existing_comment.id, body});
await github.rest.issues.updateComment({repo, owner, comment_id: existing_comment.id, body});
} else {
core.info(`Creating a comment`);
await github.issues.createComment({repo, owner, issue_number, body});
await github.rest.issues.createComment({repo, owner, issue_number, body});
}
2 changes: 1 addition & 1 deletion BuildScripts/Build-Ares-net6.0.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ param($Configuration = "Release")
Build-Project $Configuration Ares UniversalGL net6.0
if ($IsWindows) {
@('WindowsDX', 'WindowsGL', 'WindowsXNA') | ForEach-Object {
Build-Project $Configuration Ares $_ net6.0-windows10.0.22000.0
Build-Project $Configuration Ares $_ net6.0-windows
}
}
2 changes: 1 addition & 1 deletion BuildScripts/Build-TS-net6.0.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ param($Configuration = "Release")
Build-Project $Configuration TS UniversalGL net6.0
if ($IsWindows) {
@('WindowsDX', 'WindowsGL', 'WindowsXNA') | ForEach-Object {
Build-Project $Configuration TS $_ net6.0-windows10.0.22000.0
Build-Project $Configuration TS $_ net6.0-windows
}
}
2 changes: 1 addition & 1 deletion BuildScripts/Build-YR-net6.0.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ param($Configuration = "Release")
Build-Project $Configuration YR UniversalGL net6.0
if ($IsWindows) {
@('WindowsDX', 'WindowsGL', 'WindowsXNA') | ForEach-Object {
Build-Project $Configuration YR $_ net6.0-windows10.0.22000.0
Build-Project $Configuration YR $_ net6.0-windows
}
}
9 changes: 2 additions & 7 deletions BuildScripts/Common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ function Build-Project($Configuration, $Game, $Engine, $Framework) {
$Output = Join-Path $Output any
}
$Output = Join-Path $Output Resources Binaries ($EngineMap[$Engine])
if ($Engine -EQ 'WindowsXNA') {
dotnet publish $ProjectPath --configuration=$Configuration -property:GAME=$Game -property:ENGINE=$Engine --arch=x86 --framework=$Framework --output=$Output
}
else {
dotnet publish $ProjectPath --configuration=$Configuration -property:GAME=$Game -property:ENGINE=$Engine --framework=$Framework --output=$Output
}
dotnet publish $ProjectPath --configuration=$Configuration -property:GAME=$Game -property:ENGINE=$Engine --framework=$Framework --output=$Output
if ($LASTEXITCODE) { throw }
}
}
16 changes: 8 additions & 8 deletions BuildScripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ UniversalGL:
* net6.0

WindowsDX, WindowsGL & WindowsXNA:
* net6.0-windows10.0.22000.0
* net6.0-windows
* net48

Overview of the Engine configurations differences:

| | OS Support | Platform | Technology |
| | OS Support | Default Platform | Technology |
| - | ---------- | -------- | ---------- |
| UniversalGL | Any | AnyCPU | MonoGame DesktopGL |
| WindowsDX | Windows | AnyCPU | MonoGame WindowsDX + WinForms |
| WindowsGL | Windows | AnyCPU | MonoGame DesktopGL + WinForms |
| WindowsXNA | Windows | x86 | Microsoft XNA + WinForms |
| UniversalGL | Any | AnyCPU (64-bit preferred) | MonoGame DesktopGL |
| WindowsDX | Windows | AnyCPU (64-bit preferred) | MonoGame WindowsDX + WinForms |
| WindowsGL | Windows | AnyCPU (64-bit preferred) | MonoGame DesktopGL + WinForms |
| WindowsXNA | Windows | AnyCPU (32-bit preferred) | Microsoft XNA + WinForms |

AfterPublish PatchAppHost step
------------------------------
Expand All @@ -54,7 +54,7 @@ The file AfterPublish.targets will execute additional steps for the following bu

Building a .NET 6 application results in an assembly, not in an executable, e.g. `clientdx.dll`. On platform specific builds it also generates an apphost executable, so users have something to execute directly i.e. `clientdx.exe`. All the .exe does is launch e.g.: `dotnet clientdx.dll`.

By default the apphost always points to a dll with the same filename in the current directory. Since we split them up into `\clientdx.exe` and `\Resources\Binaries\Windows\clientdx.dll` this breaks. PatchAppHost modifies the .exe to point to the correct .dll path.
By default the apphost always points to a dll with the same filename in the current directory. Since we split them up into `\clientdx.exe` and `\Resources\Binaries\Windows\clientdx.dll` this breaks. `CreateAppHost.targets` modifies the .exe to point to the correct .dll path.

Custom builds
-------------
Expand Down Expand Up @@ -84,7 +84,7 @@ You can select the desired configuration directly from the solution configuratio

![Screenshot 2022-09-09 235432](https://user-images.githubusercontent.com/25006126/189451063-28418a7b-47f4-47b3-9d8b-512c598284ac.png)

Note that the XNA configurations require x86 to be selected:
Note that the XNA configurations can only be build with either `x86` or `AnyCPU` (32-bit preferred) to use `Large address aware`.

![Screenshot 2022-09-09 235556](https://user-images.githubusercontent.com/25006126/189451170-d90f665e-19d1-4e6b-a9df-a4994eb143a9.png)

Expand Down
5 changes: 2 additions & 3 deletions ClientCore/ClientCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@
<EmbeddedResource Include="Resources\unknownicon.png" />
<EmbeddedResource Include="Resources\yricon.png" />
</ItemGroup>
<!--Switching between Configurations within VS IDE requires reloading the project file-->
<ItemGroup>
<PackageReference Include="Rampastring.XNAUI.$(Engine)" Version="2.2.1" Condition="'!$(Configuration.Contains(Debug))'" />
<PackageReference Include="Rampastring.XNAUI.$(Engine).Debug" Version="2.2.1" Condition="'$(Configuration.Contains(Debug))'" />
<PackageReference Include="Rampastring.XNAUI.$(Engine)" Version="2.2.4" Condition="'!$(Configuration.Contains(Debug))'" />
<PackageReference Include="Rampastring.XNAUI.$(Engine).Debug" Version="2.2.4" Condition="'$(Configuration.Contains(Debug))'" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'" />
Expand Down
2 changes: 1 addition & 1 deletion DTAConfig/DTAConfig.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)..\build\WinForms.props" />
<ItemGroup>
<PackageReference Include="CnCNet.ClientUpdater" Version="1.0.1" />
<PackageReference Include="CnCNet.ClientUpdater" Version="1.0.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ClientGUI\ClientGUI.csproj" />
Expand Down
Loading

0 comments on commit 674a875

Please sign in to comment.