-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ft-grmhd/master
I forgor about indev branch
- Loading branch information
Showing
8 changed files
with
103 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
!README.md | ||
!LICENSE | ||
!xmake.lua | ||
!compile_commands.json | ||
!/Kanel/ | ||
!/Xmake/ | ||
!/.github/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (C) 2024 kanel | ||
// This file is part of "kanel-CLI" | ||
// For conditions of distribution and use, see copyright notice in LICENSE | ||
|
||
#ifndef KANEL_CLI_CORE_APPLICATION | ||
#define KANEL_CLI_CORE_APPLICATION | ||
|
||
#include <Core/CoreDefs.h> | ||
|
||
typedef struct KbhCoreApplication | ||
{ | ||
|
||
} KbhCoreApplication; | ||
|
||
KbhCoreApplication* kbhCreateCoreApplication(int argc, char** argv); | ||
KANEL_CLI_NONNULL(1) void kbhLaunchCoreApplication(const KbhCoreApplication* application); | ||
KANEL_CLI_NONNULL(1) void kbhDestroyCoreApplication(const KbhCoreApplication* application); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright (C) 2024 kanel | ||
// This file is part of "kanel-CLI" | ||
// For conditions of distribution and use, see copyright notice in LICENSE | ||
|
||
#include <Core/Application.h> | ||
#include <Core/RuntimeOptions.h> | ||
#include <Core/ModuleLoader.h> | ||
#include <GPU/GPUSupport.h> | ||
|
||
#include <stdlib.h> | ||
|
||
KbhCoreApplication* kbhCreateCoreApplication(int argc, char** argv) | ||
{ | ||
KbhCoreApplication* application = (KbhCoreApplication*)malloc(sizeof(KbhCoreApplication)); | ||
if(!application) | ||
return KANEL_CLI_NULLPTR; | ||
if(!kbhRuntimeOptionsParseCmd(argc, argv)) | ||
{ | ||
kbhRuntimeOptionsClear(); | ||
return 0; | ||
} | ||
kbhCoreLoadAllModulesFromCmdLine(); | ||
return application; | ||
} | ||
|
||
void kbhLaunchCoreApplication(const KbhCoreApplication* application) | ||
{ | ||
// tests | ||
char dummy[1024]; | ||
if(kbhRuntimeOptionsGetString("gpu", dummy, 1024)) | ||
{ | ||
kbhInitGPUSupport(); | ||
kbhUninitGPUSupport(); | ||
} | ||
} | ||
|
||
void kbhDestroyCoreApplication(const KbhCoreApplication* application) | ||
{ | ||
kbhCoreUnloadAllModules(); | ||
kbhRuntimeOptionsClear(); | ||
free((void*)application); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters