mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 04:32:50 -04:00
Switch download URLs to classicube CDN
This commit is contained in:
parent
77e890afb4
commit
5a4b00c654
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -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
|
||||
|
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@ -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
|
||||
|
@ -42,7 +42,7 @@ namespace MCGalaxy.SQL
|
||||
|
||||
|
||||
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");
|
||||
|
@ -28,19 +28,26 @@ namespace MCGalaxy
|
||||
{
|
||||
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";
|
||||
#if MCG_STANDALONE
|
||||
static string dllURL = "https://cs.classicube.net/mcgalaxy/" + IOperatingSystem.DetectOS().StandaloneName;
|
||||
#elif TEN_BIT_BLOCKS
|
||||
const string dllURL = BaseURL + "Uploads/MCGalaxy_infid.dll";
|
||||
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 dllURL = BaseURL + "Uploads/MCGalaxy_.dll";
|
||||
const string CDN_BASE = CRN_URL + "net40/";
|
||||
#endif
|
||||
const string changelogURL = BaseURL + "Changelog.txt";
|
||||
const string guiURL = BaseURL + "Uploads/MCGalaxy.exe";
|
||||
const string cliURL = BaseURL + "Uploads/MCGalaxyCLI.exe";
|
||||
|
||||
#if MCG_STANDALONE
|
||||
static string DLL_URL = CRN_URL + IOperatingSystem.DetectOS().StandaloneName;
|
||||
#elif TEN_BIT_BLOCKS
|
||||
const string DLL_URL = CDN_BASE + "MCGalaxy_infid.dll";
|
||||
#else
|
||||
const string DLL_URL = CDN_BASE + "MCGalaxy_.dll";
|
||||
#endif
|
||||
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 @@ namespace MCGalaxy
|
||||
}
|
||||
|
||||
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");
|
||||
|
||||
|
@ -203,7 +203,7 @@ namespace MCGalaxy.Platform
|
||||
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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user