Skip to content

Commit

Permalink
Windows: complete rewrite of drive restoration and image writing
Browse files Browse the repository at this point in the history
This is a complete rewrite of the Windows support. It introduces a new
library 'libwindisk' that combines use of WMI and WinAPI to manipulate
with devices. We use Windows Storage Management for getting information
about devices and some actions, especially since pure WinAPI does not
seem to have support for things like formatting or partition removal.
This library is used in both the app and the helper process used for
writing and formatting. We now also don't rely on diskpart since it
didn't work properly in some cases.

Fixes #626 | Fixes #575 | Fixes #574 |Fixes #555 | Fixes #96
  • Loading branch information
grulja committed Oct 25, 2024
1 parent fd0648a commit a2c2373
Show file tree
Hide file tree
Showing 16 changed files with 1,812 additions and 551 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
with:
clang-format-version: '17'
check-path: 'src'
exclude-regex: 'src\/helper\/win|src\/app\/crashhandler.cpp'
exclude-regex: 'src\/app\/crashhandler.cpp'
2 changes: 1 addition & 1 deletion src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ if (UNIX AND NOT APPLE)
endif()

if (WIN32)
target_link_libraries(mediawriter dbghelp)
target_link_libraries(mediawriter dbghelp libwindisk)
endif()

if (APPLE)
Expand Down
1 change: 1 addition & 0 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Fedora Media Writer
* Copyright (C) 2024 Jan Grulich <jgrulichredhat.com>
* Copyright (C) 2016 Martin Bříza <[email protected]>
*
* This program is free software; you can redistribute it and/or
Expand Down
2 changes: 1 addition & 1 deletion src/app/utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Options

bool testing{false};
bool verbose{false};
#ifdef QT_NO_DEBUG
#if defined(QT_NO_DEBUG) && !defined(_WIN32)
bool logging{false};
#else
bool logging{true};
Expand Down
Loading

0 comments on commit a2c2373

Please sign in to comment.