diff --git a/.gitea/workflows/publish-release.yml b/.gitea/workflows/publish-release.yml index 891dc69..b066b38 100644 --- a/.gitea/workflows/publish-release.yml +++ b/.gitea/workflows/publish-release.yml @@ -29,12 +29,12 @@ jobs: - name: Build for Windows and Linux run: | - dotnet publish "OF DL/OF DL.csproj" -p:Version=${{ steps.version.outputs.version }} \ + dotnet publish "OF DL/OF DL.Cli.csproj" -p:Version=${{ steps.version.outputs.version }} \ -p:PackageVersion=${{ steps.version.outputs.version }} \ -p:WarningLevel=0 -c Release -r win-x86 \ --self-contained true -p:PublishSingleFile=true -o outwin - dotnet publish "OF DL/OF DL.csproj" -p:Version=${{ steps.version.outputs.version }} \ + dotnet publish "OF DL/OF DL.Cli.csproj" -p:Version=${{ steps.version.outputs.version }} \ -p:PackageVersion=${{ steps.version.outputs.version }} \ -p:WarningLevel=0 -c Release -r linux-x64 \ --self-contained true -p:PublishSingleFile=true -o outlin diff --git a/AGENTS.md b/AGENTS.md index d0e9a0a..8aec47f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -21,10 +21,11 @@ most important change points. ## Project Layout -- `OF DL/Program.cs` is the single entrypoint and routes between GUI (default) and CLI (`--cli`). -- `OF DL/CLI/` contains Spectre.Console UI helpers and progress reporting (CLI-only). -- `OF DL.Gui/` contains the Avalonia desktop UI (`App`, `MainWindow`, `AboutWindow`, `FaqWindow`, MVVM view models, and GUI event handlers). -- `OF DL.Gui/Helpers/` contains GUI-specific utility helpers (for example, Docker-aware web-link behavior shared across windows). +- `OF DL.Cli/CLI/` contains Spectre.Console UI helpers and progress reporting (CLI-only). +- `OF DL.Gui/` contains the Avalonia desktop UI (`App`, `MainWindow`, `AboutWindow`, `FaqWindow`, MVVM view models, and + GUI event handlers). +- `OF DL.Gui/Helpers/` contains GUI-specific utility helpers (for example, Docker-aware web-link behavior shared across + windows). - `OF DL.Core/Services/` contains application services (API, auth, download, config, DB, startup, logging, filenames). - `OF DL.Core/Models/` holds configuration, auth, API request/response models, downloads/startup results, DTOs, entities, and mapping helpers. @@ -101,16 +102,17 @@ dotnet build OF DL.sln - Run from source (GUI mode, default): ```bash -dotnet run --project "OF DL/OF DL.csproj" +dotnet run --project "OF DL/OF DL.Cli.csproj" ``` - Run CLI mode: ```bash -dotnet run --project "OF DL/OF DL.csproj" -- --cli +dotnet run --project "OF DL/OF DL.Cli.csproj" -- --cli ``` -- If you want a local `rules.json` fallback, run from `OF DL/` or copy `OF DL/rules.json` into your working directory. +- If you want a local `rules.json` fallback, run from `OF DL.Cli/` or copy `OF DL.Cli/rules.json` into your working + directory. - Run tests: ```bash diff --git a/Dockerfile b/Dockerfile index 87247d1..79094f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ WORKDIR "/src" # Build release RUN dotnet publish "OF DL.Gui/OF DL.Gui.csproj" -p:WarningLevel=0 -p:Version=$VERSION -c Release -o outgui -RUN dotnet publish "OF DL/OF DL.csproj" -p:WarningLevel=0 -p:Version=$VERSION -c Release -o outcli +RUN dotnet publish "OF DL/OF DL.Cli.csproj" -p:WarningLevel=0 -p:Version=$VERSION -c Release -o outcli # Generate default config.conf files RUN /src/outcli/OF\ DL --non-interactive || true && \ diff --git a/OF DL/CLI/SpectreDownloadEventHandler.cs b/OF DL.Cli/CLI/SpectreDownloadEventHandler.cs similarity index 100% rename from OF DL/CLI/SpectreDownloadEventHandler.cs rename to OF DL.Cli/CLI/SpectreDownloadEventHandler.cs diff --git a/OF DL/CLI/SpectreProgressReporter.cs b/OF DL.Cli/CLI/SpectreProgressReporter.cs similarity index 100% rename from OF DL/CLI/SpectreProgressReporter.cs rename to OF DL.Cli/CLI/SpectreProgressReporter.cs diff --git a/OF DL/CLI/SpectreStatusReporter.cs b/OF DL.Cli/CLI/SpectreStatusReporter.cs similarity index 100% rename from OF DL/CLI/SpectreStatusReporter.cs rename to OF DL.Cli/CLI/SpectreStatusReporter.cs diff --git a/OF DL/Icon/download.ico b/OF DL.Cli/Icon/download.ico similarity index 100% rename from OF DL/Icon/download.ico rename to OF DL.Cli/Icon/download.ico diff --git a/OF DL/OF DL.csproj b/OF DL.Cli/OF DL.Cli.csproj similarity index 100% rename from OF DL/OF DL.csproj rename to OF DL.Cli/OF DL.Cli.csproj diff --git a/OF DL/Program.cs b/OF DL.Cli/Program.cs similarity index 100% rename from OF DL/Program.cs rename to OF DL.Cli/Program.cs diff --git a/OF DL/References/Spectre.Console.deps.json b/OF DL.Cli/References/Spectre.Console.deps.json similarity index 100% rename from OF DL/References/Spectre.Console.deps.json rename to OF DL.Cli/References/Spectre.Console.deps.json diff --git a/OF DL/References/Spectre.Console.dll b/OF DL.Cli/References/Spectre.Console.dll similarity index 100% rename from OF DL/References/Spectre.Console.dll rename to OF DL.Cli/References/Spectre.Console.dll diff --git a/OF DL/chromium-scripts/CREATING_STEALTH_SCRIPT.md b/OF DL.Cli/chromium-scripts/CREATING_STEALTH_SCRIPT.md similarity index 92% rename from OF DL/chromium-scripts/CREATING_STEALTH_SCRIPT.md rename to OF DL.Cli/chromium-scripts/CREATING_STEALTH_SCRIPT.md index 959e86f..bc76c2c 100644 --- a/OF DL/chromium-scripts/CREATING_STEALTH_SCRIPT.md +++ b/OF DL.Cli/chromium-scripts/CREATING_STEALTH_SCRIPT.md @@ -1,4 +1,4 @@ -# Stealth Script Creation +# Stealth Script Creation ## Requirements diff --git a/OF DL/chromium-scripts/stealth.min.js b/OF DL.Cli/chromium-scripts/stealth.min.js similarity index 100% rename from OF DL/chromium-scripts/stealth.min.js rename to OF DL.Cli/chromium-scripts/stealth.min.js diff --git a/OF DL/rules.json b/OF DL.Cli/rules.json similarity index 100% rename from OF DL/rules.json rename to OF DL.Cli/rules.json diff --git a/OF DL.sln b/OF DL.sln index 7253651..fbcb42a 100644 --- a/OF DL.sln +++ b/OF DL.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.5.33516.290 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OF DL", "OF DL\OF DL.csproj", "{318B2CE3-D046-4276-A2CF-89E6DF32F1B3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OF DL.Cli", "OF DL.Cli\OF DL.Cli.csproj", "{318B2CE3-D046-4276-A2CF-89E6DF32F1B3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OF DL.Core", "OF DL.Core\OF DL.Core.csproj", "{7B8B6A26-6732-4B3A-AE62-1CE589DFF8F2}" EndProject diff --git a/docs/installation/linux.md b/docs/installation/linux.md index 123f973..9f5836c 100644 --- a/docs/installation/linux.md +++ b/docs/installation/linux.md @@ -2,14 +2,16 @@ A Linux release of OF-DL is not available at this time, however you can run OF-DL on Linux using Docker. Please refer to the [Docker](/installation/docker) page for instructions on how to run OF-DL in a Docker container. -If you do not have Docker installed, you can download it from [here](https://docs.docker.com/desktop/install/linux-install/). +If you do not have Docker installed, you can download it +from [here](https://docs.docker.com/desktop/install/linux-install/). If you would like to run OF-DL natively on Linux, you can build it from source by following the instructions below. ## Building from source - Install FFmpeg (and FFprobe) -Follow the installtion instructions from FFmpeg ([https://ffmpeg.org/download.html](https://ffmpeg.org/download.html)) for your distro (Ubuntu, Debian, Fedora, etc.) to install FFmpeg and FFprobe +Follow the installation instructions from FFmpeg ([https://ffmpeg.org/download.html](https://ffmpeg.org/download.html)) +for your distro (Ubuntu, Debian, Fedora, etc.) to install FFmpeg and FFprobe !!! warning @@ -17,7 +19,9 @@ Follow the installtion instructions from FFmpeg ([https://ffmpeg.org/download.ht - Install .NET 10 -Follow the installation instructions from Microsoft ([https://learn.microsoft.com/en-us/dotnet/core/install/linux](https://learn.microsoft.com/en-us/dotnet/core/install/linux)) for your distro (Ubuntu, Debian, Fedora, etc.) to install .NET 10. +Follow the installation instructions from +Microsoft ([https://learn.microsoft.com/en-us/dotnet/core/install/linux](https://learn.microsoft.com/en-us/dotnet/core/install/linux)) +for your distro (Ubuntu, Debian, Fedora, etc.) to install .NET 10. - Clone the repo @@ -29,7 +33,7 @@ cd 'OF-DL' - Build the project. Replace `%VERSION%` with the current version number of OF-DL (e.g. `1.9.20`). ```bash -dotnet publish "OF DL/OF DL.csproj" -p:Version=%VERSION% -p:PackageVersion=%VERSION% -c Release +dotnet publish "OF DL/OF DL.Cli.csproj" -p:Version=%VERSION% -p:PackageVersion=%VERSION% -c Release cd 'OF DL/bin/Release/net10.0' ```