Skip to content

Commit

Permalink
更换新的SaintCoinach并配合升级项目为.NET 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yueecui authored and oott123 committed Mar 13, 2024
1 parent b8b4f8a commit 0df6cb8
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 97 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "SaintCoinach"]
path = SaintCoinach
url = https://github.com/ufx/SaintCoinach.git
url = https://github.com/xivapi/SaintCoinach.git
2 changes: 1 addition & 1 deletion EorzeaMapExtractor.Cli/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>
69 changes: 11 additions & 58 deletions EorzeaMapExtractor.Cli/EorzeaMapExtractor.Cli.csproj
Original file line number Diff line number Diff line change
@@ -1,71 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" 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>{46D27CD9-F3EA-4227-92B1-EC980C4F1F4B}</ProjectGuid>
<TargetFramework>net7.0</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>EorzeaMapExtractor.Cli</RootNamespace>
<AssemblyName>EorzeaMapExtractor.Cli</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyTitle>EorzeaMapExtractor.Cli</AssemblyTitle>
<Product>EorzeaMapExtractor.Cli</Product>
<Copyright>Copyright © 2020</Copyright>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</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>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Text.Encoding.CodePages, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)packages\System.Text.Encoding.CodePages.4.7.0\lib\net461\System.Text.Encoding.CodePages.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\SaintCoinach\SaintCoinach.Cmd\ExdHelper.cs">
<Link>ExdHelper.cs</Link>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<ProjectReference Include="..\SaintCoinach\SaintCoinach\SaintCoinach.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SaintCoinach\SaintCoinach\SaintCoinach.csproj">
<Project>{8A7D65EB-3DE3-4631-B286-CC73A3126002}</Project>
<Name>SaintCoinach</Name>
</ProjectReference>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
26 changes: 19 additions & 7 deletions EorzeaMapExtractor.Cli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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}");
}
}
}

Expand Down
23 changes: 0 additions & 23 deletions EorzeaMapExtractor.Cli/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -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("")]

Expand All @@ -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")]
9 changes: 9 additions & 0 deletions EorzeaMapExtractor.Cli/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"profiles": {
"EorzeaMapExtractor.Cli": {
"commandName": "Project",
"commandLineArgs": "\"C:\\Games\\最终幻想XIV\" map \"source\"",
"workingDirectory": "D:\\FF14\\ff14-allinone-map\\EorzeaMapExtractor.Cli"
}
}
}
11 changes: 5 additions & 6 deletions EorzeaMapExtractor.sln
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion SaintCoinach
Submodule SaintCoinach updated 600 files

0 comments on commit 0df6cb8

Please sign in to comment.