Skip to content
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
38 changes: 15 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,56 @@ name: TagTool Build

on:
push:
branches: [ "dev" ]
branches: [ "net10" ]

jobs:
build-win:
env:
TARGET_FRAMEWORK: net8.0-windows
PLATFORM: x64

strategy:
matrix:
BUILD_CONFIGURATION: [ Debug, Release ]
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Initialize Submodules
uses: snickerbockers/submodules-init@v4
with:
submodules: 'true'

- name: Determine Version
id: determine_version
run: |
$version = (git rev-parse --short=7 HEAD).Trim()
Write-Output "Version determined: $version"
Write-Host "::set-output name=version::$version"

- name: Install 7Zip
run: |
Invoke-WebRequest -Uri "https://www.7-zip.org/a/7z1900-x64.msi" -OutFile "$env:TEMP\7z.msi"
Start-Process -Wait -FilePath msiexec -ArgumentList "/i", "$env:TEMP\7z.msi", "/quiet"

- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
dotnet-version: '10.x'

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2

- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.5

- name: Install 7Zip
run: |
Invoke-WebRequest -Uri "https://www.7-zip.org/a/7z1900-x64.msi" -OutFile "$env:TEMP\7z.msi"
Start-Process -Wait -FilePath msiexec -ArgumentList "/i", "$env:TEMP\7z.msi", "/quiet"

- name: Restore Packages
run: nuget restore TagTool.sln
run: nuget restore TagTool.slnx


- name: Build solution
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: msbuild TagTool.sln /t:rebuild /p:Platform=${{ env.PLATFORM }} /p:Configuration=${{ matrix.BUILD_CONFIGURATION }} /p:TargetFramework=${{ env.TARGET_FRAMEWORK }}
run: msbuild TagTool.slnx -t:rebuild -property:Platform=x64 -property:Configuration=Release

- name: Zip Release
run: |
& "C:\Program Files\7-Zip\7z.exe" a ${{ matrix.BUILD_CONFIGURATION }}_${{ env.PLATFORM }}.7z ./TagTool/bin/${{ env.PLATFORM }}/${{ matrix.BUILD_CONFIGURATION }}/${{ env.TARGET_FRAMEWORK }}*
& "C:\Program Files\7-Zip\7z.exe" a Release_x64.7z ./TagTool/bin/x64/Release/*

- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: ${{ matrix.BUILD_CONFIGURATION }}_${{ env.PLATFORM }}.7z
files: Release_x64.7z
tag_name: ${{ steps.determine_version.outputs.version }}
draft: false
prerelease: false
Expand Down
6 changes: 0 additions & 6 deletions .nuget/NuGet.Config

This file was deleted.

41 changes: 0 additions & 41 deletions TagTool.sln

This file was deleted.

14 changes: 14 additions & 0 deletions TagTool.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Solution>
<Configurations>
<Platform Name="x64" />
<Platform Name="x86" />
</Configurations>
<Project Path="ShaderGenerator/HaloShaderGenerator/HaloShaderGenerator.csproj">
<Platform Solution="*|x64" Project="x64" />
<Platform Solution="*|x86" Project="x86" />
</Project>
<Project Path="TagTool/TagTool.csproj">
<Platform Solution="*|x64" Project="x64" />
<Platform Solution="*|x86" Project="x86" />
</Project>
</Solution>
2 changes: 1 addition & 1 deletion TagTool/Audio/Utils/AudioUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static byte[] ConvertPCM32ToPCM16(ReadOnlySpan<byte> data)
{
var newData = new byte[data.Length / 2];
var input = MemoryMarshal.Cast<byte, float>(data);
var output = MemoryMarshal.Cast<byte, short>(newData);
var output = MemoryMarshal.Cast<byte, short>(newData.AsSpan());

for (int i = 0; i < input.Length; i++)
{
Expand Down
2 changes: 1 addition & 1 deletion TagTool/Commands/Files/ConvertVariantCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ private async Task ConvertFileAsync(string filePath)
private void FixBlfEndianness(FileStream stream, Blf blf)
{
var buffer = new byte[stream.Length];
stream.Read(buffer, 0, buffer.Length);
stream.ReadExactly(buffer);

using (var memoryStream = new MemoryStream(buffer))
{
Expand Down
2 changes: 1 addition & 1 deletion TagTool/Common/FileTimeUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static DateTime GetLinkerTimestampUtc(string filePath)

using (var file = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
{
file.Read(bytes, 0, bytes.Length);
file.ReadExactly(bytes);
}

var headerPos = BitConverter.ToInt32(bytes, peHeaderOffset);
Expand Down
24 changes: 3 additions & 21 deletions TagTool/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,35 +1,17 @@
using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("TagTool-NET")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TagTool-NET")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("MtnDewIt ™ 2025")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("aa6e96fc-04b5-4b3b-9963-f6587190bc39")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
63 changes: 0 additions & 63 deletions TagTool/Properties/Resources.Designer.cs

This file was deleted.

Loading
Loading