Skip to content

Commit

Permalink
0.1.4.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Starfelll committed May 31, 2024
1 parent 13d26ea commit 2b492e6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions AppUpdate.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>0.1.4.0</version>
<url>https://github.com/Starfelll/NekoVpk/releases/download/v0.1.4-Beta/NekoVpk_0.1.4-Beta_win-x64.zip</url>
<version>0.1.4.1</version>
<url>https://github.com/Starfelll/NekoVpk/releases/download/v0.1.4.1-Beta/NekoVpk_0.1.4.1-Beta_win-x64.zip</url>
<mandatory>false</mandatory>
</item>
2 changes: 1 addition & 1 deletion NekoVpk/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public partial class App : Application
{
public static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger();

public const string Version = "0.1.4.0";
public const string Version = "0.1.4.1";

public const string VersionSuffix = "-Beta";

Expand Down
18 changes: 10 additions & 8 deletions NekoVpk/Views/MainView.axaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Avalonia.Controls;
using Avalonia.Media.Imaging;
using Avalonia.Platform.Storage;
using NekoVpk.Core;
using NekoVpk.ViewModels;
using SteamDatabase.ValvePak;
Expand All @@ -10,8 +9,6 @@
using System.Diagnostics;
using SevenZip;
using System.Linq;
using ReactiveUI;
using System.Threading.Tasks;
using Avalonia.Threading;

namespace NekoVpk.Views;
Expand Down Expand Up @@ -235,11 +232,11 @@ private async void Button_AssetTagModifiedPanel_Apply(object? sender, Avalonia.I
pkg.ExtratFile(entry.Value[0], tmpFile);
tmpFile.Refresh();
pkg.RemoveFile(entry.Value[0]);
extractor = new(tmpFile.FullName);
extractor = new SevenZipExtractor(tmpFile.FullName, InArchiveFormat.SevenZip);
break;
}
}

if (!tmpFile.Exists) tmpFile.Create().Close();
tmpFile.Attributes |= FileAttributes.Temporary;

Expand Down Expand Up @@ -280,15 +277,15 @@ private async void Button_AssetTagModifiedPanel_Apply(object? sender, Avalonia.I
}


compressor = new()
compressor = new SevenZipCompressor()
{
CompressionMode = extractor is null ? CompressionMode.Create : CompressionMode.Append,
ArchiveFormat = OutArchiveFormat.SevenZip,
//CompressionLevel = (CompressionLevel)NekoSettings.Default.CompressionLevel,
CompressionLevel = CompressionLevel.Ultra,
CompressionMethod = CompressionMethod.Lzma2,
EventSynchronization = EventSynchronizationStrategy.AlwaysSynchronous,
};


// move zip files to vpk
if (extractor != null && disableZipFiles.Count > 0) {
Expand All @@ -301,7 +298,7 @@ private async void Button_AssetTagModifiedPanel_Apply(object? sender, Avalonia.I
}
}
// delete file in archive
await compressor.ModifyArchiveAsync(tmpFile.FullName, disableZipFiles);
compressor.ModifyArchive(tmpFile.FullName, disableZipFiles);
}

// move vpk files to zip
Expand Down Expand Up @@ -353,6 +350,11 @@ private async void Button_AssetTagModifiedPanel_Apply(object? sender, Avalonia.I
CancelAssetTagChange();
goto clean;
}
catch (Exception ex)
{
Debug.WriteLine(ex);
throw ex;
}
finally
{
pkg?.Dispose();
Expand Down

0 comments on commit 2b492e6

Please sign in to comment.