diff --git a/LICENSE b/LICENSE index d4b81a0..3f5e25e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 Masashi Yoshikawa +Copyright (c) 2021-2022 Masashi Yoshikawa Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/NgsPacker (Package)/NgsPacker (Package).wapproj b/NgsPacker (Package)/NgsPacker (Package).wapproj index 0fa0d97..cc1754f 100644 --- a/NgsPacker (Package)/NgsPacker (Package).wapproj +++ b/NgsPacker (Package)/NgsPacker (Package).wapproj @@ -51,7 +51,7 @@ 9b4f198f-785a-4203-ac41-ce8aa6c28217 - 10.0.20348.0 + 10.0.22000.0 10.0.19041.0 ja-JP false @@ -119,7 +119,7 @@ - + diff --git a/NgsPacker (Package)/Package.appxmanifest b/NgsPacker (Package)/Package.appxmanifest index 628f71e..cbf4878 100644 --- a/NgsPacker (Package)/Package.appxmanifest +++ b/NgsPacker (Package)/Package.appxmanifest @@ -13,7 +13,7 @@ NgsPacker (Package) - logue + Logue Images\StoreLogo.png diff --git a/NgsPacker/NgsPacker.csproj b/NgsPacker/NgsPacker.csproj index 648a506..078c898 100644 --- a/NgsPacker/NgsPacker.csproj +++ b/NgsPacker/NgsPacker.csproj @@ -5,13 +5,13 @@ NgsPacker Masashi Yoshikawa Logue - (c) 2021 Logue + (c) 2021-2022 Logue All rights reserved. Data packer and unpacker for Phantasy Star Online 2 New Genesis. false WinExe ice-cubes.png LICENSE - https://logue.dev/NgsPacker + https://ngs.logue.dev/NgsPacker Readme.md false PSO2;Phantasy Star Online2;Phantasy Star Online New Genesis;PSO2NGS;Packer;Unpacker @@ -20,24 +20,25 @@ NgsPacker NgsPacker.App 10.0.19041.0 - net6.0-windows10.0.22000.0 + net6.0-windows10.0.22621.0 true - 1.2.1 - False + 1.2.3 + True AnyCPU - dotnet6に移行。 + 一括処理(リスト出力時など)で処理不能なファイルがあったときに、そこで処理が中断してしまう問題を修正。 +(主に旧PSO2のdataディレクトリで発生) - - + + - - + + @@ -67,6 +68,10 @@ True + + True + + True Designer diff --git a/NgsPacker/Services/ZamboniService.cs b/NgsPacker/Services/ZamboniService.cs index cf32f94..7c4a388 100644 --- a/NgsPacker/Services/ZamboniService.cs +++ b/NgsPacker/Services/ZamboniService.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (c) 2021 Masashi Yoshikawa All rights reserved. +// Copyright (c) 2021-2022 Masashi Yoshikawa All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // // ----------------------------------------------------------------------- @@ -270,34 +270,51 @@ public async Task> Filelist(string inputPath) + fileInfo.Name + ",ICE" + num + ","; // Iceファイルを読み込む - IceFile iceFile = IceFile.LoadIceFile(ms); + IceFile iceFile; + try + { + iceFile = IceFile.LoadIceFile(ms); + } + catch + { + ret.Add(ice + "0,[ERROR] Could not load ice file."); + continue; + } if (iceFile == null) { - ret.Add(ice + "0,ERROR"); + ret.Add(ice + "0,[ERROR] Could not parse ice file."); continue; } // グループ1のファイルをパース if (iceFile.groupOneFiles != null) { - byte[][] groupOneFiles = iceFile.groupOneFiles; - for (int f = 0; f < groupOneFiles.Length; ++f) - { - int int32 = BitConverter.ToInt32(groupOneFiles[f], 16); - string str2 = Encoding.ASCII.GetString(groupOneFiles[f], 64, int32).TrimEnd(new char[1]); - ret.Add(ice + "1," + str2); + try { + byte[][] groupOneFiles = iceFile.groupOneFiles; + for (int f = 0; f < groupOneFiles.Length; ++f) + { + int int32 = BitConverter.ToInt32(groupOneFiles[f], 16); + string str2 = Encoding.ASCII.GetString(groupOneFiles[f], 64, int32).TrimEnd(new char[1]); + ret.Add(ice + "1," + str2); + } + }catch { + ret.Add(ice + "1,[ERROR] Could not parse Group1 files."); } } // グループ2のファイルをパース if (iceFile.groupTwoFiles != null) { - byte[][] groupTwoFiles = iceFile.groupTwoFiles; - for (int f = 0; f < groupTwoFiles.Length; ++f) - { - int int32 = BitConverter.ToInt32(groupTwoFiles[f], 16); - string str2 = Encoding.ASCII.GetString(groupTwoFiles[f], 64, int32).TrimEnd(new char[1]); - ret.Add(ice + "2," + str2); + try { + byte[][] groupTwoFiles = iceFile.groupTwoFiles; + for (int f = 0; f < groupTwoFiles.Length; ++f) + { + int int32 = BitConverter.ToInt32(groupTwoFiles[f], 16); + string str2 = Encoding.ASCII.GetString(groupTwoFiles[f], 64, int32).TrimEnd(new char[1]); + ret.Add(ice + "2," + str2); + } + } catch { + ret.Add(ice + "2,[ERROR] Could not parse Group2 files."); } } } diff --git a/NgsPacker/ViewModels/UnpackPageViewModel.cs b/NgsPacker/ViewModels/UnpackPageViewModel.cs index ee8fdfe..a1b7d5b 100644 --- a/NgsPacker/ViewModels/UnpackPageViewModel.cs +++ b/NgsPacker/ViewModels/UnpackPageViewModel.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Copyright (c) 2021 Masashi Yoshikawa All rights reserved. +// Copyright (c) 2021-2022 Masashi Yoshikawa All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // // ----------------------------------------------------------------------- @@ -8,6 +8,7 @@ using Microsoft.Toolkit.Uwp.Notifications; using NgsPacker.Helpers; using NgsPacker.Interfaces; +using NgsPacker.Views; using Prism.Commands; using Prism.Mvvm; using System; @@ -210,6 +211,8 @@ private async void ExecuteUnpackByFilelistCommand() _ = Directory.CreateDirectory(outputPath); } + ProgressDialog progressDialog = new(); + _ = progressDialog.ShowAsync(); foreach (string file in fileList) { string path = picker.ResultPath + Path.DirectorySeparatorChar + file; @@ -221,6 +224,7 @@ private async void ExecuteUnpackByFilelistCommand() // アンパック ZamboniService.Unpack(path, outputPath, false); } + progressDialog.Hide(); // 完了通知 if (Properties.Settings.Default.NotifyComplete) diff --git a/NgsPacker/Views/ShellWindow.xaml b/NgsPacker/Views/ShellWindow.xaml index 0e48fe1..9609477 100644 --- a/NgsPacker/Views/ShellWindow.xaml +++ b/NgsPacker/Views/ShellWindow.xaml @@ -30,9 +30,9 @@ + PaneDisplayMode="Top"> @@ -49,11 +49,15 @@ Name="Unpack" Content="{lex:Loc UnpackText}" Icon="FullScreen" - IsSelected="True"/> + IsSelected="True" /> + - - - + + + - - + + diff --git a/Readme-ja.md b/Readme-ja.md index 369f49e..5aaca1e 100644 --- a/Readme-ja.md +++ b/Readme-ja.md @@ -1,6 +1,6 @@ # NGSPacker -本プログラムは、PSO2NGS のデータファイルを解凍(アンパック)したり生成(パック)するものです。 +本プログラムは、PSO2NGS のゲームデータファイルを解凍(アンパック)したり生成(パック)するものです。 動作には.net6.0 ランタイムが必要です。下記サイトからダウンロードしてください。 @@ -17,11 +17,11 @@ - [PSO2 Modding Tutorial](http://www.pso-world.com/forums/showthread.php?237103-PSO2-Modding-Tutorial-2-0) - [PSO2 File Directory](https://docs.google.com/spreadsheets/d/1GQwG49iYM1sgJhyAU5AWP-gboemzfIZjBGjTGEZSET4/edit?usp=sharing) - [PSO2-Modding](https://discord.com/invite/cV3QRkB) - Discord ※日本語情報あり -- [Arks-Layer](https://arks-layer.com/) - Third party launcher. Required when enabling mods. +- [Arks-Layer](https://arks-layer.com/) - サードパーティー製ランチャーです。日本語や英語以外でプレイしたい場合や Mod を使用する場合必須です。 - [Phantasy Star Fleet](https://discord.com/invite/pso2) - Discord -- [Checksum File](http://www.mediafire.com/file/85m6h56u5w3181g/checksum.zip/file) - %%%Required when enabling mods.%%% +- [チェックサムファイル](http://www.mediafire.com/file/85m6h56u5w3181g/checksum.zip/file) - Required when enabling mods - [PSO2 Modding Database](https://pso2mod.com/) - - [PSO2 Mod Manager](https://github.com/PolCPP/PSO2-Mod-Manager) - Official PSO2 Modding Database Client, But not maintained. + - [PSO2 Mod Manager](https://github.com/PolCPP/PSO2-Mod-Manager) - PSO2Mods.com 公式 Mod マネージャーですが長らくメンテナンスされていません。 - [PSO2NGS @ Nexus Mods](https://www.nexusmods.com/phantasystaronline2newgenesis) ## 免責事項 diff --git a/Readme.md b/Readme.md index 9b4bf22..7ffc5de 100644 --- a/Readme.md +++ b/Readme.md @@ -18,7 +18,7 @@ It requires the .net 6.0 runtime to work. Please download from the following sit - [PSO2 Modding Tutorial](http://www.pso-world.com/forums/showthread.php?237103-PSO2-Modding-Tutorial-2-0) - [PSO2 File Directory](https://docs.google.com/spreadsheets/d/1GQwG49iYM1sgJhyAU5AWP-gboemzfIZjBGjTGEZSET4/edit?usp=sharing) - - [PSO2-Modding](https://discord.com/invite/cV3QRkB) - Discord ※日本語情報あり + - [PSO2-Modding](https://discord.com/invite/cV3QRkB) - Discord - [Arks-Layer](https://arks-layer.com/) - Third party launcher. Required when enabling mods. - [Phantasy Star Fleet](https://discord.com/invite/pso2) - Discord - [Checksum File](http://www.mediafire.com/file/85m6h56u5w3181g/checksum.zip/file) - Required when enabling mods.