MSIX: implement initial msix installer

This commit is contained in:
yuyoyuppe
2019-12-18 13:19:15 +03:00
committed by yuyoyuppe
parent b58d4e306a
commit 860087d291
12 changed files with 105 additions and 0 deletions

View File

@@ -112,6 +112,7 @@
<ClInclude Include="two_way_pipe_message_ipc.h" />
<ClInclude Include="version.h" />
<ClInclude Include="windows_colors.h" />
<ClInclude Include="winstore.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="animation.cpp" />
@@ -133,6 +134,7 @@
<ClCompile Include="tasklist_positions.cpp" />
<ClCompile Include="common.cpp" />
<ClCompile Include="windows_colors.cpp" />
<ClCompile Include="winstore.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@@ -78,6 +78,9 @@
<ClInclude Include="json.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="winstore.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="d2d_svg.cpp">
@@ -126,5 +129,8 @@
<ClCompile Include="json.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="winstore.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

11
src/common/winstore.cpp Normal file
View File

@@ -0,0 +1,11 @@
#include "pch.h"
#include "winstore.h"
#include <appmodel.h>
bool running_as_packaged()
{
UINT32 length = 0;
const auto rc = GetPackageFamilyName(GetCurrentProcess(), &length, nullptr);
return rc != APPMODEL_ERROR_NO_PACKAGE;
}

3
src/common/winstore.h Normal file
View File

@@ -0,0 +1,3 @@
#pragma once
bool running_as_packaged();