mirror of
https://github.com/MathiasLui/CSGO-Projects.git
synced 2025-05-06 13:51:18 +00:00
Increase to .NET 7.0 & Add ugly publishing scripts
* Scripts got added for DamageCalculator and ConfigManager * Batch scripts will need 7z be added to PATH, as well as the two specified profiles in order to work * Alter publish profiles to fit to the scripts, one for self-contained and one for lower file size * Add explicit cast that is now needed to remove ambiguity
This commit is contained in:
parent
ede94373ad
commit
81b2b98394
5 changed files with 91 additions and 3 deletions
44
ConfigManager/publish.bat
Normal file
44
ConfigManager/publish.bat
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
:Start
|
||||||
|
|
||||||
|
set /p "version=TYPE IN VERSION NUMBER: "
|
||||||
|
|
||||||
|
IF "%version%" == "" GOTO Start
|
||||||
|
|
||||||
|
mkdir publish
|
||||||
|
|
||||||
|
echo Deleting old releases...
|
||||||
|
del /q publish\*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
echo Publishing framework dependent version...
|
||||||
|
dotnet publish .\ConfigManager\ConfigManager.csproj /p:PublishProfile=ConfigManager\Properties\PublishProfiles\FrameworkDependentProfile.pubxml
|
||||||
|
|
||||||
|
echo Removing PDBs...
|
||||||
|
del ConfigManager\bin\Release\net7.0-windows\publish\CsgoConfigManager\*.pdb
|
||||||
|
|
||||||
|
echo Zipping folder...
|
||||||
|
7z a CsgoConfigManager.zip .\ConfigManager\bin\Release\net7.0-windows\publish\CsgoConfigManager
|
||||||
|
|
||||||
|
echo Moving and renaming file...
|
||||||
|
move /y "CsgoConfigManager.zip" "publish\csgo_config_manager_FD_%version%.zip"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
echo Publishing standalone (self-contained) version...
|
||||||
|
dotnet publish .\ConfigManager\ConfigManager.csproj /p:PublishProfile=ConfigManager\Properties\PublishProfiles\SelfContainedProfile.pubxml
|
||||||
|
|
||||||
|
echo Removing PDBs...
|
||||||
|
del ConfigManager\bin\Release\net7.0-windows\publish\CsgoConfigManager\*.pdb
|
||||||
|
|
||||||
|
echo Zipping folder...
|
||||||
|
7z a CsgoConfigManager.zip .\ConfigManager\bin\Release\net7.0-windows\publish\CsgoConfigManager
|
||||||
|
|
||||||
|
echo Moving and renaming file...
|
||||||
|
move /y "CsgoConfigManager.zip" "publish\csgo_config_manager_SC_%version%.zip"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
pause
|
|
@ -1,6 +1,6 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
<TargetFramework>net7.0-windows</TargetFramework>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<RootNamespace>Damage_Calculator</RootNamespace>
|
<RootNamespace>Damage_Calculator</RootNamespace>
|
||||||
<AssemblyName>CSGO Damage Calculator</AssemblyName>
|
<AssemblyName>CSGO Damage Calculator</AssemblyName>
|
||||||
|
|
44
DamageCalculator/publish.bat
Normal file
44
DamageCalculator/publish.bat
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
:Start
|
||||||
|
|
||||||
|
set /p "version=TYPE IN VERSION NUMBER: "
|
||||||
|
|
||||||
|
IF "%version%" == "" GOTO Start
|
||||||
|
|
||||||
|
mkdir publish
|
||||||
|
|
||||||
|
echo Deleting old releases...
|
||||||
|
del /q publish\*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
echo Publishing framework dependent version...
|
||||||
|
dotnet publish .\DamageCalculator\DamageCalculator.csproj /p:PublishProfile=DamageCalculator\Properties\PublishProfiles\FrameworkDependentProfile.pubxml
|
||||||
|
|
||||||
|
echo Removing PDBs...
|
||||||
|
del DamageCalculator\bin\Release\net7.0-windows\publish\DamageCalculator\*.pdb
|
||||||
|
|
||||||
|
echo Zipping folder...
|
||||||
|
7z a DamageCalculator.zip .\DamageCalculator\bin\Release\net7.0-windows\publish\DamageCalculator
|
||||||
|
|
||||||
|
echo Moving and renaming file...
|
||||||
|
move /y "DamageCalculator.zip" "publish\csgo_damage_calculator_FD_x64_%version%.zip"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
echo Publishing standalone (self-contained) version...
|
||||||
|
dotnet publish .\DamageCalculator\DamageCalculator.csproj /p:PublishProfile=DamageCalculator\Properties\PublishProfiles\SelfContainedProfile.pubxml
|
||||||
|
|
||||||
|
echo Removing PDBs...
|
||||||
|
del DamageCalculator\bin\Release\net7.0-windows\publish\DamageCalculator\*.pdb
|
||||||
|
|
||||||
|
echo Zipping folder...
|
||||||
|
7z a DamageCalculator.zip .\DamageCalculator\bin\Release\net7.0-windows\publish\DamageCalculator
|
||||||
|
|
||||||
|
echo Moving and renaming file...
|
||||||
|
move /y "DamageCalculator.zip" "publish\csgo_damage_calculator_SC_x64_%version%.zip"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
pause
|
|
@ -21,7 +21,7 @@ namespace SteamShared.Models
|
||||||
this.ID = reader.ReadUInt32();
|
this.ID = reader.ReadUInt32();
|
||||||
|
|
||||||
if (navVersion <= 8)
|
if (navVersion <= 8)
|
||||||
this.AttributeBitField = BitConverter.GetBytes(reader.ReadByte());
|
this.AttributeBitField = BitConverter.GetBytes((short)reader.ReadByte()); // .NET 6 would cast the byte to a short, .NET 7 will be ambiguous between short and Half
|
||||||
else if (navVersion <= 12)
|
else if (navVersion <= 12)
|
||||||
this.AttributeBitField = BitConverter.GetBytes(reader.ReadUInt16());
|
this.AttributeBitField = BitConverter.GetBytes(reader.ReadUInt16());
|
||||||
else if (navVersion >= 13)
|
else if (navVersion >= 13)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
<TargetFramework>net7.0-windows</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
|
|
Loading…
Add table
Reference in a new issue