@@ -14,13 +14,8 @@ namespace nbl::system
1414class IApplicationFramework
1515{
1616 public:
17- IApplicationFramework (
18- const system::path& _localInputCWD,
19- const system::path& _localOutputCWD,
20- const system::path& _sharedInputCWD,
21- const system::path& _sharedOutputCWD) :
22- localInputCWD (_localInputCWD), localOutputCWD(_localOutputCWD), sharedInputCWD(_sharedInputCWD), sharedOutputCWD(_sharedOutputCWD)
23- {
17+ static void GlobalsInit ()
18+ {
2419 #ifdef _NBL_PLATFORM_WINDOWS_
2520 // TODO: @AnastaZIuk also provide define constants for DXC install dir!
2621 const HRESULT dxcLoad = CSystemWin32::delayLoadDLL (" dxcompiler.dll" ,{system::path (_DXC_DLL_).parent_path ()});
@@ -31,7 +26,19 @@ class IApplicationFramework
3126 const HRESULT nablaLoad = CSystemWin32::delayLoadDLL (_NABLA_DLL_NAME_,{_NABLA_OUTPUT_DIR_,_NABLA_INSTALL_DIR_});
3227 assert (SUCCEEDED (nablaLoad));
3328 #endif
29+ #else
30+ // nothing else needs to be done cause we have RPath
3431 #endif
32+ }
33+
34+ IApplicationFramework (
35+ const system::path& _localInputCWD,
36+ const system::path& _localOutputCWD,
37+ const system::path& _sharedInputCWD,
38+ const system::path& _sharedOutputCWD) :
39+ localInputCWD (_localInputCWD), localOutputCWD(_localOutputCWD), sharedInputCWD(_sharedInputCWD), sharedOutputCWD(_sharedOutputCWD)
40+ {
41+ GlobalsInit ();
3542 }
3643
3744 virtual void setSystem (core::smart_refctd_ptr<nbl::system::ISystem>&& system) = 0;
@@ -47,6 +54,8 @@ class IApplicationFramework
4754
4855 virtual void workLoopBody () = 0;
4956 virtual bool keepRunning () = 0;
57+
58+ // TODO: refactor/hide
5059 std::vector<std::string> argv;
5160
5261 protected:
0 commit comments