From b7548756a85942f96398830b21e74740cf04954f Mon Sep 17 00:00:00 2001 From: Oleksii Holub <1935960+Tyrrrz@users.noreply.github.com> Date: Thu, 16 May 2024 20:42:15 +0300 Subject: [PATCH] Use self-contained builds (#1224) --- .docs/Dotnet.md | 51 ------------------- .docs/Readme.md | 2 - .docs/Scheduling-Linux.md | 2 - .docs/Scheduling-MacOS.md | 2 - .docs/Scheduling-Windows.md | 3 -- .docs/Troubleshooting.md | 12 +---- .docs/Using-the-CLI.md | 6 --- .github/workflows/main.yml | 5 +- .../DiscordChatExporter.Cli.csproj | 1 - .../DiscordChatExporter.Gui.csproj | 1 - Readme.md | 12 ----- 11 files changed, 3 insertions(+), 94 deletions(-) delete mode 100644 .docs/Dotnet.md diff --git a/.docs/Dotnet.md b/.docs/Dotnet.md deleted file mode 100644 index 2555d3552..000000000 --- a/.docs/Dotnet.md +++ /dev/null @@ -1,51 +0,0 @@ -# Install .NET runtime - -**.NET 8.0 Runtime** is required by **DiscordChatExporter**. - -> **Note**: -> Installing the **.NET Runtime** is not required if you running **DiscordChatExporter** using [Docker](Docker.md). - -## Windows - -Both the GUI and the CLI flavors of **DiscordChatExporter** for Windows come with a bootstrapper that should automatically install all the required prerequisites. Simply run the application and follow the presented instructions. - -If, for some reason, you need to install the runtime manually, use one of the download links below: - -- [.NET 8.0 Runtime for **Windows x64**](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-8.0.0-windows-x86-installer) -- [.NET 8.0 Runtime for **Windows x86**](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-8.0.0-windows-x64-installer) -- [.NET 8.0 Runtime for **Windows arm64**](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-8.0.0-windows-arm64-installer) - -> **Note**: -> [How can I tell if my computer is running a 32-bit (x86) or a 64-bit (x64) version of Windows?](https://support.microsoft.com/help/15056/windows-32-64-bit-faq) - -## macOS - -Use one of the download links below: - -- [.NET 8.0 Runtime for **macOS x64**](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-8.0.0-macos-x64-installer) -- [.NET 8.0 Runtime for **macOS arm64**](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-8.0.0-macos-arm64-installer) - -> **Note**: -> [Is my Mac using an Intel processor (x64) or Apple Silicon (arm64)?](https://support.apple.com/HT211814) - -## Linux - -Installing the .NET Runtime works differently depending on which Linux distribution you use. Check out the instructions for your distro: - -- [Ubuntu](https://docs.microsoft.com/dotnet/core/install/linux-ubuntu) -- [Debian](https://docs.microsoft.com/dotnet/core/install/linux-debian) -- [Fedora](https://docs.microsoft.com/dotnet/core/install/linux-fedora) - -For other distros, please check the _'Install on Linux'_ menu on the left of [this page](https://docs.microsoft.com/dotnet/core/install/linux). - -## Verify installation (optional) - -You can check which version of **.NET Runtime** is installed by running the following command in a terminal: - -```console -$ dotnet --info - -.NET runtimes installed: - Microsoft.NETCore.App 7.0.x [C:\path\to\dotnet\shared\Microsoft.NETCore.App] - Microsoft.WindowsDesktop.App 7.0.x [C:\path\to\dotnet\shared\Microsoft.WindowsDesktop.App] -``` diff --git a/.docs/Readme.md b/.docs/Readme.md index c26734cd1..01f86e51a 100644 --- a/.docs/Readme.md +++ b/.docs/Readme.md @@ -2,7 +2,6 @@ ## Installation & Usage -- [Get .NET Runtime](Dotnet.md) - Getting started: - [Using the GUI](Using-the-GUI.md) - [Using the CLI](Using-the-CLI.md) @@ -28,6 +27,5 @@ - [General questions](Troubleshooting.md#general) - [First steps help](Troubleshooting.md#first-steps) - [It's crashing/failing](Troubleshooting.md#DCE-is-crashingfailing) -- [.NET Core Runtime is required](Troubleshooting.md#net-core-runtime-is-required) - [Errors](Troubleshooting.md#errors) - [**More help**](Troubleshooting.md) diff --git a/.docs/Scheduling-Linux.md b/.docs/Scheduling-Linux.md index 7d1fcbdd8..721810eda 100644 --- a/.docs/Scheduling-Linux.md +++ b/.docs/Scheduling-Linux.md @@ -1,7 +1,5 @@ # Scheduling exports with Cron -Make sure you already have **DiscordChatExporter.CLI** downloaded and **.NET Runtime** installed. - ## Creating the script 1. Open Terminal and create a new text file with `nano /path/to/DiscordChatExporter/cron.sh` diff --git a/.docs/Scheduling-MacOS.md b/.docs/Scheduling-MacOS.md index b40c2d897..91f611068 100644 --- a/.docs/Scheduling-MacOS.md +++ b/.docs/Scheduling-MacOS.md @@ -1,7 +1,5 @@ # Scheduling exports on macOS -Make sure you already have **DiscordChatExporter.CLI** downloaded and **.NET Runtime** installed. - ## Creating the script 1. Open TextEdit.app and create a new file diff --git a/.docs/Scheduling-Windows.md b/.docs/Scheduling-Windows.md index c7a83c490..6033da153 100644 --- a/.docs/Scheduling-Windows.md +++ b/.docs/Scheduling-Windows.md @@ -1,8 +1,5 @@ # Scheduling exports on Windows -We'll be using [DiscordChatExporter CLI](https://github.com/Tyrrrz/DiscordChatExporter/releases/latest), PowerShell, and Task Scheduler. -Make sure you already have **DiscordChatExporter.CLI** downloaded and **.NET Runtime** installed. - ## Creating the script 1. Open a text editor such as Notepad and paste: diff --git a/.docs/Troubleshooting.md b/.docs/Troubleshooting.md index 079e467d6..9fde7febb 100644 --- a/.docs/Troubleshooting.md +++ b/.docs/Troubleshooting.md @@ -70,7 +70,7 @@ Check the following page: [Obtaining token](Token-and-IDs.md) ### When I open DCE a black window pops up quickly or nothing shows up -If you have [.NET Runtime correctly installed](Dotnet.md), you might have downloaded the CLI flavor, try [downloading the GUI](Getting-started.md#gui-or-cli) instead. +You might have downloaded the CLI flavor of the app, which is meant to be run in a terminal. Try [downloading the GUI](Getting-started.md#gui-or-cli) instead if that's what you want. ### How can I set DCE to export automatically at certain times? @@ -84,16 +84,6 @@ Check the following pages to learn how to schedule **DiscordChatExporter.CLI** r Try opening it with a different program, try partitioning or use a different file format, like `PlainText`. -### DCE is crashing/failing - -Check the following page: [Installing .NET Core Runtime](Dotnet.md) - -If you already have .NET Core installed, please check if your problem is a [known issue](https://github.com/Tyrrrz/DiscordChatExporter/issues?q=is%3Aissue) before [opening a bug report](https://github.com/Tyrrrz/DiscordChatExporter/issues/new). - -### .NET Core Runtime is required - -Check the following page: [Installing .NET Core Runtime](Dotnet.md) - ### I see messages in the export, but they have no content Your bot is missing the 'Message Content Intent'. Go to the [Discord Developer Portal](https://discord.com/developers/applications), navigate to the 'Bot' section and enable it. diff --git a/.docs/Using-the-CLI.md b/.docs/Using-the-CLI.md index 20eee3b4a..1b0f0bee1 100644 --- a/.docs/Using-the-CLI.md +++ b/.docs/Using-the-CLI.md @@ -1,11 +1,5 @@ # Using the CLI -## Guide - -> **Note**: -> Make sure you have [.NET Core installed](Dotnet.md) before attempting to run the commands below. -> **Docker** users, please refer to the [Docker usage instructions](Docker.md). - ## Step 1 After extracting the `.zip`, open Command Prompt, aka `cmd` (`Terminal` on **macOS** and **Linux**). diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e95968272..8befe4e07 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -99,8 +99,7 @@ jobs: # GUI assets aren't suffixed, unlike the CLI assets asset: DiscordChatExporter - # Need to run on Windows because of DotnetRuntimeBootstrapper's dependency on Ressy - runs-on: windows-latest + runs-on: ubuntu-latest timeout-minutes: 10 permissions: @@ -124,7 +123,7 @@ jobs: --output ${{ matrix.app }}/bin/publish/ --configuration Release --runtime ${{ matrix.rid }} - --no-self-contained + --self-contained - name: Upload artifacts uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 diff --git a/DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj b/DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj index f232e4b72..3b19906b9 100644 --- a/DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj +++ b/DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj @@ -9,7 +9,6 @@ - diff --git a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj index 5574454d6..5158a3b8f 100644 --- a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj +++ b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj @@ -20,7 +20,6 @@ - diff --git a/Readme.md b/Readme.md index 984401f0f..7a18b4896 100644 --- a/Readme.md +++ b/Readme.md @@ -53,18 +53,6 @@ To learn more about the war and how you can help, [click here](https://tyrrrz.me > **Note**: > If you're unsure which build is right for your system, consult with [this page](https://useragent.cc) to determine your OS and CPU architecture. -> **Important**: -> To run **DiscordChatExporter**, you need to make sure that the **.NET 8.0 Runtime** is installed. -> You can download it here: -> -> - [.NET 8.0 Runtime for **macOS x64**](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-8.0.0-macos-x64-installer) -> - [.NET 8.0 Runtime for **macOS arm64**](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-8.0.0-macos-arm64-installer) -> - [.NET 8.0 Runtime for **Linux**](https://learn.microsoft.com/dotnet/core/install/linux) (find the correct download for your distro) -> - On **Windows**, the runtime should be installed automatically when you run the application for the first time -> -> This should not be necessary if you install **DiscordChatExporter** using a package manager, as it should take care of the dependencies for you. -> This is also not necessary if you are running **DiscordChatExporter** via Docker, because the image already contains the runtime. - > **Note**: > AUR and Nix packages linked above are maintained by the community. > If you have any issues with them, please contact the corresponding maintainers.