Skip to content

Commit

Permalink
Add Mobility.MinUap project.
Browse files Browse the repository at this point in the history
  • Loading branch information
MouriNaruto committed Dec 25, 2024
1 parent 6922f94 commit d4faf0f
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 0 deletions.
6 changes: 6 additions & 0 deletions BuildAllTargets.proj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
<ProjectReference Include="$(SolutionPath)">
<AdditionalProperties>Configuration=Release;Platform=x64</AdditionalProperties>
</ProjectReference>
<ProjectReference Include="$(SolutionPath)">
<AdditionalProperties>Configuration=Debug;Platform=ARM64</AdditionalProperties>
</ProjectReference>
<ProjectReference Include="$(SolutionPath)">
<AdditionalProperties>Configuration=Release;Platform=ARM64</AdditionalProperties>
</ProjectReference>
</ItemGroup>
<Target Name="Restore" >
<MSBuild
Expand Down
77 changes: 77 additions & 0 deletions Mobility.MinUap/Mobility.MinUap.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*
* PROJECT: Mobility
* FILE: Mobility.MinUap.cpp
* PURPOSE: Implementation for Mobility Minimum UEFI Application Project
*
* LICENSE: The MIT License
*
* MAINTAINER: MouriNaruto ([email protected])
*/

#include <Mile.Project.Version.h>

#include <Uefi.h>

#ifndef _In_
#define _In_
#endif // !_In_

#ifndef _Out_
#define _Out_
#endif // !_Out_

#define MOBILITY_MINUAP_VERSION_STRING \
MILE_PROJECT_VERSION_STRING L" (Build " \
MILE_PROJECT_MACRO_TO_STRING(MILE_PROJECT_VERSION_BUILD) L")"

namespace
{
static EFI_STATUS OutputWideString(
_In_ EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL* Output,
_In_ const wchar_t* String)
{
return Output->OutputString(
Output,
const_cast<CHAR16*>(reinterpret_cast<const CHAR16*>(String)));
}
}

/**
* Entry point to UEFI Application.
*
* @param ImageHandle The image handle of the UEFI Application.
* @param SystemTable A pointer to the EFI System Table.
* @return EFI_STATUS. If the function succeeds, the return value is
* EFI_SUCCESS.
*/
EFI_STATUS EFIAPI UefiMain(
_In_ EFI_HANDLE ImageHandle,
_In_ EFI_SYSTEM_TABLE* SystemTable)
{
::OutputWideString(
SystemTable->ConOut,
L"Mobility Minimum UEFI Application Project"
L" " MOBILITY_MINUAP_VERSION_STRING L"\r\n"
L"(c) Kenji Mouri. All rights reserved.\r\n"
L"\r\n");

::OutputWideString(
SystemTable->ConOut,
L"Hello World!\r\n");

::OutputWideString(
SystemTable->ConOut,
L"\r\n"
L"Press any key to return to the boot menu...\r\n");
{
UINTN Index = 0;
SystemTable->BootServices->WaitForEvent(
1,
&SystemTable->ConIn->WaitForKey,
&Index);
}

return EFI_SUCCESS;
}

#pragma comment(linker, "/entry:UefiMain")
28 changes: 28 additions & 0 deletions Mobility.MinUap/Mobility.MinUap.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>{A158BB1B-480D-4622-B0F1-517D8F366BC1}</ProjectGuid>
<RootNamespace>Mobility.MinUap</RootNamespace>
<MileProjectType>UefiApplication</MileProjectType>
<TargetName>MoMinUap</TargetName>
<MileProjectUseProjectProperties>true</MileProjectUseProjectProperties>
<MileProjectCompanyName>Mobility</MileProjectCompanyName>
<MileProjectFileDescription>Mobility Minimum UEFI Application Project</MileProjectFileDescription>
<MileProjectInternalName>Mobility.MinUap</MileProjectInternalName>
<MileProjectLegalCopyright>© Kenji Mouri. All rights reserved.</MileProjectLegalCopyright>
<MileProjectOriginalFilename>MoMinUap.efi</MileProjectOriginalFilename>
<MileProjectProductName>Mobility</MileProjectProductName>
<MileProjectVersion>1.0.$([System.DateTime]::Today.Subtract($([System.DateTime]::Parse('2024-11-04'))).TotalDays).0</MileProjectVersion>
<MileProjectVersionTag Condition="false">Alpha 1</MileProjectVersionTag>
</PropertyGroup>
<Import Sdk="Mile.Project.Configurations" Version="1.0.1426" Project="Mile.Project.Platform.x64.props" />
<Import Sdk="Mile.Project.Configurations" Version="1.0.1426" Project="Mile.Project.Platform.ARM64.props" />
<Import Sdk="Mile.Project.Configurations" Version="1.0.1426" Project="Mile.Project.Cpp.Default.props" />
<Import Sdk="Mile.Project.Configurations" Version="1.0.1426" Project="Mile.Project.Cpp.props" />
<Import Project="..\Mile.Uefi\Mile.Uefi.props" />
<ItemGroup>
<ClCompile Include="Mobility.MinUap.cpp" />
</ItemGroup>
<Import Project="..\Mile.Uefi\Mile.Uefi.targets" />
<Import Sdk="Mile.Project.Configurations" Version="1.0.1426" Project="Mile.Project.Cpp.targets" />
</Project>
14 changes: 14 additions & 0 deletions Mobility.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,30 @@ VisualStudioVersion = 17.12.35527.113
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mobility.HvGcs", "Mobility.HvGcs\Mobility.HvGcs.vcxproj", "{30B9DE98-9479-4E1B-AAFA-D754BD5F7182}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mobility.MinUap", "Mobility.MinUap\Mobility.MinUap.vcxproj", "{A158BB1B-480D-4622-B0F1-517D8F366BC1}"
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
{30B9DE98-9479-4E1B-AAFA-D754BD5F7182}.Debug|ARM64.ActiveCfg = Debug|x64
{30B9DE98-9479-4E1B-AAFA-D754BD5F7182}.Debug|x64.ActiveCfg = Debug|x64
{30B9DE98-9479-4E1B-AAFA-D754BD5F7182}.Debug|x64.Build.0 = Debug|x64
{30B9DE98-9479-4E1B-AAFA-D754BD5F7182}.Release|ARM64.ActiveCfg = Release|x64
{30B9DE98-9479-4E1B-AAFA-D754BD5F7182}.Release|x64.ActiveCfg = Release|x64
{30B9DE98-9479-4E1B-AAFA-D754BD5F7182}.Release|x64.Build.0 = Release|x64
{A158BB1B-480D-4622-B0F1-517D8F366BC1}.Debug|ARM64.ActiveCfg = Debug|ARM64
{A158BB1B-480D-4622-B0F1-517D8F366BC1}.Debug|ARM64.Build.0 = Debug|ARM64
{A158BB1B-480D-4622-B0F1-517D8F366BC1}.Debug|x64.ActiveCfg = Debug|x64
{A158BB1B-480D-4622-B0F1-517D8F366BC1}.Debug|x64.Build.0 = Debug|x64
{A158BB1B-480D-4622-B0F1-517D8F366BC1}.Release|ARM64.ActiveCfg = Release|ARM64
{A158BB1B-480D-4622-B0F1-517D8F366BC1}.Release|ARM64.Build.0 = Release|ARM64
{A158BB1B-480D-4622-B0F1-517D8F366BC1}.Release|x64.ActiveCfg = Release|x64
{A158BB1B-480D-4622-B0F1-517D8F366BC1}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit d4faf0f

Please sign in to comment.