Init
This commit is contained in:
303
Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3.0.vcxproj
Normal file
303
Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3.0.vcxproj
Normal file
@ -0,0 +1,303 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug - Unicode|Win32">
|
||||
<Configuration>Debug - Unicode</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release - Unicode|Win32">
|
||||
<Configuration>Release - Unicode</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Retail - Unicode|Win32">
|
||||
<Configuration>Retail - Unicode</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Retail|Win32">
|
||||
<Configuration>Retail</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>AutopatcherClientGFx3</ProjectName>
|
||||
<ProjectGuid>{5BCE2D70-53B4-42F9-ABFE-1BC26E59C4FD}</ProjectGuid>
|
||||
<RootNamespace>AutopatcherClientGFx3</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
|
||||
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
|
||||
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
|
||||
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
|
||||
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
|
||||
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
|
||||
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat%3b$(TargetPath)</ExtensionsToDeleteOnClean>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/GFx3;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;$(GFXSDK)\Src\GRenderer;$(GFXSDK)\Src\GKernel;$(GFXSDK)\Src\GFxXML;$(GFXSDK)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;ws2_32.lib;libgfx.lib;libjpeg.lib;zlib.lib;imm32.lib;winmm.lib;libgrenderer_d3d9.lib;d3dx9.lib;d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(DXSDK_DIR)\Lib\x86;$(GFXSDK)\3rdParty\expat-2.0.1\lib;$(GFXSDK)\Lib\$(Platform)\Msvc80\Debug\;$(GFXSDK)\3rdParty\zlib-1.2.3\Lib\$(Platform)\Msvc80\Debug;$(GFXSDK)\3rdParty\jpeg-6b\Lib\$(Platform)\Msvc80\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)AutopatcherClientGFx3.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/GFx3;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;$(GFXSDK)\Src\GRenderer;$(GFXSDK)\Src\GKernel;$(GFXSDK)\Src\GFxXML;$(GFXSDK)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;ws2_32.lib;libgfx.lib;libjpeg.lib;zlib.lib;imm32.lib;winmm.lib;libgrenderer_d3d9.lib;d3dx9.lib;d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(DXSDK_DIR)\Lib\x86;$(GFXSDK)\3rdParty\expat-2.0.1\lib;$(GFXSDK)\Lib\$(Platform)\Msvc80\Debug\;$(GFXSDK)\3rdParty\zlib-1.2.3\Lib\$(Platform)\Msvc80\Debug;$(GFXSDK)\3rdParty\jpeg-6b\Lib\$(Platform)\Msvc80\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)AutopatcherClientGFx3.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/GFx3;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;$(GFXSDK)\Src\GRenderer;$(GFXSDK)\Src\GKernel;$(GFXSDK)\Src\GFxXML;$(GFXSDK)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;ws2_32.lib;libgfx.lib;libjpeg.lib;zlib.lib;imm32.lib;winmm.lib;libgrenderer_d3d9.lib;d3dx9.lib;d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(DXSDK_DIR)\Lib\x86;$(GFXSDK)\3rdParty\expat-2.0.1\lib;$(GFXSDK)\Lib\$(Platform)\Msvc80\Release\;$(GFXSDK)\3rdParty\zlib-1.2.3\Lib\$(Platform)\Msvc80\Release;$(GFXSDK)\3rdParty\jpeg-6b\Lib\$(Platform)\Msvc80\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/GFx3;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;$(GFXSDK)\Src\GRenderer;$(GFXSDK)\Src\GKernel;$(GFXSDK)\Src\GFxXML;$(GFXSDK)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;ws2_32.lib;libgfx.lib;libjpeg.lib;zlib.lib;imm32.lib;winmm.lib;libgrenderer_d3d9.lib;d3dx9.lib;d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(DXSDK_DIR)\Lib\x86;$(GFXSDK)\3rdParty\expat-2.0.1\lib;$(GFXSDK)\Lib\$(Platform)\Msvc80\Release\;$(GFXSDK)\3rdParty\zlib-1.2.3\Lib\$(Platform)\Msvc80\Release;$(GFXSDK)\3rdParty\jpeg-6b\Lib\$(Platform)\Msvc80\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/GFx3;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;$(GFXSDK)\Src\GRenderer;$(GFXSDK)\Src\GKernel;$(GFXSDK)\Src\GFxXML;$(GFXSDK)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;ws2_32.lib;libgfx.lib;libjpeg.lib;zlib.lib;imm32.lib;winmm.lib;libgrenderer_d3d9.lib;d3dx9.lib;d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(DXSDK_DIR)\Lib\x86;$(GFXSDK)\3rdParty\expat-2.0.1\lib;$(GFXSDK)\Lib\$(Platform)\Msvc80\Release\;$(GFXSDK)\3rdParty\zlib-1.2.3\Lib\$(Platform)\Msvc80\Release;$(GFXSDK)\3rdParty\jpeg-6b\Lib\$(Platform)\Msvc80\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>./;./../../Source/include;./../../DependentExtensions/GFx3;./../../DependentExtensions/Autopatcher;./../../DependentExtensions/bzip2-1.0.6;$(GFXSDK)\Src\GRenderer;$(GFXSDK)\Src\GKernel;$(GFXSDK)\Src\GFxXML;$(GFXSDK)\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;ws2_32.lib;libgfx.lib;libjpeg.lib;zlib.lib;imm32.lib;winmm.lib;libgrenderer_d3d9.lib;d3dx9.lib;d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(DXSDK_DIR)\Lib\x86;$(GFXSDK)\3rdParty\expat-2.0.1\lib;$(GFXSDK)\Lib\$(Platform)\Msvc80\Release\;$(GFXSDK)\3rdParty\zlib-1.2.3\Lib\$(Platform)\Msvc80\Release;$(GFXSDK)\3rdParty\jpeg-6b\Lib\$(Platform)\Msvc80\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.cpp" />
|
||||
<ClCompile Include="..\..\DependentExtensions\Autopatcher\AutopatcherClient.cpp" />
|
||||
<ClCompile Include="AutopatcherClientGFx3Impl.cpp" />
|
||||
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\blocksort.c" />
|
||||
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzip2.c" />
|
||||
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.c" />
|
||||
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\compress.c" />
|
||||
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\crctable.c" />
|
||||
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\decompress.c" />
|
||||
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\huffman.c" />
|
||||
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\randtable.c" />
|
||||
<ClCompile Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.cpp" />
|
||||
<ClCompile Include="..\..\DependentExtensions\GFx3\FxGameDelegate.cpp" />
|
||||
<ClCompile Include="GFxPlayerTinyD3D9.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.h" />
|
||||
<ClInclude Include="..\..\DependentExtensions\Autopatcher\AutopatcherClient.h" />
|
||||
<ClInclude Include="..\..\Source\AutopatcherPatchContext.h" />
|
||||
<ClInclude Include="AutopatcherClientGFx3Impl.h" />
|
||||
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.h" />
|
||||
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib_private.h" />
|
||||
<ClInclude Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.h" />
|
||||
<ClInclude Include="..\..\DependentExtensions\GFx3\FxGameDelegate.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
|
||||
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Client Files">
|
||||
<UniqueIdentifier>{b6f49cc2-408d-47b8-8ad5-eaf3c6996cc6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Main">
|
||||
<UniqueIdentifier>{21f8af2d-ce01-47e1-903f-b5cc3b32030a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="BZip2">
|
||||
<UniqueIdentifier>{17c1e00f-1867-4c62-931e-529d23297b27}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="BZip2Wrapper">
|
||||
<UniqueIdentifier>{49a51911-908b-44d3-a402-3350728ec567}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="GFx3">
|
||||
<UniqueIdentifier>{12d55ff1-6f87-490d-9543-26f70a1b9755}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.cpp">
|
||||
<Filter>Client Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DependentExtensions\Autopatcher\AutopatcherClient.cpp">
|
||||
<Filter>Client Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="AutopatcherClientGFx3Impl.cpp">
|
||||
<Filter>Main</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\blocksort.c">
|
||||
<Filter>BZip2</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzip2.c">
|
||||
<Filter>BZip2</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.c">
|
||||
<Filter>BZip2</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\compress.c">
|
||||
<Filter>BZip2</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\crctable.c">
|
||||
<Filter>BZip2</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\decompress.c">
|
||||
<Filter>BZip2</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\huffman.c">
|
||||
<Filter>BZip2</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DependentExtensions\bzip2-1.0.6\randtable.c">
|
||||
<Filter>BZip2</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.cpp">
|
||||
<Filter>BZip2Wrapper</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\DependentExtensions\GFx3\FxGameDelegate.cpp">
|
||||
<Filter>GFx3</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GFxPlayerTinyD3D9.cpp">
|
||||
<Filter>GFx3</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\DependentExtensions\Autopatcher\ApplyPatch.h">
|
||||
<Filter>Client Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DependentExtensions\Autopatcher\AutopatcherClient.h">
|
||||
<Filter>Client Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\Source\AutopatcherPatchContext.h">
|
||||
<Filter>Client Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="AutopatcherClientGFx3Impl.h">
|
||||
<Filter>Main</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib.h">
|
||||
<Filter>BZip2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DependentExtensions\bzip2-1.0.6\bzlib_private.h">
|
||||
<Filter>BZip2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DependentExtensions\Autopatcher\MemoryCompressor.h">
|
||||
<Filter>BZip2Wrapper</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\DependentExtensions\GFx3\FxGameDelegate.h">
|
||||
<Filter>GFx3</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
342
Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.cpp
Normal file
342
Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.cpp
Normal file
@ -0,0 +1,342 @@
|
||||
/*
|
||||
* Original work: Copyright (c) 2014, Oculus VR, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
|
||||
*
|
||||
*
|
||||
* Modified work: Copyright (c) 2016-2020, SLikeSoft UG (haftungsbeschränkt)
|
||||
*
|
||||
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
|
||||
* license found in the license.txt file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// Common includes
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "slikenet/Kbhit.h"
|
||||
|
||||
#include "slikenet/GetTime.h"
|
||||
#include "slikenet/peerinterface.h"
|
||||
#include "slikenet/MessageIdentifiers.h"
|
||||
#include "slikenet/BitStream.h"
|
||||
#include "slikenet/StringCompressor.h"
|
||||
#include "slikenet/PacketizedTCP.h"
|
||||
|
||||
// Client only includes
|
||||
#include "slikenet/FileListTransferCBInterface.h"
|
||||
#include "slikenet/FileListTransfer.h"
|
||||
#include "AutopatcherClient.h"
|
||||
#include "slikenet/AutopatcherPatchContext.h"
|
||||
#include "slikenet/sleep.h"
|
||||
#include "slikenet/linux_adapter.h"
|
||||
#include "slikenet/osx_adapter.h"
|
||||
|
||||
#include "AutopatcherClientGFx3Impl.h"
|
||||
|
||||
using namespace SLNet;
|
||||
|
||||
static const char *AUTOPATCHER_LAST_UPDATE_FILE="autopatcherLastUpdate.txt";
|
||||
static const char *AUTOPATCHER_RESTART_FILE="autopatcherRestart.txt";
|
||||
|
||||
class TestCB : public SLNet::FileListTransferCBInterface
|
||||
{
|
||||
public:
|
||||
virtual bool OnFile(OnFileStruct *onFileStruct)
|
||||
{
|
||||
char buff[1024];
|
||||
|
||||
if (onFileStruct->context.op==PC_HASH_1_WITH_PATCH || onFileStruct->context.op==PC_HASH_2_WITH_PATCH)
|
||||
strcpy_s(buff,"Patched: ");
|
||||
else if (onFileStruct->context.op==PC_WRITE_FILE)
|
||||
strcpy_s(buff,"Written: ");
|
||||
else if (onFileStruct->context.op==PC_ERROR_FILE_WRITE_FAILURE)
|
||||
strcpy_s(buff,"Write Failure: ");
|
||||
else if (onFileStruct->context.op==PC_ERROR_PATCH_TARGET_MISSING)
|
||||
strcpy_s(buff,"Patch target missing: ");
|
||||
else if (onFileStruct->context.op==PC_ERROR_PATCH_APPLICATION_FAILURE)
|
||||
strcpy_s(buff,"Patch process failure: ");
|
||||
else if (onFileStruct->context.op==PC_ERROR_PATCH_RESULT_CHECKSUM_FAILURE)
|
||||
strcpy_s(buff,"Patch checksum failure: ");
|
||||
else if (onFileStruct->context.op==PC_NOTICE_WILL_COPY_ON_RESTART)
|
||||
strcpy_s(buff,"Copy pending restart: ");
|
||||
else if (onFileStruct->context.op==PC_NOTICE_FILE_DOWNLOADED)
|
||||
strcpy_s(buff,"Downloaded: ");
|
||||
else if (onFileStruct->context.op==PC_NOTICE_FILE_DOWNLOADED_PATCH)
|
||||
strcpy_s(buff,"Downloaded Patch: ");
|
||||
else
|
||||
RakAssert(0);
|
||||
|
||||
|
||||
sprintf(buff+strlen(buff), "%i. (100%%) %i/%i %s %ib / %ib\n", onFileStruct->setID, onFileStruct->fileIndex+1, onFileStruct->numberOfFilesInThisSet,
|
||||
onFileStruct->fileName, onFileStruct->byteLengthOfThisFile,
|
||||
onFileStruct->byteLengthOfThisSet);
|
||||
|
||||
FxResponseArgs<1> args;
|
||||
args.Add(GFxValue(buff));
|
||||
FxDelegate::Invoke2(autopatcherClient->movie, "addToPatchNotesText", args);
|
||||
|
||||
FxResponseArgs<5> args2;
|
||||
args2.Add(GFxValue(buff));
|
||||
args2.Add(GFxValue(1.0));
|
||||
args2.Add(GFxValue(1.0));
|
||||
args2.Add(GFxValue((double)onFileStruct->bytesDownloadedForThisSet));
|
||||
args2.Add(GFxValue((double)onFileStruct->byteLengthOfThisSet));
|
||||
FxDelegate::Invoke2(autopatcherClient->movie, "updateProgressBars", args2);
|
||||
|
||||
// Return false for the file data to be deallocated automatically
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual void OnFileProgress(FileProgressStruct *fps)
|
||||
{
|
||||
char buff[1024];
|
||||
sprintf(buff, "%s %ib / %ib\n", fps->onFileStruct->fileName,
|
||||
fps->onFileStruct->bytesDownloadedForThisFile, fps->onFileStruct->byteLengthOfThisFile);
|
||||
|
||||
FxResponseArgs<5> args2;
|
||||
float thisFileProgress,totalProgress;
|
||||
thisFileProgress=(float)fps->partCount/(float)fps->partTotal;
|
||||
totalProgress=(float)(fps->onFileStruct->fileIndex+1)/(float)fps->onFileStruct->numberOfFilesInThisSet;
|
||||
args2.Add(GFxValue(buff));
|
||||
args2.Add(GFxValue((double)fps->onFileStruct->bytesDownloadedForThisFile));
|
||||
args2.Add(GFxValue((double)fps->onFileStruct->byteLengthOfThisFile));
|
||||
args2.Add(GFxValue((double)fps->onFileStruct->bytesDownloadedForThisSet));
|
||||
args2.Add(GFxValue((double)fps->onFileStruct->byteLengthOfThisSet));
|
||||
FxDelegate::Invoke2(autopatcherClient->movie, "updateProgressBars", args2);
|
||||
}
|
||||
|
||||
AutopatcherClientGFx3Impl *autopatcherClient;
|
||||
|
||||
} transferCallback;
|
||||
|
||||
AutopatcherClientGFx3Impl::AutopatcherClientGFx3Impl()
|
||||
{
|
||||
autopatcherClient=0;
|
||||
fileListTransfer=0;
|
||||
packetizedTCP=0;
|
||||
}
|
||||
AutopatcherClientGFx3Impl::~AutopatcherClientGFx3Impl()
|
||||
{
|
||||
Shutdown();
|
||||
}
|
||||
void AutopatcherClientGFx3Impl::Init(const char *_pathToThisExe, GPtr<FxDelegate> pDelegate, GPtr<GFxMovieView> pMovie)
|
||||
{
|
||||
pDelegate->RegisterHandler(this);
|
||||
delegate=pDelegate;
|
||||
movie=pMovie;
|
||||
strcpy_s(pathToThisExe,_pathToThisExe);
|
||||
|
||||
autopatcherClient= SLNet::OP_NEW<AutopatcherClient>(_FILE_AND_LINE_);
|
||||
fileListTransfer= SLNet::OP_NEW<FileListTransfer>(_FILE_AND_LINE_);
|
||||
packetizedTCP= SLNet::OP_NEW<PacketizedTCP>(_FILE_AND_LINE_);
|
||||
autopatcherClient->SetFileListTransferPlugin(fileListTransfer);
|
||||
|
||||
packetizedTCP->AttachPlugin(autopatcherClient);
|
||||
packetizedTCP->AttachPlugin(fileListTransfer);
|
||||
|
||||
}
|
||||
void AutopatcherClientGFx3Impl::Update(void)
|
||||
{
|
||||
SLNet::Packet *p;
|
||||
|
||||
SystemAddress notificationAddress;
|
||||
notificationAddress=packetizedTCP->HasCompletedConnectionAttempt();
|
||||
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
|
||||
{
|
||||
UpdateConnectResult(true);
|
||||
serverAddress=notificationAddress;
|
||||
}
|
||||
notificationAddress=packetizedTCP->HasFailedConnectionAttempt();
|
||||
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
|
||||
{
|
||||
UpdateConnectResult(false);
|
||||
}
|
||||
notificationAddress=packetizedTCP->HasNewIncomingConnection();
|
||||
notificationAddress=packetizedTCP->HasLostConnection();
|
||||
if (notificationAddress!= SLNet::UNASSIGNED_SYSTEM_ADDRESS)
|
||||
{
|
||||
UpdateConnectResult(false);
|
||||
}
|
||||
|
||||
p=packetizedTCP->Receive();
|
||||
while (p)
|
||||
{
|
||||
if (p->data[0]==ID_AUTOPATCHER_REPOSITORY_FATAL_ERROR)
|
||||
{
|
||||
char buff[256];
|
||||
SLNet::BitStream temp(p->data, p->length, false);
|
||||
temp.IgnoreBits(8);
|
||||
StringCompressor::Instance()->DecodeString(buff, 256, &temp);
|
||||
|
||||
// Error.
|
||||
FxDelegate::Invoke2(movie, "gotoCompletionMenu", FxResponseArgs<0>());
|
||||
|
||||
FxResponseArgs<1> args2;
|
||||
args2.Add(GFxValue(buff));
|
||||
FxDelegate::Invoke2(movie, "setCompletionMessage", args2);
|
||||
}
|
||||
else if (p->data[0]==ID_AUTOPATCHER_FINISHED)
|
||||
{
|
||||
FxDelegate::Invoke2(movie, "gotoCompletionMenu", FxResponseArgs<0>());
|
||||
|
||||
SaveLastUpdateDate();
|
||||
}
|
||||
else if (p->data[0]==ID_AUTOPATCHER_RESTART_APPLICATION)
|
||||
{
|
||||
FxDelegate::Invoke2(movie, "gotoCompletionMenu", FxResponseArgs<0>());
|
||||
|
||||
FxResponseArgs<1> args2;
|
||||
SLNet::RakString completionMsg("Launch \"AutopatcherClientRestarter.exe %s\"\nQuit this application immediately after to unlock files.\n", AUTOPATCHER_RESTART_FILE);
|
||||
args2.Add(GFxValue(completionMsg.C_String()));
|
||||
FxDelegate::Invoke2(movie, "setCompletionMessage", args2);
|
||||
|
||||
SaveLastUpdateDate();
|
||||
}
|
||||
|
||||
packetizedTCP->DeallocatePacket(p);
|
||||
p=packetizedTCP->Receive();
|
||||
}
|
||||
}
|
||||
void AutopatcherClientGFx3Impl::Shutdown(void)
|
||||
{
|
||||
if (delegate.GetPtr()!=0)
|
||||
{
|
||||
delegate->UnregisterHandler(this);
|
||||
delegate.Clear();
|
||||
}
|
||||
movie.Clear();
|
||||
if (packetizedTCP)
|
||||
packetizedTCP->Stop();
|
||||
SLNet::OP_DELETE(autopatcherClient,_FILE_AND_LINE_);
|
||||
SLNet::OP_DELETE(fileListTransfer,_FILE_AND_LINE_);
|
||||
SLNet::OP_DELETE(packetizedTCP,_FILE_AND_LINE_);
|
||||
autopatcherClient=0;
|
||||
fileListTransfer=0;
|
||||
packetizedTCP=0;
|
||||
}
|
||||
const char* AutopatcherClientGFx3Impl::Connect(const char *ip, unsigned short port)
|
||||
{
|
||||
if (packetizedTCP->Start(0,1)==true)
|
||||
{
|
||||
packetizedTCP->Connect(ip,port,false);
|
||||
return "Connecting";
|
||||
}
|
||||
else
|
||||
return "Start call failed.";
|
||||
}
|
||||
void AutopatcherClientGFx3Impl::PressedPatch(const FxDelegateArgs& pparams)
|
||||
{
|
||||
AutopatcherClientGFx3Impl* prt = (AutopatcherClientGFx3Impl*)pparams.GetHandler();
|
||||
//appNameText.text, appDirectoryText.text, fullRescanBtn.selected
|
||||
const char *appName = pparams[0].GetString();
|
||||
const char *appDir = pparams[1].GetString();
|
||||
bool fullRescan = pparams[2].GetBool();
|
||||
strcpy_s(prt->appDirectory, appDir);
|
||||
|
||||
char restartFile[512];
|
||||
strcpy_s(restartFile, appDir);
|
||||
strcat(restartFile, "/");
|
||||
strcat(restartFile, AUTOPATCHER_RESTART_FILE);
|
||||
double lastUpdateDate;
|
||||
if (fullRescan==false)
|
||||
prt->LoadLastUpdateDate(&lastUpdateDate,appDir);
|
||||
else
|
||||
lastUpdateDate=0;
|
||||
|
||||
transferCallback.autopatcherClient=prt;
|
||||
if (prt->autopatcherClient->PatchApplication(appName, appDir, lastUpdateDate, prt->serverAddress, &transferCallback, restartFile, prt->pathToThisExe))
|
||||
{
|
||||
FxDelegate::Invoke2(prt->movie, "gotoPatchMenu", FxResponseArgs<0>());
|
||||
}
|
||||
else
|
||||
{
|
||||
prt->packetizedTCP->Stop();
|
||||
//prt->UpdateConnectResult("Failed to start patching");
|
||||
FxDelegate::Invoke2(prt->movie, "gotoPatchStartMenu", FxResponseArgs<0>());
|
||||
}
|
||||
}
|
||||
void AutopatcherClientGFx3Impl::OpenSite(const FxDelegateArgs& pparams)
|
||||
{
|
||||
AutopatcherClientGFx3Impl* prt = (AutopatcherClientGFx3Impl*)pparams.GetHandler();
|
||||
const char *siteType = pparams[0].GetString();
|
||||
if (_stricmp(siteType, "help")==0)
|
||||
{
|
||||
ShellExecute(nullptr, "open", "http://www.jenkinssoftware.com/raknet/manual/autopatcher.html", nullptr, nullptr, SW_SHOWNORMAL);
|
||||
}
|
||||
else if (_stricmp(siteType, "raknet")==0)
|
||||
{
|
||||
ShellExecute(nullptr, "open", "http://www.jenkinssoftware.com/", nullptr, nullptr, SW_SHOWNORMAL);
|
||||
}
|
||||
else if (_stricmp(siteType, "scaleform")==0)
|
||||
{
|
||||
ShellExecute(nullptr, "open", "https://www.scaleform.com/", nullptr, nullptr, SW_SHOWNORMAL);
|
||||
}
|
||||
}
|
||||
void AutopatcherClientGFx3Impl::PressedConnect(const FxDelegateArgs& pparams)
|
||||
{
|
||||
AutopatcherClientGFx3Impl* prt = (AutopatcherClientGFx3Impl*)pparams.GetHandler();
|
||||
const char *result = prt->Connect(pparams[0].GetString(), atoi(pparams[1].GetString()));
|
||||
}
|
||||
void AutopatcherClientGFx3Impl::PressedOKBtn(const FxDelegateArgs& pparams)
|
||||
{
|
||||
AutopatcherClientGFx3Impl* prt = (AutopatcherClientGFx3Impl*)pparams.GetHandler();
|
||||
prt->autopatcherClient->Clear();
|
||||
prt->packetizedTCP->Stop();
|
||||
|
||||
prt->GotoMainMenu();
|
||||
}
|
||||
void AutopatcherClientGFx3Impl::UpdateConnectResult( bool isConnected )
|
||||
{
|
||||
FxResponseArgs<1> args;
|
||||
args.Add(GFxValue(isConnected));
|
||||
FxDelegate::Invoke2(movie, "ConnectResult", args);
|
||||
}
|
||||
|
||||
void AutopatcherClientGFx3Impl::Accept(CallbackProcessor* cbreg)
|
||||
{
|
||||
cbreg->Process( "PressedOKBtn", &AutopatcherClientGFx3Impl::PressedOKBtn );
|
||||
cbreg->Process( "PressedConnect", &AutopatcherClientGFx3Impl::PressedConnect );
|
||||
cbreg->Process( "PressedPatch", &AutopatcherClientGFx3Impl::PressedPatch );
|
||||
cbreg->Process( "openSite", &AutopatcherClientGFx3Impl::OpenSite );
|
||||
}
|
||||
|
||||
void AutopatcherClientGFx3Impl::SaveLastUpdateDate(void)
|
||||
{
|
||||
char inPath[512];
|
||||
double serverDate=autopatcherClient->GetServerDate();
|
||||
strcpy_s(inPath, appDirectory);
|
||||
strcat(inPath, "/");
|
||||
strcat(inPath, AUTOPATCHER_LAST_UPDATE_FILE);
|
||||
FILE *fp;
|
||||
if (fopen_s(&fp,inPath,"wb")==0)
|
||||
{
|
||||
fwrite(&serverDate,sizeof(double),1,fp);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
void AutopatcherClientGFx3Impl::LoadLastUpdateDate(double *out, const char *appDir)
|
||||
{
|
||||
char inPath[512];
|
||||
strcpy_s(appDirectory,appDir);
|
||||
strcpy_s(inPath, appDirectory);
|
||||
strcat(inPath, "/");
|
||||
strcat(inPath, AUTOPATCHER_LAST_UPDATE_FILE);
|
||||
FILE *fp;
|
||||
if (fopen_s(&fp,inPath,"rb")==0)
|
||||
{
|
||||
fread(out,sizeof(double),1,fp);
|
||||
fclose(fp);
|
||||
}
|
||||
else
|
||||
out[0]=0;
|
||||
}
|
||||
void AutopatcherClientGFx3Impl::GotoMainMenu(void)
|
||||
{
|
||||
FxDelegate::Invoke2(movie, "gotoMainMenu", FxResponseArgs<0>());
|
||||
autopatcherClient->Clear();
|
||||
packetizedTCP->Stop();
|
||||
}
|
||||
62
Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.h
Normal file
62
Samples/AutopatcherClientGFx3.0/AutopatcherClientGFx3Impl.h
Normal file
@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Original work: Copyright (c) 2014, Oculus VR, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
|
||||
*
|
||||
*
|
||||
* Modified work: Copyright (c) 2017, SLikeSoft UG (haftungsbeschränkt)
|
||||
*
|
||||
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
|
||||
* license found in the license.txt file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#include "slikenet/types.h"
|
||||
#include "FxGameDelegate.h"
|
||||
|
||||
namespace SLNet {
|
||||
|
||||
class AutopatcherClient;
|
||||
class FileListTransfer;
|
||||
class PacketizedTCP;
|
||||
|
||||
// GFxPlayerTinyD3D9.cpp has an instance of this class, and callls the corresponding 3 function
|
||||
// This keeps the patching code out of the GFx sample as much as possible
|
||||
class AutopatcherClientGFx3Impl : public FxDelegateHandler
|
||||
{
|
||||
public:
|
||||
AutopatcherClientGFx3Impl();
|
||||
~AutopatcherClientGFx3Impl();
|
||||
void Init(const char *_pathToThisExe, GPtr<FxDelegate> pDelegate, GPtr<GFxMovieView> pMovie);
|
||||
void Update(void);
|
||||
void Shutdown(void);
|
||||
|
||||
// Callback from flash
|
||||
static void PressedConnect(const FxDelegateArgs& pparams);
|
||||
static void PressedOKBtn(const FxDelegateArgs& pparams);
|
||||
static void PressedPatch(const FxDelegateArgs& pparams);
|
||||
static void OpenSite(const FxDelegateArgs& pparams);
|
||||
|
||||
// Update all callbacks from flash
|
||||
void Accept(CallbackProcessor* cbreg);
|
||||
|
||||
const char* Connect(const char *ip, unsigned short port);
|
||||
void UpdateConnectResult(bool isConnected);
|
||||
void SaveLastUpdateDate(void);
|
||||
void LoadLastUpdateDate(double *out, const char *appDir);
|
||||
void GotoMainMenu(void);
|
||||
|
||||
AutopatcherClient *autopatcherClient;
|
||||
FileListTransfer *fileListTransfer;
|
||||
PacketizedTCP *packetizedTCP;
|
||||
SystemAddress serverAddress;
|
||||
char pathToThisExe[512];
|
||||
char appDirectory[512];
|
||||
GPtr<FxDelegate> delegate;
|
||||
GPtr<GFxMovieView> movie;
|
||||
|
||||
};
|
||||
|
||||
} // namespace SLNet
|
||||
38
Samples/AutopatcherClientGFx3.0/CMakeLists.txt
Normal file
38
Samples/AutopatcherClientGFx3.0/CMakeLists.txt
Normal file
@ -0,0 +1,38 @@
|
||||
#
|
||||
# This file was taken from RakNet 4.082.
|
||||
# Please see licenses/RakNet license.txt for the underlying license and related copyright.
|
||||
#
|
||||
#
|
||||
# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt)
|
||||
#
|
||||
# This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
|
||||
# license found in the license.txt file in the root directory of this source tree.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
project(AutopatcherClientGFx3)
|
||||
IF(WIN32 AND NOT UNIX)
|
||||
FINDD3D()
|
||||
FINDSCALEGFX()
|
||||
include_directories(${SLIKENET_HEADER_FILES} ./ ${Autopatcher_SOURCE_DIR} ${BZip2_SOURCE_DIR} ${D3D_INCLUDE_DIR} ${SCALEGFX_INCLUDE_DIR} "${SLikeNet_SOURCE_DIR}/DependentExtensions/GFx3")
|
||||
FILE(GLOB GFXSRC GFxPlayerTinyD3D9.cpp "${SLikeNet_SOURCE_DIR}/DependentExtensions/GFx3/*.cpp" "${SLikeNet_SOURCE_DIR}/DependentExtensions/GFx3/*.h")
|
||||
FILE(GLOB AUTOSRC "${Autopatcher_SOURCE_DIR}/*.cpp" "${Autopatcher_SOURCE_DIR}/*.h")
|
||||
FILE(GLOB BZSRC "${BZip2_SOURCE_DIR}/*.c" "${BZip2_SOURCE_DIR}/*.h")
|
||||
LIST(REMOVE_ITEM BZSRC "${BZip2_SOURCE_DIR}/dlltest.c" "${BZip2_SOURCE_DIR}/mk251.c" "${BZip2_SOURCE_DIR}/bzip2recover.c")
|
||||
SOURCE_GROUP(BZip2 FILES ${BZSRC})
|
||||
SET(WRAPFILES "${Autopatcher_SOURCE_DIR}/MemoryCompressor.cpp" "${Autopatcher_SOURCE_DIR}/MemoryCompressor.h")
|
||||
LIST(REMOVE_ITEM AUTOSRC ${WRAPFILES})
|
||||
SOURCE_GROUP(Client_Files FILES ${AUTOSRC})
|
||||
SOURCE_GROUP(Main FILES "AutopatcherClientGFx3Impl.cpp" AutopatcherClientGFx3Impl.h)
|
||||
SOURCE_GROUP(BZip2Wrapper FILES ${WRAPFILES})
|
||||
SOURCE_GROUP(GFx3 FILES ${GFXSRC})
|
||||
add_executable(AutopatcherClientGFx3 WIN32 "AutopatcherClientGFx3Impl.cpp" AutopatcherClientGFx3Impl.h ${AUTOSRC} ${BZSRC} ${WRAPFILES} ${GFXSRC})
|
||||
target_link_libraries(AutopatcherClientGFx3 ${SLIKENET_COMMON_LIBS} ${D3D_LIBRARIES} winmm.lib imm32.lib ${SCALEGFX_DEBUG_LIBRARIES} ${SCALEGFX_LIBRARIES})
|
||||
VSUBFOLDER(AutopatcherClientGFx3 "Samples/AutoPatcher/Client")
|
||||
ENDIF(WIN32 AND NOT UNIX)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user