|
|
@ -70,16 +70,49 @@ biggestSingleScreen()
|
|
|
|
return s;
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** @brief Distinguish has-not-been-checked-at-all from false.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct MaybeChecked
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bool hasBeenChecked = false;
|
|
|
|
|
|
|
|
bool value = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MaybeChecked& operator=( bool b )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
cDebug() << "Assigning" << b;
|
|
|
|
|
|
|
|
hasBeenChecked = true;
|
|
|
|
|
|
|
|
value = b;
|
|
|
|
|
|
|
|
return *this;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
operator bool() const { return value; }
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QDebug&
|
|
|
|
|
|
|
|
operator<<( QDebug& s, const MaybeChecked& c )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if ( c.hasBeenChecked )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
s << c.value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
s << "unchecked";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return s;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Calamares::RequirementsList
|
|
|
|
Calamares::RequirementsList
|
|
|
|
GeneralRequirements::checkRequirements()
|
|
|
|
GeneralRequirements::checkRequirements()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QSize availableSize = biggestSingleScreen();
|
|
|
|
QSize availableSize = biggestSingleScreen();
|
|
|
|
|
|
|
|
|
|
|
|
bool enoughStorage = false;
|
|
|
|
MaybeChecked enoughStorage;
|
|
|
|
bool enoughRam = false;
|
|
|
|
MaybeChecked enoughRam;
|
|
|
|
bool hasPower = false;
|
|
|
|
MaybeChecked hasPower;
|
|
|
|
bool hasInternet = false;
|
|
|
|
MaybeChecked hasInternet;
|
|
|
|
bool isRoot = false;
|
|
|
|
MaybeChecked isRoot;
|
|
|
|
bool enoughScreen = availableSize.isValid() && ( availableSize.width() >= CalamaresUtils::windowMinimumWidth )
|
|
|
|
bool enoughScreen = availableSize.isValid() && ( availableSize.width() >= CalamaresUtils::windowMinimumWidth )
|
|
|
|
&& ( availableSize.height() >= CalamaresUtils::windowMinimumHeight );
|
|
|
|
&& ( availableSize.height() >= CalamaresUtils::windowMinimumHeight );
|
|
|
|
|
|
|
|
|
|
|
@ -112,7 +145,7 @@ GeneralRequirements::checkRequirements()
|
|
|
|
isRoot = checkIsRoot();
|
|
|
|
isRoot = checkIsRoot();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
using TR = Logger::DebugRow< const char*, bool >;
|
|
|
|
using TR = Logger::DebugRow< const char*, MaybeChecked >;
|
|
|
|
cDebug() << "GeneralRequirements output:" << TR( "enoughStorage", enoughStorage ) << TR( "enoughRam", enoughRam )
|
|
|
|
cDebug() << "GeneralRequirements output:" << TR( "enoughStorage", enoughStorage ) << TR( "enoughRam", enoughRam )
|
|
|
|
<< TR( "hasPower", hasPower ) << TR( "hasInternet", hasInternet ) << TR( "isRoot", isRoot );
|
|
|
|
<< TR( "hasPower", hasPower ) << TR( "hasInternet", hasInternet ) << TR( "isRoot", isRoot );
|
|
|
|
|
|
|
|
|
|
|
|