Skip to content

Commit

Permalink
missing files added
Browse files Browse the repository at this point in the history
  • Loading branch information
chrxh committed Nov 11, 2024
1 parent 25ae2ab commit 718122a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
18 changes: 18 additions & 0 deletions source/Gui/StartupCheckService.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include "StartupCheckService.h"

#include <filesystem>

#include "Base/Exceptions.h"
#include "Base/LoggingService.h"
#include "Base/Resources.h"

void StartupCheckService::check(SimulationFacade const& simulationFacade)
{
log(Priority::Important, "check if resource folder exist");
if (!std::filesystem::exists(Const::ResourcePath)) {
throw InitialCheckException("The resource folder has not been found. Please start ALIEN from the directory in which the folder `resource` is located.");
}

log(Priority::Important, "check if cuda device exist");
simulationFacade->getGpuName();
}
12 changes: 12 additions & 0 deletions source/Gui/StartupCheckService.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once

#include "Base/Singleton.h"
#include "EngineInterface/SimulationFacade.h"

class StartupCheckService
{
MAKE_SINGLETON(StartupCheckService);

public:
void check(SimulationFacade const& simulationFacade);
};

0 comments on commit 718122a

Please sign in to comment.