Skip to content

Commit 51771fd

Browse files
committed
Simplified gen proj and premake5 passthrough
1 parent afe7a0f commit 51771fd

11 files changed

Lines changed: 47 additions & 50 deletions

File tree

.github/workflows/linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
- name: Generate premake5 solution
3434
working-directory: ${{env.SOLUTION_FILE_PATH}}
35-
run: ./gen_proj_linux.sh
35+
run: ./gen_proj.sh
3636

3737
- name: Build
3838
working-directory: ${{env.GITHUB_WORKSPACE}}

.github/workflows/windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
- name: Generate premake5 solution
3030
working-directory: ${{env.SOLUTION_FILE_PATH}}
31-
run: .\gen_proj_win32.bat
31+
run: .\gen_proj.bat
3232

3333
- name: Add MSBuild to PATH
3434
uses: microsoft/setup-msbuild@v2

README.md

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,32 +68,23 @@ In a rush? [Get the latest release](https://github.com/Overload-Technologies/Ove
6868
```powershell
6969
git clone https://github.com/Overload-Technologies/Overload
7070
cd Overload
71-
.\gen_proj_win32.bat # generate project files for Visual Studio 2022
72-
73-
# (Optional) open the solution in Visual Studio
74-
.\Overload.sln
71+
.\gen_proj.bat vs2026 # generate project files for Visual Studio 2026
72+
.\Overload.sln # Open the solution in Visual Studio
7573
```
7674

75+
> [!note]
76+
> Supported actions for `gen_proj.bat` are: `vs2026` (default), `vs2022`, `gmake`, `codelite`
77+
7778
### Linux (Clang)
7879
```bash
7980
git clone https://github.com/Overload-Technologies/Overload
8081
cd Overload
81-
./gen_proj_linux.sh # generate Makefiles
82-
83-
# (Optional) build the project
84-
make
82+
./gen_proj.sh gmake # generate project files for Makefile
83+
make -j$(nproc) # build the project using all available CPU cores
8584
```
8685

87-
### Other Platforms & IDEs
88-
`gen_proj` scripts can be invoked with an argument to specify the the action to perform.
89-
```bash
90-
# Generating Makefile on Windows
91-
.\gen_proj_win32.bat gmake
92-
93-
# Generating CodeLite project on Linux
94-
./gen_proj_linux.sh codelite
95-
```
96-
*Please refer to [Premake5's documentation](https://premake.github.io/docs/Using-Premake) to find supported IDEs.*
86+
> [!note]
87+
> Supported actions for `gen_proj.sh` are: `gmake` (default), `codelite`
9788
9889
# Architecture
9990
Overload is divided into 11 modules: 9 libraries (SDK), and 2 executables (Applications).

Scripts/Linux/GenerateProjects.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

Scripts/Linux/RunPremake5.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
WORKSPACE_ROOT="$(dirname "$0")/../.."
4+
5+
# If no argument is provided, default to gmake
6+
if [ $# -eq 0 ]; then
7+
echo "No action specified. Defaulting to 'gmake'."
8+
set -- gmake
9+
fi
10+
11+
pushd "$WORKSPACE_ROOT" > /dev/null
12+
"./Dependencies/premake5/bin/premake5" "$@"
13+
popd > /dev/null

Scripts/Windows/GenerateProjects.bat

Lines changed: 0 additions & 9 deletions
This file was deleted.

Scripts/Windows/RunPremake5.bat

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@echo off
2+
3+
SET WORKSPACE_ROOT=%~dp0\..\..
4+
5+
pushd "%WORKSPACE_ROOT%"
6+
7+
REM If no argument is provided, default to vs2026
8+
if "%~1"=="" (
9+
echo No action specified. Defaulting to 'vs2026'.
10+
call "Dependencies\premake5\bin\premake5.exe" vs2026
11+
) else (
12+
call "Dependencies\premake5\bin\premake5.exe" %*
13+
)
14+
15+
popd

gen_proj.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@echo off
2+
3+
call "%~dp0\Scripts\Windows\RunPremake5.bat" %*
4+
5+
exit /b %errorlevel%

gen_proj.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
"$(dirname "$0")/Scripts/Linux/RunPremake5.sh" "$@"

gen_proj_linux.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)