Skip to content

Commit

Permalink
Fix several bugs and change branding.
Browse files Browse the repository at this point in the history
- User can set password while creating the account.
- PATH is no longer unset for Windows interoperability.
- Configure automount options in wsl.conf.
- All branding has been changed to AOSC OS.
  • Loading branch information
KexyBiscuit committed Jul 2, 2021
1 parent c8676c3 commit ed21745
Show file tree
Hide file tree
Showing 75 changed files with 218 additions and 202 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ __pycache__/



DistroLauncher/MSG*.bin
DistroLauncher/messages.rc
DistroLauncher/messages.h
AOSCOSLauncher/MSG*.bin
AOSCOSLauncher/messages.rc
AOSCOSLauncher/messages.h
*.lib
*.dll
*.exe
Expand Down
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="AOSCOS" Version="8.1.1.0" Publisher="CN=KexyBiscuit" ProcessorArchitecture="x64" />
<Identity Name="AOSCOS" Version="8.1.2.0" Publisher="CN=KexyBiscuit" ProcessorArchitecture="x64" />
<mp:PhoneIdentity PhoneProductId="160867c6-4e75-4e36-85c6-1543de07d5f3" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>AOSC OS</DisplayName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{f63472f9-d0a0-412e-aa3d-a4e822970486}</ProjectGuid>
<RootNamespace>DistroLauncher_Appx</RootNamespace>
<RootNamespace>AOSCOSLauncher_Appx</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<AppContainerApplication>true</AppContainerApplication>
Expand All @@ -11,7 +11,7 @@
<WindowsTargetPlatformMinVersion>10.0.16215.0</WindowsTargetPlatformMinVersion>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<TargetName>aoscos</TargetName>
<ProjectName>DistroLauncher-Appx</ProjectName>
<ProjectName>AOSCOSLauncher-Appx</ProjectName>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
Expand Down Expand Up @@ -75,7 +75,7 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<PackageCertificateKeyFile>DistroLauncher-Appx_TemporaryKey.pfx</PackageCertificateKeyFile>
<PackageCertificateKeyFile>AOSCOSLauncher-Appx_TemporaryKey.pfx</PackageCertificateKeyFile>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<AppxBundle>Always</AppxBundle>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
Expand All @@ -94,11 +94,11 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<AppxManifest Include="MyDistro.appxmanifest">
<AppxManifest Include="AOSCOS.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<None Include="DistroLauncher-Appx_StoreKey.pfx" />
<None Include="DistroLauncher-Appx_TemporaryKey.pfx" />
<None Include="AOSCOSLauncher-Appx_StoreKey.pfx" />
<None Include="AOSCOSLauncher-Appx_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup Condition="'$(Platform)'=='x64'">
<None Include="..\x64\install.tar.gz">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,14 @@
</Image>
</ItemGroup>
<ItemGroup>
<AppxManifest Include="MyDistro.appxmanifest" />
<AppxManifest Include="AOSCOS.appxmanifest" />
</ItemGroup>
<ItemGroup>
<None Include="..\ARM64\install.tar.gz" />
<None Include="..\x64\install.tar.gz" />
<None Include="DistroLauncher-Appx_TemporaryKey.pfx" />
<None Include="AOSCOSLauncher-Appx_TemporaryKey.pfx" />
<None Include="Package.StoreAssociation.xml" />
<None Include="DistroLauncher-Appx_StoreKey.pfx" />
<None Include="AOSCOSLauncher-Appx_StoreKey.pfx" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="$(targetname)" />
Expand Down
4 changes: 2 additions & 2 deletions DistroLauncher.sln → AOSCOSLauncher.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2036
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "launcher", "DistroLauncher\DistroLauncher.vcxproj", "{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "launcher", "AOSCOSLauncher\AOSCOSLauncher.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}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AOSCOSLauncher-Appx", "AOSCOSLauncher-Appx\AOSCOSLauncher-Appx.vcxproj", "{F63472F9-D0A0-412E-AA3D-A4E822970486}"
ProjectSection(ProjectDependencies) = postProject
{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2} = {BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}
EndProjectSection
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{BA627106-E5F7-46EE-B8D7-2D5A760F2FB2}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>DistroLauncher</RootNamespace>
<RootNamespace>AOSCOSLauncher</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>launcher</ProjectName>
</PropertyGroup>
Expand Down Expand Up @@ -148,14 +148,14 @@
<ItemGroup>
<ClCompile Include="DistributionInfo.cpp" />
<ClCompile Include="Helpers.cpp" />
<ClCompile Include="DistroLauncher.cpp" />
<ClCompile Include="AOSCOSLauncher.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="WslApiLoader.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="DistroLauncher.rc" />
<ResourceCompile Include="AOSCOSLauncher.rc" />
</ItemGroup>
<ItemGroup>
<Image Include=".\images\icon.ico" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="DistroLauncher.cpp">
<ClCompile Include="AOSCOSLauncher.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Helpers.cpp">
Expand All @@ -52,7 +52,7 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="DistroLauncher.rc">
<ResourceCompile Include="AOSCOSLauncher.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,23 @@ bool DistributionInfo::CreateUser(std::wstring_view userName)
return false;
}

// Do not require the user account authenticate him or herself before running a command.
commandLine = L"echo \"";
// Change the user account's password.
commandLine = L"passwd ";
commandLine += userName;
commandLine += L" ALL = (ALL:ALL) NOPASSWD: ALL\" | sudo tee -a /etc/sudoers.d/wsl > /dev/null";
hr = g_wslApi.WslLaunchInteractive(commandLine.c_str(), true, &exitCode);
if ((FAILED(hr)) || (exitCode != 0)) {
return false;
}

// Do not unset PATH
commandLine = L"sed -e 's/^unset PATH MANPATH/unset MANPATH # PATH/' -i /etc/profile";
hr = g_wslApi.WslLaunchInteractive(commandLine.c_str(), true, &exitCode);
if ((FAILED(hr)) || (exitCode != 0)) {
return false;
}

// Configure per distro launch settings with wslconf
commandLine = L"echo \"# Enable extra metadata options by default\n[automount]\noptions = \\\"metadata,umask=22,fmask=11\\\"\" > /etc/wsl.conf";
hr = g_wslApi.WslLaunchInteractive(commandLine.c_str(), true, &exitCode);
if ((FAILED(hr)) || (exitCode != 0)) {
return false;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
2 changes: 1 addition & 1 deletion DistroLauncher/resource.h → AOSCOSLauncher/resource.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by DistroInstaller.rc
// Used by AOSCOSLauncher.rc
//
#define IDI_ICON1 101

Expand Down
2 changes: 1 addition & 1 deletion DistroLauncher/stdafx.cpp → AOSCOSLauncher/stdafx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Licensed under the terms described in the LICENSE file in the root of this project.
//
// stdafx.cpp : source file that includes just the standard includes
// DistroInstaller.pch will be the pre-compiled header
// AOSCOSLauncher.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
//

Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit ed21745

Please sign in to comment.