diff --git a/README.md b/README.md new file mode 100644 index 0000000..72b527c --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +# 🔙 Steam Rollback + +Steam Roollback is a simple tool that will allow you easily to go back to the old steam user interface. + +# 📣 Whats This For + +> This tool is really usefull for those who want to customize the steam UI + +> For csgo boosting pourposes as the new UI doesnt work well under sandbox enviroments + +![Build Status](https://cdn.discordapp.com/attachments/903283950267564094/1139565749699100713/image.png) + +## 🌳 Simple Use + +1. Go to the [**releases**](https://github.com/IMXNOOBX/steam-rollback/releases) tab. +2. Find the latest release and download it +3. Open the tool and it will automatically return your steam to the old looking UI ++ Enjoy your new old steam! + + +* ❕ if your steam is using the **new steam UI** it will automatically return to the **old one** +* ❕ if you are using the **old steam UI** the program will automatically install the **new one** + +## 📘 Developer Instructions + +1. To generate the zip file automatically run the python script [`generate_zip.py`]() + - Run in your console/terminal: **`python3 generate_zip.py`** + +2. After generating the zip file you can continue to build the program + - Build: **`x64/x86 - Release`** + +3. Locate your binary file in the folder `/`, e.g., `x64/Release`. + +## 💫 Credits + +* Credits to [rollback-steam](https://github.com/merely04/rollback-steam) for making the tool and providing such a usefull tool \ No newline at end of file diff --git a/generate_zip_binary.py b/generate_zip.py similarity index 100% rename from generate_zip_binary.py rename to generate_zip.py diff --git a/steam-rollback/steam-rollback.cpp b/steam-rollback/steam-rollback.cpp index b95565b..d5f5104 100644 --- a/steam-rollback/steam-rollback.cpp +++ b/steam-rollback/steam-rollback.cpp @@ -84,16 +84,10 @@ int main() if (mz_zip_reader_file_stat(&zip_archive, i, &file_stat)) { std::string output_filename = steam_path + std::string("/") + file_stat.m_filename; - // Check if the file already exists - if (util::file_exists(output_filename)) { - debug::log::success("replacing existing file -> " + output_filename); - } + util::display_progress_bar((i + 1) * 100 / num_files); - if (mz_zip_reader_extract_to_file(&zip_archive, i, output_filename.c_str(), 0)) { - debug::log::success("extracted -> " + output_filename); - } - else { - debug::log::error("failed to extract -> " + output_filename); + if (!mz_zip_reader_extract_to_file(&zip_archive, i, output_filename.c_str(), 0)) { + debug::log::error("Failed to extract -> \t\t" + output_filename); } } } diff --git a/steam-rollback/utils/utilities.hpp b/steam-rollback/utils/utilities.hpp index 9e721ed..54bdb05 100644 --- a/steam-rollback/utils/utilities.hpp +++ b/steam-rollback/utils/utilities.hpp @@ -47,7 +47,6 @@ namespace util { return false; } - std::string get_file_version(std::string filePath) { DWORD handle; DWORD versionSize = GetFileVersionInfoSizeA(filePath.c_str(), &handle); @@ -88,6 +87,24 @@ namespace util { return file.good(); } + void display_progress_bar(int progress) { + std::cout << "\r"; + + int barWidth = 110; + int pos = barWidth * progress / 100; + + std::cout << " " << progress << "% ["; + for (int i = 0; i < barWidth; ++i) { + if (i < pos) std::cout << "|"; + else if (i == pos) std::cout << ">"; + else std::cout << "-"; + } + std::cout << "] " << std::flush; + + if (progress == 100) + std::cout << "\n" << std::endl; + } + void extract_resource(const std::string& outputFilePath) { HRSRC hResource = FindResource(NULL, MAKEINTRESOURCE(IDR_OLDSTEAM1), "oldsteam");