Skip to content

Commit 57c2db5

Browse files
committed
Merge branch 'feature/ci-tweaks'
2 parents 0220037 + 6d44a35 commit 57c2db5

25 files changed

+55
-60
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,3 +307,6 @@ _Pvt_Extensions
307307
Bin/
308308
Build/
309309
InstallFiles/
310+
utils/vswhere.exe
311+
utils/DXFiles.zip
312+
utils/DXFiles/

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ matrix:
2929
NIGHTLY_UPLOAD=0
3030

3131
before_script:
32-
- wget https://github.com/sbx320/premake5-travis/blob/master/premake5?raw=true -O ./premake5 &&
32+
- wget https://mirror.mtasa.com/bdata/premake5-travis -O ./premake5 &&
3333
chmod +x ./premake5 &&
3434
./premake5 gmake &&
3535
cd Build

Client/ceflauncher/premake5.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ project "CEFLauncher"
77
includedirs { "../sdk" }
88

99
links { "CEFLauncher DLL"}
10-
flags { "WinMain" }
10+
entrypoint "WinMainCRTStartup"
1111

1212
vpaths {
1313
["Headers/*"] = "**.h",

Client/launch/premake5.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ project "Client Launcher"
99
pchheader "StdInc.h"
1010
pchsource "StdInc.cpp"
1111

12-
flags { "WinMain" }
12+
entrypoint "WinMainCRTStartup"
1313

1414
vpaths {
1515
["Headers/*"] = "**.h",

Client/loader/premake5.lua

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,7 @@ project "Loader"
4141
files {
4242
"loader.rc",
4343
"resource/splash.bmp"
44-
}
45-
46-
filter {"system:windows", "toolset:*120*"}
47-
links { "Psapi.lib" }
44+
}
4845

4946
filter "architecture:x64"
5047
flags { "ExcludeFromBuild" }

Client/mods/deathmatch/premake5.lua

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ project "Client Deathmatch"
77
pchheader "StdInc.h"
88
pchsource "StdInc.cpp"
99

10+
defines { "LUA_USE_APICHECK", "SDK_WITH_BCRYPT" }
1011
links {
11-
"Lua_Client", "pcre", "json-c", "ws2_32", "portaudio", "zlib", "cryptopp", "libspeex",
12+
"Lua_Client", "pcre", "json-c", "ws2_32", "portaudio", "zlib", "cryptopp", "libspeex", "blowfish_bcrypt",
1213
"../../../vendor/bass/lib/bass",
1314
"../../../vendor/bass/lib/bass_fx",
1415
"../../../vendor/bass/lib/bassmix",
@@ -24,9 +25,6 @@ project "Client Deathmatch"
2425
filter "system:windows"
2526
includedirs { "../../../vendor/sparsehash/src/windows" }
2627
linkoptions { "/SAFESEH\:NO" }
27-
28-
filter {"system:windows", "toolset:*120*"}
29-
links { "Psapi.lib" }
3028

3129
filter {}
3230
includedirs {
@@ -60,10 +58,6 @@ project "Client Deathmatch"
6058
"../../../vendor/bochs/bochs_internal/crc32.cpp"
6159
}
6260

63-
defines {
64-
"LUA_USE_APICHECK"
65-
}
66-
6761
configuration "windows"
6862
buildoptions { "-Zm180" }
6963

Server/mods/deathmatch/premake5.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ project "Deathmatch"
3030
"."
3131
}
3232

33+
defines { "SDK_WITH_BCRYPT" }
3334
links {
34-
"Lua_Server", "pthread", "sqlite", "ehs", "cryptopp", "pme", "pcre", "json-c", "zip", "zlib"
35+
"Lua_Server", "pthread", "sqlite", "ehs", "cryptopp", "pme", "pcre", "json-c", "zip", "zlib", "blowfish_bcrypt",
3536
}
3637

3738
vpaths {
@@ -59,9 +60,6 @@ project "Deathmatch"
5960
includedirs { "../../../vendor/pthreads/include" }
6061
buildoptions { "-Zm130" }
6162
links { "ws2_32" }
62-
63-
filter {"system:windows", "toolset:*120*"}
64-
links { "Psapi.lib" }
6563

6664
filter "system:not windows"
6765
buildoptions { "-Wno-narrowing" } -- We should fix the warnings at some point

Shared/sdk/SharedUtil.Hash.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ namespace SharedUtil
8585
unsigned int HashString ( const char* szString );
8686
unsigned int HashString ( const char* szString, unsigned int length );
8787

88+
#ifdef SDK_WITH_BCRYPT
8889
SString BcryptHash (const SString& password, SString salt = "", std::size_t cost = 10);
8990
bool BcryptVerify (const SString& password, const SString& hash);
91+
#endif
9092

9193
SString ConvertDataToHexString ( const void* pData, uint uiLength );
9294
void ConvertHexStringToData ( const SString& strString, void* pOutData, uint uiLength );

Shared/sdk/SharedUtil.Hash.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ namespace SharedUtil
489489
return c;
490490
}
491491

492+
#ifdef SDK_WITH_BCRYPT
492493
constexpr const std::size_t HashBufferSize = 60 + 1;
493494
SString BcryptHash(const SString& password, SString salt, std::size_t cost)
494495
{
@@ -525,7 +526,7 @@ namespace SharedUtil
525526

526527
return strcmp(checkedHashBuffer, hash.c_str()) == 0;
527528
}
528-
529+
#endif
529530

530531
SString ConvertDataToHexString( const void* pData, uint uiLength )
531532
{

appveyor.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
version: ci-{build}
2-
os: Visual Studio 2015
2+
os: Visual Studio 2017
33

44
configuration:
55
- Release
66

77
before_build:
88
- choco install curl
9+
- curl -o utils/DXFiles.zip https://mirror.mtasa.com/bdata/DXFiles.zip
10+
- 7z e utils/DXFiles.zip -outils/DXFiles -spf
11+
- set DXSDK_DIR=%CD%\utils\DXFiles\
12+
- echo Using DXSDK_DIR %DXSDK_DIR%
913
- utils\premake5 install_cef
10-
- utils\premake5 vs2015
14+
- utils\premake5 vs2017
15+
- utils\premake5 install_data
1116

1217
after_build:
13-
- utils\premake5 install_data
1418
- utils\premake5 compose_files
1519
- 7z a InstallFiles.zip InstallFiles
1620
- cmd: if "%APPVEYOR_PULL_REQUEST_TITLE%" == "" if "%APPVEYOR_REPO_TAG%" == "false" curl -i -F "branch_name=%APPVEYOR_REPO_BRANCH%" -F "commit_hash=%APPVEYOR_REPO_COMMIT%" -F "commit_title=%APPVEYOR_REPO_COMMIT_MESSAGE%" -F build_type=windows32 -F "secret=%UPLOAD_SECRET%" -F build_upload=@InstallFiles.zip https://nightlytest.mtasa.com/api/upload

0 commit comments

Comments
 (0)