Skip to content

Commit b21f5fd

Browse files
committed
Driver switch v4.0
fixes #346
1 parent b383004 commit b21f5fd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+6422
-2459
lines changed

.gitignore

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Ignore Visual Studio temporary files, build results, and
22
## files generated by popular Visual Studio add-ons.
33
##
4-
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
4+
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
55

66
# User-specific files
77
*.rsuser
@@ -90,6 +90,7 @@ StyleCopReport.xml
9090
*.tmp_proj
9191
*_wpftmp.csproj
9292
*.log
93+
*.tlog
9394
*.vspscc
9495
*.vssscc
9596
.builds
@@ -293,6 +294,17 @@ node_modules/
293294
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
294295
*.vbw
295296

297+
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
298+
*.vbp
299+
300+
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
301+
*.dsw
302+
*.dsp
303+
304+
# Visual Studio 6 technical files
305+
*.ncb
306+
*.aps
307+
296308
# Visual Studio LightSwitch build output
297309
**/*.HTMLClient/GeneratedArtifacts
298310
**/*.DesktopClient/GeneratedArtifacts
@@ -349,6 +361,9 @@ ASALocalRun/
349361
# Local History for Visual Studio
350362
.localhistory/
351363

364+
# Visual Studio History (VSHistory) files
365+
.vshistory/
366+
352367
# BeatPulse healthcheck temp database
353368
healthchecksdb
354369

@@ -361,4 +376,25 @@ MigrationBackup/
361376
# Fody - auto-generated XML schema
362377
FodyWeavers.xsd
363378

379+
# VS Code files for those working on multiple tools
380+
.vscode/*
381+
!.vscode/settings.json
382+
!.vscode/tasks.json
383+
!.vscode/launch.json
384+
!.vscode/extensions.json
385+
*.code-workspace
386+
387+
# Local History for Visual Studio Code
388+
.history/
389+
390+
# Windows Installer files from build outputs
391+
*.cab
392+
*.msi
393+
*.msix
394+
*.msm
395+
*.msp
396+
397+
# JetBrains Rider
398+
*.sln.iml
399+
364400
.idea/

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@
3434

3535
---
3636

37+
#### IGCIT Driver Switch v4.0.0
38+
* Add support for new drivers package (exe)
39+
* Remove old drivers package support (zip and igfxpin)
40+
* Remove PowerShell requirement
41+
* Rewrite from scratch with QT and C++
42+
3743
#### IGCIT Driver Switch v3.0.0
3844
* Add full support for new driver installer
3945
* Fix application freeze in some cases

IGCIT Driver Switch/App.config

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#pragma once
2+
3+
#include <QThread>
4+
#include <QColor>
5+
#include <bit7z/bitfileextractor.hpp>
6+
#include <bit7z/bitexception.hpp>
7+
8+
class ExtractDriverForInstallthread: public QThread {
9+
Q_OBJECT
10+
11+
private:
12+
QString exePath;
13+
QString extractPath;
14+
15+
public:
16+
explicit ExtractDriverForInstallthread(QObject *parent = nullptr): QThread(parent) {}
17+
18+
void setPaths(const QString &filePath, const QString &extractDirPath) {
19+
exePath = filePath;
20+
extractPath = extractDirPath;
21+
}
22+
23+
void run() override {
24+
try {
25+
bit7z::Bit7zLibrary lib {"7za.dll"};
26+
bit7z::BitFileExtractor extractor {lib, bit7z::BitFormat::SevenZip};
27+
uint64_t totalSz = 1;
28+
29+
extractor.setTotalCallback([&totalSz](uint64_t total_size) {
30+
totalSz = total_size;
31+
}
32+
);
33+
34+
extractor.setProgressCallback([this, &totalSz](uint64_t processed_size) {
35+
emit progressUpdated(static_cast<int>((100.f * processed_size) / totalSz));
36+
return true;
37+
}
38+
);
39+
40+
emit logMessageWritten("Extracting driver..", Qt::blue);
41+
extractor.extract(exePath.toStdString(), extractPath.toStdString());
42+
43+
emit resultReady(true);
44+
return;
45+
46+
} catch (const bit7z::BitException &e) {
47+
emit logMessageWritten(e.what(), Qt::red);
48+
}
49+
50+
emit resultReady(false);
51+
}
52+
53+
signals:
54+
void resultReady(bool res);
55+
void logMessageWritten(const QString &msg, const QColor &color);
56+
void progressUpdated(int progress);
57+
};

0 commit comments

Comments
 (0)