Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

strategy:
matrix:
configuration: [Debug, Release]
configuration: [Debug, Release, Publish]

steps:
- uses: actions/checkout@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

strategy:
matrix:
configuration: [Debug, Release]
configuration: [Debug, Release, Publish]

steps:
- uses: actions/checkout@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- uses: actions/checkout@v6

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v3

Expand Down
4 changes: 2 additions & 2 deletions Dependencies/ImGui/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ project "ImGui"
defines { "DEBUG", "_DEBUG" }
symbols "On"

filter { "configurations:Release" }
filter { "configurations:Release or configurations:Publish" }
defines { "NDEBUG" }
optimize "On"
optimize "On"
2 changes: 1 addition & 1 deletion Dependencies/assimp/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,6 @@ project 'assimp'
defines { "DEBUG", "_DEBUG" }
symbols "On"

filter { "configurations:Release" }
filter { "configurations:Release or configurations:Publish" }
defines { "NDEBUG" }
optimize "On"
2 changes: 1 addition & 1 deletion Dependencies/bullet3/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ project "bullet3"
defines { "DEBUG", "_DEBUG" }
symbols "On"

filter { "configurations:Release" }
filter { "configurations:Release or configurations:Publish" }
defines { "NDEBUG" }
optimize "On"
2 changes: 1 addition & 1 deletion Dependencies/glad/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ project "glad"
defines { "DEBUG", "_DEBUG" }
optimize "On"

filter { "configurations:Release" }
filter { "configurations:Release or configurations:Publish" }
defines { "NDEBUG" }
optimize "On"
2 changes: 1 addition & 1 deletion Dependencies/glfw/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ project "glfw"
defines { "DEBUG", "_DEBUG" }
symbols "On"

filter { "configurations:Release" }
filter { "configurations:Release or configurations:Publish" }
defines { "NDEBUG" }
optimize "On"
4 changes: 2 additions & 2 deletions Dependencies/lua/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ project "lua"
symbols "Off"
runtime "Debug" -- Ensures /MDd is used

filter { "configurations:Release" }
filter { "configurations:Release or configurations:Publish" }
defines { "NDEBUG" }
optimize "Speed"
optimize "Speed"
2 changes: 1 addition & 1 deletion Dependencies/soloud/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ project "soloud"
defines { "DEBUG", "_DEBUG" }
symbols "On"

filter { "configurations:Release" }
filter { "configurations:Release or configurations:Publish" }
defines { "NDEBUG" }
optimize "On"
2 changes: 1 addition & 1 deletion Dependencies/tinyxml2/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ project "tinyxml2"
defines { "DEBUG", "_DEBUG" }
symbols "On"

filter { "configurations:Release" }
filter { "configurations:Release or configurations:Publish" }
defines { "NDEBUG" }
optimize "On"
2 changes: 1 addition & 1 deletion Dependencies/tracy/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ project "tracy"
defines { "DEBUG", "_DEBUG" }
symbols "On"

filter { "configurations:Release" }
filter { "configurations:Release or configurations:Publish" }
defines { "NDEBUG" }
optimize "On"
25 changes: 20 additions & 5 deletions Scripts/Linux/Build.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
#!/bin/bash

# Get the configuration parameter (default to debug)
CONFIGURATION="${1:-debug}"
SKIP_PROJECT_GENERATION=false

# Parse arguments
for arg in "$@"; do
case $arg in
-skip-project-generation)
SKIP_PROJECT_GENERATION=true
;;
*)
CONFIGURATION="$arg"
;;
esac
done

CONFIGURATION="${CONFIGURATION:-debug}"

# Convert to lowercase for make
CONFIG_LOWER=$(echo "$CONFIGURATION" | tr '[:upper:]' '[:lower:]')

# Generate project files
pushd "$(dirname "$0")" > /dev/null
./GenerateProjects.sh
popd > /dev/null
if [ "$SKIP_PROJECT_GENERATION" != "true" ]; then
pushd "$(dirname "$0")" > /dev/null
./GenerateProjects.sh
popd > /dev/null
fi

# Build the solution
echo "Building Overload in $CONFIGURATION mode..."
Expand Down
18 changes: 14 additions & 4 deletions Scripts/Linux/MakeReleaseBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,30 @@ for arg in "$@"; do
fi
done

# Generate projects
"$SCRIPT_DIR/GenerateProjects.sh"

# Build Debug
"$SCRIPT_DIR/Build.sh" debug
"$SCRIPT_DIR/Build.sh" debug -skip-project-generation
if [ $? -ne 0 ]; then
echo "Debug build failed. Exiting."
exit $?
fi

# Build Release
"$SCRIPT_DIR/Build.sh" release
"$SCRIPT_DIR/Build.sh" release -skip-project-generation
if [ $? -ne 0 ]; then
echo "Release build failed. Exiting."
exit $?
fi

# Build Publish
"$SCRIPT_DIR/Build.sh" publish -skip-project-generation
if [ $? -ne 0 ]; then
echo "Publish build failed. Exiting."
exit $?
fi

# Read version from VERSION.txt
VERSION=$(cat "$SCRIPT_DIR/../../VERSION.txt")
PLATFORM="linux_x64"
Expand All @@ -39,8 +49,8 @@ fi
# Create Releases folder if it doesn't exist
mkdir -p ../Releases

# Copy the Release folder to a new folder
cp -r Release "../Releases/Overload-$VERSION-$PLATFORM"
# Copy the Publish folder to a new folder
cp -r Publish "../Releases/Overload-$VERSION-$PLATFORM"

# Create the archive, delete any existing one first
if [ -f "../Releases/Overload-$VERSION-$PLATFORM.tar.gz" ]; then
Expand Down
19 changes: 15 additions & 4 deletions Scripts/Windows/Build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@
setlocal enabledelayedexpansion

:: Get the configuration parameter
set "CONFIGURATION=%~1"
set "CONFIGURATION="
set "SKIP_PROJECT_GENERATION=false"

for %%a in (%*) do (
if "%%a"=="-skip-project-generation" (
set "SKIP_PROJECT_GENERATION=true"
) else (
set "CONFIGURATION=%%a"
)
)

:: Generate the projects
pushd "%~dp0"
call .\GenerateProjects.bat vs2022 %CONFIGURATION%
popd
if "!SKIP_PROJECT_GENERATION!"=="false" (
pushd "%~dp0"
call .\GenerateProjects.bat vs2022 %CONFIGURATION%
popd
)

:: Initialize variables
set "VSWHERE_PATH="
Expand Down
22 changes: 17 additions & 5 deletions Scripts/Windows/MakeReleaseBuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,31 @@ pushd "%~dp0"
set NO_OPEN=false
if "%1"=="--no-open" set NO_OPEN=true

call .\Build.bat Debug
:: Generate projects
call .\GenerateProjects.bat

:: Build Debug
call .\Build.bat Debug -skip-project-generation
if %ERRORLEVEL% neq 0 (
echo Debug build failed. Exiting.
exit /b %ERRORLEVEL%
)

call .\Build.bat Release
:: Build Release
call .\Build.bat Release -skip-project-generation
if %ERRORLEVEL% neq 0 (
echo Release build failed. Exiting.
exit /b %ERRORLEVEL%
)

:: The output is located in a folder called ..\..\Build\Release. Create an archive with this folder's content, and name the archive Overload-<version>-<platform>.zip.
:: Build Publish
call .\Build.bat Publish -skip-project-generation
if %ERRORLEVEL% neq 0 (
echo Publish build failed. Exiting.
exit /b %ERRORLEVEL%
)

:: The output is located in a folder called ..\..\Build\Publish. Create an archive with this folder's content, and name the archive Overload-<version>-<platform>.zip.
for /f "delims=" %%v in (..\..\VERSION.txt) do set version=%%v
set platform=windows_x64

Expand All @@ -27,8 +39,8 @@ if exist Overload-%version%-%platform% (
rmdir /s /q Overload-%version%-%platform%
)

:: Copy the folder "Release" to a new folder called "Overload-%version%-%platform%"
xcopy Release\ ..\Releases\Overload-%version%-%platform% /E /I
:: Copy the folder "Publish" to a new folder called "Overload-%version%-%platform%"
xcopy Publish\ ..\Releases\Overload-%version%-%platform% /E /I

:: Ensure the Releases folder exists
if not exist ..\Releases (
Expand Down
2 changes: 1 addition & 1 deletion Sources/OvAudio/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ project "OvAudio"
defines { "DEBUG", "_DEBUG" }
symbols "On"

filter { "configurations:Release" }
filter { "configurations:Release or configurations:Publish" }
defines { "NDEBUG" }
optimize "On"
2 changes: 1 addition & 1 deletion Sources/OvCore/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ project "OvCore"
defines { "DEBUG", "_DEBUG" }
symbols "On"

filter { "configurations:Release" }
filter { "configurations:Release or configurations:Publish" }
defines { "NDEBUG" }
optimize "On"
2 changes: 1 addition & 1 deletion Sources/OvDebug/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ project "OvDebug"
defines { "DEBUG", "_DEBUG" }
symbols "On"

filter { "configurations:Release" }
filter { "configurations:Release or configurations:Publish" }
defines { "NDEBUG" }
optimize "On"
21 changes: 19 additions & 2 deletions Sources/OvEditor/include/OvEditor/Core/EditorActions.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ namespace OvEditor::Core
{
enum class EGizmoOperation;

enum class EBuildType : int
{
Debug = 0,
Release = 1,
Publish = 2
};

/**
* Returns the name of a build type
* @param p_buildType
*/
std::string GetBuildTypeName(EBuildType p_buildType);

/**
* A set of editor actions
*/
Expand Down Expand Up @@ -398,11 +411,15 @@ namespace OvEditor::Core

/**
* Build the current project at the given location
* @param p_configuration
* @param p_buildType
* @param p_buildPath
* @param p_autoRun
*/
void BuildAtLocation(const std::string& p_configuration, const std::filesystem::path&, bool p_autoRun = false);
void BuildAtLocation(
EBuildType p_buildType,
const std::filesystem::path&,
bool p_autoRun = false
);
#pragma endregion

#pragma region PROFILNIG
Expand Down
24 changes: 14 additions & 10 deletions Sources/OvEditor/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ project "OvEditor"
symbols "On"
kind "ConsoleApp"

filter { "configurations:Release" }
filter { "configurations:Release or configurations:Publish" }
defines { "NDEBUG" }
optimize "Speed"
kind "WindowedApp"
Expand All @@ -95,17 +95,19 @@ project "OvEditor"

"xcopy \"%{resdir}Engine\\*\" \"%{builddir}%{cfg.buildcfg}\\Data\\Engine\" /y /i /r /e /q",
"xcopy \"%{resdir}Editor\\*\" \"%{builddir}%{cfg.buildcfg}\\Data\\Editor\" /y /i /r /e /q",
"xcopy \"%{prj.location}\\Layout.ini\" \"%{builddir}%{cfg.buildcfg}\\Config\\\" /y /i",
"xcopy \"%{prj.location}\\layout.ini\" \"%{builddir}%{cfg.buildcfg}\\Config\\\" /y /i",

"xcopy \"%{wks.location}\\Tools\\tracy-profiler.exe\" \"%{builddir}%{cfg.buildcfg}\\Tools\\\" /y /i",

"xcopy /Y /I /Q /D \"%{outputdir}%{cfg.buildcfg}\\%{prj.name}\\*.exe\" \"%{builddir}%{cfg.buildcfg}\\\"",
"xcopy /Y /I /Q /D \"%{outputdir}%{cfg.buildcfg}\\%{prj.name}\\*.dll\" \"%{builddir}%{cfg.buildcfg}\\\"",

"xcopy \"%{outputdir}Debug\\OvGame\\*.exe\" \"%{builddir}%{cfg.buildcfg}\\Builder\\Development\" /y /i /c",
"xcopy \"%{outputdir}Debug\\OvGame\\*.dll\" \"%{builddir}%{cfg.buildcfg}\\Builder\\Development\" /y /i /c",
"xcopy \"%{outputdir}Release\\OvGame\\*.exe\" \"%{builddir}%{cfg.buildcfg}\\Builder\\Shipping\" /y /i /c",
"xcopy \"%{outputdir}Release\\OvGame\\*.dll\" \"%{builddir}%{cfg.buildcfg}\\Builder\\Shipping\" /y /i /c",
"xcopy \"%{outputdir}Debug\\OvGame\\*.exe\" \"%{builddir}%{cfg.buildcfg}\\Builder\\Debug\" /y /i /c",
"xcopy \"%{outputdir}Debug\\OvGame\\*.dll\" \"%{builddir}%{cfg.buildcfg}\\Builder\\Debug\" /y /i /c",
"xcopy \"%{outputdir}Release\\OvGame\\*.exe\" \"%{builddir}%{cfg.buildcfg}\\Builder\\Release\" /y /i /c",
"xcopy \"%{outputdir}Release\\OvGame\\*.dll\" \"%{builddir}%{cfg.buildcfg}\\Builder\\Release\" /y /i /c",
"xcopy \"%{outputdir}Publish\\OvGame\\*.exe\" \"%{builddir}%{cfg.buildcfg}\\Builder\\Publish\" /y /i /c",
"xcopy \"%{outputdir}Publish\\OvGame\\*.dll\" \"%{builddir}%{cfg.buildcfg}\\Builder\\Publish\" /y /i /c",

"EXIT /B 0"
}
Expand Down Expand Up @@ -137,17 +139,19 @@ project "OvEditor"
"rm -rf %{builddir}%{cfg.buildcfg}/Data",
"mkdir -p %{builddir}%{cfg.buildcfg}/Data",
"mkdir -p %{builddir}%{cfg.buildcfg}/Config",
"mkdir -p %{builddir}%{cfg.buildcfg}/Builder/Development",
"mkdir -p %{builddir}%{cfg.buildcfg}/Builder/Shipping",
"mkdir -p %{builddir}%{cfg.buildcfg}/Builder/Debug",
"mkdir -p %{builddir}%{cfg.buildcfg}/Builder/Release",
"mkdir -p %{builddir}%{cfg.buildcfg}/Builder/Publish",

"cp -r %{resdir}Engine %{builddir}%{cfg.buildcfg}/Data/Engine",
"cp -r %{resdir}Editor %{builddir}%{cfg.buildcfg}/Data/Editor",
"cp %{prj.location}/layout.ini %{builddir}%{cfg.buildcfg}/Config/ 2>/dev/null || true",

"cp %{outputdir}%{cfg.buildcfg}/%{prj.name}/OvEditor %{builddir}%{cfg.buildcfg}/",

"cp %{outputdir}Debug/OvGame/OvGame %{builddir}%{cfg.buildcfg}/Builder/Development/ 2>/dev/null || true",
"cp %{outputdir}Release/OvGame/OvGame %{builddir}%{cfg.buildcfg}/Builder/Shipping/ 2>/dev/null || true",
"cp %{outputdir}Debug/OvGame/OvGame %{builddir}%{cfg.buildcfg}/Builder/Debug/OvGame 2>/dev/null || true",
"cp %{outputdir}Release/OvGame/OvGame %{builddir}%{cfg.buildcfg}/Builder/Release/OvGame 2>/dev/null || true",
"cp %{outputdir}Publish/OvGame/OvGame %{builddir}%{cfg.buildcfg}/Builder/Publish/OvGame 2>/dev/null || true",

"true"
}
4 changes: 2 additions & 2 deletions Sources/OvEditor/src/OvEditor/Core/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ void OvEditor::Core::Context::ResetProjectSettings()
projectSettings.Add<bool>("vsync", true);
projectSettings.Add<bool>("multisampling", false);
projectSettings.Add<int>("samples", 4);
projectSettings.Add<bool>("dev_build", true);
projectSettings.Add<int>("build_type", 0);
}

bool OvEditor::Core::Context::IsProjectSettingsIntegrityVerified()
Expand All @@ -217,7 +217,7 @@ bool OvEditor::Core::Context::IsProjectSettingsIntegrityVerified()
projectSettings.IsKeyExisting("vsync") &&
projectSettings.IsKeyExisting("multisampling") &&
projectSettings.IsKeyExisting("samples") &&
projectSettings.IsKeyExisting("dev_build");
projectSettings.IsKeyExisting("build_type");
}

void OvEditor::Core::Context::ApplyProjectSettings()
Expand Down
Loading