Skip to content

Commit

Permalink
Tweaks for nuget.
Browse files Browse the repository at this point in the history
  • Loading branch information
EliotVU committed Mar 25, 2024
1 parent cb45c2c commit f63740f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 114 deletions.
72 changes: 5 additions & 67 deletions CLI/Eliot.UELib.CLI.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{01B07425-0B35-4DAB-9555-D61261A0F161}</ProjectGuid>
<TargetFramework>net48</TargetFramework>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>UELib.CLI</RootNamespace>
<AssemblyName>Eliot.UELib.CLI</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand All @@ -27,52 +18,10 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'UnitTest|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Test\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\src\Eliot.UELib.csproj">
<Project>{7e45273f-434f-42fa-8269-0e760aeb41e1}</Project>
<Name>Eliot.UELib</Name>
</ProjectReference>
<ProjectReference Include="..\src\Eliot.UELib.csproj" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
Expand All @@ -86,16 +35,5 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<!-- 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>
-->
<PropertyGroup />
</Project>
14 changes: 7 additions & 7 deletions Test/UnrealFlagsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ public void TestUnrealPackageFlags()
(ulong)(DefaultEngineBranch.PackageFlagsDefault.AllowDownload |
DefaultEngineBranch.PackageFlagsDefault.ServerSideOnly);

var flagsMap = new ulong[(int)PackageFlags.Max];
flagsMap[(int)PackageFlags.AllowDownload] = (ulong)DefaultEngineBranch.PackageFlagsDefault.AllowDownload;
flagsMap[(int)PackageFlags.ServerSideOnly] = (ulong)DefaultEngineBranch.PackageFlagsDefault.ServerSideOnly;
var flags = new UnrealFlags<PackageFlags>(serializedFlags, ref flagsMap);
var flagsMap = new ulong[(int)PackageFlag.Max];
flagsMap[(int)PackageFlag.AllowDownload] = (ulong)DefaultEngineBranch.PackageFlagsDefault.AllowDownload;
flagsMap[(int)PackageFlag.ServerSideOnly] = (ulong)DefaultEngineBranch.PackageFlagsDefault.ServerSideOnly;
var flags = new UnrealFlags<PackageFlag>(serializedFlags, ref flagsMap);

// Verify mapped flags
Assert.IsTrue(flags.HasFlag(PackageFlags.AllowDownload));
Assert.IsTrue(flags.HasFlag(PackageFlags.ServerSideOnly));
Assert.IsFalse(flags.HasFlag(PackageFlags.ClientOptional));
Assert.IsTrue(flags.HasFlag(PackageFlag.AllowDownload));
Assert.IsTrue(flags.HasFlag(PackageFlag.ServerSideOnly));
Assert.IsFalse(flags.HasFlag(PackageFlag.ClientOptional));

// Verify actual flags
Assert.IsTrue(flags.HasFlags((uint)DefaultEngineBranch.PackageFlagsDefault.AllowDownload));
Expand Down
26 changes: 9 additions & 17 deletions src/Eliot.UELib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>$(DefineConstants);TRACE;DEBUG;</DefineConstants>
Expand Down Expand Up @@ -69,27 +70,18 @@
</ItemGroup>
<ProjectExtensions></ProjectExtensions>
<PropertyGroup>
<NuspecFile>Eliot.UELib.nuspec</NuspecFile>
<NuspecProperties>$(NuspecProperties);configuration=$(Configuration)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);version=$(Version)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);id=$(PackageId)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);author=$(Authors)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);PackageProjectUrl=$(PackageProjectUrl)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);Description=$(Description)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);PackageReleaseNotes=$(PackageReleaseNotes)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);Copyright=$(Copyright)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);PackageTags=$(PackageTags)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);RepositoryType=$(RepositoryType)</NuspecProperties>
<NuspecProperties>$(NuspecProperties);RepositoryUrl=$(RepositoryUrl)</NuspecProperties>
<Description>UnrealScript decompiler library for Unreal package files (.upk, .u, .uasset; etc), with support for Unreal Engine 1, 2, and 3.</Description>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<AssemblyName>Eliot.UELib</AssemblyName>
<PackageId>$(AssemblyName)</PackageId>
<Version>$(VersionPrefix)1.4.0</Version>
<Authors>EliotVU</Authors>
<Title>$(AssemblyName)</Title>
<PackageDescription>UnrealScript decompiler library for Unreal package files (.upk, .u, .uasset; etc), with support for Unreal Engine 1, 2, and 3.</PackageDescription>
<PackageTags>UnrealEngine;UnrealScript;Decompiler;UPK;Exporter;Bytecode</PackageTags>
<Copyright>2009-2024 Eliot van Uytfanghe. All rights reserved.</Copyright>
<Authors>EliotVU</Authors>
<PackageProjectUrl>https://github.com/EliotVU/Unreal-Library</PackageProjectUrl>
<PackageReadmeFile>README.MD</PackageReadmeFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/EliotVU/Unreal-Library</RepositoryUrl>
<Version>$(VersionPrefix)1.4.0</Version>
<NeutralLanguage>en</NeutralLanguage>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<EnableNETAnalyzers>True</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
Expand Down
23 changes: 0 additions & 23 deletions src/Eliot.UELib.nuspec

This file was deleted.

0 comments on commit f63740f

Please sign in to comment.