Skip to content

Commit

Permalink
Completely deprecate ClassicalSharp. Rest in peace.
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownShadow200 committed Feb 1, 2019
1 parent 59b1d4b commit 4655f41
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 11 deletions.
8 changes: 6 additions & 2 deletions Launcher2/Gui/Screens/UpdatesScreen.cs
Expand Up @@ -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";
Expand Down
7 changes: 5 additions & 2 deletions Launcher2/LauncherWindow.cs
Expand Up @@ -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");
}
}

Expand Down
10 changes: 5 additions & 5 deletions Launcher2/Utils/Client.cs
Expand Up @@ -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) {
Expand Down
14 changes: 12 additions & 2 deletions src/Logger.c
Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit 4655f41

Please sign in to comment.