Initial Commit
This commit is contained in:
parent
32c5bafa07
commit
5e77883bd2
11 changed files with 215 additions and 32 deletions
38
.gitignore
vendored
38
.gitignore
vendored
|
@ -1,32 +1,6 @@
|
|||
# Prerequisites
|
||||
*.d
|
||||
|
||||
# Compiled Object files
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Compiled Dynamic libraries
|
||||
*.so
|
||||
*.dylib
|
||||
*.dll
|
||||
|
||||
# Fortran module files
|
||||
*.mod
|
||||
*.smod
|
||||
|
||||
# Compiled Static libraries
|
||||
*.lai
|
||||
*.la
|
||||
*.a
|
||||
*.lib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
bin/
|
||||
bin-int/
|
||||
*.sln
|
||||
*.vcxproj
|
||||
*.vcxproj.filters
|
||||
!/vendor/**
|
5
FluxEngine/src/Flux.h
Normal file
5
FluxEngine/src/Flux.h
Normal file
|
@ -0,0 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include "Flux/Application.h"
|
||||
|
||||
#include "Flux/EntryPoint.h"
|
16
FluxEngine/src/Flux/Application.cpp
Normal file
16
FluxEngine/src/Flux/Application.cpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
#include "Application.h"
|
||||
|
||||
namespace Flux {
|
||||
|
||||
Application::Application()
|
||||
{
|
||||
}
|
||||
|
||||
Application::~Application()
|
||||
{
|
||||
}
|
||||
void Application::Run()
|
||||
{
|
||||
while (true);
|
||||
}
|
||||
}
|
18
FluxEngine/src/Flux/Application.h
Normal file
18
FluxEngine/src/Flux/Application.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
#pragma once
|
||||
|
||||
#include "Core.h"
|
||||
|
||||
namespace Flux {
|
||||
class FLUX_API Application
|
||||
{
|
||||
public:
|
||||
Application();
|
||||
virtual ~Application();
|
||||
|
||||
void Run();
|
||||
};
|
||||
|
||||
Application* CreateApplication();
|
||||
}
|
||||
|
||||
|
11
FluxEngine/src/Flux/Core.h
Normal file
11
FluxEngine/src/Flux/Core.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef FLUX_PLATFORM_WINDOWS
|
||||
#ifdef FLUX_BUILD_DLL
|
||||
#define FLUX_API __declspec(dllexport)
|
||||
#else
|
||||
#define FLUX_API __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#error Flux only supports windows!
|
||||
#endif
|
14
FluxEngine/src/Flux/EntryPoint.h
Normal file
14
FluxEngine/src/Flux/EntryPoint.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#pragma once
|
||||
#include "../Flux.h"
|
||||
|
||||
#ifdef FLUX_PLATFORM_WINDOWS
|
||||
|
||||
extern Flux::Application* Flux::CreateApplication();
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
auto app = Flux::CreateApplication();
|
||||
app->Run();
|
||||
delete app;
|
||||
}
|
||||
#endif
|
2
GenerateProjects.bat
Normal file
2
GenerateProjects.bat
Normal file
|
@ -0,0 +1,2 @@
|
|||
call .\vendor\bin\premake\premake5.exe vs2022
|
||||
PAUSE
|
19
Sandbox/src/SandboxApp.cpp
Normal file
19
Sandbox/src/SandboxApp.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include <Flux.h>
|
||||
|
||||
class Sandbox : public Flux::Application
|
||||
{
|
||||
public:
|
||||
Sandbox()
|
||||
{
|
||||
|
||||
}
|
||||
~Sandbox()
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
Flux::Application* Flux::CreateApplication()
|
||||
{
|
||||
return new Sandbox();
|
||||
}
|
97
premake5.lua
Normal file
97
premake5.lua
Normal file
|
@ -0,0 +1,97 @@
|
|||
workspace "FluxEngine"
|
||||
architecture "x64"
|
||||
startproject "Sandbox"
|
||||
|
||||
configurations { "Debug", "Release", "Dist" }
|
||||
|
||||
outputdir = "%{cfg.buildcfg}-%{cfg.system}"
|
||||
|
||||
project "FluxEngine"
|
||||
location "FluxEngine"
|
||||
kind "SharedLib"
|
||||
language "C++"
|
||||
|
||||
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
|
||||
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
|
||||
|
||||
files
|
||||
{
|
||||
"%{prj.name}/src/**.h",
|
||||
"%{prj.name}/src/**.cpp",
|
||||
}
|
||||
|
||||
includedirs
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
filter "system:windows"
|
||||
cppdialect "C++20"
|
||||
staticruntime "on"
|
||||
systemversion "latest"
|
||||
defines
|
||||
{
|
||||
"FLUX_PLATFORM_WINDOWS",
|
||||
"FLUX_BUILD_DLL"
|
||||
}
|
||||
|
||||
postbuildcommands
|
||||
{
|
||||
("{COPY} %{cfg.buildtarget.relpath} ../bin/".. outputdir .. "/Sandbox")
|
||||
}
|
||||
filter "configurations:Debug"
|
||||
defines "FLUX_DEBUG"
|
||||
symbols "On"
|
||||
|
||||
filter "configurations:Release"
|
||||
defines "FLUX_RELEASE"
|
||||
optimize "On"
|
||||
|
||||
filter "configurations:Dist"
|
||||
defines "FLUX_DIST"
|
||||
optimize "On"
|
||||
|
||||
project "Sandbox"
|
||||
location "Sandbox"
|
||||
kind "ConsoleApp"
|
||||
language "C++"
|
||||
|
||||
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
|
||||
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
|
||||
|
||||
files
|
||||
{
|
||||
"%{prj.name}/src/**.h",
|
||||
"%{prj.name}/src/**.cpp",
|
||||
}
|
||||
|
||||
includedirs
|
||||
{
|
||||
"Flux/src"
|
||||
}
|
||||
|
||||
links
|
||||
{
|
||||
"FluxEngine"
|
||||
}
|
||||
|
||||
filter "system:windows"
|
||||
cppdialect "C++20"
|
||||
staticruntime "on"
|
||||
systemversion "latest"
|
||||
defines
|
||||
{
|
||||
"FLUX_PLATFORM_WINDOWS"
|
||||
}
|
||||
|
||||
filter "configurations:Debug"
|
||||
defines "FLUX_DEBUG"
|
||||
symbols "On"
|
||||
|
||||
filter "configurations:Release"
|
||||
defines "FLUX_RELEASE"
|
||||
optimize "On"
|
||||
|
||||
filter "configurations:Dist"
|
||||
defines "FLUX_DIST"
|
||||
optimize "On"
|
27
vendor/bin/premake/LICENSE.txt
vendored
Normal file
27
vendor/bin/premake/LICENSE.txt
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
Copyright (c) 2003-2022 Jason Perkins and individual contributors.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of Premake nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
BIN
vendor/bin/premake/premake5.exe
vendored
Normal file
BIN
vendor/bin/premake/premake5.exe
vendored
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue