Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,22 @@ nix run .#build-installer
- `adk/ossetup/` - Windows installer (ImGui + DirectX 11)
- `libredaemon/` - Rust daemon for LibreNT
- `drivers/` - BTRFS and other Windows drivers

### Utility Scripts

- `utils/Enable-ConsoleLogon.ps1` - toggles classic/console-style logon fallback by disabling or restoring `authui.dll` (supports online and offline Windows roots).

Example:

```powershell
# Apply on current system (Admin shell)
.\utils\Enable-ConsoleLogon.ps1

# Apply to offline image mounted at D:\
.\utils\Enable-ConsoleLogon.ps1 -WindowsRoot 'D:\Windows'

# Restore
.\utils\Enable-ConsoleLogon.ps1 -WindowsRoot 'D:\Windows' -Restore
```
> [!NOTE]
> I will accept **any** contributions to this project, even if it's just a typo fix, a driver update, or a new feature.
3 changes: 1 addition & 2 deletions mswindows/shell/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace LibreNT.Shell;

public partial class App : Application
{
private Window? _window;
private static readonly string LogoPath = "../../librentlogo.svg";

public static Window? MainWindow { get; private set; }
Expand All @@ -27,7 +26,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs args)
MainWindow.Activate();
}

private void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
private void OnUnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e)
{
// Log error and continue
}
Expand Down
3 changes: 1 addition & 2 deletions mswindows/shell/Components/StartMenu/StartMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

<Border Background="{ThemeResource SystemControlBackgroundBaseHighBrush}"
CornerRadius="{StaticResource StartMenuCornerRadius}"
Padding="12"
DropShadow>
Padding="12">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
Expand Down
29 changes: 21 additions & 8 deletions mswindows/shell/Components/StartMenu/StartMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Microsoft.UI.Xaml.Controls;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;

namespace LibreNT.Shell.Components.StartMenu;

Expand Down Expand Up @@ -65,29 +66,41 @@ private void OnAppClick(object sender, RoutedEventArgs e)

private void LaunchApp(string appId)
{
// Launch the application - in a real implementation,
// this would use Windows.ApplicationModel.Store or Process.Start
switch (appId)
{
case "explorer":
Windows.System.ProcessLauncher.TryLaunch("explorer.exe", "");
TryLaunch("explorer.exe");
break;
case "terminal":
Windows.System.ProcessLauncher.TryLaunch("wt.exe", "");
TryLaunch("wt.exe");
break;
case "browser":
Windows.System.ProcessLauncher.TryLaunch("msedge.exe", "");
TryLaunch("msedge.exe");
break;
case "settings":
Windows.System.ProcessLauncher.TryLaunch("ms-settings:", "");
TryLaunch("ms-settings:");
break;
default:
// For demo purposes, show a message
// In production, use proper file associations
break;
}
}

private static void TryLaunch(string target)
{
try
{
Process.Start(new ProcessStartInfo
{
FileName = target,
UseShellExecute = true
});
}
catch
{
// TODO: wire into shell notifications/logging.
}
}

private void OnShutdownClick(object sender, RoutedEventArgs e)
{
// Shutdown logic
Expand Down
4 changes: 2 additions & 2 deletions mswindows/shell/Components/SystemTray/SystemTray.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace LibreNT.Shell.Components.SystemTray;

public sealed partial class SystemTray : UserControl, INotifyPropertyChanged
{
private Timer? _timer;
private System.Timers.Timer? _timer;
private string _currentTime = string.Empty;

public string CurrentTime
Expand All @@ -30,7 +30,7 @@ public SystemTray()

private void InitializeTimer()
{
_timer = new Timer(1000);
_timer = new System.Timers.Timer(1000);
_timer.Elapsed += (s, e) => UpdateTime();
_timer.Start();
}
Expand Down
16 changes: 1 addition & 15 deletions mswindows/shell/LibreNT.Shell.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,5 @@
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.250606001" />
</ItemGroup>

<ItemGroup>
<ApplicationDefinition Include="App.xaml" />
<Compile Include="App.xaml.cs" />
<Page Include="MainWindow.xaml" />
<Compile Include="MainWindow.xaml.cs" />
<Page Include="Components\Taskbar\Taskbar.xaml" />
<Compile Include="Components\Taskbar\Taskbar.xaml.cs" />
<Page Include="Components\StartMenu\StartMenu.xaml" />
<Compile Include="Components\StartMenu\StartMenu.xaml.cs" />
<Page Include="Components\SystemTray\SystemTray.xaml" />
<Compile Include="Components\SystemTray\SystemTray.xaml.cs" />
<Compile Include="Program.cs" />
<Compile Include="Services\WindowManager.cs" />
</ItemGroup>

</Project>
</Project>
10 changes: 6 additions & 4 deletions mswindows/shell/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
x:Class="LibreNT.Shell.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="using:LibreNT.Shell"
xmlns:components="using:LibreNT.Shell.Components"
xmlns:taskbar="using:LibreNT.Shell.Components.Taskbar"
xmlns:startmenu="using:LibreNT.Shell.Components.StartMenu"
mc:Ignorable="d"
Title="LibreNT Desktop"
ExtendsContentIntoTitleBar="True">
Expand All @@ -24,18 +27,17 @@
Background="{ThemeResource SystemControlBackgroundBaseLowBrush}" />

<!-- Taskbar (Windows 11 style - centered) -->
<components:Taskbar x:Name="MainTaskbar"
<taskbar:Taskbar x:Name="MainTaskbar"
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Bottom" />

<!-- Start Menu (hidden by default) -->
<Popup x:Name="StartMenuPopup"
Placement="Bottom"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Margin="0,0,0,60">
<components:StartMenu x:Name="StartMenuControl" />
<startmenu:StartMenu x:Name="StartMenuControl" />
</Popup>
</Grid>
</Window>
2 changes: 1 addition & 1 deletion mswindows/shell/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public MainWindow()
Activated += OnActivated;

// Initialize system tray
var systemTray = new SystemTray.SystemTray();
var systemTray = new SystemTray();
MainTaskbar.SetSystemTray(systemTray);

// Hook up start button
Expand Down
23 changes: 23 additions & 0 deletions ntos2nd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ set(NTOS2ND_HEADERS
ntos2nd/apibridge.h
ntos2nd/sandbox.h
ntos2nd/undocumented.h
NTCall.h
)

# Create the kernel DLL
Expand Down Expand Up @@ -111,3 +112,25 @@ if(Cargo_FOUND)
DESTINATION bin
)
endif()


# POSIX subsystem runtime DLL (user mode)
add_library(posixsubsystem SHARED
posix/runtime/posixsubsystem.c
posix/runtime/posixsubsystem.def
posix/include/posix_abi.h
)
target_include_directories(posixsubsystem PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/posix/include
)
target_link_libraries(posixsubsystem PRIVATE
kernel32
)
install(TARGETS posixsubsystem
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
)
install(FILES posix/include/posix_abi.h
DESTINATION include/ntos2nd/posix
)
Loading