-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from OpenRCT2/add-libzip
Add libzip
- Loading branch information
Showing
10 changed files
with
299 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
|
||
#if WIN32 | ||
#define SIZEOF_OFF_T 4 | ||
#else | ||
#define SIZEOF_OFF_T 8 | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 14 | ||
VisualStudioVersion = 14.0.25420.1 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libzip", "libzip.vcxproj", "{5716F715-D80B-4B3B-923B-53C9CBA60B11}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Release Static|Win32 = Release Static|Win32 | ||
Release Static|x64 = Release Static|x64 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{5716F715-D80B-4B3B-923B-53C9CBA60B11}.Release Static|Win32.ActiveCfg = Release Static|Win32 | ||
{5716F715-D80B-4B3B-923B-53C9CBA60B11}.Release Static|Win32.Build.0 = Release Static|Win32 | ||
{5716F715-D80B-4B3B-923B-53C9CBA60B11}.Release Static|x64.ActiveCfg = Release Static|x64 | ||
{5716F715-D80B-4B3B-923B-53C9CBA60B11}.Release Static|x64.Build.0 = Release Static|x64 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,211 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup Label="ProjectConfigurations"> | ||
<ProjectConfiguration Include="Release Static|Win32"> | ||
<Configuration>Release Static</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release Static|x64"> | ||
<Configuration>Release Static</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
</ItemGroup> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>{5716F715-D80B-4B3B-923B-53C9CBA60B11}</ProjectGuid> | ||
<RootNamespace>libzip</RootNamespace> | ||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|Win32'" Label="Configuration"> | ||
<ConfigurationType>StaticLibrary</ConfigurationType> | ||
<UseDebugLibraries>false</UseDebugLibraries> | ||
<PlatformToolset>v140</PlatformToolset> | ||
<WholeProgramOptimization>true</WholeProgramOptimization> | ||
<CharacterSet>Unicode</CharacterSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|x64'" Label="Configuration"> | ||
<ConfigurationType>StaticLibrary</ConfigurationType> | ||
<UseDebugLibraries>false</UseDebugLibraries> | ||
<PlatformToolset>v140</PlatformToolset> | ||
<WholeProgramOptimization>true</WholeProgramOptimization> | ||
<CharacterSet>Unicode</CharacterSet> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
<ImportGroup Label="ExtensionSettings"> | ||
</ImportGroup> | ||
<ImportGroup Label="Shared"> | ||
</ImportGroup> | ||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|Win32'" Label="PropertySheets"> | ||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
</ImportGroup> | ||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|x64'" Label="PropertySheets"> | ||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
</ImportGroup> | ||
<PropertyGroup Label="UserMacros" /> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|Win32'"> | ||
<LinkIncremental>false</LinkIncremental> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|x64'"> | ||
<LinkIncremental>false</LinkIncremental> | ||
</PropertyGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|Win32'"> | ||
<ClCompile> | ||
<WarningLevel>Level3</WarningLevel> | ||
<PrecompiledHeader> | ||
</PrecompiledHeader> | ||
<Optimization>MaxSpeed</Optimization> | ||
<FunctionLevelLinking>true</FunctionLevelLinking> | ||
<IntrinsicFunctions>true</IntrinsicFunctions> | ||
<PreprocessorDefinitions>WIN32;NDEBUG;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<PrecompiledHeaderFile> | ||
</PrecompiledHeaderFile> | ||
<AdditionalIncludeDirectories>.;..\..\src\zlib</AdditionalIncludeDirectories> | ||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Windows</SubSystem> | ||
<EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
<OptimizeReferences>true</OptimizeReferences> | ||
<GenerateDebugInformation>true</GenerateDebugInformation> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|x64'"> | ||
<ClCompile> | ||
<WarningLevel>Level3</WarningLevel> | ||
<PrecompiledHeader> | ||
</PrecompiledHeader> | ||
<Optimization>MaxSpeed</Optimization> | ||
<FunctionLevelLinking>true</FunctionLevelLinking> | ||
<IntrinsicFunctions>true</IntrinsicFunctions> | ||
<PreprocessorDefinitions>NDEBUG;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<SDLCheck>true</SDLCheck> | ||
<AdditionalIncludeDirectories>.;..\..\src\zlib</AdditionalIncludeDirectories> | ||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Windows</SubSystem> | ||
<EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
<OptimizeReferences>true</OptimizeReferences> | ||
<GenerateDebugInformation>true</GenerateDebugInformation> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemGroup> | ||
<ClCompile Include="..\..\src\libzip\lib\mkstemp.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_add.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_add_dir.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_add_entry.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_buffer.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_close.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_delete.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_dirent.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_dir_add.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_discard.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_entry.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_error.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_error_clear.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_error_get.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_error_get_sys_type.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_error_strerror.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_error_to_str.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_err_str.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_extra_field.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_extra_field_api.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_fclose.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_fdopen.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_filerange_crc.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_file_add.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_file_error_clear.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_file_error_get.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_file_get_comment.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_file_get_external_attributes.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_file_get_offset.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_file_rename.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_file_replace.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_file_set_comment.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_file_set_external_attributes.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_file_set_mtime.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_file_strerror.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_fopen.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_fopen_encrypted.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_fopen_index.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_fopen_index_encrypted.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_fread.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_fseek.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_ftell.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_get_archive_comment.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_get_archive_flag.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_get_compression_implementation.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_get_encryption_implementation.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_get_file_comment.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_get_name.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_get_num_entries.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_get_num_files.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_hash.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_io_util.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_memdup.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_name_locate.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_new.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_open.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_rename.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_replace.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_set_archive_comment.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_set_archive_flag.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_set_default_password.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_set_file_comment.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_set_file_compression.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_set_name.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_begin_write.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_buffer.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_call.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_close.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_commit_write.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_crc.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_deflate.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_error.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_filep.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_free.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_function.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_is_deleted.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_layered.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_open.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_pkware.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_read.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_remove.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_rollback_write.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_seek.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_seek_write.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_stat.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_supports.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_tell.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_tell_write.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_win32a.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_win32handle.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_win32utf8.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_win32w.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_window.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_write.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_zip.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_source_zip_new.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_stat.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_stat_index.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_stat_init.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_strerror.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_string.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_unchange.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_unchange_all.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_unchange_archive.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_unchange_data.c" /> | ||
<ClCompile Include="..\..\src\libzip\lib\zip_utf-8.c" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClInclude Include="config.h" /> | ||
<ClInclude Include="zipconf.h" /> | ||
<ClInclude Include="..\..\src\libzip\lib\compat.h" /> | ||
<ClInclude Include="..\..\src\libzip\lib\zip.h" /> | ||
<ClInclude Include="..\..\src\libzip\lib\zipint.h" /> | ||
<ClInclude Include="..\..\src\libzip\lib\zipwin32.h" /> | ||
</ItemGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
<ImportGroup Label="ExtensionTargets"> | ||
</ImportGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#pragma once | ||
|
||
#include <limits.h> | ||
|
||
typedef signed __int8 zip_int8_t; | ||
typedef signed __int16 zip_int16_t; | ||
typedef signed __int32 zip_int32_t; | ||
typedef signed __int64 zip_int64_t; | ||
typedef unsigned __int8 zip_uint8_t; | ||
typedef unsigned __int16 zip_uint16_t; | ||
typedef unsigned __int32 zip_uint32_t; | ||
typedef unsigned __int64 zip_uint64_t; | ||
|
||
#define ZIP_INT8_MAX CHAR_MAX | ||
#define ZIP_INT16_MAX SHRT_MAX | ||
#define ZIP_INT32_MAX INT_MAX | ||
#define ZIP_INT64_MAX LLONG_MAX | ||
#define ZIP_UINT8_MAX UCHAR_MAX | ||
#define ZIP_UINT16_MAX USHRT_MAX | ||
#define ZIP_UINT32_MAX UINT_MAX | ||
#define ZIP_UINT64_MAX ULLONG_MAX | ||
|
||
#define strcasecmp strcmpi |