Maat: ok compilazione

- aggiunta file accessori
- fix nuget.config x publish (locale)
This commit is contained in:
Samuele Locatelli
2024-04-04 09:25:30 +02:00
parent 8cdb27cd20
commit e01ae501aa
7 changed files with 89 additions and 9 deletions
+1
View File
@@ -20,6 +20,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.ILLink.Tasks" Version="8.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.2.8" />
<PackageReference Include="StackExchange.Redis" Version="2.7.33" />
+1
View File
@@ -24,6 +24,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.ILLink.Tasks" Version="8.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.2.8" />
<PackageReference Include="StackExchange.Redis" Version="2.7.33" />
@@ -1,6 +1,6 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<History>False|2024-04-03T16:54:46.2558736Z;False|2024-04-03T18:53:40.5084714+02:00;False|2024-04-03T18:52:58.5201680+02:00;</History>
<History>False|2024-04-04T07:20:19.1194551Z;False|2024-04-04T07:54:11.6078436+02:00;False|2024-04-03T18:57:56.8357860+02:00;False|2024-04-03T18:57:31.1394991+02:00;False|2024-04-03T18:56:30.3461610+02:00;False|2024-04-03T18:55:50.6292479+02:00;False|2024-04-03T18:54:46.2558736+02:00;False|2024-04-03T18:53:40.5084714+02:00;False|2024-04-03T18:52:58.5201680+02:00;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
+8 -8
View File
@@ -1,14 +1,14 @@
<config>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="nexus" value="https://nexus.steamware.net/repository/nuget-group/"/>
<add key="nexus-v3" value="https://nexus.steamware.net/repository/nuget-proxy-v3/index.json" protocolVersion="3" />
<!--<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />-->
</packageSources>
<packageSourceCredentials>
<nexus>
<nexus-v3>
<add key="Username" value="nugetUser" />
<add key="Password" value="viaDante16" />
</nexus>
<add key="cleartextpassword" value="viaDante16" />
<add key="ValidAuthenticationTypes" value="basic" />
</nexus-v3>
</packageSourceCredentials>
</config>
</configuration>
+15
View File
@@ -0,0 +1,15 @@
<?xml version='1.0'?>
<Obfuscator>
<Var name="InPath" value=".\bin\{{CURR_CONFIG}}\net6.0\" />
<Var name="OutPath" value=".\bin\{{CURR_CONFIG}}\net6.0_obf\" />
<Var name="KeepPublicApi" value="true" />
<Var name="HidePrivateApi" value="true" />
<Var name="RenameProperties" value="true" />
<Var name="RenameEvents" value="true" />
<Var name="RenameFields" value="true" />
<Var name="UseUnicodeNames" value="true" />
<Var name="HideStrings" value="true" />
<Var name="OptimizeMethods" value="true" />
<Var name="SuppressIldasm" value="true" />
<Module file="$(InPath)MP.MONO.Core.dll" />
</Obfuscator>
+15
View File
@@ -0,0 +1,15 @@
<?xml version='1.0'?>
<Obfuscator>
<Var name="InPath" value=".\bin\Release\net6.0\" />
<Var name="OutPath" value=".\bin\Release\net6.0_obf\" />
<Var name="KeepPublicApi" value="true" />
<Var name="HidePrivateApi" value="true" />
<Var name="RenameProperties" value="true" />
<Var name="RenameEvents" value="true" />
<Var name="RenameFields" value="true" />
<Var name="UseUnicodeNames" value="true" />
<Var name="HideStrings" value="true" />
<Var name="OptimizeMethods" value="true" />
<Var name="SuppressIldasm" value="true" />
<Module file="$(InPath)MP.MONO.Core.dll" />
</Obfuscator>
+48
View File
@@ -0,0 +1,48 @@
param([string]$CurrConfig);
#verifico se encessario installare come global tool
$testString = dotnet tool list -g | Select-String -Pattern "obfuscar.globaltool"
if($testString -eq $null)
{
Write-Output("Installing obfuscar as global tool")
dotnet tool install --global Obfuscar.GlobalTool --version 2.2.33
}
else
{
Write-Output("Obfuscar already installed!")
#dotnet tool update --global Obfuscar.GlobalTool --version 2.2.33
}
# fix folder obf
$FolderName = "\bin\Debug\net6.0_obf\"
if (Test-Path $FolderName) {
Write-Host "Folder Exists"
}
else {
#PowerShell Create directory if not exists
New-Item $FolderName -ItemType Directory
Write-Host "Folder Created successfully"
}
# sistemo XML x usare la conf corrente
$OrigConfPath = "obfuscar.orig.xml"
$ConfigPath = "obfuscar.xml"
$configFile = Get-Content $OrigConfPath
$find = "{{CURR_CONFIG}}";
$configFileUpd = $configFile -replace $find, $CurrConfig
Set-Content -Path $ConfigPath -Value $configFileUpd
Write-Output("Config File set:")
Write-Output($configFileUpd)
# chiamo script principale
#C:\Users\samuele.steamw\.dotnet\tools\obfuscar.console.exe obfuscar.xml
obfuscar.console.exe obfuscar.xml
#obfuscar.console obfuscar.xml
Write-Output("Obfuscar completed!")
# sovrascrivo dll originali con i file elaborati
Copy-Item .\bin\$CurrConfig\net6.0_obf\*.dll .\bin\$CurrConfig\net6.0\
Write-Output("Obfuscated dll copy completed!")