mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Change FTagData to use WindowsUnicodeToolShim
This commit is contained in:
@@ -5,7 +5,9 @@
|
|||||||
#include "CFileStream.h"
|
#include "CFileStream.h"
|
||||||
#include "CombinedTimestamp.h"
|
#include "CombinedTimestamp.h"
|
||||||
|
|
||||||
int main(int argc, const char **argv)
|
#include "WindowsUnicodeToolShim.h"
|
||||||
|
|
||||||
|
int toolMain(int argc, const char **argv)
|
||||||
{
|
{
|
||||||
if (argc < 7)
|
if (argc < 7)
|
||||||
{
|
{
|
||||||
@@ -28,12 +30,11 @@ int main(int argc, const char **argv)
|
|||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE *tsF = nullptr;
|
FILE *tsF = fopen_utf8(timestampPath.c_str(), "rb");
|
||||||
errno_t ferr = fopen_s(&tsF, timestampPath.c_str(), "rb");
|
|
||||||
int64_t timestamp = 0;
|
int64_t timestamp = 0;
|
||||||
PortabilityLayer::CombinedTimestamp ts;
|
PortabilityLayer::CombinedTimestamp ts;
|
||||||
|
|
||||||
if (!ferr)
|
if (tsF)
|
||||||
{
|
{
|
||||||
if (fread(&ts, 1, sizeof(ts), tsF) != sizeof(ts))
|
if (fread(&ts, 1, sizeof(ts), tsF) != sizeof(ts))
|
||||||
{
|
{
|
||||||
@@ -77,9 +78,8 @@ int main(int argc, const char **argv)
|
|||||||
PortabilityLayer::MacFilePropertiesSerialized mps;
|
PortabilityLayer::MacFilePropertiesSerialized mps;
|
||||||
mps.Serialize(mfp);
|
mps.Serialize(mfp);
|
||||||
|
|
||||||
FILE *file = nullptr;
|
FILE *file = fopen_utf8(outPath.c_str(), "wb");
|
||||||
errno_t err = fopen_s(&file, outPath.c_str(), "wb");
|
if (file)
|
||||||
if (!err)
|
|
||||||
{
|
{
|
||||||
PortabilityLayer::CFileStream stream(file);
|
PortabilityLayer::CFileStream stream(file);
|
||||||
|
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
<Import Project="..\GpCommon.props" />
|
<Import Project="..\GpCommon.props" />
|
||||||
<Import Project="..\Common.props" />
|
<Import Project="..\Common.props" />
|
||||||
<Import Project="..\Debug.props" />
|
<Import Project="..\Debug.props" />
|
||||||
|
<Import Project="..\WindowsUnicodeToolShim.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
@@ -48,6 +49,7 @@
|
|||||||
<Import Project="..\GpCommon.props" />
|
<Import Project="..\GpCommon.props" />
|
||||||
<Import Project="..\Common.props" />
|
<Import Project="..\Common.props" />
|
||||||
<Import Project="..\Release.props" />
|
<Import Project="..\Release.props" />
|
||||||
|
<Import Project="..\WindowsUnicodeToolShim.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup />
|
<PropertyGroup />
|
||||||
@@ -77,6 +79,9 @@
|
|||||||
<ProjectReference Include="..\PortabilityLayer\PortabilityLayer.vcxproj">
|
<ProjectReference Include="..\PortabilityLayer\PortabilityLayer.vcxproj">
|
||||||
<Project>{6ec62b0f-9353-40a4-a510-3788f1368b33}</Project>
|
<Project>{6ec62b0f-9353-40a4-a510-3788f1368b33}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\WindowsUnicodeToolShim\WindowsUnicodeToolShim.vcxproj">
|
||||||
|
<Project>{15009625-1120-405e-8bba-69a16cd6713d}</Project>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="FTagData.cpp" />
|
<ClCompile Include="FTagData.cpp" />
|
||||||
|
Reference in New Issue
Block a user