diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e9aac8e6e..8d97e30a5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,7 +72,7 @@ jobs: if: ${{ always() && steps.compile.outcome == 'success' }} with: SOURCE_FILE: 'bin/Release' - DEST_NAME: 'MCGalaxy-infid' + DEST_NAME: 'MCGalaxy-infid' - uses: ./.github/actions/notify_success if: ${{ always() && steps.compile.outcome == 'success' }} @@ -141,7 +141,7 @@ jobs: if: ${{ always() && steps.compile.outcome == 'success' }} with: SOURCE_FILE: 'CLI/bin/Debug/net6.0/osx-x64/publish' - DEST_NAME: 'MCGalaxy-mac64-standalone' + DEST_NAME: 'MCGalaxy-mac64-standalone' - uses: ./.github/actions/notify_success diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2c7805988..326a2f538 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,7 +50,6 @@ jobs: id: compile shell: bash run: | - make_dotnet_zip() { cp sqlite3_x32.dll $1/sqlite3_x32.dll cp sqlite3_x64.dll $1/sqlite3_x64.dll diff --git a/MCGalaxy/Database/Backends/SQLite.cs b/MCGalaxy/Database/Backends/SQLite.cs index 6f5b1f893..839bf9605 100644 --- a/MCGalaxy/Database/Backends/SQLite.cs +++ b/MCGalaxy/Database/Backends/SQLite.cs @@ -42,7 +42,7 @@ public override ISqlConnection CreateConnection() { public override void LoadDependencies() { - // on macOS/Linux, use the system provided sqlite3 native library + // on macOS/Linux, system provided sqlite3 native library is used if (!IOperatingSystem.DetectOS().IsWindows) return; Server.CheckFile("sqlite3_x32.dll"); diff --git a/MCGalaxy/Server/Maintenance/Updater.cs b/MCGalaxy/Server/Maintenance/Updater.cs index c7a3772d1..54efe276b 100644 --- a/MCGalaxy/Server/Maintenance/Updater.cs +++ b/MCGalaxy/Server/Maintenance/Updater.cs @@ -28,19 +28,26 @@ public static class Updater { public static string SourceURL = "https://github.com/ClassiCube/MCGalaxy"; public const string BaseURL = "https://raw.githubusercontent.com/ClassiCube/MCGalaxy/master/"; - public const string UploadsURL = "https://github.com/ClassiCube/MCGalaxy/tree/master/Uploads"; - + public const string UploadsURL = "https://github.com/ClassiCube/MCGalaxy/tree/master/Uploads"; const string CurrentVersionURL = BaseURL + "Uploads/current_version.txt"; + const string changelogURL = BaseURL + "Changelog.txt"; + + const string CRN_URL = "https://cs.classicube.net/c_client/mcg/release/"; +#if NET_20 + const string CDN_BASE = CRN_URL + "net20/"; +#else + const string CDN_BASE = CRN_URL + "net40/"; +#endif + #if MCG_STANDALONE - static string dllURL = "https://cs.classicube.net/mcgalaxy/" + IOperatingSystem.DetectOS().StandaloneName; + static string DLL_URL = CRN_URL + IOperatingSystem.DetectOS().StandaloneName; #elif TEN_BIT_BLOCKS - const string dllURL = BaseURL + "Uploads/MCGalaxy_infid.dll"; + const string DLL_URL = CDN_BASE + "MCGalaxy_infid.dll"; #else - const string dllURL = BaseURL + "Uploads/MCGalaxy_.dll"; + const string DLL_URL = CDN_BASE + "MCGalaxy_.dll"; #endif - const string changelogURL = BaseURL + "Changelog.txt"; - const string guiURL = BaseURL + "Uploads/MCGalaxy.exe"; - const string cliURL = BaseURL + "Uploads/MCGalaxyCLI.exe"; + const string GUI_URL = CDN_BASE + "MCGalaxy.exe"; + const string CLI_URL = CDN_BASE + "MCGalaxyCLI.exe"; public static event EventHandler NewerVersionDetected; @@ -79,10 +86,10 @@ public static void PerformUpdate() { } WebClient client = HttpUtil.CreateWebClient(); - client.DownloadFile(dllURL, "MCGalaxy_.update"); + client.DownloadFile(DLL_URL, "MCGalaxy_.update"); #if !MCG_STANDALONE - client.DownloadFile(guiURL, "MCGalaxy.update"); - client.DownloadFile(cliURL, "MCGalaxyCLI.update"); + client.DownloadFile(GUI_URL, "MCGalaxy.update"); + client.DownloadFile(CLI_URL, "MCGalaxyCLI.update"); #endif client.DownloadFile(changelogURL, "Changelog.txt"); diff --git a/MCGalaxy/util/OperatingSystem.cs b/MCGalaxy/util/OperatingSystem.cs index 0c83b8d77..76b032b06 100644 --- a/MCGalaxy/util/OperatingSystem.cs +++ b/MCGalaxy/util/OperatingSystem.cs @@ -203,7 +203,7 @@ protected virtual void RestartInPlace() { class LinuxOS : UnixOS { public override string StandaloneName { - get { return IntPtr.Size == 8 ? "nix64" : "nix32"; } + get { return IntPtr.Size == 8 ? "linux64" : "linux32"; } } public override void Init() {