mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Change hqx2gp to use WindowsUnicodeToolShim
This commit is contained in:
@@ -30,12 +30,13 @@ SOFTWARE.
|
|||||||
#include "MacBinary2.h"
|
#include "MacBinary2.h"
|
||||||
#include "MacFileMem.h"
|
#include "MacFileMem.h"
|
||||||
#include "ZipFile.h"
|
#include "ZipFile.h"
|
||||||
|
#include "WindowsUnicodeToolShim.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
using namespace PortabilityLayer;
|
using namespace PortabilityLayer;
|
||||||
|
|
||||||
int main(int argc, const char **argv)
|
int toolMain(int argc, const char **argv)
|
||||||
{
|
{
|
||||||
if (argc != 4)
|
if (argc != 4)
|
||||||
{
|
{
|
||||||
@@ -43,13 +44,7 @@ int main(int argc, const char **argv)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _CRT_INSECURE_DEPRECATE
|
FILE *f = fopen_utf8(argv[1], "rb");
|
||||||
FILE *f = nullptr;
|
|
||||||
if (fopen_s(&f, argv[1], "rb"))
|
|
||||||
f = nullptr;
|
|
||||||
#else
|
|
||||||
FILE *f = fopen(argv[1], "rb");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!f)
|
if (!f)
|
||||||
{
|
{
|
||||||
@@ -57,13 +52,7 @@ int main(int argc, const char **argv)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _CRT_INSECURE_DEPRECATE
|
FILE *tsF = fopen_utf8(argv[2], "rb");
|
||||||
FILE *tsF = nullptr;
|
|
||||||
if (fopen_s(&tsF, argv[2], "rb"))
|
|
||||||
tsF = nullptr;
|
|
||||||
#else
|
|
||||||
FILE *tsF = fopen(argv[2], "rb");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!tsF)
|
if (!tsF)
|
||||||
{
|
{
|
||||||
@@ -130,13 +119,7 @@ int main(int argc, const char **argv)
|
|||||||
|
|
||||||
std::string path = fname + extensions[i];
|
std::string path = fname + extensions[i];
|
||||||
|
|
||||||
#ifdef _CRT_INSECURE_DEPRECATE
|
FILE *outF = fopen_utf8(path.c_str(), "wb");
|
||||||
FILE *outF = nullptr;
|
|
||||||
if (fopen_s(&outF, path.c_str(), "wb"))
|
|
||||||
outF = nullptr;
|
|
||||||
#else
|
|
||||||
FILE *outF = fopen(path.c_str(), "wb");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!outF)
|
if (!outF)
|
||||||
continue;
|
continue;
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
<Import Project="..\Common.props" />
|
<Import Project="..\Common.props" />
|
||||||
<Import Project="..\GpCommon.props" />
|
<Import Project="..\GpCommon.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="..\Common.props" />
|
<Import Project="..\Common.props" />
|
||||||
<Import Project="..\GpCommon.props" />
|
<Import Project="..\GpCommon.props" />
|
||||||
<Import Project="..\Release.props" />
|
<Import Project="..\Release.props" />
|
||||||
|
<Import Project="..\WindowsUnicodeToolShim.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup />
|
<PropertyGroup />
|
||||||
@@ -80,6 +82,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>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
Reference in New Issue
Block a user