Skip to content

Commit 5c0cff6

Browse files
authored
Merge pull request #34 from danielga/update-azure-pipelines-config-and-premake
Update Azure Pipelines config and premake5 script
2 parents d0bc735 + 25e81ff commit 5c0cff6

4 files changed

Lines changed: 17 additions & 24 deletions

File tree

azure-pipelines.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ variables:
66
GARRYSMOD_COMMON_REPOSITORY: https://github.com/danielga/garrysmod_common.git
77
PROJECT_GENERATOR_VERSION: 2
88
REPOSITORY_DIR: $(System.DefaultWorkingDirectory)
9-
TARGET_ARCHITECTURE: x86
10-
TARGET_ARCHITECTURE_64: x86_64
119
DISABLE_X86_64_BUILD: true
12-
SOURCE_SDK: $(System.DefaultWorkingDirectory)/dependencies/sourcesdk-minimal
13-
SOURCE_SDK_BRANCH: master
14-
SOURCE_SDK_REPOSITORY: https://github.com/danielga/sourcesdk-minimal.git
1510
trigger:
1611
tags:
1712
include:
@@ -26,11 +21,8 @@ jobs:
2621
variables:
2722
BOOTSTRAP_URL: https://raw.githubusercontent.com/danielga/garrysmod_common/master/build/bootstrap.ps1
2823
BUILD_SCRIPT: $(System.DefaultWorkingDirectory)/dependencies/garrysmod_common/build/build.ps1
29-
TARGET_OS: win32
30-
TARGET_OS_64: win64
3124
COMPILER_PLATFORM: vs2019
3225
PROJECT_OS: windows
33-
PREMAKE5_EXECUTABLE: premake5.exe
3426
PREMAKE5: $(System.DefaultWorkingDirectory)/dependencies/windows/premake-core/premake5.exe
3527
PREMAKE5_URL: https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-windows.zip
3628
steps:
@@ -60,14 +52,15 @@ jobs:
6052
variables:
6153
BOOTSTRAP_URL: https://raw.githubusercontent.com/danielga/garrysmod_common/master/build/bootstrap.sh
6254
BUILD_SCRIPT: $(System.DefaultWorkingDirectory)/dependencies/garrysmod_common/build/build.sh
63-
TARGET_OS: linux
64-
TARGET_OS_64: linux64
6555
COMPILER_PLATFORM: gmake
6656
PREMAKE5: $(System.DefaultWorkingDirectory)/dependencies/linux/premake-core/premake5
6757
PROJECT_OS: linux
6858
PREMAKE5_URL: https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz
6959
CC: gcc-9
7060
CXX: g++-9
61+
AR: gcc-ar-9
62+
NM: gcc-nm-9
63+
RANLIB: gcc-ranlib-9
7164
steps:
7265
- bash: 'curl -s -L "$BOOTSTRAP_URL" | bash'
7366
displayName: Bootstrap
@@ -97,8 +90,6 @@ jobs:
9790
variables:
9891
BOOTSTRAP_URL: https://raw.githubusercontent.com/danielga/garrysmod_common/master/build/bootstrap.sh
9992
BUILD_SCRIPT: $(System.DefaultWorkingDirectory)/dependencies/garrysmod_common/build/build.sh
100-
TARGET_OS: osx
101-
TARGET_OS_64: osx64
10293
COMPILER_PLATFORM: gmake
10394
PREMAKE5: $(System.DefaultWorkingDirectory)/dependencies/macosx/premake-core/premake5
10495
PROJECT_OS: macosx

premake5.lua

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,10 @@ newoption({
66

77
local gmcommon = assert(_OPTIONS.gmcommon or os.getenv("GARRYSMOD_COMMON"),
88
"you didn't provide a path to your garrysmod_common (https://github.com/danielga/garrysmod_common) directory")
9-
include(path.join(gmcommon, "generator.v2.lua"))
9+
include(gmcommon .. "/generator.v2.lua")
1010

1111
CreateWorkspace({name = "luaerror", abi_compatible = true})
1212
CreateProject({serverside = true, manual_files = true})
13-
files({
14-
"source/main.cpp",
15-
"source/server.cpp",
16-
"source/server.hpp",
17-
"source/shared.cpp",
18-
"source/shared.hpp"
19-
})
2013
IncludeLuaShared()
2114
IncludeHelpersExtended()
2215
IncludeSDKCommon()
@@ -25,15 +18,24 @@ CreateWorkspace({name = "luaerror", abi_compatible = true})
2518
IncludeScanning()
2619
IncludeDetouring()
2720

28-
CreateProject({serverside = false, manual_files = true})
2921
files({
3022
"source/main.cpp",
23+
"source/server.cpp",
24+
"source/server.hpp",
3125
"source/shared.cpp",
3226
"source/shared.hpp"
3327
})
28+
29+
CreateProject({serverside = false, manual_files = true})
3430
IncludeLuaShared()
3531
IncludeHelpersExtended()
3632
IncludeSDKCommon()
3733
IncludeSDKTier0()
3834
IncludeSDKTier1()
3935
IncludeScanning()
36+
37+
files({
38+
"source/main.cpp",
39+
"source/shared.cpp",
40+
"source/shared.hpp"
41+
})

source/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ GMOD_MODULE_OPEN( )
1212
{
1313
LUA->CreateTable( );
1414

15-
LUA->PushString( "luaerror 1.5.3" );
15+
LUA->PushString( "luaerror 1.5.4" );
1616
LUA->SetField( -2, "Version" );
1717

1818
// version num follows LuaJIT style, xxyyzz
19-
LUA->PushNumber( 10503 );
19+
LUA->PushNumber( 10504 );
2020
LUA->SetField( -2, "VersionNum" );
2121

2222
#if defined LUAERROR_SERVER

source/server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ void Initialize( GarrysMod::Lua::ILuaBase *LUA )
143143
if( engine == nullptr )
144144
LUA->ThrowError( "failed to retrieve server engine interface" );
145145

146-
const auto HandleClientLuaError = FunctionPointers::HandleClientLuaError( );
146+
const auto HandleClientLuaError = FunctionPointers::CBasePlayer_HandleClientLuaError( );
147147
if( HandleClientLuaError == nullptr )
148148
LUA->ThrowError( "unable to sigscan function HandleClientLuaError" );
149149

0 commit comments

Comments
 (0)