diff --git a/changelog.md b/changelog.md index ffb8170..57936ab 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,14 @@ # Changelog +## 2026.04.04 - Version 26.04 +- Based on Debian +- Added byobu to default install +- Added just to default install +- Added jq to install +- Added Infer# to install +- .NET 8.0.25 +- .NET 9.0.14 +- .NET 10.0.5 + ## 2025.12.27 - Initial release - Initial 'beta' release for testing \ No newline at end of file diff --git a/readme.md b/readme.md index 3995a1a..9a02c4c 100644 --- a/readme.md +++ b/readme.md @@ -34,13 +34,20 @@ The complete list of changes can be found here: [changelog](changelog.md) - [FastFetch](https://github.com/fastfetch-cli/fastfetch) - [git](https://git-scm.com/) with [git-lfs](https://git-lfs.com/) - [htop](https://htop.dev/) +- [just](https://github.com/casey/just) - [lazygit](https://github.com/jesseduffield/lazygit) - [openssl](https://www.openssl.org/) - [ripgrep](https://github.com/BurntSushi/ripgrep) - [strace](https://strace.io/) - [tmux](https://github.com/tmux/tmux/wiki) -- [Visual studio remote shell](https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging?view=visualstudio) - [wget](https://www.gnu.org/software/wget/) +- [jq](https://jqlang.org/) +- [byobu](https://www.byobu.org/) + +**Apps** + +- [Visual studio remote shell](https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging?view=visualstudio) +- [Infer#](https://github.com/microsoft/infersharp) **.NET tools from microsoft** @@ -53,7 +60,7 @@ The complete list of changes can be found here: [changelog](changelog.md) - [dotnet-symbol](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-symbol) - [dotnet-trace](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-trace) - [powershell](https://learn.microsoft.com/en-us/powershell/scripting/install/install-powershell-on-linux) -- [sngen](https://github.com/microsoft/slngen) +- [slngen](https://github.com/microsoft/slngen) - [upgrade-assistant](https://learn.microsoft.com/en-us/dotnet/core/porting/upgrade-assistant-overview) - [DocFx](https://dotnet.github.io/docfx/index.html) @@ -62,6 +69,7 @@ The complete list of changes can be found here: [changelog](changelog.md) - [csharprepl](https://github.com/waf/CSharpRepl) - [ilspycmd](github.com/icsharpcode/ILSpy) - [roslynator](https://github.com/dotnet/roslynator?tab=readme-ov-file#command-line-tool) +- [Csproj](https://github.com/webmaster442/csproj) ## Installation @@ -88,10 +96,11 @@ wsl --set-default-version 2 1. Install debian: `wsl --install Debian` 2. Install user: `user` with password: `pass` 3. Run install.sh: `./src/install.sh` this will do most of the installing of software -4. Run branding.sh: `sudo ./src/branding.sh` to do branding -5. Run install-app.sh: `sudo ./src/install-app.sh` to install the debianet app. -5. exit: `exit` -6. do a shutdown: `wsl --shutdown` -7. export: `wsl --export Debian --format tar.xz debiannet.wsl` -8. unregister debian: `wsl --unregister Debian` -9. reinstall debianet.wsl \ No newline at end of file +4. Change to the source directory: `cd src` +5. Run branding.sh: `sudo ./branding.sh` to do branding +6. Run install-app.sh: `sudo ./install-app.sh` to install the debianet app. +7. exit: `exit` +8. do a shutdown: `wsl --shutdown` +9. export: `wsl --export Debian --format tar.xz debiannet.wsl` +10. unregister debian: `wsl --unregister Debian` +11. reinstall debianet.wsl \ No newline at end of file diff --git a/src/DebiaNetApp/Commands/DockerMenuCommand.cs b/src/DebiaNetApp/Commands/DockerMenuCommand.cs index bc41e71..0e61490 100644 --- a/src/DebiaNetApp/Commands/DockerMenuCommand.cs +++ b/src/DebiaNetApp/Commands/DockerMenuCommand.cs @@ -12,6 +12,12 @@ internal sealed class DockerMenuCommand : AsyncCommand { public override async Task ExecuteAsync(CommandContext context, CancellationToken cancellationToken) { + if (!DependencyChecker.IsDockerInstalled()) + { + Ui.Error(Resources.Error_DockerNotInstalled); + return ExitCodes.MissingDependency; + } + var selections = new SelectorMenuItem[] { new JsonCliMenuItem(Resources.Menu_Docker_ListRunningContainers, $"{Emoji.Known.Scroll} ") diff --git a/src/DebiaNetApp/DebiaNetApp.csproj b/src/DebiaNetApp/DebiaNetApp.csproj index e71d386..55f2457 100644 --- a/src/DebiaNetApp/DebiaNetApp.csproj +++ b/src/DebiaNetApp/DebiaNetApp.csproj @@ -6,6 +6,16 @@ enable enable true + Webmaster442 + https://github.com/webmaster442/DebiaNet + https://github.com/webmaster442/DebiaNet + git + True + debianet + True + + $([System.DateTime]::UtcNow.ToString("yyyy")).$([System.DateTime]::UtcNow.ToString("MM")).$([System.DateTime]::UtcNow.ToString("dd")).0 + diff --git a/src/DebiaNetApp/ExitCodes.cs b/src/DebiaNetApp/ExitCodes.cs index a5ae340..bed6dcf 100644 --- a/src/DebiaNetApp/ExitCodes.cs +++ b/src/DebiaNetApp/ExitCodes.cs @@ -5,4 +5,5 @@ internal static class ExitCodes public const int NotLinux = ushort.MaxValue; public const int SudoUser = 1; public const int Success = 0; + public const int MissingDependency = 2; } \ No newline at end of file diff --git a/src/DebiaNetApp/Infrastructure/DependencyChecker.cs b/src/DebiaNetApp/Infrastructure/DependencyChecker.cs new file mode 100644 index 0000000..d035d61 --- /dev/null +++ b/src/DebiaNetApp/Infrastructure/DependencyChecker.cs @@ -0,0 +1,37 @@ +using System.Diagnostics; + +namespace DebiaNetApp.Infrastructure; + +internal static class DependencyChecker +{ + public static bool IsInstalled(string appBinary, params string[] arguments) + { + try + { + using var process = new Process(); + process.StartInfo.FileName = appBinary; + for (int i = 0; i < arguments.Length; i++) + { + process.StartInfo.ArgumentList.Add(arguments[i]); + } + process.StartInfo.RedirectStandardOutput = true; + process.StartInfo.RedirectStandardError = true; + process.StartInfo.UseShellExecute = false; + process.StartInfo.CreateNoWindow = true; + + process.Start(); + process.WaitForExit(); + return process.ExitCode == 0; + } + catch + { + return false; + } + } + + public static bool IsDockerInstalled() + => IsInstalled("docker", "--version"); + + public static bool IsAptAvailable() + => IsInstalled("apt-get", "--version"); +} diff --git a/src/DebiaNetApp/Program.cs b/src/DebiaNetApp/Program.cs index c637d70..61c00b9 100644 --- a/src/DebiaNetApp/Program.cs +++ b/src/DebiaNetApp/Program.cs @@ -17,7 +17,13 @@ if (Linux.IsRunningWithElevatedPriviliges()) { Ui.Error(Resources.Error_SudoUser); - return ExitCodes.NotLinux; + return ExitCodes.SudoUser; +} + +if (!DependencyChecker.IsAptAvailable()) +{ + Ui.Error(Resources.Error_NotAptDistro); + return ExitCodes.MissingDependency; } var app = new CommandApp(); diff --git a/src/DebiaNetApp/Properties/Resources.Designer.cs b/src/DebiaNetApp/Properties/Resources.Designer.cs index 0ee05aa..6ffa6cd 100644 --- a/src/DebiaNetApp/Properties/Resources.Designer.cs +++ b/src/DebiaNetApp/Properties/Resources.Designer.cs @@ -60,6 +60,24 @@ internal Resources() { } } + /// + /// Looks up a localized string similar to This function of the app requires docker to be installed.. + /// + public static string Error_DockerNotInstalled { + get { + return ResourceManager.GetString("Error_DockerNotInstalled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your distribution doesn't use apt as package manager. This app only supports apt based distributions. + /// + public static string Error_NotAptDistro { + get { + return ResourceManager.GetString("Error_NotAptDistro", resourceCulture); + } + } + /// /// Looks up a localized string similar to This application is only supported on Linux systems.. /// diff --git a/src/DebiaNetApp/Properties/Resources.resx b/src/DebiaNetApp/Properties/Resources.resx index 4ada2bc..8c42f75 100644 --- a/src/DebiaNetApp/Properties/Resources.resx +++ b/src/DebiaNetApp/Properties/Resources.resx @@ -186,4 +186,10 @@ Value + + This function of the app requires docker to be installed. + + + Your distribution doesn't use apt as package manager. This app only supports apt based distributions + \ No newline at end of file diff --git a/src/branding/repository-open-graph.png b/src/branding/repository-open-graph.png new file mode 100644 index 0000000..b1cc8d1 --- /dev/null +++ b/src/branding/repository-open-graph.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d268ec7f6cd9acc1a9c9db815154d9f8d9484664d2fca65dacbaa6a85ab7d3c8 +size 36185 diff --git a/src/branding/repository-open-graph.svg b/src/branding/repository-open-graph.svg new file mode 100644 index 0000000..8a0e407 --- /dev/null +++ b/src/branding/repository-open-graph.svg @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + NET + + + diff --git a/src/install.sh b/src/install.sh index 47f26f5..63dccfb 100644 --- a/src/install.sh +++ b/src/install.sh @@ -23,6 +23,7 @@ sudo apt install -y \ git-lfs \ gpg \ htop \ + just \ lazygit \ libxml2 \ mc \ @@ -31,7 +32,9 @@ sudo apt install -y \ strace \ tmux \ unzip \ - wget + wget \ + jq \ + byobu # prerpare docker install sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc @@ -65,9 +68,6 @@ sudo usermod -aG docker $USER sudo mkdir -p /etc/systemd/system/docker.service.d/ sudo cp docker-override.conf /etc/systemd/system/docker.service.d/override.conf -# update dotnet workloads -sudo dotnet workload update - # install devtoys.cli wget https://github.com/DevToys-app/DevToys/releases/download/v2.0.8.0/devtoys.cli_linux_x64.deb -O devtoys.cli.deb sudo dpkg -i devtoys.cli.deb @@ -76,6 +76,12 @@ rm devtoys.cli.deb # install VS Remote debugger curl -sSL https://aka.ms/getvsdbgsh | /bin/sh /dev/stdin -v latest -l ~/vsdbg +# install infer# +mkdir -p ~/infersharp +curl -L https://github.com/microsoft/infersharp/releases/download/v1.5/infersharp-linux64-v1.5.tar.gz -o infersharp.tar.gz +tar -xvzf infersharp.tar.gz -C ~/infersharp +rm infersharp.tar.gz + # install ripgrep wget https://github.com/BurntSushi/ripgrep/releases/download/15.1.0/ripgrep_15.1.0-1_amd64.deb -O ripgrep.deb sudo dpkg -i ripgrep.deb @@ -87,6 +93,9 @@ curl -fOL "https://github.com/wagoodman/dive/releases/download/v${DIVE_VERSION}/ sudo apt install ./dive_${DIVE_VERSION}_linux_amd64.deb rm ./dive_${DIVE_VERSION}_linux_amd64.deb +# update dotnet workloads +sudo dotnet workload update + # install .NET Global tools dotnet tool install --global dotnet-counters dotnet tool install --global dotnet-coverage @@ -105,6 +114,7 @@ dotnet tool install --global docfx dotnet tool install --global csharprepl dotnet tool install --global ilspycmd dotnet tool install --global roslynator.dotnet.cli +dotnet tool install --global CsProj # set path for dotnet tools echo 'export PATH="$PATH:$HOME/.dotnet/tools"' >> ~/.bashrc