Skip to content

Commit ff89a4d

Browse files
committed
PreRelease CLI for MSVC
1 parent a7860aa commit ff89a4d

File tree

6 files changed

+289
-2
lines changed

6 files changed

+289
-2
lines changed

Project/MSVC2022/MediaInfoLib.sln

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "..\..\..\zlib\c
2525
EndProject
2626
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FieldsDescription", "FieldsDescription\FieldsDescription.vcxproj", "{3BEA2212-C3A5-45A5-81CE-39E9A2ED3127}"
2727
EndProject
28+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PreRelease", "PreRelease\PreRelease.vcxproj", "{98740C20-8A19-4190-A29B-7DFA0497F545}"
29+
EndProject
2830
Global
2931
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3032
Debug|ARM = Debug|ARM
@@ -199,6 +201,22 @@ Global
199201
{3BEA2212-C3A5-45A5-81CE-39E9A2ED3127}.Release|Win32.Build.0 = Release|Win32
200202
{3BEA2212-C3A5-45A5-81CE-39E9A2ED3127}.Release|x64.ActiveCfg = Release|x64
201203
{3BEA2212-C3A5-45A5-81CE-39E9A2ED3127}.Release|x64.Build.0 = Release|x64
204+
{98740C20-8A19-4190-A29B-7DFA0497F545}.Debug|ARM.ActiveCfg = Debug|x64
205+
{98740C20-8A19-4190-A29B-7DFA0497F545}.Debug|ARM64.ActiveCfg = Debug|ARM64
206+
{98740C20-8A19-4190-A29B-7DFA0497F545}.Debug|ARM64.Build.0 = Debug|ARM64
207+
{98740C20-8A19-4190-A29B-7DFA0497F545}.Debug|ARM64EC.ActiveCfg = Debug|ARM64
208+
{98740C20-8A19-4190-A29B-7DFA0497F545}.Debug|Win32.ActiveCfg = Debug|Win32
209+
{98740C20-8A19-4190-A29B-7DFA0497F545}.Debug|Win32.Build.0 = Debug|Win32
210+
{98740C20-8A19-4190-A29B-7DFA0497F545}.Debug|x64.ActiveCfg = Debug|x64
211+
{98740C20-8A19-4190-A29B-7DFA0497F545}.Debug|x64.Build.0 = Debug|x64
212+
{98740C20-8A19-4190-A29B-7DFA0497F545}.Release|ARM.ActiveCfg = Release|x64
213+
{98740C20-8A19-4190-A29B-7DFA0497F545}.Release|ARM64.ActiveCfg = Release|ARM64
214+
{98740C20-8A19-4190-A29B-7DFA0497F545}.Release|ARM64.Build.0 = Release|ARM64
215+
{98740C20-8A19-4190-A29B-7DFA0497F545}.Release|ARM64EC.ActiveCfg = Release|ARM64
216+
{98740C20-8A19-4190-A29B-7DFA0497F545}.Release|Win32.ActiveCfg = Release|Win32
217+
{98740C20-8A19-4190-A29B-7DFA0497F545}.Release|Win32.Build.0 = Release|Win32
218+
{98740C20-8A19-4190-A29B-7DFA0497F545}.Release|x64.ActiveCfg = Release|x64
219+
{98740C20-8A19-4190-A29B-7DFA0497F545}.Release|x64.Build.0 = Release|x64
202220
EndGlobalSection
203221
GlobalSection(SolutionProperties) = preSolution
204222
HideSolutionNode = FALSE
Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|ARM64">
5+
<Configuration>Debug</Configuration>
6+
<Platform>ARM64</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Debug|Win32">
9+
<Configuration>Debug</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Release|ARM64">
13+
<Configuration>Release</Configuration>
14+
<Platform>ARM64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|Win32">
17+
<Configuration>Release</Configuration>
18+
<Platform>Win32</Platform>
19+
</ProjectConfiguration>
20+
<ProjectConfiguration Include="Debug|x64">
21+
<Configuration>Debug</Configuration>
22+
<Platform>x64</Platform>
23+
</ProjectConfiguration>
24+
<ProjectConfiguration Include="Release|x64">
25+
<Configuration>Release</Configuration>
26+
<Platform>x64</Platform>
27+
</ProjectConfiguration>
28+
</ItemGroup>
29+
<ItemGroup>
30+
<ClCompile Include="..\..\..\Source\PreRelease\CLI\PreRelease.cpp" />
31+
<ClCompile Include="..\..\..\Source\PreRelease\Enums.cpp" />
32+
<ClCompile Include="..\..\..\Source\PreRelease\Resources.cpp" />
33+
</ItemGroup>
34+
<ItemGroup>
35+
<ProjectReference Include="..\..\..\..\ZenLib\Project\MSVC2022\Library\ZenLib.vcxproj">
36+
<Project>{0da1da7d-f393-4e7c-a7ce-cb5c6a67bc94}</Project>
37+
</ProjectReference>
38+
</ItemGroup>
39+
<ItemGroup>
40+
<ClInclude Include="..\..\..\Source\PreRelease\Enums.h" />
41+
<ClInclude Include="..\..\..\Source\PreRelease\Resources.h" />
42+
</ItemGroup>
43+
<PropertyGroup Label="Globals">
44+
<VCProjectVersion>17.0</VCProjectVersion>
45+
<Keyword>Win32Proj</Keyword>
46+
<ProjectGuid>{98740c20-8a19-4190-a29b-7dfa0497f545}</ProjectGuid>
47+
<RootNamespace>PreRelease</RootNamespace>
48+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
49+
</PropertyGroup>
50+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
51+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
52+
<ConfigurationType>Application</ConfigurationType>
53+
<UseDebugLibraries>true</UseDebugLibraries>
54+
<PlatformToolset>v143</PlatformToolset>
55+
<CharacterSet>Unicode</CharacterSet>
56+
</PropertyGroup>
57+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
58+
<ConfigurationType>Application</ConfigurationType>
59+
<UseDebugLibraries>false</UseDebugLibraries>
60+
<PlatformToolset>v143</PlatformToolset>
61+
<WholeProgramOptimization>true</WholeProgramOptimization>
62+
<CharacterSet>Unicode</CharacterSet>
63+
</PropertyGroup>
64+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
65+
<ConfigurationType>Application</ConfigurationType>
66+
<UseDebugLibraries>true</UseDebugLibraries>
67+
<PlatformToolset>v143</PlatformToolset>
68+
<CharacterSet>Unicode</CharacterSet>
69+
</PropertyGroup>
70+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
71+
<ConfigurationType>Application</ConfigurationType>
72+
<UseDebugLibraries>true</UseDebugLibraries>
73+
<PlatformToolset>v143</PlatformToolset>
74+
<CharacterSet>Unicode</CharacterSet>
75+
</PropertyGroup>
76+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
77+
<ConfigurationType>Application</ConfigurationType>
78+
<UseDebugLibraries>false</UseDebugLibraries>
79+
<PlatformToolset>v143</PlatformToolset>
80+
<WholeProgramOptimization>true</WholeProgramOptimization>
81+
<CharacterSet>Unicode</CharacterSet>
82+
</PropertyGroup>
83+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
84+
<ConfigurationType>Application</ConfigurationType>
85+
<UseDebugLibraries>false</UseDebugLibraries>
86+
<PlatformToolset>v143</PlatformToolset>
87+
<WholeProgramOptimization>true</WholeProgramOptimization>
88+
<CharacterSet>Unicode</CharacterSet>
89+
</PropertyGroup>
90+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
91+
<ImportGroup Label="ExtensionSettings">
92+
</ImportGroup>
93+
<ImportGroup Label="Shared">
94+
</ImportGroup>
95+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
96+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
97+
</ImportGroup>
98+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
99+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
100+
</ImportGroup>
101+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
102+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
103+
</ImportGroup>
104+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
105+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
106+
</ImportGroup>
107+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
108+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
109+
</ImportGroup>
110+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
111+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
112+
</ImportGroup>
113+
<PropertyGroup Label="UserMacros" />
114+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
115+
<IncludePath>../../../../ZenLib/Source;../../../Source;$(IncludePath)</IncludePath>
116+
</PropertyGroup>
117+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
118+
<IncludePath>../../../../ZenLib/Source;../../../Source;$(IncludePath)</IncludePath>
119+
</PropertyGroup>
120+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
121+
<IncludePath>../../../../ZenLib/Source;../../../Source;$(IncludePath)</IncludePath>
122+
</PropertyGroup>
123+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
124+
<IncludePath>../../../../ZenLib/Source;../../../Source;$(IncludePath)</IncludePath>
125+
</PropertyGroup>
126+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
127+
<IncludePath>../../../../ZenLib/Source;../../../Source;$(IncludePath)</IncludePath>
128+
</PropertyGroup>
129+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
130+
<IncludePath>../../../../ZenLib/Source;../../../Source;$(IncludePath)</IncludePath>
131+
</PropertyGroup>
132+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
133+
<ClCompile>
134+
<WarningLevel>Level3</WarningLevel>
135+
<SDLCheck>true</SDLCheck>
136+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
137+
<ConformanceMode>true</ConformanceMode>
138+
<LanguageStandard>stdcpp23</LanguageStandard>
139+
</ClCompile>
140+
<Link>
141+
<SubSystem>Console</SubSystem>
142+
<GenerateDebugInformation>true</GenerateDebugInformation>
143+
</Link>
144+
</ItemDefinitionGroup>
145+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
146+
<ClCompile>
147+
<WarningLevel>Level3</WarningLevel>
148+
<FunctionLevelLinking>true</FunctionLevelLinking>
149+
<IntrinsicFunctions>true</IntrinsicFunctions>
150+
<SDLCheck>true</SDLCheck>
151+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
152+
<ConformanceMode>true</ConformanceMode>
153+
<LanguageStandard>stdcpp23</LanguageStandard>
154+
</ClCompile>
155+
<Link>
156+
<SubSystem>Console</SubSystem>
157+
<GenerateDebugInformation>true</GenerateDebugInformation>
158+
</Link>
159+
</ItemDefinitionGroup>
160+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
161+
<ClCompile>
162+
<WarningLevel>Level3</WarningLevel>
163+
<SDLCheck>true</SDLCheck>
164+
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
165+
<ConformanceMode>true</ConformanceMode>
166+
<LanguageStandard>stdcpp23</LanguageStandard>
167+
</ClCompile>
168+
<Link>
169+
<SubSystem>Console</SubSystem>
170+
<GenerateDebugInformation>true</GenerateDebugInformation>
171+
</Link>
172+
</ItemDefinitionGroup>
173+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
174+
<ClCompile>
175+
<WarningLevel>Level3</WarningLevel>
176+
<SDLCheck>true</SDLCheck>
177+
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
178+
<ConformanceMode>true</ConformanceMode>
179+
<LanguageStandard>stdcpp23</LanguageStandard>
180+
</ClCompile>
181+
<Link>
182+
<SubSystem>Console</SubSystem>
183+
<GenerateDebugInformation>true</GenerateDebugInformation>
184+
</Link>
185+
</ItemDefinitionGroup>
186+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
187+
<ClCompile>
188+
<WarningLevel>Level3</WarningLevel>
189+
<FunctionLevelLinking>true</FunctionLevelLinking>
190+
<IntrinsicFunctions>true</IntrinsicFunctions>
191+
<SDLCheck>true</SDLCheck>
192+
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
193+
<ConformanceMode>true</ConformanceMode>
194+
<LanguageStandard>stdcpp23</LanguageStandard>
195+
</ClCompile>
196+
<Link>
197+
<SubSystem>Console</SubSystem>
198+
<GenerateDebugInformation>true</GenerateDebugInformation>
199+
</Link>
200+
</ItemDefinitionGroup>
201+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
202+
<ClCompile>
203+
<WarningLevel>Level3</WarningLevel>
204+
<FunctionLevelLinking>true</FunctionLevelLinking>
205+
<IntrinsicFunctions>true</IntrinsicFunctions>
206+
<SDLCheck>true</SDLCheck>
207+
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
208+
<ConformanceMode>true</ConformanceMode>
209+
<LanguageStandard>stdcpp23</LanguageStandard>
210+
</ClCompile>
211+
<Link>
212+
<SubSystem>Console</SubSystem>
213+
<GenerateDebugInformation>true</GenerateDebugInformation>
214+
</Link>
215+
</ItemDefinitionGroup>
216+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
217+
<ImportGroup Label="ExtensionTargets">
218+
</ImportGroup>
219+
</Project>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClCompile Include="..\..\..\Source\PreRelease\CLI\PreRelease.cpp">
19+
<Filter>Source Files</Filter>
20+
</ClCompile>
21+
<ClCompile Include="..\..\..\Source\PreRelease\Enums.cpp">
22+
<Filter>Source Files</Filter>
23+
</ClCompile>
24+
<ClCompile Include="..\..\..\Source\PreRelease\Resources.cpp">
25+
<Filter>Source Files</Filter>
26+
</ClCompile>
27+
</ItemGroup>
28+
<ItemGroup>
29+
<ClInclude Include="..\..\..\Source\PreRelease\Enums.h">
30+
<Filter>Header Files</Filter>
31+
</ClInclude>
32+
<ClInclude Include="..\..\..\Source\PreRelease\Resources.h">
33+
<Filter>Header Files</Filter>
34+
</ClInclude>
35+
</ItemGroup>
36+
</Project>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
2+
*
3+
* Use of this source code is governed by a BSD-style license that can
4+
* be found in the License.html file in the root of the source tree.
5+
*/
6+
7+
#include <print>
8+
#include "PreRelease/Enums.h"
9+
#include "PreRelease/Resources.h"
10+
11+
auto main() -> int {
12+
std::println("Resources Create: {}", Resources_Create().To_UTF8().c_str());
13+
std::println("Enums Create: {}", Enums_Create().To_UTF8().c_str());
14+
}

Source/PreRelease/Enums.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ZenLib::Ztring Enums_Create_Load(Ztring FileName, Ztring &Contents)
2828
}
2929

3030
char C[FILE_MAX];
31-
size_t Size=F.Read(C, FILE_MAX-1);
31+
size_t Size=F.Read(reinterpret_cast<int8u*>(C), FILE_MAX-1);
3232
Contents.From_Local(C, Size);
3333
return L"";
3434
}

Source/PreRelease/Resources.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ZenLib::Ztring Resources_Create_Load(Ztring FileName, Ztring &Contents)
2828
}
2929

3030
char C[FILE_MAX];
31-
size_t Size=F.Read(C, FILE_MAX-1);
31+
size_t Size=F.Read(reinterpret_cast<int8u*>(C), FILE_MAX-1);
3232
Contents.From_Local(C, Size);
3333
return L"";
3434
}

0 commit comments

Comments
 (0)