diff --git a/CraftOS-PC 2.vcxproj b/CraftOS-PC 2.vcxproj index a9be8f58..d8211ebc 100644 --- a/CraftOS-PC 2.vcxproj +++ b/CraftOS-PC 2.vcxproj @@ -157,7 +157,7 @@ - + diff --git a/CraftOS-PC 2.vcxproj.filters b/CraftOS-PC 2.vcxproj.filters index 4982b127..6c00dd0c 100644 --- a/CraftOS-PC 2.vcxproj.filters +++ b/CraftOS-PC 2.vcxproj.filters @@ -19,9 +19,6 @@ Resource Files - - Resource Files - Source Files @@ -40,6 +37,9 @@ Resource Files + + Resource Files + diff --git a/src/main.cpp b/src/main.cpp index 3ae3abaf..40326084 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -49,6 +49,7 @@ void update_thread() { parser.parse(session.receiveResponse(response)); Poco::JSON::Object::Ptr root = parser.asVar().extract(); if (root->getValue("tag_name") != CRAFTOSPC_VERSION) { +#if defined(__APPLE__) || defined(WIN32) SDL_MessageBoxData msg; SDL_MessageBoxButtonData buttons[] = { {0, 0, "Skip This Version"}, @@ -83,6 +84,9 @@ void update_thread() { // this should never happen exit(choice); } +#else + queueTask([](void* arg)->void* {SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_INFORMATION, "Update available!", (const char*)arg, NULL); return NULL; }, (void*)(std::string("A new update to CraftOS-PC is available (") + root->getValue("tag_name") + ", you have " CRAFTOSPC_VERSION "). Go to " + root->getValue("html_url") + " to download the new version.").c_str()); +#endif } } catch (std::exception &e) { printf("Could not check for updates: %s\n", e.what()); diff --git a/src/platform_linux.cpp b/src/platform_linux.cpp index 91929f23..0bc1d86d 100755 --- a/src/platform_linux.cpp +++ b/src/platform_linux.cpp @@ -142,9 +142,7 @@ void pushHostString(lua_State *L) { } void updateNow(std::string tag_name) { - int * i = new int; - *i = system("pkexec apt update; pkexec apt upgrade craftos-pc"); - delete i; // to silence warnings + } #endif // __INTELLISENSE__ \ No newline at end of file