Upgrade further
This commit is contained in:
parent
9780f3212e
commit
f98f24f6fd
57
premake5.lua
57
premake5.lua
@ -250,29 +250,44 @@ workspace "iw4x"
|
||||
objdir "%{wks.location}/obj"
|
||||
targetdir "%{wks.location}/bin/%{cfg.buildcfg}"
|
||||
buildlog "%{wks.location}/obj/%{cfg.architecture}/%{cfg.buildcfg}/%{prj.name}/%{prj.name}.log"
|
||||
|
||||
configurations { "Debug", "Release" }
|
||||
|
||||
language "C++"
|
||||
cppdialect "C++17"
|
||||
|
||||
architecture "x86"
|
||||
platforms "x86"
|
||||
platforms "Win32"
|
||||
|
||||
systemversion "latest"
|
||||
symbols "On"
|
||||
staticruntime "On"
|
||||
editandcontinue "Off"
|
||||
warnings "Extra"
|
||||
characterset "ASCII"
|
||||
|
||||
flags { "NoIncrementalLink", "NoMinimalRebuild", "MultiProcessorCompile", "No64BitChecks" }
|
||||
|
||||
filter "platforms:Win*"
|
||||
defines {"_WINDOWS", "WIN32"}
|
||||
filter {}
|
||||
|
||||
filter "configurations:Release"
|
||||
defines { "NDEBUG" }
|
||||
flags { "MultiProcessorCompile", "LinkTimeOptimization", "No64BitChecks" }
|
||||
optimize "On"
|
||||
buildoptions { "/GL" }
|
||||
linkoptions { "/IGNORE:4702", "/LTCG" }
|
||||
defines { "NDEBUG" }
|
||||
flags { "FatalCompileWarnings", "FatalLinkWarnings" }
|
||||
|
||||
if not _OPTIONS["force-unit-tests"] then
|
||||
rtti ("Off")
|
||||
end
|
||||
filter {}
|
||||
|
||||
filter "configurations:Debug"
|
||||
defines { "DEBUG", "_DEBUG" }
|
||||
flags { "MultiProcessorCompile", "No64BitChecks" }
|
||||
optimize "Debug"
|
||||
if symbols ~= nil then
|
||||
symbols "On"
|
||||
else
|
||||
flags { "Symbols" }
|
||||
end
|
||||
defines { "DEBUG", "_DEBUG" }
|
||||
filter {}
|
||||
|
||||
project "iw4x"
|
||||
kind "SharedLib"
|
||||
@ -385,23 +400,6 @@ workspace "iw4x"
|
||||
}
|
||||
end
|
||||
|
||||
-- Specific configurations
|
||||
flags { "UndefinedIdentifiers" }
|
||||
warnings "Extra"
|
||||
|
||||
if symbols ~= nil then
|
||||
symbols "On"
|
||||
else
|
||||
flags { "Symbols" }
|
||||
end
|
||||
|
||||
filter "configurations:Release"
|
||||
flags {
|
||||
"FatalCompileWarnings",
|
||||
"FatalLinkWarnings",
|
||||
}
|
||||
filter {}
|
||||
|
||||
--[[
|
||||
-- Generate source code from protobuf definitions
|
||||
rules { "ProtobufCompiler" }
|
||||
@ -445,11 +443,6 @@ workspace "iw4x"
|
||||
protobuf.project()
|
||||
zlib.project()
|
||||
udis86.project()
|
||||
|
||||
workspace "*"
|
||||
cppdialect "C++17"
|
||||
defines { "_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS" }
|
||||
defines { "_WINDOWS", "WIN32" }
|
||||
|
||||
rule "ProtobufCompiler"
|
||||
display "Protobuf compiler"
|
||||
|
@ -634,7 +634,7 @@ namespace Components
|
||||
LUID luid;
|
||||
TOKEN_PRIVILEGES tp = { 0 };
|
||||
DWORD cb = sizeof(TOKEN_PRIVILEGES);
|
||||
if (!LookupPrivilegeValueW(nullptr, SE_DEBUG_NAME, &luid)) return;
|
||||
if (!LookupPrivilegeValueA(nullptr, SE_DEBUG_NAME, &luid)) return;
|
||||
|
||||
tp.PrivilegeCount = 1;
|
||||
tp.Privileges[0].Luid = luid;
|
||||
|
@ -784,7 +784,7 @@ namespace Components
|
||||
{
|
||||
if (pack.index == dlc)
|
||||
{
|
||||
ShellExecute(0, 0, L"https://xlabs.dev/support_iw4x_client.html", 0, 0, SW_SHOW);
|
||||
ShellExecuteW(0, 0, L"https://xlabs.dev/support_iw4x_client.html", 0, 0, SW_SHOW);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -107,12 +107,12 @@ namespace Utils
|
||||
void SetEnvironment()
|
||||
{
|
||||
wchar_t exeName[512];
|
||||
GetModuleFileName(GetModuleHandle(nullptr), exeName, sizeof(exeName) / 2);
|
||||
GetModuleFileNameW(GetModuleHandle(nullptr), exeName, sizeof(exeName) / 2);
|
||||
|
||||
wchar_t* exeBaseName = wcsrchr(exeName, L'\\');
|
||||
exeBaseName[0] = L'\0';
|
||||
|
||||
SetCurrentDirectory(exeName);
|
||||
SetCurrentDirectoryW(exeName);
|
||||
}
|
||||
|
||||
HMODULE GetNTDLL()
|
||||
|
Loading…
Reference in New Issue
Block a user