Solved the Windows dependency hell

This commit is contained in:
Evgeny 2017-01-01 21:34:43 +03:00
parent 7091101b04
commit 2942e84a6f
42 changed files with 51 additions and 60 deletions

View File

@ -2,6 +2,7 @@
Credits: See CHANGES.TXT
License: GPL 2.0
*/
#include <allheaders.h>
#include <stdio.h>
#include "lib_ccx.h"
#include "configuration.h"

View File

@ -239,7 +239,7 @@ enum ccx_frame_type
typedef enum {
YES = 1,
NO = 0,
UNDEF = 0xff
UNDEFINED = 0xff
} bool_t;
enum ccx_code_type

View File

@ -173,7 +173,7 @@ struct s_primary_charset {
uint8_t g0_m29;
uint8_t g0_x28;
} primary_charset = {
0x00, UNDEF, UNDEF
0x00, UNDEFINED, UNDEFINED
};
// entities, used in colour mode, to replace unsafe HTML tag chars
@ -1043,8 +1043,8 @@ void process_telx_packet(struct TeletextCtx *ctx, data_unit_t data_unit_id, tele
ctx->receiving_data = YES;
if(default_g0_charset == LATIN) // G0 Character National Option Sub-sets selection required only for Latin Character Sets
{
primary_charset.g0_x28 = UNDEF;
c = (primary_charset.g0_m29 != UNDEF) ? primary_charset.g0_m29 : charset;
primary_charset.g0_x28 = UNDEFINED;
c = (primary_charset.g0_m29 != UNDEFINED) ? primary_charset.g0_m29 : charset;
remap_g0_charset(c);
}
/*
@ -1209,7 +1209,7 @@ void process_telx_packet(struct TeletextCtx *ctx, data_unit_t data_unit_id, tele
{
primary_charset.g0_m29 = (triplet0 & 0x3f80) >> 7;
// X/28 takes precedence over M/29
if (primary_charset.g0_x28 == UNDEF)
if (primary_charset.g0_x28 == UNDEFINED)
{
remap_g0_charset(primary_charset.g0_m29);
}
@ -1374,7 +1374,7 @@ int tlt_process_pes_packet(struct lib_cc_decode *dec_ctx, uint8_t *buffer, uint1
}
// should we use PTS or PCR?
if (ctx->using_pts == UNDEF)
if (ctx->using_pts == UNDEFINED)
{
if ((optional_pes_header_included == YES) && ((buffer[7] & 0x80) > 0))
{
@ -1501,7 +1501,7 @@ void* telxcc_init(void)
ctx->transmission_mode = TRANSMISSION_MODE_SERIAL;
ctx->receiving_data = NO;
ctx->using_pts = UNDEF;
ctx->using_pts = UNDEFINED;
ctx->delta = 0;
ctx->t0 = 0;

View File

@ -283,7 +283,7 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v120_xp</PlatformToolset>
<PlatformToolset>v140_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
@ -291,7 +291,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v120_xp</PlatformToolset>
<PlatformToolset>v140_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
@ -299,7 +299,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Full|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v120_xp</PlatformToolset>
<PlatformToolset>v140_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Full|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
@ -307,7 +307,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Full|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v120_xp</PlatformToolset>
<PlatformToolset>v140_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Full|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
@ -359,8 +359,8 @@
<IntDir>Debug-Full\</IntDir>
<LinkIncremental>true</LinkIncremental>
<TargetName>ccextractorwinfull</TargetName>
<IncludePath>$(ProjectDir)\libs\include;$(IncludePath)</IncludePath>
<LibraryPath>$(ProjectDir)\libs\lib;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86)</LibraryPath>
<IncludePath>$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Full|x64'">
<LinkIncremental>true</LinkIncremental>
@ -373,8 +373,8 @@
<IntDir>Release-Full\</IntDir>
<LinkIncremental>false</LinkIncremental>
<TargetName>ccextractorwinfull</TargetName>
<IncludePath>$(ProjectDir)\libs\include;$(IncludePath)</IncludePath>
<LibraryPath>$(ProjectDir)\libs\lib;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86)</LibraryPath>
<IncludePath>$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-Full|x64'">
<LinkIncremental>false</LinkIncremental>
@ -434,18 +434,22 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Full|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../src/utf8proc;../src/win_spec_incld;../src/gpacmp4;../src/libpng;../src/zlib;../src;../src/lib_ccx;../src/zvbi;../src/protobuf-c;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ENABLE_HARDSUBX;ENABLE_OCR;WIN32;_DEBUG;_CONSOLE;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<AdditionalIncludeDirectories>..\src\win_spec_incld;..\src\lib_ccx;..\src\lib_hash;..\src\zvbi;..\src\protobuf-c;..\src\gpacmp4;..\src\win_iconv;..\src\zlib;..\src\libpng;..\src;libs\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ENABLE_OCR;WIN32;_DEBUG;_CONSOLE;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<CompileAs>CompileAsC</CompileAs>
<DisableSpecificWarnings>4005;4996</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>WS2_32.Lib;avcodec.lib;avformat.lib;avutil.lib;swscale.lib;debug-lib/pvt.cppan.demo.danbloomberg.leptonica-master.lib;debug-lib/pvt.cppan.demo.google.tesseract.tesseract-master.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>Ws2_32.lib;$(ProjectDir)libs\lib\debug-lib\pvt.cppan.demo.danbloomberg.leptonica-1.74.0.lib;$(ProjectDir)libs\lib\debug-lib\pvt.cppan.demo.google.tesseract.tesseract-master.lib;$(ProjectDir)libs\lib\debug-lib\pvt.cppan.demo.gif-5.1.4.lib;$(ProjectDir)libs\lib\debug-lib\pvt.cppan.demo.tiff-4.0.7.lib;$(ProjectDir)libs\lib\debug-lib\pvt.cppan.demo.jpeg-9.2.0.lib;$(ProjectDir)libs\lib\debug-lib\pvt.cppan.demo.openjpeg.openjp2-2.1.2.lib;$(ProjectDir)libs\lib\debug-lib\pvt.cppan.demo.mgk25.jbig.jbig-2.1.0.lib;$(ProjectDir)libs\lib\debug-lib\pvt.cppan.demo.mgk25.jbig.ar-2.1.0.lib;$(ProjectDir)libs\lib\debug-lib\pvt.cppan.demo.xz_utils.lzma-5.2.2.lib;$(ProjectDir)libs\lib\debug-lib\pvt.cppan.demo.webp-0.5.1.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
@ -453,21 +457,12 @@
<AdditionalOptions>/SAFESEH:NO %(AdditionalOptions)</AdditionalOptions>
</Link>
<PostBuildEvent>
<Command>xcopy /y $(ProjectDir)libs\lib\debug-dll\pvt.cppan.demo.danbloomberg.leptonica-master.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\debug-dll\pvt.cppan.demo.google.tesseract.tesseract-master.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\debug-dll\pvt.cppan.demo.jpeg-9.2.0.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\debug-dll\pvt.cppan.demo.openjpeg.openjp2-2.1.2.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\debug-dll\pvt.cppan.demo.png-1.6.26.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\debug-dll\pvt.cppan.demo.tiff-4.0.7.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\debug-dll\pvt.cppan.demo.xz_utils.lzma-5.2.2.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\debug-dll\pvt.cppan.demo.zlib-1.2.8.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\debug-dll\tesseract400d.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\avcodec-57.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\avformat-57.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\avutil-55.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\swresample-2.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\swscale-4.dll $(ProjectDir)$(OutDir)</Command>
<Command>
</Command>
</PostBuildEvent>
<ProjectReference>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-Full|x64'">
<ClCompile>
@ -494,42 +489,37 @@ xcopy /y $(ProjectDir)libs\lib\libtesseract304d.dll $(ProjectDir)$(OutDir)</Comm
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-Full|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../src/win_iconv;../src/lib_hash;../src/protobuf-c;../src/utf8proc;../src/win_spec_incld;../src/gpacmp4;../src/libpng;../src/zlib;../src;../src/lib_ccx;../src/zvbi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ENABLE_HARDSUBX;VERSION_FILE_PRESENT;ENABLE_OCR;WIN32;NDEBUG;_CONSOLE;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>..\src\win_spec_incld;..\src\lib_ccx;..\src\lib_hash;..\src\zvbi;..\src\protobuf-c;..\src\gpacmp4;..\src\win_iconv;..\src\libpng;..\src\zlib;..\src;libs\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>VERSION_FILE_PRESENT;ENABLE_OCR;WIN32;NDEBUG;_CONSOLE;_FILE_OFFSET_BITS=64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<DisableSpecificWarnings>4005;4996</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>WS2_32.Lib;avcodec.lib;avformat.lib;avutil.lib;swscale.lib;release-lib/pvt.cppan.demo.danbloomberg.leptonica-master.lib;release-lib/pvt.cppan.demo.google.tesseract.tesseract-master.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>Ws2_32.lib;$(ProjectDir)libs\lib\release-lib\pvt.cppan.demo.danbloomberg.leptonica-1.74.0.lib;$(ProjectDir)libs\lib\release-lib\pvt.cppan.demo.google.tesseract.tesseract-master.lib;$(ProjectDir)libs\lib\release-lib\pvt.cppan.demo.gif-5.1.4.lib;$(ProjectDir)libs\lib\release-lib\pvt.cppan.demo.tiff-4.0.7.lib;$(ProjectDir)libs\lib\release-lib\pvt.cppan.demo.jpeg-9.2.0.lib;$(ProjectDir)libs\lib\release-lib\pvt.cppan.demo.openjpeg.openjp2-2.1.2.lib;$(ProjectDir)libs\lib\release-lib\pvt.cppan.demo.mgk25.jbig.jbig-2.1.0.lib;$(ProjectDir)libs\lib\release-lib\pvt.cppan.demo.mgk25.jbig.ar-2.1.0.lib;$(ProjectDir)libs\lib\release-lib\pvt.cppan.demo.xz_utils.lzma-5.2.2.lib;$(ProjectDir)libs\lib\release-lib\pvt.cppan.demo.webp-0.5.1.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<ImageHasSafeExceptionHandlers>true</ImageHasSafeExceptionHandlers>
</Link>
<PostBuildEvent>
<Command>xcopy /y $(ProjectDir)libs\lib\release-dll\pvt.cppan.demo.danbloomberg.leptonica-master.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\debug-dll\pvt.cppan.demo.google.tesseract.tesseract-master.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\release-dll\pvt.cppan.demo.jpeg-9.2.0.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\release-dll\pvt.cppan.demo.openjpeg.openjp2-2.1.2.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\release-dll\pvt.cppan.demo.png-1.6.26.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\release-dll\pvt.cppan.demo.tiff-4.0.7.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\release-dll\pvt.cppan.demo.xz_utils.lzma-5.2.2.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\release-dll\pvt.cppan.demo.zlib-1.2.8.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\release-dll\tesseract400.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\avcodec-57.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\avformat-57.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\avutil-55.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\swresample-2.dll $(ProjectDir)$(OutDir)
xcopy /y $(ProjectDir)libs\lib\swscale-4.dll $(ProjectDir)$(OutDir)</Command>
<Command>
</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>pre-build.bat</Command>
</PreBuildEvent>
<ProjectReference>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-Full|x64'">
<ClCompile>