Closed Nuc1eoN closed 5 years ago
I've updated the generator in b356aa0c7c318fb6ecb46a4a8de6e1ca1903575f for updates in protoc-gen-go
which were probably the reason for the crash. Now it works with the newest protoc-gen-go
.
To update to a new SteamKit version with new steamlang/protobuf files, you'll probably also need to update the file lists in generator.go
(as was done in faceit's repo).
Thank you so much, that fixed it!
About updating to the new SteamKit version, it seems upsteam SteamKit has also switched the C# framework it is built against, see https://github.com/faceit/go-steam/issues/3
So instead of
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{EBF5B7D5-58F4-4F68-A997-1BE71A72F078}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SteamLanguageParser</RootNamespace>
<AssemblyName>SteamLanguageParser</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputPath>bin\Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CodeGenerator.cs" />
<Compile Include="Generator\JavaGen.cs" />
<Compile Include="Generator\CSharpGen.cs" />
<Compile Include="Generator\ObjCGenBase.cs" />
<Compile Include="Generator\ObjCImplementationGen.cs" />
<Compile Include="Generator\ObjCInterfaceGen.cs" />
<Compile Include="Parser\LanguageParser.cs" />
<Compile Include="Parser\SymbolLocator.cs" />
<Compile Include="Parser\TokenAnalyzer.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
SteamLanguageParser.csproj
now looks like this:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
</Project>
So because of that /generator/GoSteamLanguageGenerator/GoSteamLanguageGenerator.csproj
probably also needs that adjustment. Unfortunately I am unsure how to to this yet, I am totally unexperienced with .NET
Okay, so after several reboots and .NET framework installations, I managed to update the GoSteamLanguageGenerator
code for the new SteamKit version (394218d1e118ac808800b16532bbeac2e7c69163).
In c40bffc31b3c4bb736ba0d47404e91b4e759c62c, I regenerated all files.
Finally, I tried to update the handler logic for the protocol changes (b04c5a83c1c0e14f999056ae9f438cd3f0c0ba3f). I have not yet tested if it works now, but at least it compiles 😅.
Thanks for taking up the work @Philipp15b !
There was initially an issue when I tried to compile the project on linux:
msbuild GoSteamLanguageGenerator.csproj
Microsoft (R) Build Engine version 16.0.0.0 for Mono
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 08/17/2019 17:40:11.
Project "/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/GoSteamLanguageGenerator.csproj" on node 1 (default targets).
/usr/lib/mono/msbuild/15.0/bin/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(198,5): error : Assets file '/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/GoSteamLanguageGenerator.csproj]
Done Building Project "/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/GoSteamLanguageGenerator.csproj" (default targets) -- FAILED.
Build FAILED.
"/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/GoSteamLanguageGenerator.csproj" (default target) (1) ->
(ResolvePackageAssets target) ->
/usr/lib/mono/msbuild/15.0/bin/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(198,5): error : Assets file '/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/GoSteamLanguageGenerator.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.76
But after finding https://github.com/dotnet/sdk/issues/2347 it seems I just needed the add the /restore
parameter like this msbuild GoSteamLanguageGenerator.csproj /restore
Not exactly sure why that's needed but I figured it might be useful information for some guys.
Also this closes the initial issue since the project finally compiles, thanks for taking up the work! ;)
If there are any bugs with this code I guess it would be better to open seprarate issues:)
I am trying to update to a new SteamKit version now, but the build fails:
Btw it might help that https://github.com/faceit/go-steam has some commits for newer SteamKit versions.