Permalink
Browse files

Completely deprecate ClassicalSharp. Rest in peace.

  • Loading branch information...
UnknownShadow200 committed Feb 1, 2019
1 parent 59b1d4b commit 4655f4178977b1b924cb209b8b81091ce11535e8
Showing with 28 additions and 11 deletions.
  1. +6 −2 Launcher2/Gui/Screens/UpdatesScreen.cs
  2. +5 −2 Launcher2/LauncherWindow.cs
  3. +5 −5 Launcher2/Utils/Client.cs
  4. +12 −2 src/Logger.c
@@ -124,8 +124,12 @@ public sealed class UpdatesScreen : Screen {
}

static string GetCExe(bool dx) {
// TODO: OSX, 32 bit linux
if (!OpenTK.Configuration.RunningOnWindows) return "ClassiCube";
// only a 32 bit build for OSX
if (OpenTK.Configuration.RunningOnMacOS) return "ClassiCube.osx";

if (!OpenTK.Configuration.RunningOnWindows) {
return IntPtr.Size == 8 ? "ClassiCube" : "ClassiCube.32";
}

if (IntPtr.Size == 8) {
return dx ? "ClassiCube.64.exe" : "ClassiCube.64-opengl.exe";
@@ -87,9 +87,12 @@ public sealed partial class LauncherWindow {

IDrawer2D.Cols['g'] = new PackedCol(125, 125, 125);

if (Client.CClient && Configuration.RunningOnWindows && Platform.FileExists(Client.GetExeName())) {
if (Platform.FileExists(Client.GetCExeName())) {
ErrorHandler.ShowDialog("Deprecated Client",
"ClassicalSharp is deprecated - use " + Client.GetExeName() + " instead");
"ClassicalSharp is deprecated - use " + Client.GetCExeName() + " instead");
} else {
ErrorHandler.ShowDialog("Deprecated Client",
"ClassicalSharp is deprecated - update to latest release again and use " + Client.GetCExeName() + " instead");
}
}

@@ -14,11 +14,11 @@ public static class Client {
public static bool CClient;

public static string GetExeName() {
if (!CClient) return "ClassicalSharp.exe";
if (OpenTK.Configuration.RunningOnWindows)
return "ClassiCube.exe";
return "ClassiCube"; // TODO: OSX filename
return CClient ? GetCExeName() : "ClassicalSharp.exe";
}

public static string GetCExeName() {
return OpenTK.Configuration.RunningOnWindows ? "ClassiCube.exe" : "ClassiCube";
}

public static bool Start(ClientStartData data, bool classicubeSkins, ref bool shouldExit) {
@@ -484,12 +484,20 @@ void Logger_Log(const String* msg) {
Stream_Write(&logStream, msg->buffer, msg->length);
}

static void Logger_DumpSpacing(void) {
String msg; char msgBuffer[STRING_SIZE];
String_InitArray(msg, msgBuffer);

String_Format2(&msg, "%c----------------------------------------%c",
Platform_NewLine, Platform_NewLine);
Logger_Log(&msg);
}

static void Logger_AbortCommon(ReturnCode result, const char* raw_msg, void* ctx) {
String msg; char msgBuffer[3070 + 1];
String_InitArray_NT(msg, msgBuffer);

String_Format4(&msg, "--------------------%cClassiCube crashed.%cMessage: %c%c",
Platform_NewLine, Platform_NewLine, raw_msg, Platform_NewLine);
String_Format3(&msg, "ClassiCube crashed.%cMessage: %c%c", Platform_NewLine, raw_msg, Platform_NewLine);
#ifdef CC_COMMIT_SHA
String_Format2(&msg, "Commit SHA: %c%c", CC_COMMIT_SHA, Platform_NewLine);
#endif
@@ -498,7 +506,9 @@ static void Logger_AbortCommon(ReturnCode result, const char* raw_msg, void* ctx
String_Format2(&msg, "%h%c", &result, Platform_NewLine);
} else { result = 1; }

Logger_DumpSpacing();
Logger_Log(&msg);

Logger_DumpRegisters(ctx);
Logger_DumpBacktrace(&msg, ctx);
Logger_DumpMisc(ctx);

0 comments on commit 4655f41

Please sign in to comment.