Skip to content

Commit

Permalink
IGCIT Helper 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
IGCIT committed Jul 5, 2023
1 parent bab14a9 commit 8676f72
Show file tree
Hide file tree
Showing 76 changed files with 6,667 additions and 3,195 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#### IGCIT Helper v2.0.0
* Fix crash dumps enable option when some keys are missing
* Improve SSU anonimyze option, also apply Pokechu22 suggestions
* List all available/enabled Intel GPUs in the system in Device info
* Rewrite from scratch with QT and C++

#### IGCIT Helper v1.5.1
* Remove leftover used to test compression

Expand Down
Binary file removed IGCIT Helper/7z/7za.dll
Binary file not shown.
Binary file removed IGCIT Helper/7z/7za.exe
Binary file not shown.
Binary file removed IGCIT Helper/7z/7zxa.dll
Binary file not shown.
31 changes: 0 additions & 31 deletions IGCIT Helper/7z/License.txt

This file was deleted.

8 changes: 0 additions & 8 deletions IGCIT Helper/App.config

This file was deleted.

56 changes: 56 additions & 0 deletions IGCIT Helper/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
cmake_minimum_required(VERSION 3.5)

project(IGCITHelper VERSION 0.1 LANGUAGES CXX)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

enable_language("RC")
set (WIN32_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/IGCITHelper.rc)

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)

set(PROJECT_SOURCES
main.cpp
mainwindow.cpp
mainwindow.h
ExtractDumpsCompressThread.h

mainwindow.ui
igcithelper-resource.qrc
)

if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
qt_add_executable(IGCITHelper
MANUAL_FINALIZATION
${PROJECT_SOURCES}
${WIN32_RESOURCES}
)
else()
add_executable(IGCITHelper
${PROJECT_SOURCES}
${WIN32_RESOURCES}
)
endif()

target_include_directories(IGCITHelper PRIVATE bit7z/include)
target_link_libraries(IGCITHelper PRIVATE Qt${QT_VERSION_MAJOR}::Widgets ${CMAKE_SOURCE_DIR}/bit7z/lib/x64/${CMAKE_BUILD_TYPE}/bit7z.lib oleaut32)

set_target_properties(IGCITHelper PROPERTIES
WIN32_EXECUTABLE TRUE
)

install(TARGETS IGCITHelper
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(IGCITHelper)
endif()
6 changes: 0 additions & 6 deletions IGCIT Helper/CommonData.cs

This file was deleted.

11 changes: 0 additions & 11 deletions IGCIT Helper/Events/DialogCancelEvent.cs

This file was deleted.

11 changes: 0 additions & 11 deletions IGCIT Helper/Events/DialogCancelEventArgs.cs

This file was deleted.

5 changes: 0 additions & 5 deletions IGCIT Helper/Events/DialogType.cs

This file was deleted.

75 changes: 75 additions & 0 deletions IGCIT Helper/ExtractDumpsCompressThread.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#pragma once

#include <QThread>
#include <QColor>
#include <QDir>
#include <bit7z/bitarchivewriter.hpp>
#include <bit7z/bitexception.hpp>

class ExtractDumpsCompressThread: public QThread {
Q_OBJECT

private:
QString outPath;
bool cancelled = false;

public:
explicit ExtractDumpsCompressThread(QObject *parent = nullptr): QThread(parent) {}

[[nodiscard]]
bool isCancelled() const { return cancelled; }

[[nodiscard]]
QString getOutputPath() const { return outPath; }

void setOutputPath(const QString &path) { outPath = path; }

void run() override {
try {
bit7z::Bit7zLibrary lib {"7z.dll"};
bit7z::BitArchiveWriter bwriter {lib, bit7z::BitFormat::SevenZip};
uint64_t totalSz = 1;

bwriter.setTotalCallback([&totalSz](uint64_t total_size) {
totalSz = total_size;
}
);

bwriter.setProgressCallback([this, &totalSz](uint64_t processed_size) {
if (this->isInterruptionRequested()) {
cancelled = true;
return false;
}

emit progressUpdated(static_cast<int>((100.f * processed_size) / totalSz));
return true;
}
);

if (QDir(R"(C:\AppCrashDumps)").exists())
bwriter.addDirectory(R"(C:\AppCrashDumps)");

if (QDir(R"(C:\Windows\Minidump)").exists())
bwriter.addDirectory(R"(C:\Windows\Minidump)");

if (QDir(R"(C:\Windows\LiveKernelReports\WATCHDOG)").exists())
bwriter.addDirectory(R"(C:\Windows\LiveKernelReports\WATCHDOG)");

bwriter.setCompressionLevel(bit7z::BitCompressionLevel::Max);
bwriter.compressTo(outPath.toStdString());

emit resultReady(true, outPath);
return;

} catch (const bit7z::BitException &e) {
emit logMessageWritten(e.what());
}

emit resultReady(false, outPath);
}

signals:
void resultReady(bool res, const QString &path);
void logMessageWritten(const QString &msg);
void progressUpdated(int progress);
};
Loading

0 comments on commit 8676f72

Please sign in to comment.