Build: Use deps DLLs on Windows

This commit is contained in:
Stenzek 2024-03-24 14:07:32 +10:00
parent 68ff16e187
commit b143d96476
No known key found for this signature in database
20 changed files with 286 additions and 447 deletions

View file

@ -9,11 +9,11 @@ if(NOT WIN32 AND NOT ANDROID)
set(CMAKE_FIND_FRAMEWORK NEVER) set(CMAKE_FIND_FRAMEWORK NEVER)
endif() endif()
find_package(Zstd REQUIRED) find_package(Zstd 1.5.5 REQUIRED)
find_package(WebP REQUIRED) find_package(WebP REQUIRED) # v1.3.2, spews an error on Linux because no pkg-config.
find_package(ZLIB REQUIRED) find_package(ZLIB 1.3 REQUIRED)
find_package(PNG REQUIRED) find_package(PNG 1.6.40 REQUIRED)
find_package(JPEG REQUIRED) find_package(JPEG REQUIRED) # No version because flatpak uses libjpeg-turbo.
find_package(CURL REQUIRED) find_package(CURL REQUIRED)
if(APPLE) if(APPLE)
set(CMAKE_FIND_FRAMEWORK ${FIND_FRAMEWORK_BACKUP}) set(CMAKE_FIND_FRAMEWORK ${FIND_FRAMEWORK_BACKUP})

View file

@ -5,12 +5,6 @@
<ProjectReference Include="..\lzma\lzma.vcxproj"> <ProjectReference Include="..\lzma\lzma.vcxproj">
<Project>{dd944834-7899-4c1c-a4c1-064b5009d239}</Project> <Project>{dd944834-7899-4c1c-a4c1-064b5009d239}</Project>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\zlib\zlib.vcxproj">
<Project>{7ff9fdb9-d504-47db-a16a-b08071999620}</Project>
</ProjectReference>
<ProjectReference Include="..\zstd\zstd.vcxproj">
<Project>{73ee0c55-6ffe-44e7-9c12-baa52434a797}</Project>
</ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="src\libchdr_bitstream.c" /> <ClCompile Include="src\libchdr_bitstream.c" />
@ -36,7 +30,7 @@
<ItemDefinitionGroup> <ItemDefinitionGroup>
<ClCompile> <ClCompile>
<WarningLevel>TurnOffAllWarnings</WarningLevel> <WarningLevel>TurnOffAllWarnings</WarningLevel>
<AdditionalIncludeDirectories>$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\lzma\include;$(SolutionDir)dep\zstd\lib;$(ProjectDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir)include;%(AdditionalIncludeDirectories);$(SolutionDir)dep\lzma\include</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<Import Project="..\msvc\vsprops\Targets.props" /> <Import Project="..\msvc\vsprops\Targets.props" />

View file

@ -16,11 +16,6 @@
<ClInclude Include="include\zip.h" /> <ClInclude Include="include\zip.h" />
<ClInclude Include="src\crypt.h" /> <ClInclude Include="src\crypt.h" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\zlib\zlib.vcxproj">
<Project>{7ff9fdb9-d504-47db-a16a-b08071999620}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{8BDA439C-6358-45FB-9994-2FF083BABE06}</ProjectGuid> <ProjectGuid>{8BDA439C-6358-45FB-9994-2FF083BABE06}</ProjectGuid>
</PropertyGroup> </PropertyGroup>

View file

@ -1,5 +1,14 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Dependencies -->
<PropertyGroup Label="UserMacros">
<DepsRootDir Condition="'$(Platform)'=='x64'">$(SolutionDir)dep\msvc\deps-x64\</DepsRootDir>
<DepsRootDir Condition="'$(Platform)'=='ARM64'">$(SolutionDir)dep\msvc\deps-arm64\</DepsRootDir>
<DepsBinDir>$(DepsRootDir)bin\</DepsBinDir>
<DepsLibDir>$(DepsRootDir)lib\</DepsLibDir>
<DepsIncludeDir>$(DepsRootDir)include\</DepsIncludeDir>
</PropertyGroup>
<PropertyGroup Condition="$(Configuration.Contains(Debug))"> <PropertyGroup Condition="$(Configuration.Contains(Debug))">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
</PropertyGroup> </PropertyGroup>
@ -19,6 +28,7 @@
<LanguageStandard>stdcpp17</LanguageStandard> <LanguageStandard>stdcpp17</LanguageStandard>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<PreprocessorDefinitions>_HAS_EXCEPTIONS=0;_CRT_INTERNAL_NONSTDC_NAMES;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_HAS_EXCEPTIONS=0;_CRT_INTERNAL_NONSTDC_NAMES;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DepsIncludeDir)</AdditionalIncludeDirectories>
<AdditionalOptions Condition="!$(Configuration.Contains(Clang))">/Zc:__cplusplus /Zo /utf-8 %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions Condition="!$(Configuration.Contains(Clang))">/Zc:__cplusplus /Zo /utf-8 %(AdditionalOptions)</AdditionalOptions>
<!-- Force ThinLTO for Release builds, MSVC doesn't seem to do it otherwise. --> <!-- Force ThinLTO for Release builds, MSVC doesn't seem to do it otherwise. -->
<AdditionalOptions Condition="$(Configuration.Contains(Clang)) And $(Configuration.Contains(ReleaseLTCG))"> -flto=thin %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions Condition="$(Configuration.Contains(Clang)) And $(Configuration.Contains(ReleaseLTCG))"> -flto=thin %(AdditionalOptions)</AdditionalOptions>
@ -26,6 +36,7 @@
</ClCompile> </ClCompile>
<Link> <Link>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories);$(DepsLibDir)</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup Label="UserMacros">
<IntDir>$(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\</IntDir> <IntDir>$(SolutionDir)build\$(ProjectName)-$(Platform)-$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)bin\$(Platform)\</OutDir> <OutDir>$(SolutionDir)bin\$(Platform)\</OutDir>
<GenerateProjectSpecificOutputFolder>false</GenerateProjectSpecificOutputFolder> <GenerateProjectSpecificOutputFolder>false</GenerateProjectSpecificOutputFolder>

View file

@ -1,40 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="UserMacros">
<SDL2BinaryOutputDir>$(SolutionDir)bin\$(Platform)\</SDL2BinaryOutputDir>
<SDL2Dir>$(SolutionDir)dep\msvc\sdl2\</SDL2Dir>
<SDL2Dir Condition="'$(Platform)'=='x64'">$(SolutionDir)dep\msvc\deps-x64\</SDL2Dir>
<SDL2Dir Condition="'$(Platform)'=='ARM64'">$(SolutionDir)dep\msvc\deps-arm64\</SDL2Dir>
<SDL2LibSuffix></SDL2LibSuffix>
<SDL2LibSuffix Condition="$(Configuration.Contains(Debug))">d</SDL2LibSuffix>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(SDL2Dir)include\SDL2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(SDL2Dir)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>SDL2$(SDL2LibSuffix).lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Lib>
<AdditionalLibraryDirectories>$(SDL2Dir)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>SDL2$(SDL2LibSuffix).lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<!--Copy the needed dlls-->
<ItemGroup>
<SDL2Dlls Include="$(SDL2Dir)bin\SDL2$(SDL2LibSuffix).dll" />
</ItemGroup>
<Target Name="SDL2CopyBinaries"
AfterTargets="Build"
Inputs="@(SDL2Dlls)"
Outputs="@(SDL2Dlls -> '$(SDL2BinaryOutputDir)%(RecursiveDir)%(Filename)%(Extension)')">
<Message Text="Copying SDL2 .dlls" Importance="High" />
<Copy
SourceFiles="@(SDL2Dlls)"
DestinationFolder="$(SDL2BinaryOutputDir)"
SkipUnchangedFiles="true"
/>
</Target>
</Project>

View file

@ -21,11 +21,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cubeb", "dep\cubeb\cubeb.vc
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "dep\minizip\minizip.vcxproj", "{8BDA439C-6358-45FB-9994-2FF083BABE06}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "dep\minizip\minizip.vcxproj", "{8BDA439C-6358-45FB-9994-2FF083BABE06}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "dep\zlib\zlib.vcxproj", "{7FF9FDB9-D504-47DB-A16A-B08071999620}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchdr", "dep\libchdr\libchdr.vcxproj", "{425D6C99-D1C8-43C2-B8AC-4D7B1D941017}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchdr", "dep\libchdr\libchdr.vcxproj", "{425D6C99-D1C8-43C2-B8AC-4D7B1D941017}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{7FF9FDB9-D504-47DB-A16A-B08071999620} = {7FF9FDB9-D504-47DB-A16A-B08071999620}
{DD944834-7899-4C1C-A4C1-064B5009D239} = {DD944834-7899-4C1C-A4C1-064B5009D239} {DD944834-7899-4C1C-A4C1-064B5009D239} = {DD944834-7899-4C1C-A4C1-064B5009D239}
EndProjectSection EndProjectSection
EndProject EndProject
@ -61,8 +58,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util", "src\util\util.vcxpr
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soundtouch", "dep\soundtouch\soundtouch.vcxproj", "{751D9F62-881C-454E-BCE8-CB9CF5F1D22F}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soundtouch", "dep\soundtouch\soundtouch.vcxproj", "{751D9F62-881C-454E-BCE8-CB9CF5F1D22F}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zstd", "dep\zstd\zstd.vcxproj", "{73EE0C55-6FFE-44E7-9C12-BAA52434A797}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpuinfo", "dep\cpuinfo\cpuinfo.vcxproj", "{EE55AA65-EA6B-4861-810B-78354B53A807}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpuinfo", "dep\cpuinfo\cpuinfo.vcxproj", "{EE55AA65-EA6B-4861-810B-78354B53A807}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zydis", "dep\zydis\zydis.vcxproj", "{C51A346A-86B2-46DF-9BB3-D0AA7E5D8699}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zydis", "dep\zydis\zydis.vcxproj", "{C51A346A-86B2-46DF-9BB3-D0AA7E5D8699}"
@ -73,10 +68,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reshadefx", "dep\reshadefx\
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rapidyaml", "dep\rapidyaml\rapidyaml.vcxproj", "{1AD23A8A-4C20-434C-AE6B-0E07759EEB1E}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rapidyaml", "dep\rapidyaml\rapidyaml.vcxproj", "{1AD23A8A-4C20-434C-AE6B-0E07759EEB1E}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "dep\libpng\libpng.vcxproj", "{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "dep\libjpeg\libjpeg.vcxproj", "{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64 Debug|ARM64 = Debug|ARM64
@ -349,38 +340,6 @@ Global
{8BDA439C-6358-45FB-9994-2FF083BABE06}.ReleaseLTCG-Clang|ARM64.Build.0 = ReleaseLTCG-Clang|ARM64 {8BDA439C-6358-45FB-9994-2FF083BABE06}.ReleaseLTCG-Clang|ARM64.Build.0 = ReleaseLTCG-Clang|ARM64
{8BDA439C-6358-45FB-9994-2FF083BABE06}.ReleaseLTCG-Clang|x64.ActiveCfg = ReleaseLTCG-Clang|x64 {8BDA439C-6358-45FB-9994-2FF083BABE06}.ReleaseLTCG-Clang|x64.ActiveCfg = ReleaseLTCG-Clang|x64
{8BDA439C-6358-45FB-9994-2FF083BABE06}.ReleaseLTCG-Clang|x64.Build.0 = ReleaseLTCG-Clang|x64 {8BDA439C-6358-45FB-9994-2FF083BABE06}.ReleaseLTCG-Clang|x64.Build.0 = ReleaseLTCG-Clang|x64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.Debug|ARM64.ActiveCfg = Debug|ARM64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.Debug|ARM64.Build.0 = Debug|ARM64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.Debug|x64.ActiveCfg = Debug|x64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.Debug|x64.Build.0 = Debug|x64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.Debug-Clang|ARM64.ActiveCfg = Debug-Clang|ARM64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.Debug-Clang|ARM64.Build.0 = Debug-Clang|ARM64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.Debug-Clang|x64.ActiveCfg = Debug-Clang|x64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.Debug-Clang|x64.Build.0 = Debug-Clang|x64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.DebugFast|ARM64.ActiveCfg = DebugFast|ARM64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.DebugFast|ARM64.Build.0 = DebugFast|ARM64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.DebugFast|x64.ActiveCfg = DebugFast|x64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.DebugFast|x64.Build.0 = DebugFast|x64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.DebugFast-Clang|ARM64.ActiveCfg = DebugFast-Clang|ARM64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.DebugFast-Clang|ARM64.Build.0 = DebugFast-Clang|ARM64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.DebugFast-Clang|x64.ActiveCfg = DebugFast-Clang|x64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.DebugFast-Clang|x64.Build.0 = DebugFast-Clang|x64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.Release|ARM64.ActiveCfg = Release|ARM64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.Release|ARM64.Build.0 = Release|ARM64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.Release|x64.ActiveCfg = Release|x64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.Release|x64.Build.0 = Release|x64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.Release-Clang|ARM64.ActiveCfg = Release-Clang|ARM64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.Release-Clang|ARM64.Build.0 = Release-Clang|ARM64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.Release-Clang|x64.ActiveCfg = Release-Clang|x64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.Release-Clang|x64.Build.0 = Release-Clang|x64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.ReleaseLTCG|ARM64.ActiveCfg = ReleaseLTCG|ARM64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.ReleaseLTCG|ARM64.Build.0 = ReleaseLTCG|ARM64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.ReleaseLTCG|x64.ActiveCfg = ReleaseLTCG|x64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.ReleaseLTCG|x64.Build.0 = ReleaseLTCG|x64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.ReleaseLTCG-Clang|ARM64.ActiveCfg = ReleaseLTCG-Clang|ARM64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.ReleaseLTCG-Clang|ARM64.Build.0 = ReleaseLTCG-Clang|ARM64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.ReleaseLTCG-Clang|x64.ActiveCfg = ReleaseLTCG-Clang|x64
{7FF9FDB9-D504-47DB-A16A-B08071999620}.ReleaseLTCG-Clang|x64.Build.0 = ReleaseLTCG-Clang|x64
{425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.Debug|ARM64.ActiveCfg = Debug|ARM64 {425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.Debug|ARM64.ActiveCfg = Debug|ARM64
{425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.Debug|ARM64.Build.0 = Debug|ARM64 {425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.Debug|ARM64.Build.0 = Debug|ARM64
{425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.Debug|x64.ActiveCfg = Debug|x64 {425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.Debug|x64.ActiveCfg = Debug|x64
@ -855,38 +814,6 @@ Global
{751D9F62-881C-454E-BCE8-CB9CF5F1D22F}.ReleaseLTCG-Clang|ARM64.Build.0 = ReleaseLTCG-Clang|ARM64 {751D9F62-881C-454E-BCE8-CB9CF5F1D22F}.ReleaseLTCG-Clang|ARM64.Build.0 = ReleaseLTCG-Clang|ARM64
{751D9F62-881C-454E-BCE8-CB9CF5F1D22F}.ReleaseLTCG-Clang|x64.ActiveCfg = ReleaseLTCG-Clang|x64 {751D9F62-881C-454E-BCE8-CB9CF5F1D22F}.ReleaseLTCG-Clang|x64.ActiveCfg = ReleaseLTCG-Clang|x64
{751D9F62-881C-454E-BCE8-CB9CF5F1D22F}.ReleaseLTCG-Clang|x64.Build.0 = ReleaseLTCG-Clang|x64 {751D9F62-881C-454E-BCE8-CB9CF5F1D22F}.ReleaseLTCG-Clang|x64.Build.0 = ReleaseLTCG-Clang|x64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.Debug|ARM64.ActiveCfg = Debug|ARM64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.Debug|ARM64.Build.0 = Debug|ARM64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.Debug|x64.ActiveCfg = Debug|x64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.Debug|x64.Build.0 = Debug|x64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.Debug-Clang|ARM64.ActiveCfg = Debug-Clang|ARM64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.Debug-Clang|ARM64.Build.0 = Debug-Clang|ARM64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.Debug-Clang|x64.ActiveCfg = Debug-Clang|x64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.Debug-Clang|x64.Build.0 = Debug-Clang|x64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.DebugFast|ARM64.ActiveCfg = DebugFast|ARM64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.DebugFast|ARM64.Build.0 = DebugFast|ARM64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.DebugFast|x64.ActiveCfg = DebugFast|x64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.DebugFast|x64.Build.0 = DebugFast|x64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.DebugFast-Clang|ARM64.ActiveCfg = DebugFast-Clang|ARM64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.DebugFast-Clang|ARM64.Build.0 = DebugFast-Clang|ARM64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.DebugFast-Clang|x64.ActiveCfg = DebugFast-Clang|x64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.DebugFast-Clang|x64.Build.0 = DebugFast-Clang|x64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.Release|ARM64.ActiveCfg = Release|ARM64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.Release|ARM64.Build.0 = Release|ARM64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.Release|x64.ActiveCfg = Release|x64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.Release|x64.Build.0 = Release|x64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.Release-Clang|ARM64.ActiveCfg = Release-Clang|ARM64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.Release-Clang|ARM64.Build.0 = Release-Clang|ARM64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.Release-Clang|x64.ActiveCfg = Release-Clang|x64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.Release-Clang|x64.Build.0 = Release-Clang|x64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.ReleaseLTCG|ARM64.ActiveCfg = ReleaseLTCG|ARM64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.ReleaseLTCG|ARM64.Build.0 = ReleaseLTCG|ARM64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.ReleaseLTCG|x64.ActiveCfg = ReleaseLTCG|x64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.ReleaseLTCG|x64.Build.0 = ReleaseLTCG|x64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.ReleaseLTCG-Clang|ARM64.ActiveCfg = ReleaseLTCG-Clang|ARM64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.ReleaseLTCG-Clang|ARM64.Build.0 = ReleaseLTCG-Clang|ARM64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.ReleaseLTCG-Clang|x64.ActiveCfg = ReleaseLTCG-Clang|x64
{73EE0C55-6FFE-44E7-9C12-BAA52434A797}.ReleaseLTCG-Clang|x64.Build.0 = ReleaseLTCG-Clang|x64
{EE55AA65-EA6B-4861-810B-78354B53A807}.Debug|ARM64.ActiveCfg = Debug|ARM64 {EE55AA65-EA6B-4861-810B-78354B53A807}.Debug|ARM64.ActiveCfg = Debug|ARM64
{EE55AA65-EA6B-4861-810B-78354B53A807}.Debug|ARM64.Build.0 = Debug|ARM64 {EE55AA65-EA6B-4861-810B-78354B53A807}.Debug|ARM64.Build.0 = Debug|ARM64
{EE55AA65-EA6B-4861-810B-78354B53A807}.Debug|x64.ActiveCfg = Debug|x64 {EE55AA65-EA6B-4861-810B-78354B53A807}.Debug|x64.ActiveCfg = Debug|x64
@ -1035,70 +962,6 @@ Global
{1AD23A8A-4C20-434C-AE6B-0E07759EEB1E}.ReleaseLTCG-Clang|ARM64.Build.0 = ReleaseLTCG-Clang|ARM64 {1AD23A8A-4C20-434C-AE6B-0E07759EEB1E}.ReleaseLTCG-Clang|ARM64.Build.0 = ReleaseLTCG-Clang|ARM64
{1AD23A8A-4C20-434C-AE6B-0E07759EEB1E}.ReleaseLTCG-Clang|x64.ActiveCfg = ReleaseLTCG-Clang|x64 {1AD23A8A-4C20-434C-AE6B-0E07759EEB1E}.ReleaseLTCG-Clang|x64.ActiveCfg = ReleaseLTCG-Clang|x64
{1AD23A8A-4C20-434C-AE6B-0E07759EEB1E}.ReleaseLTCG-Clang|x64.Build.0 = ReleaseLTCG-Clang|x64 {1AD23A8A-4C20-434C-AE6B-0E07759EEB1E}.ReleaseLTCG-Clang|x64.Build.0 = ReleaseLTCG-Clang|x64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.Debug|ARM64.ActiveCfg = Debug|ARM64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.Debug|ARM64.Build.0 = Debug|ARM64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.Debug|x64.ActiveCfg = Debug|x64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.Debug|x64.Build.0 = Debug|x64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.Debug-Clang|ARM64.ActiveCfg = Debug-Clang|ARM64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.Debug-Clang|ARM64.Build.0 = Debug-Clang|ARM64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.Debug-Clang|x64.ActiveCfg = Debug-Clang|x64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.Debug-Clang|x64.Build.0 = Debug-Clang|x64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.DebugFast|ARM64.ActiveCfg = DebugFast|ARM64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.DebugFast|ARM64.Build.0 = DebugFast|ARM64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.DebugFast|x64.ActiveCfg = DebugFast|x64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.DebugFast|x64.Build.0 = DebugFast|x64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.DebugFast-Clang|ARM64.ActiveCfg = DebugFast-Clang|ARM64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.DebugFast-Clang|ARM64.Build.0 = DebugFast-Clang|ARM64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.DebugFast-Clang|x64.ActiveCfg = DebugFast-Clang|x64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.DebugFast-Clang|x64.Build.0 = DebugFast-Clang|x64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.Release|ARM64.ActiveCfg = Release|ARM64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.Release|ARM64.Build.0 = Release|ARM64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.Release|x64.ActiveCfg = Release|x64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.Release|x64.Build.0 = Release|x64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.Release-Clang|ARM64.ActiveCfg = Release-Clang|ARM64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.Release-Clang|ARM64.Build.0 = Release-Clang|ARM64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.Release-Clang|x64.ActiveCfg = Release-Clang|x64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.Release-Clang|x64.Build.0 = Release-Clang|x64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.ReleaseLTCG|ARM64.ActiveCfg = ReleaseLTCG|ARM64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.ReleaseLTCG|ARM64.Build.0 = ReleaseLTCG|ARM64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.ReleaseLTCG|x64.ActiveCfg = ReleaseLTCG|x64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.ReleaseLTCG|x64.Build.0 = ReleaseLTCG|x64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.ReleaseLTCG-Clang|ARM64.ActiveCfg = ReleaseLTCG-Clang|ARM64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.ReleaseLTCG-Clang|ARM64.Build.0 = ReleaseLTCG-Clang|ARM64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.ReleaseLTCG-Clang|x64.ActiveCfg = ReleaseLTCG-Clang|x64
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5}.ReleaseLTCG-Clang|x64.Build.0 = ReleaseLTCG-Clang|x64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.Debug|ARM64.ActiveCfg = Debug|ARM64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.Debug|ARM64.Build.0 = Debug|ARM64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.Debug|x64.ActiveCfg = Debug|x64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.Debug|x64.Build.0 = Debug|x64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.Debug-Clang|ARM64.ActiveCfg = Debug-Clang|ARM64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.Debug-Clang|ARM64.Build.0 = Debug-Clang|ARM64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.Debug-Clang|x64.ActiveCfg = Debug-Clang|x64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.Debug-Clang|x64.Build.0 = Debug-Clang|x64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.DebugFast|ARM64.ActiveCfg = DebugFast|ARM64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.DebugFast|ARM64.Build.0 = DebugFast|ARM64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.DebugFast|x64.ActiveCfg = DebugFast|x64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.DebugFast|x64.Build.0 = DebugFast|x64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.DebugFast-Clang|ARM64.ActiveCfg = DebugFast-Clang|ARM64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.DebugFast-Clang|ARM64.Build.0 = DebugFast-Clang|ARM64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.DebugFast-Clang|x64.ActiveCfg = DebugFast-Clang|x64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.DebugFast-Clang|x64.Build.0 = DebugFast-Clang|x64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.Release|ARM64.ActiveCfg = Release|ARM64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.Release|ARM64.Build.0 = Release|ARM64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.Release|x64.ActiveCfg = Release|x64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.Release|x64.Build.0 = Release|x64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.Release-Clang|ARM64.ActiveCfg = Release-Clang|ARM64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.Release-Clang|ARM64.Build.0 = Release-Clang|ARM64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.Release-Clang|x64.ActiveCfg = Release-Clang|x64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.Release-Clang|x64.Build.0 = Release-Clang|x64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.ReleaseLTCG|ARM64.ActiveCfg = ReleaseLTCG|ARM64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.ReleaseLTCG|ARM64.Build.0 = ReleaseLTCG|ARM64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.ReleaseLTCG|x64.ActiveCfg = ReleaseLTCG|x64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.ReleaseLTCG|x64.Build.0 = ReleaseLTCG|x64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.ReleaseLTCG-Clang|ARM64.ActiveCfg = ReleaseLTCG-Clang|ARM64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.ReleaseLTCG-Clang|ARM64.Build.0 = ReleaseLTCG-Clang|ARM64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.ReleaseLTCG-Clang|x64.ActiveCfg = ReleaseLTCG-Clang|x64
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2}.ReleaseLTCG-Clang|x64.Build.0 = ReleaseLTCG-Clang|x64
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -1109,7 +972,6 @@ Global
{3773F4CC-614E-4028-8595-22E08CA649E3} = {BA490C0E-497D-4634-A21E-E65012006385} {3773F4CC-614E-4028-8595-22E08CA649E3} = {BA490C0E-497D-4634-A21E-E65012006385}
{72F9423C-91EE-4487-AAC6-555ED6F61AA1} = {BA490C0E-497D-4634-A21E-E65012006385} {72F9423C-91EE-4487-AAC6-555ED6F61AA1} = {BA490C0E-497D-4634-A21E-E65012006385}
{8BDA439C-6358-45FB-9994-2FF083BABE06} = {BA490C0E-497D-4634-A21E-E65012006385} {8BDA439C-6358-45FB-9994-2FF083BABE06} = {BA490C0E-497D-4634-A21E-E65012006385}
{7FF9FDB9-D504-47DB-A16A-B08071999620} = {BA490C0E-497D-4634-A21E-E65012006385}
{425D6C99-D1C8-43C2-B8AC-4D7B1D941017} = {BA490C0E-497D-4634-A21E-E65012006385} {425D6C99-D1C8-43C2-B8AC-4D7B1D941017} = {BA490C0E-497D-4634-A21E-E65012006385}
{DD944834-7899-4C1C-A4C1-064B5009D239} = {BA490C0E-497D-4634-A21E-E65012006385} {DD944834-7899-4C1C-A4C1-064B5009D239} = {BA490C0E-497D-4634-A21E-E65012006385}
{09553C96-9F39-49BF-8AE6-7ACBD07C410C} = {BA490C0E-497D-4634-A21E-E65012006385} {09553C96-9F39-49BF-8AE6-7ACBD07C410C} = {BA490C0E-497D-4634-A21E-E65012006385}
@ -1121,14 +983,11 @@ Global
{E4357877-D459-45C7-B8F6-DCBB587BB528} = {BA490C0E-497D-4634-A21E-E65012006385} {E4357877-D459-45C7-B8F6-DCBB587BB528} = {BA490C0E-497D-4634-A21E-E65012006385}
{8BE398E6-B882-4248-9065-FECC8728E038} = {BA490C0E-497D-4634-A21E-E65012006385} {8BE398E6-B882-4248-9065-FECC8728E038} = {BA490C0E-497D-4634-A21E-E65012006385}
{751D9F62-881C-454E-BCE8-CB9CF5F1D22F} = {BA490C0E-497D-4634-A21E-E65012006385} {751D9F62-881C-454E-BCE8-CB9CF5F1D22F} = {BA490C0E-497D-4634-A21E-E65012006385}
{73EE0C55-6FFE-44E7-9C12-BAA52434A797} = {BA490C0E-497D-4634-A21E-E65012006385}
{EE55AA65-EA6B-4861-810B-78354B53A807} = {BA490C0E-497D-4634-A21E-E65012006385} {EE55AA65-EA6B-4861-810B-78354B53A807} = {BA490C0E-497D-4634-A21E-E65012006385}
{C51A346A-86B2-46DF-9BB3-D0AA7E5D8699} = {BA490C0E-497D-4634-A21E-E65012006385} {C51A346A-86B2-46DF-9BB3-D0AA7E5D8699} = {BA490C0E-497D-4634-A21E-E65012006385}
{F351C4D8-594A-4850-B77B-3C1249812CCE} = {BA490C0E-497D-4634-A21E-E65012006385} {F351C4D8-594A-4850-B77B-3C1249812CCE} = {BA490C0E-497D-4634-A21E-E65012006385}
{27B8D4BB-4F01-4432-BC14-9BF6CA458EEE} = {BA490C0E-497D-4634-A21E-E65012006385} {27B8D4BB-4F01-4432-BC14-9BF6CA458EEE} = {BA490C0E-497D-4634-A21E-E65012006385}
{1AD23A8A-4C20-434C-AE6B-0E07759EEB1E} = {BA490C0E-497D-4634-A21E-E65012006385} {1AD23A8A-4C20-434C-AE6B-0E07759EEB1E} = {BA490C0E-497D-4634-A21E-E65012006385}
{9FD2ABCD-2DCD-4302-BE5C-DF0BA8431FA5} = {BA490C0E-497D-4634-A21E-E65012006385}
{EC3B6685-0B6E-4767-84AB-39B75EEAD2E2} = {BA490C0E-497D-4634-A21E-E65012006385}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {26E40B32-7C1D-48D0-95F4-1A500E054028} SolutionGuid = {26E40B32-7C1D-48D0-95F4-1A500E054028}

View file

@ -26,31 +26,47 @@ if [ "$#" -ne 1 ]; then
fi fi
export MACOSX_DEPLOYMENT_TARGET=11.0 export MACOSX_DEPLOYMENT_TARGET=11.0
INSTALLDIR="$1" INSTALLDIR="$1"
NPROCS="$(getconf _NPROCESSORS_ONLN)" NPROCS="$(getconf _NPROCESSORS_ONLN)"
SDL=SDL2-2.30.1 SDL=SDL2-2.30.1
QT=6.6.2 ZLIB=1.3.1
MOLTENVK=1.2.6
ZSTD=1.5.5 ZSTD=1.5.5
PNG=1.6.43 LIBPNG=1.6.43
JPEG=9f LIBJPEG=9f
WEBP=1.3.2 LIBWEBP=1.3.2
MOLTENVK=1.2.8
QT=6.6.2
if [ "${INSTALLDIR:0:1}" != "/" ]; then
INSTALLDIR="$PWD/$INSTALLDIR"
fi
mkdir -p deps-build mkdir -p deps-build
cd deps-build cd deps-build
export PKG_CONFIG_PATH="$INSTALLDIR/lib/pkgconfig:$PKG_CONFIG_PATH" export PKG_CONFIG_PATH="$INSTALLDIR/lib/pkgconfig:$PKG_CONFIG_PATH"
export LDFLAGS="-L$INSTALLDIR/lib -dead_strip $LDFLAGS" export LDFLAGS="-L$INSTALLDIR/lib $LDFLAGS"
export CFLAGS="-I$INSTALLDIR/include -Os $CFLAGS" export CFLAGS="-I$INSTALLDIR/include $CFLAGS"
export CXXFLAGS="-I$INSTALLDIR/include -Os $CXXFLAGS" export CXXFLAGS="-I$INSTALLDIR/include $CXXFLAGS"
CMAKE_COMMON=(
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_PREFIX_PATH="$INSTALLDIR"
-DCMAKE_INSTALL_PREFIX="$INSTALLDIR"
-DCMAKE_INSTALL_NAME_DIR='$<INSTALL_PREFIX>/lib'
)
CMAKE_ARCH_X64=-DCMAKE_OSX_ARCHITECTURES="x86_64"
CMAKE_ARCH_ARM64=-DCMAKE_OSX_ARCHITECTURES="arm64"
CMAKE_ARCH_UNIVERSAL=-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
cat > SHASUMS <<EOF cat > SHASUMS <<EOF
01215ffbc8cfc4ad165ba7573750f15ddda1f971d5a66e9dcaffd37c587f473a $SDL.tar.gz 01215ffbc8cfc4ad165ba7573750f15ddda1f971d5a66e9dcaffd37c587f473a $SDL.tar.gz
b6a3d179aa9c41275ed0e35e502e5e3fd347dbe5117a0435a26868b231cd6246 v$MOLTENVK.tar.gz 9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23 zlib-$ZLIB.tar.gz
9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4 zstd-$ZSTD.tar.gz 9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4 zstd-$ZSTD.tar.gz
6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c libpng-$PNG.tar.xz 6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c libpng-$LIBPNG.tar.xz
04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b jpegsrc.v$JPEG.tar.gz 2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4 libwebp-$LIBWEBP.tar.gz
2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4 libwebp-$WEBP.tar.gz 04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b jpegsrc.v$LIBJPEG.tar.gz
85beaf8abfcc54d9da0ff0257ae311abd9e7aa96e53da37e1c37d6bc04ac83cd v$MOLTENVK.tar.gz
b89b426b9852a17d3e96230ab0871346574d635c7914480a2a27f98ff942677b qtbase-everywhere-src-$QT.tar.xz b89b426b9852a17d3e96230ab0871346574d635c7914480a2a27f98ff942677b qtbase-everywhere-src-$QT.tar.xz
71584c9136d4983ad19fa2d017abbae57b055eb90c62a36bf3f45d6d21a87cb3 qtimageformats-everywhere-src-$QT.tar.xz 71584c9136d4983ad19fa2d017abbae57b055eb90c62a36bf3f45d6d21a87cb3 qtimageformats-everywhere-src-$QT.tar.xz
5a231d59ef1b42bfbaa5174d4ff39f8e1b4ba070ef984a70b069b4b2576d8181 qtsvg-everywhere-src-$QT.tar.xz 5a231d59ef1b42bfbaa5174d4ff39f8e1b4ba070ef984a70b069b4b2576d8181 qtsvg-everywhere-src-$QT.tar.xz
@ -59,43 +75,111 @@ ca3ac090ef3aa12566c26b482c106f1f986c5a3444e7003f379726a550530c77 qttranslations
EOF EOF
curl -L \ curl -L \
-O "https://libsdl.org/release/$SDL.tar.gz" \ -O "https://libsdl.org/release/$SDL.tar.gz" \
-O "https://github.com/KhronosGroup/MoltenVK/archive/refs/tags/v$MOLTENVK.tar.gz" \ -O "http://zlib.net/zlib-$ZLIB.tar.gz" \
-O "https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz" \ -O "https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz" \
-O "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$WEBP.tar.gz" \ -O "https://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG/libpng-$LIBPNG.tar.xz" \
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$PNG/libpng-$PNG.tar.xz" \ -O "https://ijg.org/files/jpegsrc.v$LIBJPEG.tar.gz" \
-O "https://ijg.org/files/jpegsrc.v$JPEG.tar.gz" \ -O "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP.tar.gz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \ -O "https://github.com/KhronosGroup/MoltenVK/archive/refs/tags/v$MOLTENVK.tar.gz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \ -O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \ -O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \ -O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" -O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz"
shasum -a 256 --check SHASUMS shasum -a 256 --check SHASUMS
echo "Installing SDL..." echo "Installing SDL..."
rm -fr "$SDL"
tar xf "$SDL.tar.gz" tar xf "$SDL.tar.gz"
cd "$SDL" cd "$SDL"
cmake -B build "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DSDL_X11=OFF -DBUILD_SHARED_LIBS=ON
# SDL seems fine with dual architectures.
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DSDL_X11=OFF -DBUILD_SHARED_LIBS=ON
make -C build "-j$NPROCS" make -C build "-j$NPROCS"
make -C build install make -C build install
cd .. cd ..
echo "Installing Zlib..."
rm -fr "zlib-$ZLIB"
tar xf "zlib-$ZLIB.tar.gz"
cd "zlib-$ZLIB"
cmake -B build "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DBUILD_SHARED_LIBS=ON -DZLIB_BUILD_EXAMPLES=OFF
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Zstd..."
rm -fr "zstd-$ZSTD"
tar xf "zstd-$ZSTD.tar.gz"
cd "zstd-$ZSTD"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_X64" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_PROGRAMS=OFF -B build-dir build/cmake
make -C build-dir "-j$NPROCS"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_ARM64" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_PROGRAMS=OFF -B build-dir-arm64 build/cmake
make -C build-dir-arm64 "-j$NPROCS"
merge_binaries $(realpath build-dir) $(realpath build-dir-arm64)
make -C build-dir install
cd ..
echo "Installing libpng..."
rm -fr "libpng-$LIBPNG"
tar xf "libpng-$LIBPNG.tar.xz"
cd "libpng-$LIBPNG"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_X64" -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -B build
make -C build "-j$NPROCS"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_ARM64" -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_ARM_NEON=on -B build-arm64
make -C build-arm64 "-j$NPROCS"
merge_binaries $(realpath build) $(realpath build-arm64)
make -C build install
cd ..
echo "Building libjpeg..."
rm -fr "jpeg-$LIBJPEG"
tar xf "jpegsrc.v$LIBJPEG.tar.gz"
cd "jpeg-$LIBJPEG"
mkdir build
cd build
../configure --prefix="$INSTALLDIR" --disable-static --enable-shared --host="x86_64-apple-darwin" CFLAGS="-arch x86_64"
make "-j$NPROCS"
cd ..
mkdir build-arm64
cd build-arm64
../configure --prefix="$INSTALLDIR" --disable-static --enable-shared --host="aarch64-apple-darwin" CFLAGS="-arch arm64"
make "-j$NPROCS"
cd ..
merge_binaries $(realpath build) $(realpath build-arm64)
make -C build install
cd ..
echo "Installing WebP..."
rm -fr "libwebp-$LIBWEBP"
tar xf "libwebp-$LIBWEBP.tar.gz"
cd "libwebp-$LIBWEBP"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_X64" -B build \
-DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF \
-DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON
make -C build "-j$NPROCS"
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_ARM64" -B build-arm64 \
-DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF \
-DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON
make -C build-arm64 "-j$NPROCS"
merge_binaries $(realpath build) $(realpath build-arm64)
make -C build install
cd ..
# MoltenVK already builds universal binaries, nothing special to do here. # MoltenVK already builds universal binaries, nothing special to do here.
echo "Installing MoltenVK..." echo "Installing MoltenVK..."
rm -fr "MoltenVK-${MOLTENVK}"
tar xf "v$MOLTENVK.tar.gz" tar xf "v$MOLTENVK.tar.gz"
cd "MoltenVK-${MOLTENVK}" cd "MoltenVK-${MOLTENVK}"
./fetchDependencies --macos ./fetchDependencies --macos
make macos make macos
cp Package/Latest/MoltenVK/dylib/macOS/libMoltenVK.dylib "$INSTALLDIR/lib/" cp Package/Latest/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib "$INSTALLDIR/lib/"
cd .. cd ..
echo "Installing Qt Base..." echo "Installing Qt Base..."
rm -fr "qtbase-everywhere-src-$QT"
tar xf "qtbase-everywhere-src-$QT.tar.xz" tar xf "qtbase-everywhere-src-$QT.tar.xz"
cd "qtbase-everywhere-src-$QT" cd "qtbase-everywhere-src-$QT"
# since we don't have a direct reference to QtSvg, it doesn't deployed directly from the main binary # since we don't have a direct reference to QtSvg, it doesn't deployed directly from the main binary
# (only indirectly from iconengines), and the libqsvg.dylib imageformat plugin does not get deployed. # (only indirectly from iconengines), and the libqsvg.dylib imageformat plugin does not get deployed.
# We could run macdeployqt twice, but that's even more janky than patching it. # We could run macdeployqt twice, but that's even more janky than patching it.
@ -120,25 +204,35 @@ patch -u src/tools/macdeployqt/shared/shared.cpp <<EOF
// Platforminputcontext plugins if QtGui is in use // Platforminputcontext plugins if QtGui is in use
EOF EOF
cmake -B build "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_gssapi=OFF -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON
mkdir build make -C build "-j$NPROCS"
cd build make -C build install
cmake -G Ninja -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_optimize_size=ON -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_gssapi=OFF .. cd ..
cmake --build . --parallel
ninja install
cd ../../
echo "Installing Qt SVG..." echo "Installing Qt SVG..."
rm -fr "qtsvg-everywhere-src-$QT"
tar xf "qtsvg-everywhere-src-$QT.tar.xz" tar xf "qtsvg-everywhere-src-$QT.tar.xz"
cd "qtsvg-everywhere-src-$QT" cd "qtsvg-everywhere-src-$QT"
mkdir build mkdir build
cd build cd build
"$INSTALLDIR/bin/qt-configure-module" .. "$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL"
cmake --build . --parallel make "-j$NPROCS"
ninja install make install
cd ../../ cd ../..
echo "Installing Qt Image Formats..."
rm -fr "qtimageformats-everywhere-src-$QT"
tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
cd "qtimageformats-everywhere-src-$QT"
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DFEATURE_system_webp=ON
make "-j$NPROCS"
make install
cd ../..
echo "Installing Qt Tools..." echo "Installing Qt Tools..."
rm -fr "qttools-everywhere-src-$QT"
tar xf "qttools-everywhere-src-$QT.tar.xz" tar xf "qttools-everywhere-src-$QT.tar.xz"
cd "qttools-everywhere-src-$QT" cd "qttools-everywhere-src-$QT"
# Linguist relies on a library in the Designer target, which takes 5-7 minutes to build on the CI # Linguist relies on a library in the Designer target, which takes 5-7 minutes to build on the CI
@ -157,88 +251,22 @@ patch -u src/linguist/CMakeLists.txt <<EOF
EOF EOF
mkdir build mkdir build
cd build cd build
"$INSTALLDIR/bin/qt-configure-module" .. -- -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF .. "$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
cmake --build . --parallel make "-j$NPROCS"
ninja install make install
cd ../../ cd ../..
echo "Installing Qt Image Formats..."
tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
cd "qtimageformats-everywhere-src-$QT"
mkdir build
cd build
"$INSTALLDIR/bin/qt-configure-module" ..
cmake --build . --parallel
ninja install
cd ../../
echo "Installing Qt Translations..." echo "Installing Qt Translations..."
rm -fr "qttranslations-everywhere-src-$QT"
tar xf "qttranslations-everywhere-src-$QT.tar.xz" tar xf "qttranslations-everywhere-src-$QT.tar.xz"
cd "qttranslations-everywhere-src-$QT" cd "qttranslations-everywhere-src-$QT"
mkdir build mkdir build
cd build cd build
"$INSTALLDIR/bin/qt-configure-module" .. "$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL"
cmake --build . --parallel
ninja install
cd ../../
# Bit lame, but a custom install path breaks Qt's rcc :/
echo "Installing Zstd..."
tar xf "zstd-$ZSTD.tar.gz"
cd "zstd-$ZSTD"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_PROGRAMS=OFF -B build-dir build/cmake
make -C build-dir "-j$NPROCS"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_OSX_ARCHITECTURES="arm64" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_PROGRAMS=OFF -B build-dir-arm64 build/cmake
make -C build-dir-arm64 "-j$NPROCS"
merge_binaries $(realpath build-dir) $(realpath build-dir-arm64)
make -C build-dir install
cd ..
echo "Installing libpng..."
rm -fr "libpng-$PNG"
tar xf "libpng-$PNG.tar.xz"
cd "libpng-$PNG"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_STATIC=OFF -DPNG_SHARED=ON -DPNG_TOOLS=OFF -B build
make -C build "-j$NPROCS"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_OSX_ARCHITECTURES="arm64" -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_STATIC=OFF -DPNG_SHARED=ON -DPNG_TOOLS=OFF -DPNG_ARM_NEON=on -B build-arm64
make -C build-arm64 "-j$NPROCS"
merge_binaries $(realpath build) $(realpath build-arm64)
make -C build install
cd ..
echo "Installing libjpeg..."
rm -fr "jpeg-$JPEG"
tar xf "jpegsrc.v$JPEG.tar.gz"
cd "jpeg-$JPEG"
mkdir build
cd build
../configure --prefix="$INSTALLDIR" --disable-static --enable-shared --host="x86_64-apple-darwin" CFLAGS="-arch x86_64"
make "-j$NPROCS" make "-j$NPROCS"
cd .. make install
mkdir build-arm64 cd ../..
cd build-arm64
../configure --prefix="$INSTALLDIR" --disable-static --enable-shared --host="aarch64-apple-darwin" CFLAGS="-arch arm64"
make "-j$NPROCS"
cd ..
merge_binaries $(realpath build) $(realpath build-arm64)
make -C build install
cd ..
echo "Installing WebP..."
tar xf "libwebp-$WEBP.tar.gz"
cd "libwebp-$WEBP"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_OSX_ARCHITECTURES="x86_64" -B build \
-DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF \
-DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON
make -C build "-j$NPROCS"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_OSX_ARCHITECTURES="arm64" -B build-arm64 \
-DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF \
-DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON
make -C build-arm64 "-j$NPROCS"
merge_binaries $(realpath build) $(realpath build-arm64)
make -C build install
cd ..
echo "Cleaning up..." echo "Cleaning up..."
cd .. cd ..
rm -fr deps-build rm -rf deps-build

View file

@ -33,7 +33,6 @@ add_library(common
md5_digest.h md5_digest.h
memory_settings_interface.cpp memory_settings_interface.cpp
memory_settings_interface.h memory_settings_interface.h
minizip_helpers.cpp
minizip_helpers.h minizip_helpers.h
path.h path.h
perf_scope.cpp perf_scope.cpp
@ -61,7 +60,7 @@ add_library(common
target_include_directories(common PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..") target_include_directories(common PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_include_directories(common PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..") target_include_directories(common PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_link_libraries(common PUBLIC fmt Threads::Threads fast_float) target_link_libraries(common PUBLIC fmt Threads::Threads fast_float)
target_link_libraries(common PRIVATE ZLIB::ZLIB minizip "${CMAKE_DL_LIBS}") target_link_libraries(common PRIVATE "${CMAKE_DL_LIBS}")
if(WIN32) if(WIN32)
target_sources(common PRIVATE target_sources(common PRIVATE

View file

@ -2,7 +2,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup> <ItemDefinitionGroup>
<ClCompile> <ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)src;%(AdditionalIncludeDirectories);$(SolutionDir)dep\fast_float\include;$(SolutionDir)dep\fmt\include;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\minizip\include;$(SolutionDir)dep\stb\include</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)src;%(AdditionalIncludeDirectories);$(SolutionDir)dep\fast_float\include;$(SolutionDir)dep\fmt\include</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);FMT_EXCEPTIONS=0</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);FMT_EXCEPTIONS=0</PreprocessorDefinitions>
<LanguageStandard>stdcpp20</LanguageStandard> <LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile> </ClCompile>

View file

@ -56,7 +56,6 @@
<ClCompile Include="memmap.cpp" /> <ClCompile Include="memmap.cpp" />
<ClCompile Include="memory_settings_interface.cpp" /> <ClCompile Include="memory_settings_interface.cpp" />
<ClCompile Include="md5_digest.cpp" /> <ClCompile Include="md5_digest.cpp" />
<ClCompile Include="minizip_helpers.cpp" />
<ClCompile Include="perf_scope.cpp" /> <ClCompile Include="perf_scope.cpp" />
<ClCompile Include="progress_callback.cpp" /> <ClCompile Include="progress_callback.cpp" />
<ClCompile Include="sha1_digest.cpp" /> <ClCompile Include="sha1_digest.cpp" />
@ -87,15 +86,6 @@
<ProjectReference Include="..\..\dep\fmt\fmt.vcxproj"> <ProjectReference Include="..\..\dep\fmt\fmt.vcxproj">
<Project>{8be398e6-b882-4248-9065-fecc8728e038}</Project> <Project>{8be398e6-b882-4248-9065-fecc8728e038}</Project>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\dep\minizip\minizip.vcxproj">
<Project>{8bda439c-6358-45fb-9994-2ff083babe06}</Project>
</ProjectReference>
<ProjectReference Include="..\..\dep\zlib\zlib.vcxproj">
<Project>{7ff9fdb9-d504-47db-a16a-b08071999620}</Project>
</ProjectReference>
<ProjectReference Include="..\..\dep\zstd\zstd.vcxproj">
<Project>{73ee0c55-6ffe-44e7-9c12-baa52434a797}</Project>
</ProjectReference>
</ItemGroup> </ItemGroup>
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\marmasm.targets" /> <Import Project="$(VCTargetsPath)\BuildCustomizations\marmasm.targets" />
@ -113,7 +103,6 @@
<ItemDefinitionGroup> <ItemDefinitionGroup>
<ClCompile> <ClCompile>
<ObjectFileName>$(IntDir)/%(RelativeDir)/</ObjectFileName> <ObjectFileName>$(IntDir)/%(RelativeDir)/</ObjectFileName>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)dep\zstd\lib</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<Import Project="..\..\dep\msvc\vsprops\Targets.props" /> <Import Project="..\..\dep\msvc\vsprops\Targets.props" />

View file

@ -56,7 +56,6 @@
<ClCompile Include="string_util.cpp" /> <ClCompile Include="string_util.cpp" />
<ClCompile Include="md5_digest.cpp" /> <ClCompile Include="md5_digest.cpp" />
<ClCompile Include="progress_callback.cpp" /> <ClCompile Include="progress_callback.cpp" />
<ClCompile Include="minizip_helpers.cpp" />
<ClCompile Include="thirdparty\StackWalker.cpp"> <ClCompile Include="thirdparty\StackWalker.cpp">
<Filter>thirdparty</Filter> <Filter>thirdparty</Filter>
</ClCompile> </ClCompile>

View file

@ -1,93 +0,0 @@
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
#include "minizip_helpers.h"
#include "file_system.h"
#include "ioapi.h"
#include "types.h"
#include <algorithm>
namespace MinizipHelpers {
unzFile OpenUnzMemoryFile(const void* memory, size_t memory_size)
{
struct MemoryFileInfo
{
const u8* data;
ZPOS64_T data_size;
ZPOS64_T position;
};
MemoryFileInfo* fi = new MemoryFileInfo;
fi->data = static_cast<const u8*>(memory);
fi->data_size = static_cast<ZPOS64_T>(memory_size);
fi->position = 0;
#define FI static_cast<MemoryFileInfo*>(stream)
zlib_filefunc64_def funcs = {
[](voidpf opaque, const void* filename, int mode) -> voidpf { return opaque; }, // open
[](voidpf opaque, voidpf stream, void* buf, uLong size) -> uLong { // read
const ZPOS64_T remaining = FI->data_size - FI->position;
const ZPOS64_T to_read = std::min(remaining, static_cast<ZPOS64_T>(size));
if (to_read > 0)
{
std::memcpy(buf, FI->data + FI->position, to_read);
FI->position += to_read;
}
return static_cast<uLong>(to_read);
},
[](voidpf opaque, voidpf stream, const void* buf, uLong size) -> uLong { return 0; }, // write
[](voidpf opaque, voidpf stream) -> ZPOS64_T { return static_cast<ZPOS64_T>(FI->position); }, // tell
[](voidpf opaque, voidpf stream, ZPOS64_T offset, int origin) -> long { // seek
ZPOS64_T new_position = FI->position;
if (origin == SEEK_SET)
new_position = static_cast<int>(offset);
else if (origin == SEEK_CUR)
new_position += static_cast<int>(offset);
else
new_position = FI->data_size;
if (new_position < 0 || new_position > FI->data_size)
return -1;
FI->position = new_position;
return 0;
},
[](voidpf opaque, voidpf stream) -> int {
delete FI;
return 0;
}, // close
[](voidpf opaque, voidpf stream) -> int { return 0; }, // testerror
static_cast<voidpf>(fi)};
#undef FI
unzFile zf = unzOpen2_64("", &funcs);
if (!zf)
delete fi;
return zf;
}
unzFile OpenUnzFile(const char* filename)
{
zlib_filefunc64_def funcs;
fill_fopen64_filefunc(&funcs);
funcs.zopen64_file = [](voidpf opaque, const void* filename, int mode) -> voidpf {
const char* mode_fopen = NULL;
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER) == ZLIB_FILEFUNC_MODE_READ)
mode_fopen = "rb";
else if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
mode_fopen = "r+b";
else if (mode & ZLIB_FILEFUNC_MODE_CREATE)
mode_fopen = "wb";
return FileSystem::OpenCFile(static_cast<const char*>(filename), mode_fopen);
};
return unzOpen2_64(filename, &funcs);
}
} // namespace MinizipHelpers

View file

@ -1,12 +1,95 @@
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com> // SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0) // SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
#pragma once #pragma once
#include "file_system.h"
#include "ioapi.h"
#include "types.h"
#include "unzip.h" #include "unzip.h"
#include <algorithm>
namespace MinizipHelpers { namespace MinizipHelpers {
unzFile OpenUnzMemoryFile(const void* memory, size_t memory_size); [[maybe_unused]] static unzFile OpenUnzMemoryFile(const void* memory, size_t memory_size)
unzFile OpenUnzFile(const char* filename); {
struct MemoryFileInfo
{
const u8* data;
ZPOS64_T data_size;
ZPOS64_T position;
};
MemoryFileInfo* fi = new MemoryFileInfo;
fi->data = static_cast<const u8*>(memory);
fi->data_size = static_cast<ZPOS64_T>(memory_size);
fi->position = 0;
#define FI static_cast<MemoryFileInfo*>(stream)
zlib_filefunc64_def funcs = {
[](voidpf opaque, const void* filename, int mode) -> voidpf { return opaque; }, // open
[](voidpf opaque, voidpf stream, void* buf, uLong size) -> uLong { // read
const ZPOS64_T remaining = FI->data_size - FI->position;
const ZPOS64_T to_read = std::min(remaining, static_cast<ZPOS64_T>(size));
if (to_read > 0)
{
std::memcpy(buf, FI->data + FI->position, to_read);
FI->position += to_read;
}
return static_cast<uLong>(to_read);
},
[](voidpf opaque, voidpf stream, const void* buf, uLong size) -> uLong { return 0; }, // write
[](voidpf opaque, voidpf stream) -> ZPOS64_T { return static_cast<ZPOS64_T>(FI->position); }, // tell
[](voidpf opaque, voidpf stream, ZPOS64_T offset, int origin) -> long { // seek
ZPOS64_T new_position = FI->position;
if (origin == SEEK_SET)
new_position = static_cast<int>(offset);
else if (origin == SEEK_CUR)
new_position += static_cast<int>(offset);
else
new_position = FI->data_size;
if (new_position < 0 || new_position > FI->data_size)
return -1;
FI->position = new_position;
return 0;
},
[](voidpf opaque, voidpf stream) -> int {
delete FI;
return 0;
}, // close
[](voidpf opaque, voidpf stream) -> int { return 0; }, // testerror
static_cast<voidpf>(fi)};
#undef FI
unzFile zf = unzOpen2_64("", &funcs);
if (!zf)
delete fi;
return zf;
}
[[maybe_unused]] static unzFile OpenUnzFile(const char* filename)
{
zlib_filefunc64_def funcs;
fill_fopen64_filefunc(&funcs);
funcs.zopen64_file = [](voidpf opaque, const void* filename, int mode) -> voidpf {
const char* mode_fopen = NULL;
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER) == ZLIB_FILEFUNC_MODE_READ)
mode_fopen = "rb";
else if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
mode_fopen = "r+b";
else if (mode & ZLIB_FILEFUNC_MODE_CREATE)
mode_fopen = "wb";
return FileSystem::OpenCFile(static_cast<const char*>(filename), mode_fopen);
};
return unzOpen2_64(filename, &funcs);
}
} // namespace MinizipHelpers } // namespace MinizipHelpers

View file

@ -184,12 +184,6 @@
<ProjectReference Include="..\..\dep\xxhash\xxhash.vcxproj"> <ProjectReference Include="..\..\dep\xxhash\xxhash.vcxproj">
<Project>{09553c96-9f39-49bf-8ae6-7acbd07c410c}</Project> <Project>{09553c96-9f39-49bf-8ae6-7acbd07c410c}</Project>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\dep\zlib\zlib.vcxproj">
<Project>{7ff9fdb9-d504-47db-a16a-b08071999620}</Project>
</ProjectReference>
<ProjectReference Include="..\..\dep\zstd\zstd.vcxproj">
<Project>{73ee0c55-6ffe-44e7-9c12-baa52434a797}</Project>
</ProjectReference>
<ProjectReference Include="..\..\dep\zydis\zydis.vcxproj" Condition="'$(Platform)'=='x64' And $(Configuration.Contains('Debug'))"> <ProjectReference Include="..\..\dep\zydis\zydis.vcxproj" Condition="'$(Platform)'=='x64' And $(Configuration.Contains('Debug'))">
<Project>{c51a346a-86b2-46df-9bb3-d0aa7e5d8699}</Project> <Project>{c51a346a-86b2-46df-9bb3-d0aa7e5d8699}</Project>
</ProjectReference> </ProjectReference>

View file

@ -341,6 +341,9 @@
<ProjectReference Include="..\..\dep\imgui\imgui.vcxproj"> <ProjectReference Include="..\..\dep\imgui\imgui.vcxproj">
<Project>{bb08260f-6fbc-46af-8924-090ee71360c6}</Project> <Project>{bb08260f-6fbc-46af-8924-090ee71360c6}</Project>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\dep\minizip\minizip.vcxproj">
<Project>{8bda439c-6358-45fb-9994-2ff083babe06}</Project>
</ProjectReference>
<ProjectReference Include="..\common\common.vcxproj"> <ProjectReference Include="..\common\common.vcxproj">
<Project>{ee054e08-3799-4a59-a422-18259c105ffd}</Project> <Project>{ee054e08-3799-4a59-a422-18259c105ffd}</Project>
</ProjectReference> </ProjectReference>
@ -378,6 +381,7 @@
<ClCompile> <ClCompile>
<PreprocessorDefinitions>QT_NO_EXCEPTIONS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>QT_NO_EXCEPTIONS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4127;%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>4127;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)dep\minizip\include</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="$(Configuration.Contains(Clang))"> <ItemDefinitionGroup Condition="$(Configuration.Contains(Clang))">

View file

@ -17,9 +17,6 @@
<ProjectReference Include="..\..\dep\minizip\minizip.vcxproj"> <ProjectReference Include="..\..\dep\minizip\minizip.vcxproj">
<Project>{8bda439c-6358-45fb-9994-2ff083babe06}</Project> <Project>{8bda439c-6358-45fb-9994-2ff083babe06}</Project>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\dep\zlib\zlib.vcxproj">
<Project>{7ff9fdb9-d504-47db-a16a-b08071999620}</Project>
</ProjectReference>
<ProjectReference Include="..\common\common.vcxproj"> <ProjectReference Include="..\common\common.vcxproj">
<Project>{ee054e08-3799-4a59-a422-18259c105ffd}</Project> <Project>{ee054e08-3799-4a59-a422-18259c105ffd}</Project>
</ProjectReference> </ProjectReference>
@ -31,10 +28,10 @@
<Import Project="..\common\common.props" /> <Import Project="..\common\common.props" />
<ItemDefinitionGroup> <ItemDefinitionGroup>
<ClCompile> <ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)dep\minizip\include;$(SolutionDir)dep\zlib\include;$(SolutionDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)dep\minizip\include;$(SolutionDir)src</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>%(AdditionalDependencies);Comctl32.lib</AdditionalDependencies> <AdditionalDependencies>%(AdditionalDependencies);Comctl32.lib;zlib.lib</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<Import Project="..\..\dep\msvc\vsprops\Targets.props" /> <Import Project="..\..\dep\msvc\vsprops\Targets.props" />

View file

@ -77,7 +77,7 @@ target_precompile_headers(util PRIVATE "pch.h")
target_include_directories(util PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..") target_include_directories(util PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_include_directories(util PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..") target_include_directories(util PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_link_libraries(util PUBLIC common simpleini imgui) target_link_libraries(util PUBLIC common simpleini imgui)
target_link_libraries(util PRIVATE libchdr JPEG::JPEG PNG::PNG ZLIB::ZLIB soundtouch xxhash Zstd::Zstd reshadefx) target_link_libraries(util PRIVATE libchdr JPEG::JPEG PNG::PNG WebP::libwebp ZLIB::ZLIB soundtouch xxhash Zstd::Zstd reshadefx)
if(ENABLE_CUBEB) if(ENABLE_CUBEB)
target_sources(util PRIVATE target_sources(util PRIVATE

View file

@ -8,7 +8,7 @@
<PreprocessorDefinitions>ENABLE_CUBEB=1;ENABLE_SDL2=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>ENABLE_CUBEB=1;ENABLE_SDL2=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Platform)'!='ARM64'">%(PreprocessorDefinitions);ENABLE_OPENGL=1;ENABLE_VULKAN=1</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Platform)'!='ARM64'">%(PreprocessorDefinitions);ENABLE_OPENGL=1;ENABLE_VULKAN=1</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Platform)'=='ARM64'">%(PreprocessorDefinitions);SOUNDTOUCH_USE_NEON</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Platform)'=='ARM64'">%(PreprocessorDefinitions);SOUNDTOUCH_USE_NEON</PreprocessorDefinitions>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)dep\xxhash\include;$(SolutionDir)dep\soundtouch\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\simpleini\include;$(SolutionDir)dep\libchdr\include;$(SolutionDir)dep\cubeb\include;$(SolutionDir)dep\d3d12ma\include;$(SolutionDir)dep\zstd\lib;$(SolutionDir)dep\libpng\include;$(SolutionDir)dep\libjpeg\include</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SolutionDir)dep\xxhash\include;$(SolutionDir)dep\soundtouch\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\simpleini\include;$(SolutionDir)dep\libchdr\include;$(SolutionDir)dep\cubeb\include;$(SolutionDir)dep\d3d12ma\include</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Platform)'!='ARM64'">%(AdditionalIncludeDirectories);$(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan\include;$(SolutionDir)dep\glslang</AdditionalIncludeDirectories> <AdditionalIncludeDirectories Condition="'$(Platform)'!='ARM64'">%(AdditionalIncludeDirectories);$(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan\include;$(SolutionDir)dep\glslang</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
@ -20,6 +20,35 @@
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<Import Project="..\..\dep\msvc\vsprops\SDL2Compile.props" />
<Import Condition="$(Configuration.Contains('Debug'))" Project="..\..\dep\winpixeventruntime\WinPixEventRuntime.props" /> <Import Condition="$(Configuration.Contains('Debug'))" Project="..\..\dep\winpixeventruntime\WinPixEventRuntime.props" />
<!-- Dependency linking and DLL copying -->
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DepsIncludeDir)SDL2</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);libjpeg.lib;libpng16.lib;libwebp.lib;SDL2.lib;zlib.lib;zstd.lib</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<DepsDLLs Include="$(DepsBinDir)libjpeg.dll" />
<DepsDLLs Include="$(DepsBinDir)libpng16.dll" />
<DepsDLLs Include="$(DepsBinDir)libsharpyuv.dll" />
<DepsDLLs Include="$(DepsBinDir)libwebp.dll" />
<DepsDLLs Include="$(DepsBinDir)SDL2.dll" />
<DepsDLLs Include="$(DepsBinDir)zlib1.dll" />
<DepsDLLs Include="$(DepsBinDir)zstd.dll" />
</ItemGroup>
<Target Name="DepsCopyDLLs"
AfterTargets="Build"
Inputs="@(DepsDLLs)"
Outputs="@(DepsDLLs -> '$(OutDir)%(RecursiveDir)%(Filename)%(Extension)')">
<Message Text="Copying Dependency DLLs" Importance="High" />
<Copy
SourceFiles="@(DepsDLLs)"
DestinationFolder="$(OutDir)"
SkipUnchangedFiles="true"
/>
</Target>
</Project> </Project>

View file

@ -254,12 +254,6 @@
<ProjectReference Include="..\..\dep\libchdr\libchdr.vcxproj"> <ProjectReference Include="..\..\dep\libchdr\libchdr.vcxproj">
<Project>{425d6c99-d1c8-43c2-b8ac-4d7b1d941017}</Project> <Project>{425d6c99-d1c8-43c2-b8ac-4d7b1d941017}</Project>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\dep\libjpeg\libjpeg.vcxproj">
<Project>{ec3b6685-0b6e-4767-84ab-39b75eead2e2}</Project>
</ProjectReference>
<ProjectReference Include="..\..\dep\libpng\libpng.vcxproj">
<Project>{9fd2abcd-2dcd-4302-be5c-df0ba8431fa5}</Project>
</ProjectReference>
<ProjectReference Include="..\..\dep\reshadefx\reshadefx.vcxproj"> <ProjectReference Include="..\..\dep\reshadefx\reshadefx.vcxproj">
<Project>{27b8d4bb-4f01-4432-bc14-9bf6ca458eee}</Project> <Project>{27b8d4bb-4f01-4432-bc14-9bf6ca458eee}</Project>
</ProjectReference> </ProjectReference>
@ -272,9 +266,6 @@
<ProjectReference Include="..\..\dep\glslang\glslang.vcxproj" Condition="'$(Platform)'!='ARM64'"> <ProjectReference Include="..\..\dep\glslang\glslang.vcxproj" Condition="'$(Platform)'!='ARM64'">
<Project>{7f909e29-4808-4bd9-a60c-56c51a3aaec2}</Project> <Project>{7f909e29-4808-4bd9-a60c-56c51a3aaec2}</Project>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\dep\zstd\zstd.vcxproj">
<Project>{73ee0c55-6ffe-44e7-9c12-baa52434a797}</Project>
</ProjectReference>
<ProjectReference Include="..\common\common.vcxproj"> <ProjectReference Include="..\common\common.vcxproj">
<Project>{ee054e08-3799-4a59-a422-18259c105ffd}</Project> <Project>{ee054e08-3799-4a59-a422-18259c105ffd}</Project>
</ProjectReference> </ProjectReference>