From 0df6cb8382c3409a137158544a8b6737f4f51c69 Mon Sep 17 00:00:00 2001 From: Yuee Date: Wed, 13 Mar 2024 17:30:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E6=96=B0=E7=9A=84SaintCoinac?= =?UTF-8?q?h=E5=B9=B6=E9=85=8D=E5=90=88=E5=8D=87=E7=BA=A7=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E4=B8=BA.NET=207.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitmodules | 2 +- EorzeaMapExtractor.Cli/App.config | 2 +- .../EorzeaMapExtractor.Cli.csproj | 69 +++---------------- EorzeaMapExtractor.Cli/Program.cs | 26 +++++-- .../Properties/AssemblyInfo.cs | 23 ------- .../Properties/launchSettings.json | 9 +++ EorzeaMapExtractor.sln | 11 ++- SaintCoinach | 2 +- 8 files changed, 47 insertions(+), 97 deletions(-) create mode 100644 EorzeaMapExtractor.Cli/Properties/launchSettings.json diff --git a/.gitmodules b/.gitmodules index 29bf7f0..533c7b9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "SaintCoinach"] path = SaintCoinach - url = https://github.com/ufx/SaintCoinach.git + url = https://github.com/xivapi/SaintCoinach.git diff --git a/EorzeaMapExtractor.Cli/App.config b/EorzeaMapExtractor.Cli/App.config index bae5d6d..4bfa005 100644 --- a/EorzeaMapExtractor.Cli/App.config +++ b/EorzeaMapExtractor.Cli/App.config @@ -1,6 +1,6 @@ - + diff --git a/EorzeaMapExtractor.Cli/EorzeaMapExtractor.Cli.csproj b/EorzeaMapExtractor.Cli/EorzeaMapExtractor.Cli.csproj index bb709c8..9e17197 100644 --- a/EorzeaMapExtractor.Cli/EorzeaMapExtractor.Cli.csproj +++ b/EorzeaMapExtractor.Cli/EorzeaMapExtractor.Cli.csproj @@ -1,71 +1,24 @@ - - - + - Debug - AnyCPU - {46D27CD9-F3EA-4227-92B1-EC980C4F1F4B} + net7.0 Exe - EorzeaMapExtractor.Cli - EorzeaMapExtractor.Cli - v4.6.1 - 512 - true - true - - PackageReference + false + EorzeaMapExtractor.Cli + EorzeaMapExtractor.Cli + Copyright © 2020 + 1.0.0.0 + 1.0.0.0 - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - ..\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll - - - $(SolutionDir)packages\System.Text.Encoding.CodePages.4.7.0\lib\net461\System.Text.Encoding.CodePages.dll - - - - - - - - ExdHelper.cs - - - + - - {8A7D65EB-3DE3-4631-B286-CC73A3126002} - SaintCoinach - + + - \ No newline at end of file diff --git a/EorzeaMapExtractor.Cli/Program.cs b/EorzeaMapExtractor.Cli/Program.cs index 494629c..8372a63 100644 --- a/EorzeaMapExtractor.Cli/Program.cs +++ b/EorzeaMapExtractor.Cli/Program.cs @@ -85,6 +85,11 @@ static void ExportMaps(ARealmReversed realm, string dest) foreach (var map in allMaps) { count++; + if (map.Id.ToString() == "") + { + continue; + } + var fileName = map.Id.ToString().Replace("/", "_") + ".png"; Console.Write($"[{count.ToString().PadLeft(padLength)}/{totalMapsStr}] Exporting Map :{fileName}: ..."); var outFile = new FileInfo(Path.Combine(dest, fileName)); @@ -99,15 +104,22 @@ static void ExportMaps(ARealmReversed realm, string dest) outFile.Directory.Create(); } - var img = map.MediumImage; - if (img == null) + try { - Console.WriteLine(" no image found."); - continue; - } + var img = map.MediumImage; + if (img == null) + { + Console.WriteLine(" no image found."); + continue; + } - img.Save(outFile.FullName, format); - Console.WriteLine(" OK."); + img.Save(outFile.FullName, format); + Console.WriteLine(" OK."); + } + catch (Exception ex) + { + Console.WriteLine($" Failed: {ex.Message}"); + } } } diff --git a/EorzeaMapExtractor.Cli/Properties/AssemblyInfo.cs b/EorzeaMapExtractor.Cli/Properties/AssemblyInfo.cs index 52f3db7..f257635 100644 --- a/EorzeaMapExtractor.Cli/Properties/AssemblyInfo.cs +++ b/EorzeaMapExtractor.Cli/Properties/AssemblyInfo.cs @@ -1,16 +1,6 @@ using System.Reflection; using System.Runtime.CompilerServices; 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("EorzeaMapExtractor.Cli")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("EorzeaMapExtractor.Cli")] -[assembly: AssemblyCopyright("Copyright © 2020")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -21,16 +11,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("46d27cd9-f3ea-4227-92b1-ec980c4f1f4b")] - -// 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.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/EorzeaMapExtractor.Cli/Properties/launchSettings.json b/EorzeaMapExtractor.Cli/Properties/launchSettings.json new file mode 100644 index 0000000..a13c6ae --- /dev/null +++ b/EorzeaMapExtractor.Cli/Properties/launchSettings.json @@ -0,0 +1,9 @@ +{ + "profiles": { + "EorzeaMapExtractor.Cli": { + "commandName": "Project", + "commandLineArgs": "\"C:\\Games\\最终幻想XIV\" map \"source\"", + "workingDirectory": "D:\\FF14\\ff14-allinone-map\\EorzeaMapExtractor.Cli" + } + } +} \ No newline at end of file diff --git a/EorzeaMapExtractor.sln b/EorzeaMapExtractor.sln index 8444532..31c9ece 100644 --- a/EorzeaMapExtractor.sln +++ b/EorzeaMapExtractor.sln @@ -1,13 +1,12 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30309.148 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34622.214 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EorzeaMapExtractor.Cli", "EorzeaMapExtractor.Cli\EorzeaMapExtractor.Cli.csproj", "{46D27CD9-F3EA-4227-92B1-EC980C4F1F4B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EorzeaMapExtractor.Cli", "EorzeaMapExtractor.Cli\EorzeaMapExtractor.Cli.csproj", "{46D27CD9-F3EA-4227-92B1-EC980C4F1F4B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SaintCoinach", "SaintCoinach\SaintCoinach\SaintCoinach.csproj", "{8A7D65EB-3DE3-4631-B286-CC73A3126002}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SaintCoinach", "SaintCoinach\SaintCoinach\SaintCoinach.csproj", "{8A7D65EB-3DE3-4631-B286-CC73A3126002}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotSquish", "SaintCoinach\DotSquish\DotSquish.csproj", "{F9681545-4BEA-4FD3-9AB9-A67BD37AB36D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotSquish", "SaintCoinach\DotSquish\DotSquish.csproj", "{F9681545-4BEA-4FD3-9AB9-A67BD37AB36D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/SaintCoinach b/SaintCoinach index 52ed96b..ac73d04 160000 --- a/SaintCoinach +++ b/SaintCoinach @@ -1 +1 @@ -Subproject commit 52ed96b3b15a1a6d12f0e34c6d9e3be55d841a3d +Subproject commit ac73d04c27b47517f1cd2e5d28614a1854efd879