aboutsummaryrefslogtreecommitdiff
path: root/src/src/lootmanager.h
blob: d33135ac2435add12d274d0105fab3b4951924b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef LOOTMANAGER_H
#define LOOTMANAGER_H

#include <QString>
#include <functional>

/// Returns the LOOT install directory: ~/.local/share/fluorine/tools/loot
QString lootInstallDir();

/// Returns true if LOOT.exe is present in the tools directory.
bool isLootInstalled();

/// Returns the path to LOOT.exe, or empty if not installed.
QString getLootExePath();

/// Download and install LOOT from the latest GitHub release.
/// Finds the win64 .7z asset, extracts to lootInstallDir().
/// Returns empty string on success, or an error message.
QString downloadLoot(const std::function<void(float)>& progressCb,
                     const std::function<void(const QString&)>& statusCb,
                     const int* cancelFlag = nullptr);

#endif  // LOOTMANAGER_H