Skip to content

Commit

Permalink
初始化
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadow-XT committed Apr 14, 2024
1 parent e24f929 commit acae6a0
Show file tree
Hide file tree
Showing 63 changed files with 146 additions and 38 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
[Rr]elease/
[Rr]eleases/
x64/
ARM64/
x86/
bld/
[Bb]in/
Expand Down Expand Up @@ -295,4 +296,6 @@ DistroLauncher/messages.h
*.lib
*.dll
*.exe
*.tar.gz
*.tar.gz
/.vscode
/.sarif
48 changes: 48 additions & 0 deletions BlackArchWSL.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34607.119
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "launcher", "DistroLauncher\DistroLauncher.vcxproj", "{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DistroLauncher-Appx", "DistroLauncher-Appx\DistroLauncher-Appx.vcxproj", "{F63472F9-D0A0-412E-AA3D-A4E822970486}"
ProjectSection(ProjectDependencies) = postProject
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2} = {BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Debug|ARM64.ActiveCfg = Debug|ARM64
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Debug|ARM64.Build.0 = Debug|ARM64
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Debug|x64.ActiveCfg = Debug|x64
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Debug|x64.Build.0 = Debug|x64
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Release|ARM64.ActiveCfg = Release|ARM64
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Release|ARM64.Build.0 = Release|ARM64
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Release|x64.ActiveCfg = Release|x64
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}.Release|x64.Build.0 = Release|x64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|ARM64.ActiveCfg = Debug|ARM64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|ARM64.Build.0 = Debug|ARM64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|ARM64.Deploy.0 = Debug|ARM64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|x64.ActiveCfg = Debug|x64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|x64.Build.0 = Debug|x64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Debug|x64.Deploy.0 = Debug|x64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|ARM64.ActiveCfg = Release|ARM64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|ARM64.Build.0 = Release|ARM64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|ARM64.Deploy.0 = Release|ARM64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|x64.ActiveCfg = Release|x64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|x64.Build.0 = Release|x64
{F63472F9-D0A0-412E-AA3D-A4E822970486}.Release|x64.Deploy.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1CBEEAE2-D963-465A-A538-A30F8D615037}
EndGlobalSection
EndGlobal
Binary file modified DistroLauncher-Appx/Assets/LargeTile.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/LargeTile.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/LargeTile.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/LargeTile.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/LargeTile.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/SmallTile.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/SmallTile.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/SmallTile.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/SmallTile.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/SmallTile.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/SplashScreen.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/SplashScreen.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/SplashScreen.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/SplashScreen.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/SplashScreen.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/Square150x150Logo.scale-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/Square150x150Logo.scale-125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/Square150x150Logo.scale-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/Square150x150Logo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/Square150x150Logo.scale-400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified DistroLauncher-Appx/Assets/Square44x44Logo.scale-100.png
Binary file modified DistroLauncher-Appx/Assets/Square44x44Logo.scale-125.png
Binary file modified DistroLauncher-Appx/Assets/Square44x44Logo.scale-150.png
Binary file modified DistroLauncher-Appx/Assets/Square44x44Logo.scale-200.png
Binary file modified DistroLauncher-Appx/Assets/Square44x44Logo.scale-400.png
Binary file modified DistroLauncher-Appx/Assets/Square44x44Logo.targetsize-16.png
Binary file modified DistroLauncher-Appx/Assets/Square44x44Logo.targetsize-24.png
Binary file modified DistroLauncher-Appx/Assets/Square44x44Logo.targetsize-256.png
Binary file modified DistroLauncher-Appx/Assets/Square44x44Logo.targetsize-32.png
Binary file modified DistroLauncher-Appx/Assets/Square44x44Logo.targetsize-48.png
Binary file modified DistroLauncher-Appx/Assets/StoreLogo.scale-100.png
Binary file modified DistroLauncher-Appx/Assets/StoreLogo.scale-125.png
Binary file modified DistroLauncher-Appx/Assets/StoreLogo.scale-150.png
Binary file modified DistroLauncher-Appx/Assets/StoreLogo.scale-200.png
Binary file modified DistroLauncher-Appx/Assets/StoreLogo.scale-400.png
Binary file modified DistroLauncher-Appx/Assets/Wide310x150Logo.scale-100.png
Binary file modified DistroLauncher-Appx/Assets/Wide310x150Logo.scale-125.png
Binary file modified DistroLauncher-Appx/Assets/Wide310x150Logo.scale-150.png
Binary file modified DistroLauncher-Appx/Assets/Wide310x150Logo.scale-200.png
Binary file modified DistroLauncher-Appx/Assets/Wide310x150Logo.scale-400.png
26 changes: 14 additions & 12 deletions DistroLauncher-Appx/DistroLauncher-Appx.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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.22621.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.19041.0</WindowsTargetPlatformMinVersion>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<TargetName>mydistro</TargetName>
<TargetName>BlackArch</TargetName>
<ProjectName>DistroLauncher-Appx</ProjectName>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<ItemGroup Label="ProjectConfigurations">
Expand All @@ -36,26 +35,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
Expand All @@ -76,13 +75,16 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<PackageCertificateKeyFile>DistroLauncher-Appx_TemporaryKey.pfx</PackageCertificateKeyFile>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<AppxBundle>Always</AppxBundle>
<PackageCertificateThumbprint>9AA4CA850308B67D8F3536434BF4224C5CAC519F</PackageCertificateThumbprint>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxBundlePlatforms>x64|arm64</AppxBundlePlatforms>
<AppInstallerUpdateFrequency>1</AppInstallerUpdateFrequency>
<AppInstallerUpdateFrequency>0</AppInstallerUpdateFrequency>
<AppInstallerCheckForUpdateFrequency>OnApplicationRun</AppInstallerCheckForUpdateFrequency>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
</PropertyGroup>
<ItemDefinitionGroup>
<Link>
Expand Down Expand Up @@ -173,4 +175,4 @@
<ItemGroup>
<None Include="Package.StoreAssociation.xml" />
</ItemGroup>
</Project>
</Project>
5 changes: 3 additions & 2 deletions DistroLauncher-Appx/DistroLauncher-Appx.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,14 @@
<AppxManifest Include="MyDistro.appxmanifest" />
</ItemGroup>
<ItemGroup>
<None Include="..\ARM64\install.tar.gz" />
<None Include="..\x64\install.tar.gz" />
<None Include="DistroLauncher-Appx_TemporaryKey.pfx" />
<None Include="Package.StoreAssociation.xml" />
<None Include="DistroLauncher-Appx_StoreKey.pfx" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="$(targetname)" />
<CustomBuild Include="$(targetname)" />
<CustomBuild Include="$(targetname)" />
</ItemGroup>
</Project>
</Project>
16 changes: 8 additions & 8 deletions DistroLauncher-Appx/MyDistro.appxmanifest
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?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="WSL-DistroLauncher" Version="1.0.0.0" Publisher="CN=Windows Console Dev Team" ProcessorArchitecture="x64" />
<Identity Name="BlackArch" Version="1.0.0.0" Publisher="CN=Script" ProcessorArchitecture="x64" />
<mp:PhoneIdentity PhoneProductId="160867c6-4e75-4e36-85c6-1543de07d5f3" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>WSL-DistroLauncher</DisplayName>
<PublisherDisplayName>Windows Console Dev Team</PublisherDisplayName>
<DisplayName>BlackArch</DisplayName>
<PublisherDisplayName>Shadow-XT</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.16215.0" MaxVersionTested="10.0.16240.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.19041.0" MaxVersionTested="10.0.22621.0" />
</Dependencies>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
Expand All @@ -17,16 +17,16 @@
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="mydistro" Executable="mydistro.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements DisplayName="WSL-DistroLauncher" Description="My Own Distro Launcher" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" BackgroundColor="transparent">
<Application Id="BlackArch" Executable="BlackArch.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements DisplayName="BlackArch" Description="BlackArch WSL Launcher" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" Square310x310Logo="Assets\LargeTile.png" Square71x71Logo="Assets\SmallTile.png">
</uap:DefaultTile>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
<uap3:Extension Category="windows.appExecutionAlias" Executable="mydistro.exe" EntryPoint="Windows.FullTrustApplication">
<uap3:Extension Category="windows.appExecutionAlias" Executable="BlackArch.exe" EntryPoint="Windows.FullTrustApplication">
<uap3:AppExecutionAlias>
<desktop:ExecutionAlias Alias="mydistro.exe" />
<desktop:ExecutionAlias Alias="BlackArch.exe" />
</uap3:AppExecutionAlias>
</uap3:Extension>
</Extensions>
Expand Down
17 changes: 14 additions & 3 deletions DistroLauncher/DistributionInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,32 @@ bool DistributionInfo::CreateUser(std::wstring_view userName)
{
// Create the user account.
DWORD exitCode;
std::wstring commandLine = L"/usr/sbin/adduser --quiet --gecos '' ";
std::wstring commandLine = L"/usr/bin/useradd -m ";
commandLine += userName;
HRESULT hr = g_wslApi.WslLaunchInteractive(commandLine.c_str(), true, &exitCode);
if ((FAILED(hr)) || (exitCode != 0)) {
return false;
}

commandLine = L"/usr/bin/passwd ";
commandLine += userName;
hr = g_wslApi.WslLaunchInteractive(commandLine.c_str(), true, &exitCode);
if ((FAILED(hr)) || (exitCode != 0)) {

// Delete the user if the group add command failed.
commandLine = L"/usr/bin/userdel ";
commandLine += userName;
g_wslApi.WslLaunchInteractive(commandLine.c_str(), true, &exitCode);
return false;
}
// Add the user account to any relevant groups.
commandLine = L"/usr/sbin/usermod -aG adm,cdrom,sudo,dip,plugdev ";
commandLine = L"/usr/bin/usermod -aG wheel ";
commandLine += userName;
hr = g_wslApi.WslLaunchInteractive(commandLine.c_str(), true, &exitCode);
if ((FAILED(hr)) || (exitCode != 0)) {

// Delete the user if the group add command failed.
commandLine = L"/usr/sbin/deluser ";
commandLine = L"/usr/bin/userdel ";
commandLine += userName;
g_wslApi.WslLaunchInteractive(commandLine.c_str(), true, &exitCode);
return false;
Expand Down
4 changes: 2 additions & 2 deletions DistroLauncher/DistributionInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ namespace DistributionInfo
//
// WARNING: This value must not change between versions of your app,
// otherwise users upgrading from older versions will see launch failures.
const std::wstring Name = L"MyDistribution";
const std::wstring Name = L"BlackArch";

// The title bar for the console window while the distribution is installing.
const std::wstring WindowTitle = L"My Distribution";
const std::wstring WindowTitle = L"BlackArch";

// Create and configure a user account.
bool CreateUser(std::wstring_view userName);
Expand Down
16 changes: 8 additions & 8 deletions DistroLauncher/DistroLauncher.vcxproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?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="17.9" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
Expand All @@ -22,34 +22,34 @@
<ProjectGuid>{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>DistroLauncher</RootNamespace>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.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>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
Expand Down Expand Up @@ -166,10 +166,10 @@
<ExcludedFromBuild>false</ExcludedFromBuild>
<Command>mc %(FullPath)</Command>
<Message>Compiling Messages...</Message>
<Outputs>%(Filename).rc;%(Filename).h;MSG0409.bin</Outputs>
<Outputs>%(Filename).rc;%(Filename).h;MSG409.bin</Outputs>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
Binary file modified DistroLauncher/images/icon.ico
Binary file not shown.
Binary file modified DistroLauncher/images/icon.png
2 changes: 1 addition & 1 deletion DistroLauncher/messages.mc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LanguageNames = (English=0x409:MSG00409)
LanguageNames = (English=0x409:MSG409)
MessageId=1001 SymbolicName=MSG_WSL_REGISTER_DISTRIBUTION_FAILED
Language=English
Expand Down
20 changes: 20 additions & 0 deletions Scripts/clear.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
$directories = @(
"${PWD}\x64\Debug",
"${PWD}\x64\Release",
"${PWD}\ARM64\Debug",
"${PWD}\ARM64\Release",
"${PWD}\DistroLauncher\x64\Debug",
"${PWD}\DistroLauncher\x64\Release",
"${PWD}\DistroLauncher\ARM64\Debug",
"${PWD}\DistroLauncher\ARM64\Release",
"${PWD}\DistroLauncher-Appx\x64\Debug",
"${PWD}\DistroLauncher-Appx\x64\Release",
"${PWD}\DistroLauncher-Appx\ARM64\Debug",
"${PWD}\DistroLauncher-Appx\ARM64\Release"
)

foreach ($dir in $directories) {
if (Test-Path $dir) {
Remove-Item -Path $dir -Recurse -Force
}
}
25 changes: 24 additions & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current
set MSBUILD="%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe"
goto :FOUND_MSBUILD
)
if exist "%DevSoftwareHome%\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe" (
set MSBUILD="%DevSoftwareHome%\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe"
goto :FOUND_MSBUILD
)
if exist "%DevSoftwareHome%\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe" (
set MSBUILD="%DevSoftwareHome%\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe"
goto :FOUND_MSBUILD
)
if exist "%DevSoftwareHome%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe" (
set MSBUILD="%DevSoftwareHome%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe"
goto :FOUND_MSBUILD
)
if exist "%ProgramFiles(x86)%\MSBuild\14.0\bin" (
set MSBUILD="%ProgramFiles(x86)%\MSBuild\14.0\bin\msbuild.exe"
goto :FOUND_MSBUILD
Expand All @@ -62,20 +74,31 @@ if %MSBUILD%==() (
:FOUND_MSBUILD
set _MSBUILD_TARGET=Build
set _MSBUILD_CONFIG=Debug
set _MSBUILD_PLATFORM=x64

:ARGS_LOOP
if (%1) == () goto :POST_ARGS_LOOP
if (%1) == (clean) (
set _MSBUILD_TARGET=Clean,Build
)
if (%1) == (clear) (
set _MSBUILD_TARGET=Clean

)
if (%1) == (rel) (
set _MSBUILD_CONFIG=Release
)
if (%1) == (ARM64) (
set _MSBUILD_PLATFORM=ARM64
)
shift
goto :ARGS_LOOP

:POST_ARGS_LOOP
%MSBUILD% %~dp0\DistroLauncher.sln /t:%_MSBUILD_TARGET% /m /nr:true /p:Configuration=%_MSBUILD_CONFIG%;Platform=x64
%MSBUILD% %~dp0\BlackArchWSL.sln /t:%_MSBUILD_TARGET% /m /nr:true /p:Configuration=%_MSBUILD_CONFIG%;Platform=%_MSBUILD_PLATFORM%

@REM %MSBUILD% %~dp0\BlackArchWSL.sln /t:%_MSBUILD_TARGET% /m /nr:false /p:Configuration=%_MSBUILD_CONFIG% /p:AppxBundlePlatforms="x64|ARM64" -verbosity:normal /p:UapAppxPackageBuildMode="StoreUpload" /p:UseSubFolderForOutputDirDuringMultiPlatformBuild=false


if (%ERRORLEVEL%) == (0) (
echo.
Expand Down

0 comments on commit acae6a0

Please sign in to comment.