Skip to content

Commit 511df68

Browse files
authored
Merge branch 'premake:master' into master
2 parents 32cba9e + 7eb4153 commit 511df68

File tree

393 files changed

+536
-4601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

393 files changed

+536
-4601
lines changed

.github/workflows/ci-workflow.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515
- name: Build
16-
run: make -f Bootstrap.mak linux PLATFORM=${{ matrix.platform }} CONFIG=${{ matrix.config }}
16+
run: PLATFORM=${{ matrix.platform }} CONFIG=${{ matrix.config }} ./Bootstrap.sh
1717
- name: Test
1818
run: bin/${{ matrix.config }}/premake5 test --test-all
1919
- name: Docs check
@@ -34,7 +34,7 @@ jobs:
3434
- name: Checkout
3535
uses: actions/checkout@v4
3636
- name: Build
37-
run: make -f Bootstrap.mak macosx PLATFORM=${{ matrix.platform }} CONFIG=${{ matrix.config }}
37+
run: PLATFORM=${{ matrix.platform }} CONFIG=${{ matrix.config }} ./Bootstrap.sh
3838
- name: Test
3939
run: bin/${{ matrix.config }}/premake5 test --test-all
4040
- name: Docs check
@@ -51,13 +51,16 @@ jobs:
5151
matrix:
5252
config: [debug, release]
5353
platform: [Win32, x64]
54+
msdev: [vs2022]
5455
steps:
5556
- name: Checkout
5657
uses: actions/checkout@v4
5758
- name: Build
58-
run: |
59-
$vcvarsall_path = vswhere.exe -find VC\Auxiliary\Build\vcvarsall.bat
60-
cmd.exe /c "call ""$vcvarsall_path"" x86_amd64 && nmake -f Bootstrap.mak MSDEV=vs2019 windows-msbuild PLATFORM=${{ matrix.platform }} CONFIG=${{ matrix.config }}"
59+
shell: cmd
60+
env:
61+
PLATFORM: ${{ matrix.platform }}
62+
CONFIG: ${{ matrix.config }}
63+
run: ./Bootstrap.bat ${{ matrix.msdev }}
6164
- name: Test
6265
run: bin\${{ matrix.config }}\premake5 test --test-all
6366
shell: cmd
@@ -98,7 +101,7 @@ jobs:
98101
pacboy: >-
99102
toolchain:p
100103
- name: Build
101-
run: make -f Bootstrap.mak mingw PLATFORM=${{ matrix.platform }} CONFIG=${{ matrix.config }}
104+
run: PLATFORM=${{ matrix.platform }} CONFIG=${{ matrix.config }} ./Bootstrap.sh
102105
- name: Test
103106
run: bin/${{ matrix.config }}/premake5.exe test --test-all
104107
- name: Docs check
@@ -121,7 +124,7 @@ jobs:
121124
with:
122125
version: '3.9.2'
123126
- name: Build
124-
run: make -f Bootstrap.mak cosmo CONFIG=${{ matrix.config }}
127+
run: PLATFORM=${{ matrix.platform }} CONFIG=${{ matrix.config }} ./Bootstrap.sh -cosmo
125128
- name: Test
126129
run: bin/${{ matrix.config }}/premake5 test --test-all
127130
- name: Docs check

BUILD.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,17 @@ BUILDING FROM A SOURCE PACKAGE
2727
BUILDING FROM THE REPOSITORY
2828

2929
If you have pulled sources from the Premake source repository, you can
30-
use `Bootstrap.mak` to generate your first premake executable:
30+
use `Bootstrap.sh` or `Bootstrap.bat` to generate your first premake executable:
31+
32+
On Windows:
33+
34+
$ ./Bootstrap.bat
35+
36+
On other platforms:
37+
38+
$ ./Bootstrap.sh
39+
40+
Alternatively, you may call the Makefile directly:
3141

3242
$ make -f Bootstrap.mak PLATFORM
3343

Bootstrap.bat

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ SET VsWherePath="C:/Program Files (x86)/Microsoft Visual Studio/Installer/vswher
99

1010
REM ===========================================================================
1111

12+
SET "PlatformArg="
13+
SET "ConfigArg="
14+
15+
IF NOT "%PLATFORM%" == "" (
16+
SET "PlatformArg=PLATFORM=%PLATFORM%"
17+
)
18+
19+
IF NOT "%CONFIG%" == "" (
20+
SET "ConfigArg=CONFIG=%CONFIG%"
21+
)
22+
1223
SET vsversion=%1
1324
IF "%vsversion%" == "" (
1425
CALL :BootstrapLatest
@@ -67,7 +78,7 @@ IF NOT EXIST "%VsPath%vsdevcmd.bat" (
6778
EXIT /B 2
6879
)
6980

70-
CALL "%VsPath%vsdevcmd.bat" && nmake MSDEV="%~1" -f Bootstrap.mak windows
81+
CALL "%VsPath%vsdevcmd.bat" && nmake MSDEV="%~1" %PlatformArg% %ConfigArg% -f Bootstrap.mak windows
7182
EXIT /B %ERRORLEVEL%
7283

7384
REM :LegacyVisualBootstrap
@@ -94,18 +105,18 @@ SET VsWhereCmdLine="!VsWherePath! -nologo -latest -version [%VsVersionMin%,%VsVe
94105

95106
FOR /F "usebackq delims=" %%i in (`!VsWhereCmdLine!`) DO (
96107

97-
IF EXIST "%%i\VC\Auxiliary\Build\vcvars32.bat" (
98-
CALL "%%i\VC\Auxiliary\Build\vcvars32.bat" && nmake MSDEV="%PremakeVsVersion%" -f Bootstrap.mak windows
108+
IF EXIST "%%i\VC\Auxiliary\Build\vcvars64.bat" (
109+
CALL "%%i\VC\Auxiliary\Build\vcvars64.bat" && nmake MSDEV="%PremakeVsVersion%" %PlatformArg% %ConfigArg% -f Bootstrap.mak windows
99110
EXIT /B %ERRORLEVEL%
100111
) ELSE (
101-
IF EXIST "%%i\VC\Auxiliary\Build\vcvars64.bat" (
102-
CALL "%%i\VC\Auxiliary\Build\vcvars64.bat" && nmake MSDEV="%PremakeVsVersion%" -f Bootstrap.mak windows
112+
IF EXIST "%%i\VC\Auxiliary\Build\vcvars32.bat" (
113+
CALL "%%i\VC\Auxiliary\Build\vcvars32.bat" && nmake MSDEV="%PremakeVsVersion%" %PlatformArg% %ConfigArg% -f Bootstrap.mak windows
103114
EXIT /B %ERRORLEVEL%
104115
)
105116
)
106117
)
107118

108-
ECHO Could not find vcvars32.bat or vcvars64.bat to setup Visual Studio environment
119+
ECHO Could not find vcvars64.bat or vcvars32.bat to setup Visual Studio environment
109120
EXIT /B 2
110121

111122
REM :VsWhereVisualBootstrap

Bootstrap.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/sh
2+
3+
DIR=$( cd "$( dirname "$0" )" && pwd )
4+
cd "$DIR"
5+
6+
COSMO_FLAG=""
7+
for arg in "$@"; do
8+
if [ "$arg" = "-cosmo" ]; then
9+
COSMO_FLAG="cosmo"
10+
break
11+
fi
12+
done
13+
14+
PLATFORM_ARG=""
15+
CONFIG_ARG=""
16+
17+
if [ -n "$PLATFORM" ]; then
18+
PLATFORM_ARG="PLATFORM=$PLATFORM"
19+
fi
20+
21+
if [ -n "$CONFIG" ]; then
22+
CONFIG_ARG="CONFIG=$CONFIG"
23+
fi
24+
25+
case "$(uname -s)" in
26+
Linux)
27+
NPROC=$(nproc --all)
28+
make -f Bootstrap.mak ${COSMO_FLAG:-linux} $PLATFORM_ARG $CONFIG_ARG -j$NPROC
29+
;;
30+
Darwin)
31+
NPROC=$(sysctl -n hw.ncpu)
32+
make -f Bootstrap.mak ${COSMO_FLAG:-osx} $PLATFORM_ARG $CONFIG_ARG -j$NPROC
33+
;;
34+
FreeBSD|OpenBSD|NetBSD)
35+
NPROC=$(sysctl -n hw.ncpu)
36+
make -f Bootstrap.mak ${COSMO_FLAG:-bsd} $PLATFORM_ARG $CONFIG_ARG -j$NPROC
37+
;;
38+
CYGWIN*|MINGW32*|MSYS*|MINGW*)
39+
make -f Bootstrap.mak ${COSMO_FLAG:-mingw} $PLATFORM_ARG $CONFIG_ARG -j$NPROC
40+
;;
41+
*)
42+
echo "Unsupported platform"
43+
exit 1
44+
;;
45+
esac

CONTRIBUTORS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ improvements to earlier versions of Premake (feel free to add your name
1414
in here too)!
1515

1616
Original design and implementation:
17-
Jason Perkins <[email protected]>
17+
Jess Perkins <[email protected]>
1818

1919
Main Contributors
2020
Blizzard Entertainment (contact [email protected])

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2003-2022 Jason Perkins and individual contributors.
1+
Copyright (c) 2003-2022 Jess Perkins and individual contributors.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification,

binmodules/luasocket/premake5.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ project "luasocket"
3232
links { 'ws2_32' }
3333
characterset "MBCS"
3434

35-
defines { "LUASOCKET_API=__declspec(dllexport)" }
35+
defines { "LUASOCKET_API=__declspec(dllexport)", "_WINSOCK_DEPRECATED_NO_WARNINGS" }
3636

3737
filter "system:not windows"
3838
removefiles

binmodules/luasocket/src/mime.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ static size_t dot(int c, size_t state, luaL_Buffer *buffer)
689689
case '.':
690690
if (state == 2)
691691
luaL_addchar(buffer, '.');
692+
/* Falls through. */
692693
default:
693694
return 0;
694695
}

contrib/lua/src/lundump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static void fchecksize (LoadState *S, size_t size, const char *tname) {
234234
#define checksize(S,t) fchecksize(S,sizeof(t),#t)
235235

236236
static void checkHeader (LoadState *S) {
237-
checkliteral(S, LUA_SIGNATURE + 1, "not a"); /* 1st char already checked */
237+
checkliteral(S, &LUA_SIGNATURE[1], "not a"); /* 1st char already checked */
238238
if (LoadByte(S) != LUAC_VERSION)
239239
error(S, "version mismatch in");
240240
if (LoadByte(S) != LUAC_FORMAT)

modules/codelite/_preload.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
-- Andrew Gough
77
-- Manu Evans
88
-- Created: 2013/05/06
9-
-- Copyright: (c) 2008-2015 Jason Perkins and the Premake project
9+
-- Copyright: (c) 2008-2015 Jess Perkins and the Premake project
1010
--
1111

1212
local p = premake

0 commit comments

Comments
 (0)