Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CS2Launcher App #23

Merged
merged 4 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: true

- name: setup dotnet
uses: actions/setup-dotnet@v4
Expand All @@ -30,7 +32,7 @@ jobs:
global-json-file: global.json

- name: restore
run: dotnet restore --locked-mode
run: dotnet workload restore && dotnet restore --locked-mode

- name: build
run: dotnet build --no-restore
Expand All @@ -45,6 +47,7 @@ jobs:
with:
fetch-depth: 0
fetch-tags: true
submodules: true

- name: setup dotnet
uses: actions/setup-dotnet@v4
Expand All @@ -54,16 +57,16 @@ jobs:
global-json-file: global.json

- name: restore
run: dotnet restore --locked-mode
run: dotnet workload restore && dotnet restore --locked-mode

- name: pack
run: dotnet pack src/Launcher/CS2Launcher.AspNetCore.Launcher.csproj -c Release -o .package --no-restore
run: dotnet pack -c Release -o .packages --no-restore

- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: cs2-launcher
path: .package
name: cs2-launcher-packages
path: .packages

publish:
needs: [pack]
Expand All @@ -83,7 +86,7 @@ jobs:
- name: download artifact
uses: actions/download-artifact@v4
with:
name: cs2-launcher
name: cs2-launcher-packages

- name: push
run: dotnet nuget push "*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "modules/CoreRcon"]
path = modules/CoreRcon
url = https://github.com/cryptoc1/corercon
47 changes: 44 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"version": "0.2.0",
"configurations": [
{
"name": "Sample Debug",
"name": "Debug Sample (Core)",
"type": "coreclr",
"request": "launch",
"program": "${workspaceFolder}/sample/bin/Debug/net8.0/CS2Launcher.Sample.dll",
"program": "${workspaceFolder}/sample/Launcher/bin/Debug/net8.0/CS2Launcher.Sample.Launcher.dll",
"args": [
"environment=Development"
],
"env": {
"DOTNET_ENVIRONMENT": "Development"
},
"cwd": "${workspaceFolder}/sample",
"cwd": "${workspaceFolder}/sample/Launcher",
"justMyCode": true,
"preLaunchTask": "${defaultBuildTask}",
"requireExactSource": true,
Expand All @@ -30,6 +30,47 @@
}
},
"stopAtEntry": false,
},
{
"name": "Debug Sample (Blazor)",
"type": "blazorwasm",
"request": "launch",
"browser": "chrome",
"cwd": "${workspaceFolder}/sample/Launcher",
"dotNetConfig": {
"justMyCode": true,
"logging": {
"engineLogging": false,
"moduleLoad": false,
"threadExit": false,
},
"requireExactSource": true,
"sourceFileMap": {
"/Views": "${workspaceFolder}/src/Launcher/Views"
},
"sourceLinkOptions": {
"https://raw.githubusercontent.com/*": {
"enabled": true
},
"*": {
"enabled": false
}
},
"stopAtEntry": false,
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"hosted": true,
"preLaunchTask": "${defaultBuildTask}",
"program": "${workspaceFolder}/sample/Launcher/bin/Debug/net8.0/CS2Launcher.Sample.Launcher.dll",
"serverReadyAction": {
"action": "debugWithChrome",
"killOnServerStop": true,
"pattern": "\\bNow listening on:\\s+(https?://\\S+)",
},
"url": "https://localhost:52750",
"webRoot": "${workspaceFolder}/sample/Launcher",
}
]
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.vs": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
Expand Down
46 changes: 23 additions & 23 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/cs2-launcher.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"runOptions": {
"instanceLimit": 1
},
"problemMatcher": "$msCompile",
"isBuildCommand": true,
"group": {
"kind": "build",
"isDefault": true
}
}
]
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/cs2-launcher.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"runOptions": {
"instanceLimit": 1
},
"problemMatcher": "$msCompile",
"isBuildCommand": true,
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
31 changes: 26 additions & 5 deletions cs2-launcher.sln
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5222FED7-6FE1-46CA-AA88-EA10FA14075C}"
ProjectSection(SolutionItems) = preProject
src\Directory.Build.props = src\Directory.Build.props
src\Directory.Build.targets = src\Directory.Build.targets
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CS2Launcher.AspNetCore.Launcher", "src\Launcher\CS2Launcher.AspNetCore.Launcher.csproj", "{115173BC-C8AD-4266-8759-3CA0A14374C2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CS2Launcher.Sample", "sample\CS2Launcher.Sample.csproj", "{2ECAA280-96DA-4212-9857-6E3BAA4E2217}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CS2Launcher.AspNetCore.App", "src\App\CS2Launcher.AspNetCore.App.csproj", "{42BE4AA8-0386-474D-BFE2-0F4E68476B42}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample", "sample", "{170E8297-96FC-4172-B45C-2FCBCEFB9F4D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CS2Launcher.Sample.Launcher", "sample\Launcher\CS2Launcher.Sample.Launcher.csproj", "{A415B696-7249-4A76-8423-6AC7163C8347}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CS2Launcher.Sample.App", "sample\App\CS2Launcher.Sample.App.csproj", "{55CFF728-1CC8-45A8-A4A8-1FC690065E3E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -19,16 +29,27 @@ Global
{115173BC-C8AD-4266-8759-3CA0A14374C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{115173BC-C8AD-4266-8759-3CA0A14374C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{115173BC-C8AD-4266-8759-3CA0A14374C2}.Release|Any CPU.Build.0 = Release|Any CPU
{2ECAA280-96DA-4212-9857-6E3BAA4E2217}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2ECAA280-96DA-4212-9857-6E3BAA4E2217}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2ECAA280-96DA-4212-9857-6E3BAA4E2217}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2ECAA280-96DA-4212-9857-6E3BAA4E2217}.Release|Any CPU.Build.0 = Release|Any CPU
{42BE4AA8-0386-474D-BFE2-0F4E68476B42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42BE4AA8-0386-474D-BFE2-0F4E68476B42}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42BE4AA8-0386-474D-BFE2-0F4E68476B42}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42BE4AA8-0386-474D-BFE2-0F4E68476B42}.Release|Any CPU.Build.0 = Release|Any CPU
{A415B696-7249-4A76-8423-6AC7163C8347}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A415B696-7249-4A76-8423-6AC7163C8347}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A415B696-7249-4A76-8423-6AC7163C8347}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A415B696-7249-4A76-8423-6AC7163C8347}.Release|Any CPU.Build.0 = Release|Any CPU
{55CFF728-1CC8-45A8-A4A8-1FC690065E3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55CFF728-1CC8-45A8-A4A8-1FC690065E3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55CFF728-1CC8-45A8-A4A8-1FC690065E3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55CFF728-1CC8-45A8-A4A8-1FC690065E3E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{115173BC-C8AD-4266-8759-3CA0A14374C2} = {5222FED7-6FE1-46CA-AA88-EA10FA14075C}
{42BE4AA8-0386-474D-BFE2-0F4E68476B42} = {5222FED7-6FE1-46CA-AA88-EA10FA14075C}
{A415B696-7249-4A76-8423-6AC7163C8347} = {170E8297-96FC-4172-B45C-2FCBCEFB9F4D}
{55CFF728-1CC8-45A8-A4A8-1FC690065E3E} = {170E8297-96FC-4172-B45C-2FCBCEFB9F4D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {56EB9027-8ADE-4B88-BDE0-E9BC3DD1ACF4}
Expand Down
1 change: 1 addition & 0 deletions modules/CoreRcon
Submodule CoreRcon added at d8bca6
5 changes: 5 additions & 0 deletions sample/App/AppRoot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using CS2Launcher.AspNetCore.App;

namespace CS2Launcher.Sample.App;

public sealed class AppRoot : RootComponent;
8 changes: 8 additions & 0 deletions sample/App/CS2Launcher.Sample.App.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<Import Project="..\..\src\App\build\CS2Launcher.AspNetCore.App.props" />

<ItemGroup>
<ProjectReference Include="..\..\src\App\CS2Launcher.AspNetCore.App.csproj" />
</ItemGroup>

</Project>
9 changes: 9 additions & 0 deletions sample/App/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using CS2Launcher.AspNetCore.App.Hosting;
using CS2Launcher.Sample.App;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;

var builder = WebAssemblyHostBuilder.CreateDefault( args );
builder.UseCS2Launcher<AppRoot>();

await using var app = builder.Build();
await app.RunAsync();
Loading