Skip to content

Commit

Permalink
Merge microsoft/WSL-DistroLauncher & Updated to VS 2019
Browse files Browse the repository at this point in the history
  • Loading branch information
bilguun0203 committed May 21, 2020
1 parent a2faa12 commit 0dcdf1a
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 51 deletions.
2 changes: 1 addition & 1 deletion DistroLauncher-Appx/Arch.appxmanifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap mp uap2 uap3 rescap desktop">
<Identity Name="ArchLinux.1.0" Version="1.0.3.0" Publisher="CN=Bilguun" ProcessorArchitecture="x64" />
<Identity Name="ArchLinux.1.0" Version="1.0.5.0" Publisher="CN=Bilguun, C=MN" ProcessorArchitecture="x64" />
<mp:PhoneIdentity PhoneProductId="00000000-0000-0000-0000-000000000000" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>Arch Linux</DisplayName>
Expand Down
29 changes: 19 additions & 10 deletions DistroLauncher-Appx/DistroLauncher-Appx.vcxproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{f63472f9-d0a0-412e-aa3d-a4e822970486}</ProjectGuid>
Expand All @@ -7,12 +7,11 @@
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.16215.0</WindowsTargetPlatformMinVersion>
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<TargetName>arch</TargetName>
<ProjectName>DistroLauncher-Appx</ProjectName>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<ItemGroup Label="ProjectConfigurations">
Expand All @@ -36,7 +35,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
Expand All @@ -48,7 +47,7 @@
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
Expand All @@ -75,14 +74,17 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<PackageCertificateKeyFile>DistroLauncher-Appx_TemporaryKey.pfx</PackageCertificateKeyFile>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<AppxBundle>Never</AppxBundle>
<AppxBundlePlatforms>x64</AppxBundlePlatforms>
<PackageCertificateThumbprint>AC3E64ED506D7177F596CC3FFCF76DF60BCF5A1D</PackageCertificateThumbprint>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppInstallerUpdateFrequency>1</AppInstallerUpdateFrequency>
<AppInstallerUpdateFrequency>0</AppInstallerUpdateFrequency>
<AppInstallerCheckForUpdateFrequency>OnApplicationRun</AppInstallerCheckForUpdateFrequency>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
<PackageCertificateThumbprint>A249CC32C5D12F48AA6B6419F26516217C2DEA80</PackageCertificateThumbprint>
</PropertyGroup>
<ItemDefinitionGroup>
<Link>
Expand All @@ -94,8 +96,12 @@
<AppxManifest Include="Arch.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<None Include="cert.pfx" />
<None Include="DistroLauncher-Appx_StoreKey.pfx" />
<None Include="DistroLauncher-Appx_TemporaryKey.pfx" />
<None Include="..\install.tar.gz">
</ItemGroup>
<ItemGroup Condition="'$(Platform)'=='x64'">
<None Include="..\x64\install.tar.gz">
<DeploymentContent>true</DeploymentContent>
</None>
</ItemGroup>
Expand Down Expand Up @@ -162,4 +168,7 @@
<Outputs>$(targetname).exe</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<None Include="Package.StoreAssociation.xml" />
</ItemGroup>
</Project>
10 changes: 9 additions & 1 deletion DistroLauncher-Appx/DistroLauncher-Appx.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,16 @@
<AppxManifest Include="Arch.appxmanifest" />
</ItemGroup>
<ItemGroup>
<None Include="..\x64\install.tar.gz" />
<None Include="DistroLauncher-Appx_TemporaryKey.pfx" />
<None Include="..\install.tar.gz" />
<None Include="Package.StoreAssociation.xml" />
<None Include="DistroLauncher-Appx_StoreKey.pfx" />
<None Include="cert.pfx" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="$(targetname)" />
<CustomBuild Include="$(targetname)" />
<CustomBuild Include="$(targetname)" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="$(targetname)" />
Expand Down
2 changes: 1 addition & 1 deletion DistroLauncher.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2036
Expand Down
8 changes: 7 additions & 1 deletion DistroLauncher/DistroLauncher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ int wmain(int argc, wchar_t const *argv[])
if (arguments.empty()) {
hr = g_wslApi.WslLaunchInteractive(L"", false, &exitCode);

// Check exitCode to see if wsl.exe returned that it could not start the Linux process
// then prompt users for input so they can view the error message.
if (SUCCEEDED(hr) && exitCode == UINT_MAX) {
Helpers::PromptForInput();
}

} else if ((arguments[0] == ARG_RUN) ||
(arguments[0] == ARG_RUN_C)) {

Expand Down Expand Up @@ -164,4 +170,4 @@ int wmain(int argc, wchar_t const *argv[])
}

return SUCCEEDED(hr) ? exitCode : 1;
}
}
9 changes: 6 additions & 3 deletions DistroLauncher/DistroLauncher.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
<ProjectGuid>{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>DistroLauncher</RootNamespace>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
<ProjectName>launcher</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
Expand All @@ -42,7 +42,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -89,6 +89,7 @@
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -105,6 +106,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<LanguageStandard>stdcpp17</LanguageStandard>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalOptions>--add /std:c++latest %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
Expand All @@ -125,6 +127,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<LanguageStandard>stdcpp17</LanguageStandard>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
Expand Down
Loading

0 comments on commit 0dcdf1a

Please sign in to comment.