mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-04-11 17:37:22 +10:00
Use nlohmann.json NuGet package instead of direct file
This way it will be easier to update to new version (when released). And it will be also clear that we have dependency on this 3rd party library.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
#include "FNVHash.h"
|
||||
#include "StringUtils.h"
|
||||
#include "Translations.h"
|
||||
#include "json.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <wininet.h>
|
||||
#include <softpub.h>
|
||||
|
||||
|
||||
@@ -101,7 +101,17 @@
|
||||
<ClCompile Include="TrackResources.cpp" />
|
||||
<ClCompile Include="Translations.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="..\packages\nlohmann.json.3.11.2\build\native\nlohmann.json.targets" Condition="Exists('..\packages\nlohmann.json.3.11.2\build\native\nlohmann.json.targets')" />
|
||||
</ImportGroup>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\nlohmann.json.3.11.2\build\native\nlohmann.json.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\nlohmann.json.3.11.2\build\native\nlohmann.json.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -149,4 +149,7 @@
|
||||
<Filter>Lib</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
24596
Src/Lib/json.hpp
24596
Src/Lib/json.hpp
File diff suppressed because it is too large
Load Diff
4
Src/Lib/packages.config
Normal file
4
Src/Lib/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="nlohmann.json" version="3.11.2" targetFramework="native" />
|
||||
</packages>
|
||||
@@ -6,6 +6,9 @@ echo -- Compiling
|
||||
|
||||
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do set MSBuildDir=%%i\MSBuild\Current\Bin\
|
||||
|
||||
REM Restore NuGet packages
|
||||
"%MSBuildDir%MSBuild.exe" ..\OpenShell.sln /m /t:Restore -p:RestorePackagesConfig=true /verbosity:quiet /nologo
|
||||
|
||||
REM ********* Build 64-bit solution
|
||||
echo --- 64bit
|
||||
"%MSBuildDir%MSBuild.exe" ..\OpenShell.sln /m /t:Rebuild /p:Configuration="Setup" /p:Platform="x64" /verbosity:quiet /nologo
|
||||
|
||||
Reference in New Issue
Block a user