Skip to content

Commit ff7d0bd

Browse files
authored
Fixed release build workflow (#368)
* Fixed release build workflow * Added support for spaces in path * Now opening output folder in the explorer after a build
1 parent dc33e5b commit ff7d0bd

8 files changed

Lines changed: 54 additions & 18 deletions

File tree

OpenInVisualStudio.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@echo off
22

33
REM Call the GenerateProjects script
4-
call %~dp0\Scripts\GenerateProjects.bat
4+
call "%~dp0\Scripts\GenerateProjects.bat"
55

66
REM Check if the project generation was successful
77
if %errorlevel% neq 0 (
@@ -10,6 +10,6 @@ if %errorlevel% neq 0 (
1010
)
1111

1212
REM Call the OpenSolution script
13-
call %~dp0\Scripts\MSVC\OpenSolution.bat
13+
call "%~dp0\Scripts\MSVC\OpenSolution.bat"
1414

1515
exit /b 0

Scripts/GenerateProjects.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
SET version=%~1%
33
if "%~1"=="" SET version="vs2022"
44

5-
SET premake_path=%~dp0\..\Dependencies\premake5\bin\premake5.exe
5+
SET premake_path="%~dp0\..\Dependencies\premake5\bin\premake5.exe"
66

7-
pushd %~dp0\..\Sources\Overload
7+
pushd "%~dp0\..\Sources\Overload"
88
call %premake_path% %version%
99
popd

Scripts/MSVC/BuildAll.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ setlocal enabledelayedexpansion
55
set "CONFIGURATION=%~1"
66

77
:: Generate the projects
8-
pushd %~dp0\..\
8+
pushd "%~dp0\..\"
99
call GenerateProjects vs2022 %CONFIGURATION%
1010
popd
1111

@@ -59,7 +59,7 @@ echo msbuild.exe found at: "!MSBUILD_PATH!"
5959
echo.
6060

6161
:: Build the solution
62-
pushd %~dp0..\..\Sources\Overload\
62+
pushd "%~dp0..\..\Sources\Overload\"
6363
if "%CONFIGURATION%"=="" (
6464
echo Building with default configuration configuration...
6565
"!MSBUILD_PATH!" Overload.sln -m -verbosity:minimal

Scripts/MSVC/MakeReleaseBuild.bat

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,56 @@
1-
pushd %~dp0
1+
pushd "%~dp0"
2+
23
call .\BuildAll.bat Debug
4+
if %ERRORLEVEL% neq 0 (
5+
echo Debug build failed. Exiting.
6+
exit /b %ERRORLEVEL%
7+
)
8+
39
call .\BuildAll.bat Release
4-
popd
10+
if %ERRORLEVEL% neq 0 (
11+
echo Release build failed. Exiting.
12+
exit /b %ERRORLEVEL%
13+
)
514

615
:: 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.
716
for /f "delims=" %%v in (..\..\VERSION.txt) do set version=%%v
817
set platform=win32_x64
918

19+
1020
:: Navigate to the release folder
11-
pushd ..\..\Build\Release
21+
pushd ..\..\Build\
22+
23+
:: Delete any existing folder with the name Overload-%version%-%platform%
24+
if exist Overload-%version%-%platform% (
25+
rmdir /s /q Overload-%version%-%platform%
26+
)
27+
28+
:: Copy the folder "Release" to a new folder called "Overload-%version%-%platform%"
29+
xcopy Release\ ..\Releases\Overload-%version%-%platform% /E /I
1230

1331
:: Ensure the Releases folder exists
14-
mkdir ..\..\Releases
32+
if not exist ..\Releases (
33+
mkdir ..\Releases
34+
)
1535

16-
:: Create the archive
17-
powershell Compress-Archive -Path * -DestinationPath ..\..\Releases\Overload-%version%-%platform%.zip
36+
:: Create the archive, but first delete any existing archive with the same name
37+
if exist ..\Releases\Overload-%version%-%platform%.zip (
38+
del ..\Releases\Overload-%version%-%platform%.zip
39+
)
40+
powershell Compress-Archive -Path ..\Releases\Overload-%version%-%platform%\ -DestinationPath ..\Releases\Overload-%version%-%platform%.zip -Force
41+
echo Archive created: ..\Releases\Overload-%version%-%platform%.zip
42+
43+
:: Delete temporary build
44+
if exist ..\Releases\Overload-%version%-%platform% (
45+
rmdir /s /q ..\Releases\Overload-%version%-%platform%
46+
echo Temporary build deleted.
47+
)
48+
49+
:: Open the output folder in the file explorer
50+
explorer ..\Releases
1851

1952
:: Return to the original directory
20-
popd
53+
popd
54+
popd
55+
56+
exit /b 0

Scripts/MSVC/OpenSolution.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@echo off
22

3-
pushd %~dp0..\..\Sources\Overload\
3+
pushd "%~dp0..\..\Sources\Overload\"
44
start Overload.sln
55

66
exit /b 0

Scripts/RunEditor.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ set "CONFIGURATION=%~1"
77
:: Build the solution
88
if "%CONFIGURATION%"=="" (
99
echo Launching Overload Editor in Debug mode...
10-
start %~dp0\..\Build\Debug\OvEditor.exe
10+
start "%~dp0\..\Build\Debug\OvEditor.exe"
1111
) else (
1212
echo Launching Overload Editor in %CONFIGURATION% mode...
13-
start %~dp0\..\Build\%CONFIGURATION%\OvEditor.exe
13+
start "%~dp0\..\Build\%CONFIGURATION%\OvEditor.exe"
1414
)
1515

1616
if %errorlevel% neq 0 (

Sources/Overload/OvEditor/src/OvEditor/Core/Context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ OvEditor::Core::Context::Context(const std::string& p_projectPath, const std::st
4242
OvWindowing::Settings::DeviceSettings deviceSettings;
4343
deviceSettings.contextMajorVersion = 4;
4444
deviceSettings.contextMinorVersion = 3;
45-
windowSettings.title = "Overload Editor";
45+
windowSettings.title = "Overload";
4646
windowSettings.width = 1600;
4747
windowSettings.height = 900;
4848

Sources/Overload/OvWindowing/include/OvWindowing/Settings/WindowSettings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace OvWindowing::Settings
2727
/**
2828
* Title of the window (Displayed in the title bar)
2929
*/
30-
std::string title = "Overload";
30+
std::string title = "Window";
3131

3232
/**
3333
* Width in pixels of the window

0 commit comments

Comments
 (0)