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